codeceptjs 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/docs/advanced.md +1 -1
- package/docs/bdd.md +11 -7
- package/docs/build/ApiDataFactory.js +2 -1
- package/docs/build/Appium.js +26 -23
- package/docs/build/Expect.js +422 -0
- package/docs/build/Nightmare.js +53 -56
- package/docs/build/Playwright.js +202 -103
- package/docs/build/Protractor.js +66 -69
- package/docs/build/Puppeteer.js +124 -81
- package/docs/build/TestCafe.js +56 -55
- package/docs/build/WebDriver.js +81 -82
- package/docs/changelog.md +562 -1
- package/docs/commands.md +12 -0
- package/docs/community-helpers.md +8 -4
- package/docs/examples.md +8 -2
- package/docs/helpers/Appium.md +50 -32
- package/docs/helpers/Expect.md +275 -0
- package/docs/helpers/Nightmare.md +141 -94
- package/docs/helpers/Playwright.md +360 -261
- package/docs/helpers/Protractor.md +229 -169
- package/docs/helpers/Puppeteer.md +270 -187
- package/docs/helpers/TestCafe.md +201 -149
- package/docs/helpers/WebDriver.md +252 -178
- package/docs/mobile.md +17 -21
- package/docs/plugins.md +35 -1
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +1 -1
- package/docs/webapi/blur.mustache +1 -0
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -1
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/executeAsyncScript.mustache +0 -2
- package/docs/webapi/executeScript.mustache +0 -2
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/grabCookie.mustache +1 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +1 -1
- package/docs/webapi/saveScreenshot.mustache +1 -1
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/docs/webdriver.md +1 -1
- package/lib/cli.js +3 -1
- package/lib/command/dryRun.js +2 -1
- package/lib/helper/ApiDataFactory.js +2 -1
- package/lib/helper/Appium.js +8 -5
- package/lib/helper/Expect.js +422 -0
- package/lib/helper/Playwright.js +127 -32
- package/lib/helper/Puppeteer.js +47 -4
- package/lib/interfaces/gherkin.js +21 -2
- package/lib/output.js +1 -1
- package/lib/plugin/autoLogin.js +41 -3
- package/lib/utils.js +1 -1
- package/lib/workers.js +23 -2
- package/package.json +25 -16
- package/translations/de-DE.js +5 -0
- package/translations/fr-FR.js +1 -0
- package/translations/it-IT.js +1 -0
- package/translations/ja-JP.js +5 -0
- package/translations/pl-PL.js +5 -0
- package/translations/pt-BR.js +1 -0
- package/translations/ru-RU.js +1 -0
- package/translations/zh-CN.js +5 -0
- package/translations/zh-TW.js +5 -0
- package/typings/promiseBasedTypes.d.ts +928 -862
- package/typings/types.d.ts +932 -845
package/docs/build/Protractor.js
CHANGED
|
@@ -456,7 +456,8 @@ class Protractor extends Helper {
|
|
|
456
456
|
* ```
|
|
457
457
|
*
|
|
458
458
|
* @param {string} url url path or global url.
|
|
459
|
-
* @
|
|
459
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
460
|
+
*
|
|
460
461
|
*/
|
|
461
462
|
async amOnPage(url) {
|
|
462
463
|
if (!(/^\w+\:\/\//.test(url))) {
|
|
@@ -492,7 +493,7 @@ class Protractor extends Helper {
|
|
|
492
493
|
*
|
|
493
494
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
494
495
|
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
495
|
-
*
|
|
496
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
496
497
|
*
|
|
497
498
|
*/
|
|
498
499
|
async click(locator, context = null) {
|
|
@@ -519,7 +520,7 @@ class Protractor extends Helper {
|
|
|
519
520
|
*
|
|
520
521
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
521
522
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
522
|
-
*
|
|
523
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
523
524
|
*
|
|
524
525
|
*/
|
|
525
526
|
async doubleClick(locator, context = null) {
|
|
@@ -547,7 +548,7 @@ class Protractor extends Helper {
|
|
|
547
548
|
*
|
|
548
549
|
* @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
549
550
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
550
|
-
*
|
|
551
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
551
552
|
*
|
|
552
553
|
*/
|
|
553
554
|
async rightClick(locator, context = null) {
|
|
@@ -581,7 +582,7 @@ class Protractor extends Helper {
|
|
|
581
582
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
582
583
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
583
584
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
584
|
-
*
|
|
585
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
585
586
|
*
|
|
586
587
|
*/
|
|
587
588
|
async moveCursorTo(locator, offsetX = null, offsetY = null) {
|
|
@@ -605,7 +606,7 @@ class Protractor extends Helper {
|
|
|
605
606
|
* ```
|
|
606
607
|
* @param {string} text expected on page.
|
|
607
608
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
608
|
-
*
|
|
609
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
609
610
|
*
|
|
610
611
|
*/
|
|
611
612
|
async see(text, context = null) {
|
|
@@ -621,7 +622,7 @@ class Protractor extends Helper {
|
|
|
621
622
|
*
|
|
622
623
|
* @param {string} text element value to check.
|
|
623
624
|
* @param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
624
|
-
*
|
|
625
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
625
626
|
*
|
|
626
627
|
*/
|
|
627
628
|
async seeTextEquals(text, context = null) {
|
|
@@ -639,7 +640,7 @@ class Protractor extends Helper {
|
|
|
639
640
|
*
|
|
640
641
|
* @param {string} text which is not present.
|
|
641
642
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
642
|
-
*
|
|
643
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
643
644
|
*
|
|
644
645
|
*/
|
|
645
646
|
dontSee(text, context = null) {
|
|
@@ -698,7 +699,7 @@ class Protractor extends Helper {
|
|
|
698
699
|
* ```
|
|
699
700
|
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
700
701
|
* @param {string|Array<*>} option visible text or value of option.
|
|
701
|
-
*
|
|
702
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
702
703
|
*
|
|
703
704
|
*/
|
|
704
705
|
async selectOption(select, option) {
|
|
@@ -737,7 +738,7 @@ class Protractor extends Helper {
|
|
|
737
738
|
* ```
|
|
738
739
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
739
740
|
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
740
|
-
*
|
|
741
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
741
742
|
*
|
|
742
743
|
*/
|
|
743
744
|
async fillField(field, value) {
|
|
@@ -758,7 +759,7 @@ class Protractor extends Helper {
|
|
|
758
759
|
* ```
|
|
759
760
|
*
|
|
760
761
|
* @param {string|string[]} key key or array of keys to press.
|
|
761
|
-
*
|
|
762
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
762
763
|
*
|
|
763
764
|
* {{ keys }}
|
|
764
765
|
*/
|
|
@@ -793,7 +794,7 @@ class Protractor extends Helper {
|
|
|
793
794
|
*
|
|
794
795
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
795
796
|
* @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
796
|
-
*
|
|
797
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
797
798
|
*
|
|
798
799
|
*/
|
|
799
800
|
async attachFile(locator, pathToFile) {
|
|
@@ -822,7 +823,7 @@ class Protractor extends Helper {
|
|
|
822
823
|
* ```
|
|
823
824
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
824
825
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
825
|
-
*
|
|
826
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
826
827
|
*
|
|
827
828
|
*/
|
|
828
829
|
async seeInField(field, value) {
|
|
@@ -841,7 +842,7 @@ class Protractor extends Helper {
|
|
|
841
842
|
*
|
|
842
843
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
843
844
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
844
|
-
*
|
|
845
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
845
846
|
*
|
|
846
847
|
*/
|
|
847
848
|
async dontSeeInField(field, value) {
|
|
@@ -860,7 +861,7 @@ class Protractor extends Helper {
|
|
|
860
861
|
* ```
|
|
861
862
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
862
863
|
* @param {string} value text value to append.
|
|
863
|
-
*
|
|
864
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
864
865
|
*
|
|
865
866
|
*/
|
|
866
867
|
async appendField(field, value) {
|
|
@@ -878,7 +879,7 @@ class Protractor extends Helper {
|
|
|
878
879
|
* I.clearField('#email');
|
|
879
880
|
* ```
|
|
880
881
|
* @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
|
|
881
|
-
*
|
|
882
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder.
|
|
882
883
|
*
|
|
883
884
|
*/
|
|
884
885
|
async clearField(field) {
|
|
@@ -900,7 +901,7 @@ class Protractor extends Helper {
|
|
|
900
901
|
* ```
|
|
901
902
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
902
903
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
903
|
-
*
|
|
904
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
904
905
|
*
|
|
905
906
|
*/
|
|
906
907
|
async checkOption(field, context = null) {
|
|
@@ -929,7 +930,7 @@ class Protractor extends Helper {
|
|
|
929
930
|
* ```
|
|
930
931
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
931
932
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
932
|
-
*
|
|
933
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
933
934
|
*
|
|
934
935
|
*/
|
|
935
936
|
async uncheckOption(field, context = null) {
|
|
@@ -955,7 +956,7 @@ class Protractor extends Helper {
|
|
|
955
956
|
* ```
|
|
956
957
|
*
|
|
957
958
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
958
|
-
*
|
|
959
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
959
960
|
*
|
|
960
961
|
*/
|
|
961
962
|
async seeCheckboxIsChecked(field) {
|
|
@@ -972,7 +973,7 @@ class Protractor extends Helper {
|
|
|
972
973
|
* ```
|
|
973
974
|
*
|
|
974
975
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
975
|
-
*
|
|
976
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
976
977
|
*
|
|
977
978
|
*/
|
|
978
979
|
async dontSeeCheckboxIsChecked(field) {
|
|
@@ -1207,7 +1208,7 @@ class Protractor extends Helper {
|
|
|
1207
1208
|
* ```
|
|
1208
1209
|
*
|
|
1209
1210
|
* @param {string} text text value to check.
|
|
1210
|
-
*
|
|
1211
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1211
1212
|
*
|
|
1212
1213
|
*/
|
|
1213
1214
|
async seeInTitle(text) {
|
|
@@ -1222,7 +1223,7 @@ class Protractor extends Helper {
|
|
|
1222
1223
|
* ```
|
|
1223
1224
|
*
|
|
1224
1225
|
* @param {string} text value to check.
|
|
1225
|
-
*
|
|
1226
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1226
1227
|
*
|
|
1227
1228
|
*/
|
|
1228
1229
|
async seeTitleEquals(text) {
|
|
@@ -1238,7 +1239,7 @@ class Protractor extends Helper {
|
|
|
1238
1239
|
* ```
|
|
1239
1240
|
*
|
|
1240
1241
|
* @param {string} text value to check.
|
|
1241
|
-
*
|
|
1242
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1242
1243
|
*
|
|
1243
1244
|
*/
|
|
1244
1245
|
async dontSeeInTitle(text) {
|
|
@@ -1270,7 +1271,7 @@ class Protractor extends Helper {
|
|
|
1270
1271
|
* I.seeElement('#modal');
|
|
1271
1272
|
* ```
|
|
1272
1273
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1273
|
-
*
|
|
1274
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1274
1275
|
*
|
|
1275
1276
|
*/
|
|
1276
1277
|
async seeElement(locator) {
|
|
@@ -1287,7 +1288,7 @@ class Protractor extends Helper {
|
|
|
1287
1288
|
* ```
|
|
1288
1289
|
*
|
|
1289
1290
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1290
|
-
*
|
|
1291
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1291
1292
|
*
|
|
1292
1293
|
*/
|
|
1293
1294
|
async dontSeeElement(locator) {
|
|
@@ -1304,7 +1305,7 @@ class Protractor extends Helper {
|
|
|
1304
1305
|
* I.seeElementInDOM('#modal');
|
|
1305
1306
|
* ```
|
|
1306
1307
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1307
|
-
*
|
|
1308
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1308
1309
|
*
|
|
1309
1310
|
*/
|
|
1310
1311
|
async seeElementInDOM(locator) {
|
|
@@ -1319,7 +1320,7 @@ class Protractor extends Helper {
|
|
|
1319
1320
|
* ```
|
|
1320
1321
|
*
|
|
1321
1322
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1322
|
-
*
|
|
1323
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1323
1324
|
*
|
|
1324
1325
|
*/
|
|
1325
1326
|
async dontSeeElementInDOM(locator) {
|
|
@@ -1333,7 +1334,7 @@ class Protractor extends Helper {
|
|
|
1333
1334
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1334
1335
|
* ```
|
|
1335
1336
|
* @param {string} text value to check.
|
|
1336
|
-
*
|
|
1337
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1337
1338
|
*
|
|
1338
1339
|
*/
|
|
1339
1340
|
async seeInSource(text) {
|
|
@@ -1362,7 +1363,7 @@ class Protractor extends Helper {
|
|
|
1362
1363
|
* ```
|
|
1363
1364
|
*
|
|
1364
1365
|
* @param {string} value to check.
|
|
1365
|
-
*
|
|
1366
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1366
1367
|
*
|
|
1367
1368
|
*/
|
|
1368
1369
|
async dontSeeInSource(text) {
|
|
@@ -1380,7 +1381,7 @@ class Protractor extends Helper {
|
|
|
1380
1381
|
*
|
|
1381
1382
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1382
1383
|
* @param {number} num number of elements.
|
|
1383
|
-
*
|
|
1384
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1384
1385
|
*
|
|
1385
1386
|
*/
|
|
1386
1387
|
async seeNumberOfElements(locator, num) {
|
|
@@ -1398,7 +1399,7 @@ class Protractor extends Helper {
|
|
|
1398
1399
|
*
|
|
1399
1400
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1400
1401
|
* @param {number} num number of elements.
|
|
1401
|
-
*
|
|
1402
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1402
1403
|
*
|
|
1403
1404
|
*/
|
|
1404
1405
|
async seeNumberOfVisibleElements(locator, num) {
|
|
@@ -1432,7 +1433,7 @@ class Protractor extends Helper {
|
|
|
1432
1433
|
*
|
|
1433
1434
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1434
1435
|
* @param {object} cssProperties object with CSS properties and their values to check.
|
|
1435
|
-
*
|
|
1436
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1436
1437
|
*
|
|
1437
1438
|
*/
|
|
1438
1439
|
async seeCssPropertiesOnElements(locator, cssProperties) {
|
|
@@ -1472,7 +1473,7 @@ class Protractor extends Helper {
|
|
|
1472
1473
|
*
|
|
1473
1474
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1474
1475
|
* @param {object} attributes attributes and their values to check.
|
|
1475
|
-
*
|
|
1476
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1476
1477
|
*
|
|
1477
1478
|
*/
|
|
1478
1479
|
async seeAttributesOnElements(locator, attributes) {
|
|
@@ -1527,8 +1528,6 @@ class Protractor extends Helper {
|
|
|
1527
1528
|
* @param {...any} args to be passed to function.
|
|
1528
1529
|
* @returns {Promise<any>} script return value
|
|
1529
1530
|
*
|
|
1530
|
-
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1531
|
-
*
|
|
1532
1531
|
*/
|
|
1533
1532
|
async executeScript() {
|
|
1534
1533
|
return this.browser.executeScript.apply(this.browser, arguments);
|
|
@@ -1560,8 +1559,6 @@ class Protractor extends Helper {
|
|
|
1560
1559
|
* @param {...any} args to be passed to function.
|
|
1561
1560
|
* @returns {Promise<any>} script return value
|
|
1562
1561
|
*
|
|
1563
|
-
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1564
|
-
*
|
|
1565
1562
|
*/
|
|
1566
1563
|
async executeAsyncScript() {
|
|
1567
1564
|
this.browser.manage().timeouts().setScriptTimeout(this.options.scriptTimeout);
|
|
@@ -1576,7 +1573,7 @@ class Protractor extends Helper {
|
|
|
1576
1573
|
* ```
|
|
1577
1574
|
*
|
|
1578
1575
|
* @param {string} url a fragment to check
|
|
1579
|
-
*
|
|
1576
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1580
1577
|
*
|
|
1581
1578
|
*/
|
|
1582
1579
|
async seeInCurrentUrl(url) {
|
|
@@ -1587,7 +1584,7 @@ class Protractor extends Helper {
|
|
|
1587
1584
|
* Checks that current url does not contain a provided fragment.
|
|
1588
1585
|
*
|
|
1589
1586
|
* @param {string} url value to check.
|
|
1590
|
-
*
|
|
1587
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1591
1588
|
*
|
|
1592
1589
|
*/
|
|
1593
1590
|
async dontSeeInCurrentUrl(url) {
|
|
@@ -1605,7 +1602,7 @@ class Protractor extends Helper {
|
|
|
1605
1602
|
* ```
|
|
1606
1603
|
*
|
|
1607
1604
|
* @param {string} url value to check.
|
|
1608
|
-
*
|
|
1605
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1609
1606
|
*
|
|
1610
1607
|
*/
|
|
1611
1608
|
async seeCurrentUrlEquals(url) {
|
|
@@ -1622,7 +1619,7 @@ class Protractor extends Helper {
|
|
|
1622
1619
|
* ```
|
|
1623
1620
|
*
|
|
1624
1621
|
* @param {string} url value to check.
|
|
1625
|
-
*
|
|
1622
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1626
1623
|
*
|
|
1627
1624
|
*/
|
|
1628
1625
|
async dontSeeCurrentUrlEquals(url) {
|
|
@@ -1639,7 +1636,7 @@ class Protractor extends Helper {
|
|
|
1639
1636
|
*
|
|
1640
1637
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1641
1638
|
* @param {string} fileName file name to save.
|
|
1642
|
-
*
|
|
1639
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1643
1640
|
*
|
|
1644
1641
|
*
|
|
1645
1642
|
*/
|
|
@@ -1675,7 +1672,7 @@ class Protractor extends Helper {
|
|
|
1675
1672
|
*
|
|
1676
1673
|
* @param {string} fileName file name to save.
|
|
1677
1674
|
* @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
1678
|
-
*
|
|
1675
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1679
1676
|
*
|
|
1680
1677
|
*/
|
|
1681
1678
|
async saveScreenshot(fileName, fullPage = false) {
|
|
@@ -1718,7 +1715,7 @@ class Protractor extends Helper {
|
|
|
1718
1715
|
* ```
|
|
1719
1716
|
*
|
|
1720
1717
|
* @param {?string} [cookie=null] (optional, `null` by default) cookie name
|
|
1721
|
-
*
|
|
1718
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1722
1719
|
*
|
|
1723
1720
|
*/
|
|
1724
1721
|
async clearCookie(cookie = null) {
|
|
@@ -1736,7 +1733,7 @@ class Protractor extends Helper {
|
|
|
1736
1733
|
* ```
|
|
1737
1734
|
*
|
|
1738
1735
|
* @param {string} name cookie name.
|
|
1739
|
-
*
|
|
1736
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1740
1737
|
*
|
|
1741
1738
|
*/
|
|
1742
1739
|
async seeCookie(name) {
|
|
@@ -1751,7 +1748,7 @@ class Protractor extends Helper {
|
|
|
1751
1748
|
* ```
|
|
1752
1749
|
*
|
|
1753
1750
|
* @param {string} name cookie name.
|
|
1754
|
-
*
|
|
1751
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1755
1752
|
*
|
|
1756
1753
|
*/
|
|
1757
1754
|
async dontSeeCookie(name) {
|
|
@@ -1769,7 +1766,7 @@ class Protractor extends Helper {
|
|
|
1769
1766
|
* ```
|
|
1770
1767
|
*
|
|
1771
1768
|
* @param {?string} [name=null] cookie name.
|
|
1772
|
-
* @returns {
|
|
1769
|
+
* @returns {any} attribute value
|
|
1773
1770
|
*
|
|
1774
1771
|
*
|
|
1775
1772
|
* Returns cookie in JSON [format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
|
|
@@ -1803,7 +1800,7 @@ class Protractor extends Helper {
|
|
|
1803
1800
|
* I.seeInPopup('Popup text');
|
|
1804
1801
|
* ```
|
|
1805
1802
|
* @param {string} text value to check.
|
|
1806
|
-
*
|
|
1803
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1807
1804
|
*
|
|
1808
1805
|
*/
|
|
1809
1806
|
async seeInPopup(text) {
|
|
@@ -1844,7 +1841,7 @@ class Protractor extends Helper {
|
|
|
1844
1841
|
*
|
|
1845
1842
|
* @param {number} width width in pixels or `maximize`.
|
|
1846
1843
|
* @param {number} height height in pixels.
|
|
1847
|
-
*
|
|
1844
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1848
1845
|
*
|
|
1849
1846
|
*/
|
|
1850
1847
|
async resizeWindow(width, height) {
|
|
@@ -1864,7 +1861,7 @@ class Protractor extends Helper {
|
|
|
1864
1861
|
*
|
|
1865
1862
|
* @param {LocatorOrString} srcElement located by CSS|XPath|strict locator.
|
|
1866
1863
|
* @param {LocatorOrString} destElement located by CSS|XPath|strict locator.
|
|
1867
|
-
*
|
|
1864
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1868
1865
|
*
|
|
1869
1866
|
*/
|
|
1870
1867
|
async dragAndDrop(srcElement, destElement) {
|
|
@@ -2008,7 +2005,7 @@ class Protractor extends Helper {
|
|
|
2008
2005
|
* ```
|
|
2009
2006
|
*
|
|
2010
2007
|
* @param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
2011
|
-
*
|
|
2008
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2012
2009
|
*
|
|
2013
2010
|
*/
|
|
2014
2011
|
async switchTo(locator) {
|
|
@@ -2032,7 +2029,7 @@ class Protractor extends Helper {
|
|
|
2032
2029
|
* ```
|
|
2033
2030
|
*
|
|
2034
2031
|
* @param {number} sec number of second to wait.
|
|
2035
|
-
*
|
|
2032
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2036
2033
|
*
|
|
2037
2034
|
*/
|
|
2038
2035
|
wait(sec) {
|
|
@@ -2050,7 +2047,7 @@ class Protractor extends Helper {
|
|
|
2050
2047
|
*
|
|
2051
2048
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2052
2049
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
2053
|
-
*
|
|
2050
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2054
2051
|
*
|
|
2055
2052
|
*/
|
|
2056
2053
|
async waitForElement(locator, sec = null) {
|
|
@@ -2076,7 +2073,7 @@ class Protractor extends Helper {
|
|
|
2076
2073
|
*
|
|
2077
2074
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2078
2075
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2079
|
-
*
|
|
2076
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2080
2077
|
*
|
|
2081
2078
|
*/
|
|
2082
2079
|
async waitForDetached(locator, sec = null) {
|
|
@@ -2112,7 +2109,7 @@ class Protractor extends Helper {
|
|
|
2112
2109
|
*
|
|
2113
2110
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2114
2111
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2115
|
-
*
|
|
2112
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2116
2113
|
*
|
|
2117
2114
|
*/
|
|
2118
2115
|
async waitForVisible(locator, sec = null) {
|
|
@@ -2131,7 +2128,7 @@ class Protractor extends Helper {
|
|
|
2131
2128
|
*
|
|
2132
2129
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2133
2130
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2134
|
-
*
|
|
2131
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2135
2132
|
*
|
|
2136
2133
|
*/
|
|
2137
2134
|
async waitToHide(locator, sec = null) {
|
|
@@ -2148,7 +2145,7 @@ class Protractor extends Helper {
|
|
|
2148
2145
|
*
|
|
2149
2146
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2150
2147
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2151
|
-
*
|
|
2148
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2152
2149
|
*
|
|
2153
2150
|
*/
|
|
2154
2151
|
async waitForInvisible(locator, sec = null) {
|
|
@@ -2174,7 +2171,7 @@ class Protractor extends Helper {
|
|
|
2174
2171
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2175
2172
|
* @param {number} num number of elements.
|
|
2176
2173
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2177
|
-
*
|
|
2174
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2178
2175
|
*
|
|
2179
2176
|
*/
|
|
2180
2177
|
async waitNumberOfVisibleElements(locator, num, sec = null) {
|
|
@@ -2202,7 +2199,7 @@ class Protractor extends Helper {
|
|
|
2202
2199
|
*
|
|
2203
2200
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2204
2201
|
* @param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
|
|
2205
|
-
*
|
|
2202
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2206
2203
|
*
|
|
2207
2204
|
*/
|
|
2208
2205
|
async waitForEnabled(locator, sec = null) {
|
|
@@ -2225,7 +2222,7 @@ class Protractor extends Helper {
|
|
|
2225
2222
|
* @param {LocatorOrString} field input field.
|
|
2226
2223
|
* @param {string }value expected value.
|
|
2227
2224
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2228
|
-
*
|
|
2225
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2229
2226
|
*
|
|
2230
2227
|
*/
|
|
2231
2228
|
async waitForValue(field, value, sec = null) {
|
|
@@ -2266,7 +2263,7 @@ class Protractor extends Helper {
|
|
|
2266
2263
|
* @param {string|function} fn to be executed in browser context.
|
|
2267
2264
|
* @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
|
|
2268
2265
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
2269
|
-
*
|
|
2266
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2270
2267
|
*
|
|
2271
2268
|
*/
|
|
2272
2269
|
async waitForFunction(fn, argsOrSec = null, sec = null) {
|
|
@@ -2292,7 +2289,7 @@ class Protractor extends Helper {
|
|
|
2292
2289
|
*
|
|
2293
2290
|
* @param {string} urlPart value to check.
|
|
2294
2291
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2295
|
-
*
|
|
2292
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2296
2293
|
*
|
|
2297
2294
|
*/
|
|
2298
2295
|
async waitInUrl(urlPart, sec = null) {
|
|
@@ -2320,7 +2317,7 @@ class Protractor extends Helper {
|
|
|
2320
2317
|
*
|
|
2321
2318
|
* @param {string} urlPart value to check.
|
|
2322
2319
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2323
|
-
*
|
|
2320
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2324
2321
|
*
|
|
2325
2322
|
*/
|
|
2326
2323
|
async waitUrlEquals(urlPart, sec = null) {
|
|
@@ -2355,7 +2352,7 @@ class Protractor extends Helper {
|
|
|
2355
2352
|
* @param {string }text to wait for.
|
|
2356
2353
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
2357
2354
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
2358
|
-
*
|
|
2355
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2359
2356
|
*
|
|
2360
2357
|
*/
|
|
2361
2358
|
async waitForText(text, sec = null, context = null) {
|
|
@@ -2382,7 +2379,7 @@ class Protractor extends Helper {
|
|
|
2382
2379
|
* ```js
|
|
2383
2380
|
* I.refreshPage();
|
|
2384
2381
|
* ```
|
|
2385
|
-
*
|
|
2382
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2386
2383
|
*
|
|
2387
2384
|
*/
|
|
2388
2385
|
refreshPage() {
|
|
@@ -2409,7 +2406,7 @@ class Protractor extends Helper {
|
|
|
2409
2406
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2410
2407
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
2411
2408
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
2412
|
-
*
|
|
2409
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2413
2410
|
*
|
|
2414
2411
|
*/
|
|
2415
2412
|
async scrollTo(locator, offsetX = 0, offsetY = 0) {
|
|
@@ -2442,7 +2439,7 @@ class Protractor extends Helper {
|
|
|
2442
2439
|
* ```js
|
|
2443
2440
|
* I.scrollPageToTop();
|
|
2444
2441
|
* ```
|
|
2445
|
-
*
|
|
2442
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2446
2443
|
*
|
|
2447
2444
|
*/
|
|
2448
2445
|
async scrollPageToTop() {
|
|
@@ -2455,7 +2452,7 @@ class Protractor extends Helper {
|
|
|
2455
2452
|
* ```js
|
|
2456
2453
|
* I.scrollPageToBottom();
|
|
2457
2454
|
* ```
|
|
2458
|
-
*
|
|
2455
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2459
2456
|
*
|
|
2460
2457
|
*/
|
|
2461
2458
|
async scrollPageToBottom() {
|
|
@@ -2541,7 +2538,7 @@ class Protractor extends Helper {
|
|
|
2541
2538
|
* ```
|
|
2542
2539
|
*
|
|
2543
2540
|
* @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
|
|
2544
|
-
*
|
|
2541
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2545
2542
|
*
|
|
2546
2543
|
*/
|
|
2547
2544
|
setCookie(cookie) {
|