codeceptjs 3.5.7 → 3.5.9-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/README.md +1 -1
- package/docs/build/Appium.js +27 -22
- package/docs/build/Nightmare.js +51 -52
- package/docs/build/Playwright.js +75 -75
- package/docs/build/Protractor.js +64 -65
- package/docs/build/Puppeteer.js +74 -75
- package/docs/build/TestCafe.js +54 -55
- package/docs/build/WebDriver.js +79 -80
- package/docs/changelog.md +1 -562
- package/docs/community-helpers.md +4 -8
- package/docs/examples.md +2 -8
- package/docs/helpers/Appium.md +85 -83
- package/docs/helpers/Nightmare.md +75 -77
- package/docs/helpers/Playwright.md +175 -177
- package/docs/helpers/Protractor.md +153 -155
- package/docs/helpers/Puppeteer.md +146 -148
- package/docs/helpers/TestCafe.md +124 -126
- package/docs/helpers/WebDriver.md +155 -157
- 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 -1
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -2
- 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/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.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/helper/Appium.js +9 -4
- package/lib/helper/Playwright.js +3 -2
- package/package.json +5 -5
- package/typings/promiseBasedTypes.d.ts +423 -1010
- package/typings/types.d.ts +423 -427
package/docs/build/Playwright.js
CHANGED
|
@@ -698,7 +698,7 @@ class Playwright extends Helper {
|
|
|
698
698
|
* I.seeInPopup('Popup text');
|
|
699
699
|
* ```
|
|
700
700
|
* @param {string} text value to check.
|
|
701
|
-
* @returns {
|
|
701
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
702
702
|
*
|
|
703
703
|
*/
|
|
704
704
|
async seeInPopup(text) {
|
|
@@ -904,7 +904,7 @@ class Playwright extends Helper {
|
|
|
904
904
|
* ```
|
|
905
905
|
*
|
|
906
906
|
* @param {string} url url path or global url.
|
|
907
|
-
* @returns {
|
|
907
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
908
908
|
*
|
|
909
909
|
*/
|
|
910
910
|
async amOnPage(url) {
|
|
@@ -943,7 +943,7 @@ class Playwright extends Helper {
|
|
|
943
943
|
*
|
|
944
944
|
* @param {number} width width in pixels or `maximize`.
|
|
945
945
|
* @param {number} height height in pixels.
|
|
946
|
-
* @returns {
|
|
946
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
947
947
|
*
|
|
948
948
|
*
|
|
949
949
|
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
@@ -997,7 +997,7 @@ class Playwright extends Helper {
|
|
|
997
997
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
998
998
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
999
999
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
1000
|
-
* @returns {
|
|
1000
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1001
1001
|
*
|
|
1002
1002
|
*
|
|
1003
1003
|
*/
|
|
@@ -1024,7 +1024,7 @@ class Playwright extends Helper {
|
|
|
1024
1024
|
*
|
|
1025
1025
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
1026
1026
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
1027
|
-
* @returns {
|
|
1027
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1028
1028
|
*
|
|
1029
1029
|
*
|
|
1030
1030
|
*/
|
|
@@ -1054,7 +1054,7 @@ class Playwright extends Helper {
|
|
|
1054
1054
|
*
|
|
1055
1055
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
1056
1056
|
* @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
1057
|
-
* @returns {
|
|
1057
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1058
1058
|
*
|
|
1059
1059
|
*
|
|
1060
1060
|
*/
|
|
@@ -1107,7 +1107,7 @@ class Playwright extends Helper {
|
|
|
1107
1107
|
*
|
|
1108
1108
|
* @param {LocatorOrString} srcElement located by CSS|XPath|strict locator.
|
|
1109
1109
|
* @param {LocatorOrString} destElement located by CSS|XPath|strict locator.
|
|
1110
|
-
* @returns {
|
|
1110
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1111
1111
|
*
|
|
1112
1112
|
* @param {any} [options] [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
1113
1113
|
*
|
|
@@ -1165,7 +1165,7 @@ class Playwright extends Helper {
|
|
|
1165
1165
|
* ```js
|
|
1166
1166
|
* I.refreshPage();
|
|
1167
1167
|
* ```
|
|
1168
|
-
* @returns {
|
|
1168
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1169
1169
|
*
|
|
1170
1170
|
*/
|
|
1171
1171
|
async refreshPage() {
|
|
@@ -1178,7 +1178,7 @@ class Playwright extends Helper {
|
|
|
1178
1178
|
* ```js
|
|
1179
1179
|
* I.scrollPageToTop();
|
|
1180
1180
|
* ```
|
|
1181
|
-
* @returns {
|
|
1181
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1182
1182
|
*
|
|
1183
1183
|
*/
|
|
1184
1184
|
scrollPageToTop() {
|
|
@@ -1193,7 +1193,7 @@ class Playwright extends Helper {
|
|
|
1193
1193
|
* ```js
|
|
1194
1194
|
* I.scrollPageToBottom();
|
|
1195
1195
|
* ```
|
|
1196
|
-
* @returns {
|
|
1196
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1197
1197
|
*
|
|
1198
1198
|
*/
|
|
1199
1199
|
async scrollPageToBottom() {
|
|
@@ -1222,7 +1222,7 @@ class Playwright extends Helper {
|
|
|
1222
1222
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1223
1223
|
* @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
1224
1224
|
* @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
1225
|
-
* @returns {
|
|
1225
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1226
1226
|
*
|
|
1227
1227
|
*/
|
|
1228
1228
|
async scrollTo(locator, offsetX = 0, offsetY = 0) {
|
|
@@ -1252,7 +1252,7 @@ class Playwright extends Helper {
|
|
|
1252
1252
|
* ```
|
|
1253
1253
|
*
|
|
1254
1254
|
* @param {string} text text value to check.
|
|
1255
|
-
* @returns {
|
|
1255
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1256
1256
|
*
|
|
1257
1257
|
*/
|
|
1258
1258
|
async seeInTitle(text) {
|
|
@@ -1291,7 +1291,7 @@ class Playwright extends Helper {
|
|
|
1291
1291
|
* ```
|
|
1292
1292
|
*
|
|
1293
1293
|
* @param {string} text value to check.
|
|
1294
|
-
* @returns {
|
|
1294
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1295
1295
|
*
|
|
1296
1296
|
*/
|
|
1297
1297
|
async seeTitleEquals(text) {
|
|
@@ -1307,7 +1307,7 @@ class Playwright extends Helper {
|
|
|
1307
1307
|
* ```
|
|
1308
1308
|
*
|
|
1309
1309
|
* @param {string} text value to check.
|
|
1310
|
-
* @returns {
|
|
1310
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1311
1311
|
*
|
|
1312
1312
|
*/
|
|
1313
1313
|
async dontSeeInTitle(text) {
|
|
@@ -1532,7 +1532,7 @@ class Playwright extends Helper {
|
|
|
1532
1532
|
* I.seeElement('#modal');
|
|
1533
1533
|
* ```
|
|
1534
1534
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1535
|
-
* @returns {
|
|
1535
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1536
1536
|
*
|
|
1537
1537
|
*
|
|
1538
1538
|
*/
|
|
@@ -1550,7 +1550,7 @@ class Playwright extends Helper {
|
|
|
1550
1550
|
* ```
|
|
1551
1551
|
*
|
|
1552
1552
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1553
|
-
* @returns {
|
|
1553
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1554
1554
|
*
|
|
1555
1555
|
*
|
|
1556
1556
|
*/
|
|
@@ -1568,7 +1568,7 @@ class Playwright extends Helper {
|
|
|
1568
1568
|
* I.seeElementInDOM('#modal');
|
|
1569
1569
|
* ```
|
|
1570
1570
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1571
|
-
* @returns {
|
|
1571
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1572
1572
|
*
|
|
1573
1573
|
*/
|
|
1574
1574
|
async seeElementInDOM(locator) {
|
|
@@ -1584,7 +1584,7 @@ class Playwright extends Helper {
|
|
|
1584
1584
|
* ```
|
|
1585
1585
|
*
|
|
1586
1586
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1587
|
-
* @returns {
|
|
1587
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1588
1588
|
*
|
|
1589
1589
|
*/
|
|
1590
1590
|
async dontSeeElementInDOM(locator) {
|
|
@@ -1650,7 +1650,7 @@ class Playwright extends Helper {
|
|
|
1650
1650
|
*
|
|
1651
1651
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1652
1652
|
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1653
|
-
* @returns {
|
|
1653
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1654
1654
|
*
|
|
1655
1655
|
*
|
|
1656
1656
|
* @param {any} [options] [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
@@ -1707,7 +1707,7 @@ class Playwright extends Helper {
|
|
|
1707
1707
|
*
|
|
1708
1708
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1709
1709
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1710
|
-
* @returns {
|
|
1710
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1711
1711
|
*
|
|
1712
1712
|
*/
|
|
1713
1713
|
async forceClick(locator, context = null) {
|
|
@@ -1727,7 +1727,7 @@ class Playwright extends Helper {
|
|
|
1727
1727
|
*
|
|
1728
1728
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1729
1729
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1730
|
-
* @returns {
|
|
1730
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1731
1731
|
*
|
|
1732
1732
|
*
|
|
1733
1733
|
*
|
|
@@ -1750,7 +1750,7 @@ class Playwright extends Helper {
|
|
|
1750
1750
|
*
|
|
1751
1751
|
* @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
1752
1752
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1753
|
-
* @returns {
|
|
1753
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1754
1754
|
*
|
|
1755
1755
|
*
|
|
1756
1756
|
*
|
|
@@ -1772,7 +1772,7 @@ class Playwright extends Helper {
|
|
|
1772
1772
|
* ```
|
|
1773
1773
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1774
1774
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1775
|
-
* @returns {
|
|
1775
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1776
1776
|
*
|
|
1777
1777
|
*
|
|
1778
1778
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
@@ -1804,7 +1804,7 @@ class Playwright extends Helper {
|
|
|
1804
1804
|
* ```
|
|
1805
1805
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1806
1806
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1807
|
-
* @returns {
|
|
1807
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1808
1808
|
*
|
|
1809
1809
|
*
|
|
1810
1810
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
@@ -1833,7 +1833,7 @@ class Playwright extends Helper {
|
|
|
1833
1833
|
* ```
|
|
1834
1834
|
*
|
|
1835
1835
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1836
|
-
* @returns {
|
|
1836
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1837
1837
|
*
|
|
1838
1838
|
*/
|
|
1839
1839
|
async seeCheckboxIsChecked(field) {
|
|
@@ -1850,7 +1850,7 @@ class Playwright extends Helper {
|
|
|
1850
1850
|
* ```
|
|
1851
1851
|
*
|
|
1852
1852
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1853
|
-
* @returns {
|
|
1853
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1854
1854
|
*
|
|
1855
1855
|
*/
|
|
1856
1856
|
async dontSeeCheckboxIsChecked(field) {
|
|
@@ -1869,7 +1869,7 @@ class Playwright extends Helper {
|
|
|
1869
1869
|
* ```
|
|
1870
1870
|
*
|
|
1871
1871
|
* @param {string} key name of key to press down.
|
|
1872
|
-
* @returns {
|
|
1872
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1873
1873
|
*
|
|
1874
1874
|
*/
|
|
1875
1875
|
async pressKeyDown(key) {
|
|
@@ -1890,7 +1890,7 @@ class Playwright extends Helper {
|
|
|
1890
1890
|
* ```
|
|
1891
1891
|
*
|
|
1892
1892
|
* @param {string} key name of key to release.
|
|
1893
|
-
* @returns {
|
|
1893
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1894
1894
|
*
|
|
1895
1895
|
*/
|
|
1896
1896
|
async pressKeyUp(key) {
|
|
@@ -1959,7 +1959,7 @@ class Playwright extends Helper {
|
|
|
1959
1959
|
* - `'Tab'`
|
|
1960
1960
|
*
|
|
1961
1961
|
* @param {string|string[]} key key or array of keys to press.
|
|
1962
|
-
* @returns {
|
|
1962
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
1963
1963
|
*
|
|
1964
1964
|
*
|
|
1965
1965
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
@@ -2010,7 +2010,7 @@ class Playwright extends Helper {
|
|
|
2010
2010
|
*
|
|
2011
2011
|
* @param {string|string[]} key or array of keys to type.
|
|
2012
2012
|
* @param {?number} [delay=null] (optional) delay in ms between key presses
|
|
2013
|
-
* @returns {
|
|
2013
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2014
2014
|
*
|
|
2015
2015
|
*/
|
|
2016
2016
|
async type(keys, delay = null) {
|
|
@@ -2041,7 +2041,7 @@ class Playwright extends Helper {
|
|
|
2041
2041
|
* ```
|
|
2042
2042
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
2043
2043
|
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
2044
|
-
* @returns {
|
|
2044
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2045
2045
|
*
|
|
2046
2046
|
*
|
|
2047
2047
|
*/
|
|
@@ -2100,7 +2100,7 @@ class Playwright extends Helper {
|
|
|
2100
2100
|
* ```
|
|
2101
2101
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
2102
2102
|
* @param {string} value text value to append.
|
|
2103
|
-
* @returns {
|
|
2103
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2104
2104
|
*
|
|
2105
2105
|
*
|
|
2106
2106
|
*
|
|
@@ -2126,7 +2126,7 @@ class Playwright extends Helper {
|
|
|
2126
2126
|
* ```
|
|
2127
2127
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
2128
2128
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
2129
|
-
* @returns {
|
|
2129
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2130
2130
|
*
|
|
2131
2131
|
*/
|
|
2132
2132
|
async seeInField(field, value) {
|
|
@@ -2145,7 +2145,7 @@ class Playwright extends Helper {
|
|
|
2145
2145
|
*
|
|
2146
2146
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
2147
2147
|
* @param {CodeceptJS.StringOrSecret} value value to check.
|
|
2148
|
-
* @returns {
|
|
2148
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2149
2149
|
*
|
|
2150
2150
|
*/
|
|
2151
2151
|
async dontSeeInField(field, value) {
|
|
@@ -2165,7 +2165,7 @@ class Playwright extends Helper {
|
|
|
2165
2165
|
*
|
|
2166
2166
|
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
2167
2167
|
* @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
2168
|
-
* @returns {
|
|
2168
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2169
2169
|
*
|
|
2170
2170
|
*
|
|
2171
2171
|
*/
|
|
@@ -2202,7 +2202,7 @@ class Playwright extends Helper {
|
|
|
2202
2202
|
* ```
|
|
2203
2203
|
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
2204
2204
|
* @param {string|Array<*>} option visible text or value of option.
|
|
2205
|
-
* @returns {
|
|
2205
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2206
2206
|
*
|
|
2207
2207
|
*/
|
|
2208
2208
|
async selectOption(select, option) {
|
|
@@ -2244,7 +2244,7 @@ class Playwright extends Helper {
|
|
|
2244
2244
|
* ```
|
|
2245
2245
|
*
|
|
2246
2246
|
* @param {string} url a fragment to check
|
|
2247
|
-
* @returns {
|
|
2247
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2248
2248
|
*
|
|
2249
2249
|
*/
|
|
2250
2250
|
async seeInCurrentUrl(url) {
|
|
@@ -2255,7 +2255,7 @@ class Playwright extends Helper {
|
|
|
2255
2255
|
* Checks that current url does not contain a provided fragment.
|
|
2256
2256
|
*
|
|
2257
2257
|
* @param {string} url value to check.
|
|
2258
|
-
* @returns {
|
|
2258
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2259
2259
|
*
|
|
2260
2260
|
*/
|
|
2261
2261
|
async dontSeeInCurrentUrl(url) {
|
|
@@ -2273,7 +2273,7 @@ class Playwright extends Helper {
|
|
|
2273
2273
|
* ```
|
|
2274
2274
|
*
|
|
2275
2275
|
* @param {string} url value to check.
|
|
2276
|
-
* @returns {
|
|
2276
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2277
2277
|
*
|
|
2278
2278
|
*/
|
|
2279
2279
|
async seeCurrentUrlEquals(url) {
|
|
@@ -2290,7 +2290,7 @@ class Playwright extends Helper {
|
|
|
2290
2290
|
* ```
|
|
2291
2291
|
*
|
|
2292
2292
|
* @param {string} url value to check.
|
|
2293
|
-
* @returns {
|
|
2293
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2294
2294
|
*
|
|
2295
2295
|
*/
|
|
2296
2296
|
async dontSeeCurrentUrlEquals(url) {
|
|
@@ -2308,7 +2308,7 @@ class Playwright extends Helper {
|
|
|
2308
2308
|
* ```
|
|
2309
2309
|
* @param {string} text expected on page.
|
|
2310
2310
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
2311
|
-
* @returns {
|
|
2311
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2312
2312
|
*
|
|
2313
2313
|
*
|
|
2314
2314
|
*
|
|
@@ -2326,7 +2326,7 @@ class Playwright extends Helper {
|
|
|
2326
2326
|
*
|
|
2327
2327
|
* @param {string} text element value to check.
|
|
2328
2328
|
* @param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
2329
|
-
* @returns {
|
|
2329
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2330
2330
|
*
|
|
2331
2331
|
*/
|
|
2332
2332
|
async seeTextEquals(text, context = null) {
|
|
@@ -2344,7 +2344,7 @@ class Playwright extends Helper {
|
|
|
2344
2344
|
*
|
|
2345
2345
|
* @param {string} text which is not present.
|
|
2346
2346
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
2347
|
-
* @returns {
|
|
2347
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2348
2348
|
*
|
|
2349
2349
|
*
|
|
2350
2350
|
*
|
|
@@ -2406,7 +2406,7 @@ class Playwright extends Helper {
|
|
|
2406
2406
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
2407
2407
|
* ```
|
|
2408
2408
|
* @param {string} text value to check.
|
|
2409
|
-
* @returns {
|
|
2409
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2410
2410
|
*
|
|
2411
2411
|
*/
|
|
2412
2412
|
async seeInSource(text) {
|
|
@@ -2422,7 +2422,7 @@ class Playwright extends Helper {
|
|
|
2422
2422
|
* ```
|
|
2423
2423
|
*
|
|
2424
2424
|
* @param {string} value to check.
|
|
2425
|
-
* @returns {
|
|
2425
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2426
2426
|
*
|
|
2427
2427
|
*/
|
|
2428
2428
|
async dontSeeInSource(text) {
|
|
@@ -2441,7 +2441,7 @@ class Playwright extends Helper {
|
|
|
2441
2441
|
*
|
|
2442
2442
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2443
2443
|
* @param {number} num number of elements.
|
|
2444
|
-
* @returns {
|
|
2444
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2445
2445
|
*
|
|
2446
2446
|
*
|
|
2447
2447
|
*
|
|
@@ -2461,7 +2461,7 @@ class Playwright extends Helper {
|
|
|
2461
2461
|
*
|
|
2462
2462
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2463
2463
|
* @param {number} num number of elements.
|
|
2464
|
-
* @returns {
|
|
2464
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2465
2465
|
*
|
|
2466
2466
|
*
|
|
2467
2467
|
*
|
|
@@ -2487,7 +2487,7 @@ class Playwright extends Helper {
|
|
|
2487
2487
|
* ```
|
|
2488
2488
|
*
|
|
2489
2489
|
* @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
|
|
2490
|
-
* @returns {
|
|
2490
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2491
2491
|
*
|
|
2492
2492
|
*/
|
|
2493
2493
|
async setCookie(cookie) {
|
|
@@ -2505,7 +2505,7 @@ class Playwright extends Helper {
|
|
|
2505
2505
|
* ```
|
|
2506
2506
|
*
|
|
2507
2507
|
* @param {string} name cookie name.
|
|
2508
|
-
* @returns {
|
|
2508
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2509
2509
|
*
|
|
2510
2510
|
*
|
|
2511
2511
|
*/
|
|
@@ -2522,7 +2522,7 @@ class Playwright extends Helper {
|
|
|
2522
2522
|
* ```
|
|
2523
2523
|
*
|
|
2524
2524
|
* @param {string} name cookie name.
|
|
2525
|
-
* @returns {
|
|
2525
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2526
2526
|
*
|
|
2527
2527
|
*/
|
|
2528
2528
|
async dontSeeCookie(name) {
|
|
@@ -2559,16 +2559,15 @@ class Playwright extends Helper {
|
|
|
2559
2559
|
*
|
|
2560
2560
|
* ```js
|
|
2561
2561
|
* I.clearCookie();
|
|
2562
|
-
* I.clearCookie('test');
|
|
2562
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
2563
2563
|
* ```
|
|
2564
2564
|
*
|
|
2565
2565
|
* @param {?string} [cookie=null] (optional, `null` by default) cookie name
|
|
2566
|
-
* @returns {Promise<void>} automatically synchronized promise through #recorder
|
|
2567
2566
|
*
|
|
2568
2567
|
*/
|
|
2569
2568
|
async clearCookie() {
|
|
2570
2569
|
// Playwright currently doesn't support to delete a certain cookie
|
|
2571
|
-
// https://github.com/microsoft/playwright/blob/main/docs/api.md#
|
|
2570
|
+
// https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md#async-method-browsercontextclearcookies
|
|
2572
2571
|
if (!this.browserContext) return;
|
|
2573
2572
|
return this.browserContext.clearCookies();
|
|
2574
2573
|
}
|
|
@@ -2793,7 +2792,7 @@ class Playwright extends Helper {
|
|
|
2793
2792
|
*
|
|
2794
2793
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2795
2794
|
* @param {object} cssProperties object with CSS properties and their values to check.
|
|
2796
|
-
* @returns {
|
|
2795
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2797
2796
|
*
|
|
2798
2797
|
*
|
|
2799
2798
|
*/
|
|
@@ -2839,7 +2838,7 @@ class Playwright extends Helper {
|
|
|
2839
2838
|
*
|
|
2840
2839
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
2841
2840
|
* @param {object} attributes attributes and their values to check.
|
|
2842
|
-
* @returns {
|
|
2841
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2843
2842
|
*
|
|
2844
2843
|
*
|
|
2845
2844
|
*/
|
|
@@ -2879,7 +2878,7 @@ class Playwright extends Helper {
|
|
|
2879
2878
|
*
|
|
2880
2879
|
* @param {CodeceptJS.LocatorOrString} locator located by label|name|CSS|XPath|strict locator.
|
|
2881
2880
|
* @param {number} offsetX position to drag.
|
|
2882
|
-
* @returns {
|
|
2881
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2883
2882
|
*
|
|
2884
2883
|
*
|
|
2885
2884
|
*/
|
|
@@ -2957,7 +2956,7 @@ class Playwright extends Helper {
|
|
|
2957
2956
|
*
|
|
2958
2957
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
2959
2958
|
* @param {string} fileName file name to save.
|
|
2960
|
-
* @returns {
|
|
2959
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2961
2960
|
*
|
|
2962
2961
|
*
|
|
2963
2962
|
*/
|
|
@@ -2983,7 +2982,7 @@ class Playwright extends Helper {
|
|
|
2983
2982
|
*
|
|
2984
2983
|
* @param {string} fileName file name to save.
|
|
2985
2984
|
* @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
2986
|
-
* @returns {
|
|
2985
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
2987
2986
|
*
|
|
2988
2987
|
*/
|
|
2989
2988
|
async saveScreenshot(fileName, fullPage) {
|
|
@@ -3121,7 +3120,7 @@ class Playwright extends Helper {
|
|
|
3121
3120
|
* ```
|
|
3122
3121
|
*
|
|
3123
3122
|
* @param {number} sec number of second to wait.
|
|
3124
|
-
* @returns {
|
|
3123
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3125
3124
|
*
|
|
3126
3125
|
*/
|
|
3127
3126
|
async wait(sec) {
|
|
@@ -3136,7 +3135,7 @@ class Playwright extends Helper {
|
|
|
3136
3135
|
*
|
|
3137
3136
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3138
3137
|
* @param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
|
|
3139
|
-
* @returns {
|
|
3138
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3140
3139
|
*
|
|
3141
3140
|
*/
|
|
3142
3141
|
async waitForEnabled(locator, sec) {
|
|
@@ -3172,7 +3171,7 @@ class Playwright extends Helper {
|
|
|
3172
3171
|
* @param {LocatorOrString} field input field.
|
|
3173
3172
|
* @param {string }value expected value.
|
|
3174
3173
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3175
|
-
* @returns {
|
|
3174
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3176
3175
|
*
|
|
3177
3176
|
*/
|
|
3178
3177
|
async waitForValue(field, value, sec) {
|
|
@@ -3209,7 +3208,7 @@ class Playwright extends Helper {
|
|
|
3209
3208
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3210
3209
|
* @param {number} num number of elements.
|
|
3211
3210
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3212
|
-
* @returns {
|
|
3211
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3213
3212
|
*
|
|
3214
3213
|
*
|
|
3215
3214
|
*/
|
|
@@ -3251,7 +3250,7 @@ class Playwright extends Helper {
|
|
|
3251
3250
|
*
|
|
3252
3251
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3253
3252
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3254
|
-
* @returns {
|
|
3253
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3255
3254
|
*
|
|
3256
3255
|
*/
|
|
3257
3256
|
async waitForClickable(locator, waitTimeout) {
|
|
@@ -3270,7 +3269,7 @@ class Playwright extends Helper {
|
|
|
3270
3269
|
*
|
|
3271
3270
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3272
3271
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3273
|
-
* @returns {
|
|
3272
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3274
3273
|
*
|
|
3275
3274
|
*
|
|
3276
3275
|
*/
|
|
@@ -3296,7 +3295,7 @@ class Playwright extends Helper {
|
|
|
3296
3295
|
*
|
|
3297
3296
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3298
3297
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3299
|
-
* @returns {
|
|
3298
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3300
3299
|
*
|
|
3301
3300
|
*
|
|
3302
3301
|
* This method accepts [React selectors](https://codecept.io/react).
|
|
@@ -3337,7 +3336,7 @@ class Playwright extends Helper {
|
|
|
3337
3336
|
*
|
|
3338
3337
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3339
3338
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3340
|
-
* @returns {
|
|
3339
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3341
3340
|
*
|
|
3342
3341
|
*/
|
|
3343
3342
|
async waitForInvisible(locator, sec) {
|
|
@@ -3377,7 +3376,7 @@ class Playwright extends Helper {
|
|
|
3377
3376
|
*
|
|
3378
3377
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3379
3378
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3380
|
-
* @returns {
|
|
3379
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3381
3380
|
*
|
|
3382
3381
|
*/
|
|
3383
3382
|
async waitToHide(locator, sec) {
|
|
@@ -3421,7 +3420,7 @@ class Playwright extends Helper {
|
|
|
3421
3420
|
*
|
|
3422
3421
|
* @param {string} urlPart value to check.
|
|
3423
3422
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3424
|
-
* @returns {
|
|
3423
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3425
3424
|
*
|
|
3426
3425
|
*/
|
|
3427
3426
|
async waitInUrl(urlPart, sec = null) {
|
|
@@ -3450,7 +3449,7 @@ class Playwright extends Helper {
|
|
|
3450
3449
|
*
|
|
3451
3450
|
* @param {string} urlPart value to check.
|
|
3452
3451
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3453
|
-
* @returns {
|
|
3452
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3454
3453
|
*
|
|
3455
3454
|
*/
|
|
3456
3455
|
async waitUrlEquals(urlPart, sec = null) {
|
|
@@ -3487,7 +3486,7 @@ class Playwright extends Helper {
|
|
|
3487
3486
|
* @param {string }text to wait for.
|
|
3488
3487
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3489
3488
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
3490
|
-
* @returns {
|
|
3489
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3491
3490
|
*
|
|
3492
3491
|
*/
|
|
3493
3492
|
async waitForText(text, sec = null, context = null) {
|
|
@@ -3522,6 +3521,7 @@ class Playwright extends Helper {
|
|
|
3522
3521
|
let count = 0;
|
|
3523
3522
|
do {
|
|
3524
3523
|
waiter = await _contextObject.locator(`:has-text('${text}')`).first().isVisible();
|
|
3524
|
+
if (waiter) break;
|
|
3525
3525
|
await this.wait(1);
|
|
3526
3526
|
count += 1000;
|
|
3527
3527
|
} while (count <= waitTimeout);
|
|
@@ -3571,7 +3571,7 @@ class Playwright extends Helper {
|
|
|
3571
3571
|
* ```
|
|
3572
3572
|
*
|
|
3573
3573
|
* @param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
3574
|
-
* @returns {
|
|
3574
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3575
3575
|
*
|
|
3576
3576
|
*/
|
|
3577
3577
|
async switchTo(locator) {
|
|
@@ -3643,7 +3643,7 @@ class Playwright extends Helper {
|
|
|
3643
3643
|
* @param {string|function} fn to be executed in browser context.
|
|
3644
3644
|
* @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
|
|
3645
3645
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
3646
|
-
* @returns {
|
|
3646
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3647
3647
|
*
|
|
3648
3648
|
*/
|
|
3649
3649
|
async waitForFunction(fn, argsOrSec = null, sec = null) {
|
|
@@ -3712,7 +3712,7 @@ class Playwright extends Helper {
|
|
|
3712
3712
|
*
|
|
3713
3713
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
3714
3714
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
3715
|
-
* @returns {
|
|
3715
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3716
3716
|
*
|
|
3717
3717
|
*/
|
|
3718
3718
|
async waitForDetached(locator, sec) {
|
|
@@ -3763,7 +3763,7 @@ class Playwright extends Helper {
|
|
|
3763
3763
|
* loadEventEnd: 241
|
|
3764
3764
|
* }
|
|
3765
3765
|
* ```
|
|
3766
|
-
* @returns {
|
|
3766
|
+
* @returns {void} automatically synchronized promise through #recorder
|
|
3767
3767
|
*
|
|
3768
3768
|
*/
|
|
3769
3769
|
async grabDataFromPerformanceTiming() {
|
|
@@ -4464,7 +4464,7 @@ async function proceedSee(assertType, text, context, strict = false) {
|
|
|
4464
4464
|
if (!context) {
|
|
4465
4465
|
const el = await this.context;
|
|
4466
4466
|
|
|
4467
|
-
allText = el.constructor.name ? [await el.locator('body').innerText()] : [await el.innerText()];
|
|
4467
|
+
allText = el.constructor.name !== 'Locator' ? [await el.locator('body').innerText()] : [await el.innerText()];
|
|
4468
4468
|
|
|
4469
4469
|
description = 'web application';
|
|
4470
4470
|
} else {
|