codeceptjs 3.5.6 → 3.5.7-beta.1
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/CHANGELOG.md +2950 -0
- package/docs/bdd.md +11 -7
- package/docs/build/ApiDataFactory.js +2 -1
- package/docs/build/Appium.js +25 -23
- package/docs/build/Expect.js +422 -0
- package/docs/build/Nightmare.js +53 -56
- package/docs/build/Playwright.js +166 -103
- package/docs/build/Protractor.js +66 -69
- package/docs/build/Puppeteer.js +79 -79
- package/docs/build/TestCafe.js +56 -55
- package/docs/build/WebDriver.js +81 -82
- package/docs/changelog.md +388 -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 +280 -211
- package/docs/helpers/Protractor.md +229 -169
- package/docs/helpers/Puppeteer.md +256 -185
- 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/lib/ai.js +12 -3
- 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 +7 -5
- package/lib/helper/Expect.js +422 -0
- package/lib/helper/Playwright.js +91 -32
- package/lib/helper/Puppeteer.js +2 -2
- package/lib/html.js +3 -3
- package/lib/interfaces/gherkin.js +21 -2
- package/lib/output.js +1 -1
- package/lib/pause.js +6 -3
- package/lib/plugin/autoLogin.js +35 -3
- package/lib/plugin/heal.js +40 -7
- package/lib/recorder.js +12 -5
- package/package.json +15 -8
- 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 +904 -862
- package/typings/types.d.ts +904 -845
package/docs/build/WebDriver.js
CHANGED
|
@@ -900,7 +900,8 @@ class WebDriver extends Helper {
|
|
|
900
900
|
* ```
|
|
901
901
|
*
|
|
902
902
|
* @param {string} url url path or global url.
|
|
903
|
-
* @
|
|
903
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
904
|
+
*
|
|
904
905
|
*
|
|
905
906
|
*/
|
|
906
907
|
amOnPage(url) {
|
|
@@ -940,7 +941,7 @@ class WebDriver extends Helper {
|
|
|
940
941
|
*
|
|
941
942
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
942
943
|
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
943
|
-
*
|
|
944
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
944
945
|
*
|
|
945
946
|
*
|
|
946
947
|
* {{ react }}
|
|
@@ -988,7 +989,7 @@ class WebDriver extends Helper {
|
|
|
988
989
|
*
|
|
989
990
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
990
991
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
991
|
-
*
|
|
992
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
992
993
|
*
|
|
993
994
|
*
|
|
994
995
|
* {{ react }}
|
|
@@ -1028,7 +1029,7 @@ class WebDriver extends Helper {
|
|
|
1028
1029
|
*
|
|
1029
1030
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1030
1031
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1031
|
-
*
|
|
1032
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1032
1033
|
*
|
|
1033
1034
|
*
|
|
1034
1035
|
* {{ react }}
|
|
@@ -1062,7 +1063,7 @@ class WebDriver extends Helper {
|
|
|
1062
1063
|
*
|
|
1063
1064
|
* @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
1064
1065
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1065
|
-
*
|
|
1066
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1066
1067
|
*
|
|
1067
1068
|
*
|
|
1068
1069
|
* {{ react }}
|
|
@@ -1106,7 +1107,7 @@ class WebDriver extends Helper {
|
|
|
1106
1107
|
*
|
|
1107
1108
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1108
1109
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1109
|
-
*
|
|
1110
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1110
1111
|
*
|
|
1111
1112
|
*
|
|
1112
1113
|
* {{ react }}
|
|
@@ -1148,7 +1149,7 @@ class WebDriver extends Helper {
|
|
|
1148
1149
|
* ```
|
|
1149
1150
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1150
1151
|
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
1151
|
-
*
|
|
1152
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1152
1153
|
*
|
|
1153
1154
|
* {{ react }}
|
|
1154
1155
|
* {{ custom }}
|
|
@@ -1173,7 +1174,7 @@ class WebDriver extends Helper {
|
|
|
1173
1174
|
* ```
|
|
1174
1175
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
1175
1176
|
* @param {string} value text value to append.
|
|
1176
|
-
*
|
|
1177
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1177
1178
|
*
|
|
1178
1179
|
* {{ react }}
|
|
1179
1180
|
*/
|
|
@@ -1194,7 +1195,7 @@ class WebDriver extends Helper {
|
|
|
1194
1195
|
* I.clearField('#email');
|
|
1195
1196
|
* ```
|
|
1196
1197
|
* @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
|
|
1197
|
-
*
|
|
1198
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder.
|
|
1198
1199
|
*
|
|
1199
1200
|
*
|
|
1200
1201
|
*/
|
|
@@ -1227,7 +1228,7 @@ class WebDriver extends Helper {
|
|
|
1227
1228
|
* ```
|
|
1228
1229
|
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
1229
1230
|
* @param {string|Array<*>} option visible text or value of option.
|
|
1230
|
-
*
|
|
1231
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1231
1232
|
*
|
|
1232
1233
|
*/
|
|
1233
1234
|
async selectOption(select, option) {
|
|
@@ -1272,7 +1273,7 @@ class WebDriver extends Helper {
|
|
|
1272
1273
|
*
|
|
1273
1274
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
1274
1275
|
* @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
1275
|
-
*
|
|
1276
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1276
1277
|
*
|
|
1277
1278
|
* Appium: not tested
|
|
1278
1279
|
*/
|
|
@@ -1313,7 +1314,7 @@ class WebDriver extends Helper {
|
|
|
1313
1314
|
* ```
|
|
1314
1315
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1315
1316
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1316
|
-
*
|
|
1317
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1317
1318
|
*
|
|
1318
1319
|
* Appium: not tested
|
|
1319
1320
|
*/
|
|
@@ -1346,7 +1347,7 @@ class WebDriver extends Helper {
|
|
|
1346
1347
|
* ```
|
|
1347
1348
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1348
1349
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1349
|
-
*
|
|
1350
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1350
1351
|
*
|
|
1351
1352
|
* Appium: not tested
|
|
1352
1353
|
*/
|
|
@@ -1591,7 +1592,7 @@ class WebDriver extends Helper {
|
|
|
1591
1592
|
* ```
|
|
1592
1593
|
*
|
|
1593
1594
|
* @param {string} text text value to check.
|
|
1594
|
-
*
|
|
1595
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1595
1596
|
*
|
|
1596
1597
|
*/
|
|
1597
1598
|
async seeInTitle(text) {
|
|
@@ -1607,7 +1608,7 @@ class WebDriver extends Helper {
|
|
|
1607
1608
|
* ```
|
|
1608
1609
|
*
|
|
1609
1610
|
* @param {string} text value to check.
|
|
1610
|
-
*
|
|
1611
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1611
1612
|
*
|
|
1612
1613
|
*/
|
|
1613
1614
|
async seeTitleEquals(text) {
|
|
@@ -1623,7 +1624,7 @@ class WebDriver extends Helper {
|
|
|
1623
1624
|
* ```
|
|
1624
1625
|
*
|
|
1625
1626
|
* @param {string} text value to check.
|
|
1626
|
-
*
|
|
1627
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1627
1628
|
*
|
|
1628
1629
|
*/
|
|
1629
1630
|
async dontSeeInTitle(text) {
|
|
@@ -1658,7 +1659,7 @@ class WebDriver extends Helper {
|
|
|
1658
1659
|
* ```
|
|
1659
1660
|
* @param {string} text expected on page.
|
|
1660
1661
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1661
|
-
*
|
|
1662
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1662
1663
|
*
|
|
1663
1664
|
*
|
|
1664
1665
|
* {{ react }}
|
|
@@ -1676,7 +1677,7 @@ class WebDriver extends Helper {
|
|
|
1676
1677
|
*
|
|
1677
1678
|
* @param {string} text element value to check.
|
|
1678
1679
|
* @param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
1679
|
-
*
|
|
1680
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1680
1681
|
*
|
|
1681
1682
|
*/
|
|
1682
1683
|
async seeTextEquals(text, context = null) {
|
|
@@ -1694,7 +1695,7 @@ class WebDriver extends Helper {
|
|
|
1694
1695
|
*
|
|
1695
1696
|
* @param {string} text which is not present.
|
|
1696
1697
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1697
|
-
*
|
|
1698
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1698
1699
|
*
|
|
1699
1700
|
*
|
|
1700
1701
|
* {{ react }}
|
|
@@ -1715,7 +1716,7 @@ class WebDriver extends Helper {
|
|
|
1715
1716
|
* ```
|
|
1716
1717
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1717
1718
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
1718
|
-
*
|
|
1719
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1719
1720
|
*
|
|
1720
1721
|
*
|
|
1721
1722
|
*/
|
|
@@ -1735,7 +1736,7 @@ class WebDriver extends Helper {
|
|
|
1735
1736
|
*
|
|
1736
1737
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1737
1738
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
1738
|
-
*
|
|
1739
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1739
1740
|
*
|
|
1740
1741
|
*
|
|
1741
1742
|
*/
|
|
@@ -1754,7 +1755,7 @@ class WebDriver extends Helper {
|
|
|
1754
1755
|
* ```
|
|
1755
1756
|
*
|
|
1756
1757
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1757
|
-
*
|
|
1758
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1758
1759
|
*
|
|
1759
1760
|
* Appium: not tested
|
|
1760
1761
|
*/
|
|
@@ -1772,7 +1773,7 @@ class WebDriver extends Helper {
|
|
|
1772
1773
|
* ```
|
|
1773
1774
|
*
|
|
1774
1775
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1775
|
-
*
|
|
1776
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1776
1777
|
*
|
|
1777
1778
|
* Appium: not tested
|
|
1778
1779
|
*/
|
|
@@ -1788,7 +1789,7 @@ class WebDriver extends Helper {
|
|
|
1788
1789
|
* I.seeElement('#modal');
|
|
1789
1790
|
* ```
|
|
1790
1791
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1791
|
-
*
|
|
1792
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1792
1793
|
*
|
|
1793
1794
|
* {{ react }}
|
|
1794
1795
|
*
|
|
@@ -1808,7 +1809,7 @@ class WebDriver extends Helper {
|
|
|
1808
1809
|
* ```
|
|
1809
1810
|
*
|
|
1810
1811
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1811
|
-
*
|
|
1812
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1812
1813
|
*
|
|
1813
1814
|
* {{ react }}
|
|
1814
1815
|
*/
|
|
@@ -1829,7 +1830,7 @@ class WebDriver extends Helper {
|
|
|
1829
1830
|
* I.seeElementInDOM('#modal');
|
|
1830
1831
|
* ```
|
|
1831
1832
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1832
|
-
*
|
|
1833
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1833
1834
|
*
|
|
1834
1835
|
*
|
|
1835
1836
|
*/
|
|
@@ -1846,7 +1847,7 @@ class WebDriver extends Helper {
|
|
|
1846
1847
|
* ```
|
|
1847
1848
|
*
|
|
1848
1849
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1849
|
-
*
|
|
1850
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1850
1851
|
*
|
|
1851
1852
|
*
|
|
1852
1853
|
*/
|
|
@@ -1862,7 +1863,7 @@ class WebDriver extends Helper {
|
|
|
1862
1863
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1863
1864
|
* ```
|
|
1864
1865
|
* @param {string} text value to check.
|
|
1865
|
-
*
|
|
1866
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1866
1867
|
*
|
|
1867
1868
|
*
|
|
1868
1869
|
*/
|
|
@@ -1931,7 +1932,7 @@ class WebDriver extends Helper {
|
|
|
1931
1932
|
* ```
|
|
1932
1933
|
*
|
|
1933
1934
|
* @param {string} value to check.
|
|
1934
|
-
*
|
|
1935
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1935
1936
|
*
|
|
1936
1937
|
*/
|
|
1937
1938
|
async dontSeeInSource(text) {
|
|
@@ -1950,7 +1951,7 @@ class WebDriver extends Helper {
|
|
|
1950
1951
|
*
|
|
1951
1952
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1952
1953
|
* @param {number} num number of elements.
|
|
1953
|
-
*
|
|
1954
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1954
1955
|
*
|
|
1955
1956
|
* {{ react }}
|
|
1956
1957
|
*/
|
|
@@ -1969,7 +1970,7 @@ class WebDriver extends Helper {
|
|
|
1969
1970
|
*
|
|
1970
1971
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1971
1972
|
* @param {number} num number of elements.
|
|
1972
|
-
*
|
|
1973
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1973
1974
|
*
|
|
1974
1975
|
* {{ react }}
|
|
1975
1976
|
*/
|
|
@@ -1987,7 +1988,7 @@ class WebDriver extends Helper {
|
|
|
1987
1988
|
*
|
|
1988
1989
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1989
1990
|
* @param {object} cssProperties object with CSS properties and their values to check.
|
|
1990
|
-
*
|
|
1991
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
1991
1992
|
*
|
|
1992
1993
|
*/
|
|
1993
1994
|
async seeCssPropertiesOnElements(locator, cssProperties) {
|
|
@@ -2031,7 +2032,7 @@ class WebDriver extends Helper {
|
|
|
2031
2032
|
*
|
|
2032
2033
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2033
2034
|
* @param {object} attributes attributes and their values to check.
|
|
2034
|
-
*
|
|
2035
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2035
2036
|
*
|
|
2036
2037
|
*/
|
|
2037
2038
|
async seeAttributesOnElements(locator, attributes) {
|
|
@@ -2086,7 +2087,7 @@ class WebDriver extends Helper {
|
|
|
2086
2087
|
* ```
|
|
2087
2088
|
*
|
|
2088
2089
|
* @param {string} url a fragment to check
|
|
2089
|
-
*
|
|
2090
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2090
2091
|
*
|
|
2091
2092
|
*
|
|
2092
2093
|
*/
|
|
@@ -2099,7 +2100,7 @@ class WebDriver extends Helper {
|
|
|
2099
2100
|
* Checks that current url does not contain a provided fragment.
|
|
2100
2101
|
*
|
|
2101
2102
|
* @param {string} url value to check.
|
|
2102
|
-
*
|
|
2103
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2103
2104
|
*
|
|
2104
2105
|
*
|
|
2105
2106
|
*/
|
|
@@ -2119,7 +2120,7 @@ class WebDriver extends Helper {
|
|
|
2119
2120
|
* ```
|
|
2120
2121
|
*
|
|
2121
2122
|
* @param {string} url value to check.
|
|
2122
|
-
*
|
|
2123
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2123
2124
|
*
|
|
2124
2125
|
*
|
|
2125
2126
|
*/
|
|
@@ -2138,7 +2139,7 @@ class WebDriver extends Helper {
|
|
|
2138
2139
|
* ```
|
|
2139
2140
|
*
|
|
2140
2141
|
* @param {string} url value to check.
|
|
2141
|
-
*
|
|
2142
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2142
2143
|
*
|
|
2143
2144
|
*
|
|
2144
2145
|
*/
|
|
@@ -2175,8 +2176,6 @@ class WebDriver extends Helper {
|
|
|
2175
2176
|
* @param {...any} args to be passed to function.
|
|
2176
2177
|
* @returns {Promise<any>} script return value
|
|
2177
2178
|
*
|
|
2178
|
-
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2179
|
-
*
|
|
2180
2179
|
*
|
|
2181
2180
|
*
|
|
2182
2181
|
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
@@ -2211,8 +2210,6 @@ class WebDriver extends Helper {
|
|
|
2211
2210
|
* @param {...any} args to be passed to function.
|
|
2212
2211
|
* @returns {Promise<any>} script return value
|
|
2213
2212
|
*
|
|
2214
|
-
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2215
|
-
*
|
|
2216
2213
|
*
|
|
2217
2214
|
*/
|
|
2218
2215
|
executeAsyncScript(...args) {
|
|
@@ -2230,7 +2227,7 @@ class WebDriver extends Helper {
|
|
|
2230
2227
|
*
|
|
2231
2228
|
* @param {LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2232
2229
|
* @param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
2233
|
-
*
|
|
2230
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2234
2231
|
*
|
|
2235
2232
|
*
|
|
2236
2233
|
*/
|
|
@@ -2253,7 +2250,7 @@ class WebDriver extends Helper {
|
|
|
2253
2250
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2254
2251
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
2255
2252
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
2256
|
-
*
|
|
2253
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2257
2254
|
*
|
|
2258
2255
|
*
|
|
2259
2256
|
*/
|
|
@@ -2296,7 +2293,7 @@ class WebDriver extends Helper {
|
|
|
2296
2293
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2297
2294
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
2298
2295
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
2299
|
-
*
|
|
2296
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2300
2297
|
*
|
|
2301
2298
|
*/
|
|
2302
2299
|
async moveCursorTo(locator, xOffset, yOffset) {
|
|
@@ -2316,7 +2313,7 @@ class WebDriver extends Helper {
|
|
|
2316
2313
|
*
|
|
2317
2314
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2318
2315
|
* @param {string} fileName file name to save.
|
|
2319
|
-
*
|
|
2316
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2320
2317
|
*
|
|
2321
2318
|
*
|
|
2322
2319
|
*/
|
|
@@ -2343,7 +2340,7 @@ class WebDriver extends Helper {
|
|
|
2343
2340
|
*
|
|
2344
2341
|
* @param {string} fileName file name to save.
|
|
2345
2342
|
* @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
2346
|
-
*
|
|
2343
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2347
2344
|
*
|
|
2348
2345
|
*/
|
|
2349
2346
|
async saveScreenshot(fileName, fullPage = false) {
|
|
@@ -2399,7 +2396,7 @@ class WebDriver extends Helper {
|
|
|
2399
2396
|
* ```
|
|
2400
2397
|
*
|
|
2401
2398
|
* @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
|
|
2402
|
-
*
|
|
2399
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2403
2400
|
*
|
|
2404
2401
|
*
|
|
2405
2402
|
*
|
|
@@ -2420,7 +2417,7 @@ class WebDriver extends Helper {
|
|
|
2420
2417
|
* ```
|
|
2421
2418
|
*
|
|
2422
2419
|
* @param {?string} [cookie=null] (optional, `null` by default) cookie name
|
|
2423
|
-
*
|
|
2420
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2424
2421
|
*
|
|
2425
2422
|
*/
|
|
2426
2423
|
async clearCookie(cookie) {
|
|
@@ -2435,7 +2432,7 @@ class WebDriver extends Helper {
|
|
|
2435
2432
|
* ```
|
|
2436
2433
|
*
|
|
2437
2434
|
* @param {string} name cookie name.
|
|
2438
|
-
*
|
|
2435
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2439
2436
|
*
|
|
2440
2437
|
*/
|
|
2441
2438
|
async seeCookie(name) {
|
|
@@ -2451,7 +2448,7 @@ class WebDriver extends Helper {
|
|
|
2451
2448
|
* ```
|
|
2452
2449
|
*
|
|
2453
2450
|
* @param {string} name cookie name.
|
|
2454
|
-
*
|
|
2451
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2455
2452
|
*
|
|
2456
2453
|
*/
|
|
2457
2454
|
async dontSeeCookie(name) {
|
|
@@ -2470,7 +2467,7 @@ class WebDriver extends Helper {
|
|
|
2470
2467
|
* ```
|
|
2471
2468
|
*
|
|
2472
2469
|
* @param {?string} [name=null] cookie name.
|
|
2473
|
-
* @returns {
|
|
2470
|
+
* @returns {any} attribute value
|
|
2474
2471
|
*
|
|
2475
2472
|
*/
|
|
2476
2473
|
async grabCookie(name) {
|
|
@@ -2548,7 +2545,7 @@ class WebDriver extends Helper {
|
|
|
2548
2545
|
* ```
|
|
2549
2546
|
*
|
|
2550
2547
|
* @param {string} key name of key to press down.
|
|
2551
|
-
*
|
|
2548
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2552
2549
|
*
|
|
2553
2550
|
*/
|
|
2554
2551
|
async pressKeyDown(key) {
|
|
@@ -2578,7 +2575,7 @@ class WebDriver extends Helper {
|
|
|
2578
2575
|
* ```
|
|
2579
2576
|
*
|
|
2580
2577
|
* @param {string} key name of key to release.
|
|
2581
|
-
*
|
|
2578
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2582
2579
|
*
|
|
2583
2580
|
*/
|
|
2584
2581
|
async pressKeyUp(key) {
|
|
@@ -2656,7 +2653,7 @@ class WebDriver extends Helper {
|
|
|
2656
2653
|
* - `'Tab'`
|
|
2657
2654
|
*
|
|
2658
2655
|
* @param {string|string[]} key key or array of keys to press.
|
|
2659
|
-
*
|
|
2656
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2660
2657
|
*
|
|
2661
2658
|
*
|
|
2662
2659
|
* _Note:_ In case a text field or textarea is focused be aware that some browsers do not respect active modifier when combining modifier keys with other keys.
|
|
@@ -2720,7 +2717,7 @@ class WebDriver extends Helper {
|
|
|
2720
2717
|
*
|
|
2721
2718
|
* @param {string|string[]} key or array of keys to type.
|
|
2722
2719
|
* @param {?number} [delay=null] (optional) delay in ms between key presses
|
|
2723
|
-
*
|
|
2720
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2724
2721
|
*
|
|
2725
2722
|
*/
|
|
2726
2723
|
async type(keys, delay = null) {
|
|
@@ -2744,7 +2741,7 @@ class WebDriver extends Helper {
|
|
|
2744
2741
|
*
|
|
2745
2742
|
* @param {number} width width in pixels or `maximize`.
|
|
2746
2743
|
* @param {number} height height in pixels.
|
|
2747
|
-
*
|
|
2744
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2748
2745
|
*
|
|
2749
2746
|
* Appium: not tested in web, in apps doesn't work
|
|
2750
2747
|
*/
|
|
@@ -2786,6 +2783,7 @@ class WebDriver extends Helper {
|
|
|
2786
2783
|
*
|
|
2787
2784
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
2788
2785
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
2786
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2789
2787
|
*
|
|
2790
2788
|
*
|
|
2791
2789
|
*/
|
|
@@ -2815,6 +2813,7 @@ class WebDriver extends Helper {
|
|
|
2815
2813
|
*
|
|
2816
2814
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
2817
2815
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
2816
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2818
2817
|
*
|
|
2819
2818
|
*
|
|
2820
2819
|
*/
|
|
@@ -2835,7 +2834,7 @@ class WebDriver extends Helper {
|
|
|
2835
2834
|
*
|
|
2836
2835
|
* @param {LocatorOrString} srcElement located by CSS|XPath|strict locator.
|
|
2837
2836
|
* @param {LocatorOrString} destElement located by CSS|XPath|strict locator.
|
|
2838
|
-
*
|
|
2837
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2839
2838
|
*
|
|
2840
2839
|
* Appium: not tested
|
|
2841
2840
|
*/
|
|
@@ -2862,7 +2861,7 @@ class WebDriver extends Helper {
|
|
|
2862
2861
|
*
|
|
2863
2862
|
* @param {CodeceptJS.LocatorOrString} locator located by label|name|CSS|XPath|strict locator.
|
|
2864
2863
|
* @param {number} offsetX position to drag.
|
|
2865
|
-
*
|
|
2864
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2866
2865
|
*
|
|
2867
2866
|
*/
|
|
2868
2867
|
async dragSlider(locator, offsetX = 0) {
|
|
@@ -2950,7 +2949,7 @@ class WebDriver extends Helper {
|
|
|
2950
2949
|
* I.closeOtherTabs();
|
|
2951
2950
|
* ```
|
|
2952
2951
|
*
|
|
2953
|
-
*
|
|
2952
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2954
2953
|
*
|
|
2955
2954
|
*/
|
|
2956
2955
|
async closeOtherTabs() {
|
|
@@ -2973,7 +2972,7 @@ class WebDriver extends Helper {
|
|
|
2973
2972
|
* ```
|
|
2974
2973
|
*
|
|
2975
2974
|
* @param {number} sec number of second to wait.
|
|
2976
|
-
*
|
|
2975
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2977
2976
|
*
|
|
2978
2977
|
*/
|
|
2979
2978
|
async wait(sec) {
|
|
@@ -2988,7 +2987,7 @@ class WebDriver extends Helper {
|
|
|
2988
2987
|
*
|
|
2989
2988
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2990
2989
|
* @param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
|
|
2991
|
-
*
|
|
2990
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2992
2991
|
*
|
|
2993
2992
|
*/
|
|
2994
2993
|
async waitForEnabled(locator, sec = null) {
|
|
@@ -3021,7 +3020,7 @@ class WebDriver extends Helper {
|
|
|
3021
3020
|
*
|
|
3022
3021
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3023
3022
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3024
|
-
*
|
|
3023
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3025
3024
|
*
|
|
3026
3025
|
*/
|
|
3027
3026
|
async waitForElement(locator, sec = null) {
|
|
@@ -3044,7 +3043,7 @@ class WebDriver extends Helper {
|
|
|
3044
3043
|
*
|
|
3045
3044
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3046
3045
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3047
|
-
*
|
|
3046
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3048
3047
|
*
|
|
3049
3048
|
*/
|
|
3050
3049
|
async waitForClickable(locator, waitTimeout) {
|
|
@@ -3068,7 +3067,7 @@ class WebDriver extends Helper {
|
|
|
3068
3067
|
*
|
|
3069
3068
|
* @param {string} urlPart value to check.
|
|
3070
3069
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3071
|
-
*
|
|
3070
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3072
3071
|
*
|
|
3073
3072
|
*/
|
|
3074
3073
|
async waitInUrl(urlPart, sec = null) {
|
|
@@ -3100,7 +3099,7 @@ class WebDriver extends Helper {
|
|
|
3100
3099
|
*
|
|
3101
3100
|
* @param {string} urlPart value to check.
|
|
3102
3101
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3103
|
-
*
|
|
3102
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3104
3103
|
*
|
|
3105
3104
|
*/
|
|
3106
3105
|
async waitUrlEquals(urlPart, sec = null) {
|
|
@@ -3136,7 +3135,7 @@ class WebDriver extends Helper {
|
|
|
3136
3135
|
* @param {string }text to wait for.
|
|
3137
3136
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3138
3137
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
3139
|
-
*
|
|
3138
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3140
3139
|
*
|
|
3141
3140
|
*
|
|
3142
3141
|
*/
|
|
@@ -3168,7 +3167,7 @@ class WebDriver extends Helper {
|
|
|
3168
3167
|
* @param {LocatorOrString} field input field.
|
|
3169
3168
|
* @param {string }value expected value.
|
|
3170
3169
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3171
|
-
*
|
|
3170
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3172
3171
|
*
|
|
3173
3172
|
*/
|
|
3174
3173
|
async waitForValue(field, value, sec = null) {
|
|
@@ -3199,7 +3198,7 @@ class WebDriver extends Helper {
|
|
|
3199
3198
|
*
|
|
3200
3199
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3201
3200
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3202
|
-
*
|
|
3201
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3203
3202
|
*
|
|
3204
3203
|
*
|
|
3205
3204
|
*/
|
|
@@ -3227,7 +3226,7 @@ class WebDriver extends Helper {
|
|
|
3227
3226
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3228
3227
|
* @param {number} num number of elements.
|
|
3229
3228
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3230
|
-
*
|
|
3229
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3231
3230
|
*
|
|
3232
3231
|
*/
|
|
3233
3232
|
async waitNumberOfVisibleElements(locator, num, sec = null) {
|
|
@@ -3254,7 +3253,7 @@ class WebDriver extends Helper {
|
|
|
3254
3253
|
*
|
|
3255
3254
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3256
3255
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3257
|
-
*
|
|
3256
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3258
3257
|
*
|
|
3259
3258
|
*/
|
|
3260
3259
|
async waitForInvisible(locator, sec = null) {
|
|
@@ -3278,7 +3277,7 @@ class WebDriver extends Helper {
|
|
|
3278
3277
|
*
|
|
3279
3278
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3280
3279
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3281
|
-
*
|
|
3280
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3282
3281
|
*
|
|
3283
3282
|
*/
|
|
3284
3283
|
async waitToHide(locator, sec = null) {
|
|
@@ -3295,7 +3294,7 @@ class WebDriver extends Helper {
|
|
|
3295
3294
|
*
|
|
3296
3295
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3297
3296
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3298
|
-
*
|
|
3297
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3299
3298
|
*
|
|
3300
3299
|
*/
|
|
3301
3300
|
async waitForDetached(locator, sec = null) {
|
|
@@ -3327,7 +3326,7 @@ class WebDriver extends Helper {
|
|
|
3327
3326
|
* @param {string|function} fn to be executed in browser context.
|
|
3328
3327
|
* @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
|
|
3329
3328
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3330
|
-
*
|
|
3329
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3331
3330
|
*
|
|
3332
3331
|
*/
|
|
3333
3332
|
async waitForFunction(fn, argsOrSec = null, sec = null) {
|
|
@@ -3354,7 +3353,7 @@ class WebDriver extends Helper {
|
|
|
3354
3353
|
* ```
|
|
3355
3354
|
*
|
|
3356
3355
|
* @param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
3357
|
-
*
|
|
3356
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3358
3357
|
*
|
|
3359
3358
|
*/
|
|
3360
3359
|
async switchTo(locator) {
|
|
@@ -3382,7 +3381,7 @@ class WebDriver extends Helper {
|
|
|
3382
3381
|
*
|
|
3383
3382
|
* @param {number} [num] (optional) number of tabs to switch forward, default: 1.
|
|
3384
3383
|
* @param {number | null} [sec] (optional) time in seconds to wait.
|
|
3385
|
-
*
|
|
3384
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3386
3385
|
*
|
|
3387
3386
|
*/
|
|
3388
3387
|
async switchToNextTab(num = 1, sec = null) {
|
|
@@ -3411,7 +3410,7 @@ class WebDriver extends Helper {
|
|
|
3411
3410
|
*
|
|
3412
3411
|
* @param {number} [num] (optional) number of tabs to switch backward, default: 1.
|
|
3413
3412
|
* @param {number?} [sec] (optional) time in seconds to wait.
|
|
3414
|
-
*
|
|
3413
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3415
3414
|
*
|
|
3416
3415
|
*/
|
|
3417
3416
|
async switchToPreviousTab(num = 1, sec = null) {
|
|
@@ -3437,7 +3436,7 @@ class WebDriver extends Helper {
|
|
|
3437
3436
|
* I.closeCurrentTab();
|
|
3438
3437
|
* ```
|
|
3439
3438
|
*
|
|
3440
|
-
*
|
|
3439
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3441
3440
|
*
|
|
3442
3441
|
*/
|
|
3443
3442
|
async closeCurrentTab() {
|
|
@@ -3453,7 +3452,7 @@ class WebDriver extends Helper {
|
|
|
3453
3452
|
* I.openNewTab();
|
|
3454
3453
|
* ```
|
|
3455
3454
|
*
|
|
3456
|
-
*
|
|
3455
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3457
3456
|
*
|
|
3458
3457
|
*/
|
|
3459
3458
|
async openNewTab(url = 'about:blank', windowName = null) {
|
|
@@ -3488,7 +3487,7 @@ class WebDriver extends Helper {
|
|
|
3488
3487
|
* ```js
|
|
3489
3488
|
* I.refreshPage();
|
|
3490
3489
|
* ```
|
|
3491
|
-
*
|
|
3490
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3492
3491
|
*
|
|
3493
3492
|
*/
|
|
3494
3493
|
async refreshPage() {
|
|
@@ -3502,7 +3501,7 @@ class WebDriver extends Helper {
|
|
|
3502
3501
|
* ```js
|
|
3503
3502
|
* I.scrollPageToTop();
|
|
3504
3503
|
* ```
|
|
3505
|
-
*
|
|
3504
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3506
3505
|
*
|
|
3507
3506
|
*/
|
|
3508
3507
|
scrollPageToTop() {
|
|
@@ -3520,7 +3519,7 @@ class WebDriver extends Helper {
|
|
|
3520
3519
|
* ```js
|
|
3521
3520
|
* I.scrollPageToBottom();
|
|
3522
3521
|
* ```
|
|
3523
|
-
*
|
|
3522
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3524
3523
|
*
|
|
3525
3524
|
*/
|
|
3526
3525
|
scrollPageToBottom() {
|
|
@@ -3575,7 +3574,7 @@ class WebDriver extends Helper {
|
|
|
3575
3574
|
* @param {number} latitude to set.
|
|
3576
3575
|
* @param {number} longitude to set
|
|
3577
3576
|
* @param {number=} altitude (optional, null by default) to set
|
|
3578
|
-
*
|
|
3577
|
+
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
3579
3578
|
*
|
|
3580
3579
|
*/
|
|
3581
3580
|
async setGeoLocation(latitude, longitude, altitude = null) {
|