codeceptjs 3.3.0 → 3.3.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 +39 -1
- package/README.md +26 -0
- package/docs/api.md +1 -1
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +26 -11
- package/docs/build/GraphQL.js +4 -2
- package/docs/build/GraphQLDataFactory.js +3 -3
- package/docs/build/JSONResponse.js +1 -1
- package/docs/build/Nightmare.js +52 -23
- package/docs/build/Playwright.js +126 -48
- package/docs/build/Protractor.js +70 -32
- package/docs/build/Puppeteer.js +78 -35
- package/docs/build/REST.js +4 -1
- package/docs/build/TestCafe.js +53 -22
- package/docs/build/WebDriver.js +115 -65
- package/docs/changelog.md +39 -1
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +113 -15
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/Nightmare.md +131 -29
- package/docs/helpers/Playwright.md +424 -215
- package/docs/helpers/Puppeteer.md +229 -92
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +166 -62
- package/docs/helpers/WebDriver.md +254 -103
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/webapi/amOnPage.mustache +2 -1
- package/docs/webapi/appendField.mustache +2 -1
- package/docs/webapi/attachFile.mustache +2 -1
- package/docs/webapi/checkOption.mustache +2 -1
- package/docs/webapi/clearCookie.mustache +2 -1
- package/docs/webapi/clearField.mustache +1 -0
- package/docs/webapi/click.mustache +2 -1
- package/docs/webapi/clickLink.mustache +2 -1
- package/docs/webapi/closeCurrentTab.mustache +6 -4
- package/docs/webapi/closeOtherTabs.mustache +6 -4
- package/docs/webapi/dontSee.mustache +1 -0
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/dontSeeCookie.mustache +2 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/dontSeeElement.mustache +2 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
- package/docs/webapi/dontSeeInField.mustache +2 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -0
- package/docs/webapi/dontSeeInTitle.mustache +2 -1
- package/docs/webapi/doubleClick.mustache +1 -0
- package/docs/webapi/downloadFile.mustache +2 -1
- package/docs/webapi/dragAndDrop.mustache +1 -0
- package/docs/webapi/dragSlider.mustache +2 -1
- package/docs/webapi/fillField.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -0
- package/docs/webapi/forceRightClick.mustache +1 -0
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +1 -0
- package/docs/webapi/openNewTab.mustache +6 -4
- package/docs/webapi/pressKey.mustache +2 -1
- package/docs/webapi/pressKeyDown.mustache +1 -0
- package/docs/webapi/pressKeyUp.mustache +1 -0
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
- package/docs/webapi/refreshPage.mustache +1 -0
- package/docs/webapi/resizeWindow.mustache +2 -1
- package/docs/webapi/rightClick.mustache +1 -0
- package/docs/webapi/saveElementScreenshot.mustache +1 -0
- package/docs/webapi/saveScreenshot.mustache +2 -1
- package/docs/webapi/say.mustache +2 -1
- package/docs/webapi/scrollIntoView.mustache +1 -0
- package/docs/webapi/scrollPageToBottom.mustache +1 -0
- package/docs/webapi/scrollPageToTop.mustache +1 -0
- package/docs/webapi/scrollTo.mustache +2 -1
- package/docs/webapi/see.mustache +2 -1
- package/docs/webapi/seeAttributesOnElements.mustache +2 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/seeCookie.mustache +1 -0
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/seeElement.mustache +2 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -0
- package/docs/webapi/seeInCurrentUrl.mustache +2 -1
- package/docs/webapi/seeInField.mustache +1 -0
- package/docs/webapi/seeInPopup.mustache +1 -0
- package/docs/webapi/seeInSource.mustache +2 -1
- package/docs/webapi/seeInTitle.mustache +2 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
- package/docs/webapi/seeTextEquals.mustache +2 -1
- package/docs/webapi/seeTitleEquals.mustache +6 -5
- package/docs/webapi/selectOption.mustache +1 -0
- package/docs/webapi/setCookie.mustache +1 -0
- package/docs/webapi/setGeoLocation.mustache +1 -0
- package/docs/webapi/switchTo.mustache +2 -1
- package/docs/webapi/switchToNextTab.mustache +8 -7
- package/docs/webapi/switchToPreviousTab.mustache +8 -7
- package/docs/webapi/type.mustache +1 -0
- package/docs/webapi/uncheckOption.mustache +2 -1
- package/docs/webapi/wait.mustache +2 -1
- package/docs/webapi/waitForClickable.mustache +2 -1
- package/docs/webapi/waitForDetached.mustache +2 -1
- package/docs/webapi/waitForElement.mustache +2 -1
- package/docs/webapi/waitForEnabled.mustache +2 -1
- package/docs/webapi/waitForFunction.mustache +1 -0
- package/docs/webapi/waitForInvisible.mustache +2 -1
- package/docs/webapi/waitForText.mustache +2 -1
- package/docs/webapi/waitForValue.mustache +1 -0
- package/docs/webapi/waitForVisible.mustache +1 -0
- package/docs/webapi/waitInUrl.mustache +2 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
- package/docs/webapi/waitToHide.mustache +2 -1
- package/docs/webapi/waitUrlEquals.mustache +2 -1
- package/lib/command/definitions.js +9 -0
- package/lib/command/run.js +2 -2
- package/lib/command/workers/runTests.js +40 -0
- package/lib/helper/ApiDataFactory.js +4 -3
- package/lib/helper/Appium.js +7 -2
- package/lib/helper/GraphQL.js +4 -2
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +1 -1
- package/lib/helper/Playwright.js +49 -13
- package/lib/helper/REST.js +4 -1
- package/lib/helper/WebDriver.js +6 -0
- package/lib/interfaces/bdd.js +5 -0
- package/lib/listener/steps.js +1 -0
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/stepByStepReport.js +8 -6
- package/lib/workers.js +12 -0
- package/package.json +3 -3
- package/typings/types.d.ts +558 -607
package/docs/index.md
CHANGED
package/docs/locators.md
CHANGED
|
@@ -243,7 +243,7 @@ Instead of writing a full CSS locator like `[data-qa-id=user_name]` simplify it
|
|
|
243
243
|
|
|
244
244
|
```js
|
|
245
245
|
// replace this:
|
|
246
|
-
I.click({ css: '[data-test-id=register_button]');
|
|
246
|
+
I.click({ css: '[data-test-id=register_button]'});
|
|
247
247
|
// with this:
|
|
248
248
|
I.click('$register_button');
|
|
249
249
|
```
|
|
@@ -5,4 +5,5 @@ Field is located by name, label, CSS or XPath
|
|
|
5
5
|
I.appendField('#myTextField', 'appended');
|
|
6
6
|
```
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
8
|
-
@param {string} value text value to append.
|
|
8
|
+
@param {string} value text value to append.
|
|
9
|
+
@return {Promise<any>}
|
|
@@ -8,4 +8,5 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
11
|
-
@param {string} pathToFile local file path relative to codecept.json config file.
|
|
11
|
+
@param {string} pathToFile local file path relative to codecept.json config file.
|
|
12
|
+
@return {Promise<any>}
|
|
@@ -9,4 +9,5 @@ I.checkOption('I Agree to Terms and Conditions');
|
|
|
9
9
|
I.checkOption('agree', '//form');
|
|
10
10
|
```
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
12
|
-
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
12
|
+
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
13
|
+
@return {Promise<any>}
|
|
@@ -21,4 +21,5 @@ I.click({css: 'nav a.login'});
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
24
|
-
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
24
|
+
@param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
25
|
+
@return {Promise<any>}
|
|
@@ -4,4 +4,5 @@ Performs a click on a link and waits for navigation before moving on.
|
|
|
4
4
|
I.clickLink('Logout', '#nav');
|
|
5
5
|
```
|
|
6
6
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
7
|
-
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
7
|
+
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
8
|
+
@return {Promise<any>}
|
|
@@ -4,4 +4,5 @@ Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
|
4
4
|
I.dontSeeElement('.modal'); // modal is not shown
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
-
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
7
|
+
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
8
|
+
@return {Promise<any>}
|
|
@@ -4,4 +4,5 @@ Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
|
4
4
|
I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
-
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
7
|
+
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
8
|
+
@return {Promise<any>}
|
|
@@ -7,4 +7,5 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
10
|
-
@param {string} value value to check.
|
|
10
|
+
@param {string} value value to check.
|
|
11
|
+
@return {Promise<any>}
|
|
@@ -10,3 +10,4 @@ I.doubleClick('.btn.edit');
|
|
|
10
10
|
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
12
12
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
13
|
+
@return {Promise<any>}
|
|
@@ -8,4 +8,5 @@ I.downloadFile('td[class="text-right file-link"] a', 'thisIsCustomName');
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by CSS|XPath locator.
|
|
11
|
-
@param {string} file custom file name.
|
|
11
|
+
@param {string} file custom file name.
|
|
12
|
+
@return {Promise<any>}
|
|
@@ -25,3 +25,4 @@ I.forceClick({css: 'nav a.login'});
|
|
|
25
25
|
|
|
26
26
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
27
27
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
28
|
+
@return {Promise<any>}
|
|
@@ -15,3 +15,4 @@ I.forceRightClick('Menu');
|
|
|
15
15
|
|
|
16
16
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
17
17
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
18
|
+
@return {Promise<any>}
|
|
@@ -9,3 +9,4 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
11
11
|
@param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
12
|
+
@return {Promise<any>}
|
|
@@ -11,3 +11,4 @@ I.rightClick('Click me', '.context');
|
|
|
11
11
|
|
|
12
12
|
@param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
13
13
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
14
|
+
@return {Promise<any>}
|
|
@@ -8,4 +8,5 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
@param {string} fileName file name to save.
|
|
11
|
-
@param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
11
|
+
@param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
12
|
+
@return {Promise<any>}
|
package/docs/webapi/say.mustache
CHANGED
|
@@ -6,4 +6,5 @@ I.say('This is blue', 'blue'); //blue is used
|
|
|
6
6
|
I.say('This is by default'); //cyan is used
|
|
7
7
|
```
|
|
8
8
|
@param {string} text expected on console log.
|
|
9
|
-
@param {string} [color='cyan'] color you want to use.
|
|
9
|
+
@param {string} [color='cyan'] color you want to use.
|
|
10
|
+
@return {Promise<any>}
|
|
@@ -8,3 +8,4 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
8
8
|
|
|
9
9
|
@param {LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
11
|
+
@return {Promise<any>}
|
|
@@ -8,4 +8,5 @@ I.scrollTo('#submit', 5, 5);
|
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
11
|
-
@param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
11
|
+
@param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
12
|
+
@return {Promise<any>}
|
package/docs/webapi/see.mustache
CHANGED
|
@@ -7,4 +7,5 @@ I.see('Welcome', '.content'); // text inside .content div
|
|
|
7
7
|
I.see('Register', {css: 'form.register'}); // use strict locator
|
|
8
8
|
```
|
|
9
9
|
@param {string} text expected on page.
|
|
10
|
-
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
10
|
+
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
11
|
+
@return {Promise<any>}
|
|
@@ -5,4 +5,5 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
8
|
-
@param {object} attributes attributes and their values to check.
|
|
8
|
+
@param {object} attributes attributes and their values to check.
|
|
9
|
+
@return {Promise<any>}
|
|
@@ -5,4 +5,5 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
8
|
-
@param {object} cssProperties object with CSS properties and their values to check.
|
|
8
|
+
@param {object} cssProperties object with CSS properties and their values to check.
|
|
9
|
+
@return {Promise<any>}
|
|
@@ -5,4 +5,5 @@ I.seeTextEquals('text', 'h1');
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
@param {string} text element value to check.
|
|
8
|
-
@param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
8
|
+
@param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
9
|
+
@return {Promise<any>}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
Checks that title is equal to provided one.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
```js
|
|
4
|
+
I.seeTitleEquals('Test title.');
|
|
5
|
+
```
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
@param {string} text value to check.
|
|
8
|
+
@return {Promise<any>}
|
|
@@ -5,4 +5,5 @@ I.switchTo('iframe'); // switch to first iframe
|
|
|
5
5
|
I.switchTo(); // switch back to main page
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
-
@param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8
|
+
@param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
9
|
+
@return {Promise<any>}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
```js
|
|
4
|
+
I.switchToNextTab();
|
|
5
|
+
I.switchToNextTab(2);
|
|
6
|
+
```
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@param {number} [num] (optional) number of tabs to switch forward, default: 1.
|
|
9
|
+
@param {number | null} [sec] (optional) time in seconds to wait.
|
|
10
|
+
@return {Promise<any>}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
```js
|
|
4
|
+
I.switchToPreviousTab();
|
|
5
|
+
I.switchToPreviousTab(2);
|
|
6
|
+
```
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@param {number} [num] (optional) number of tabs to switch backward, default: 1.
|
|
9
|
+
@param {number?} [sec] (optional) time in seconds to wait.
|
|
10
|
+
@return {Promise<any>}
|
|
@@ -9,4 +9,5 @@ I.uncheckOption('I Agree to Terms and Conditions');
|
|
|
9
9
|
I.uncheckOption('agree', '//form');
|
|
10
10
|
```
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
12
|
-
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
12
|
+
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
13
|
+
@return {Promise<any>}
|
|
@@ -7,4 +7,5 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
10
|
-
@param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
10
|
+
@param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
11
|
+
@return {Promise<any>}
|
|
@@ -6,4 +6,5 @@ I.waitForDetached('#popup');
|
|
|
6
6
|
```
|
|
7
7
|
|
|
8
8
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
9
|
-
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
9
|
+
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
10
|
+
@return {Promise<any>}
|
|
@@ -7,4 +7,5 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
10
|
-
@param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
10
|
+
@param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
11
|
+
@return {Promise<any>}
|
|
@@ -2,4 +2,5 @@ Waits for element to become enabled (by default waits for 1sec).
|
|
|
2
2
|
Element can be located by CSS or XPath.
|
|
3
3
|
|
|
4
4
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
5
|
-
@param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
|
|
5
|
+
@param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
|
|
6
|
+
@return {Promise<any>}
|