codeceptjs 3.3.5 → 3.3.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 +37 -7
- package/bin/codecept.js +40 -3
- package/docs/basics.md +24 -1
- package/docs/build/Appium.js +41 -22
- package/docs/build/FileSystem.js +1 -1
- package/docs/build/Nightmare.js +106 -57
- package/docs/build/Playwright.js +187 -111
- package/docs/build/Protractor.js +132 -70
- package/docs/build/Puppeteer.js +143 -76
- package/docs/build/REST.js +2 -2
- package/docs/build/TestCafe.js +107 -57
- package/docs/build/WebDriver.js +162 -89
- package/docs/changelog.md +37 -7
- package/docs/commands.md +5 -3
- package/docs/configuration.md +5 -5
- package/docs/helpers/Appium.md +25 -23
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Nightmare.md +57 -57
- package/docs/helpers/Playwright.md +76 -75
- package/docs/helpers/Puppeteer.md +76 -85
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +57 -57
- package/docs/helpers/WebDriver.md +84 -97
- package/docs/quickstart.md +1 -1
- package/docs/reports.md +1 -1
- package/docs/secrets.md +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +3 -3
- 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 +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.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 +2 -2
- package/docs/webapi/saveScreenshot.mustache +2 -2
- 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/command/configMigrate.js +1 -1
- package/lib/command/dryRun.js +2 -1
- package/lib/command/generate.js +35 -18
- package/lib/command/run-rerun.js +38 -0
- package/lib/command/utils.js +13 -3
- package/lib/config.js +2 -2
- package/lib/data/context.js +7 -0
- package/lib/helper/Appium.js +6 -4
- package/lib/helper/FileSystem.js +1 -1
- package/lib/helper/Nightmare.js +1 -1
- package/lib/helper/Playwright.js +50 -38
- package/lib/helper/Protractor.js +1 -1
- package/lib/helper/REST.js +2 -2
- package/lib/helper/TestCafe.js +1 -1
- package/lib/helper/WebDriver.js +7 -7
- package/lib/plugin/wdio.js +11 -2
- package/lib/utils.js +3 -0
- package/package.json +2 -2
- package/typings/index.d.ts +46 -46
- package/typings/types.d.ts +497 -443
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,41 @@
|
|
|
1
|
+
## 3.3.6
|
|
2
|
+
|
|
3
|
+
* [`run-rerun`](https://codecept.io/commands/#run-rerun) command was re-introduced by @dwentland24 in #3436. Use it to perform run multiple times and detect flaky tests
|
|
4
|
+
* Enabled `retryFailedStep` by default in `@codeceptjs/configure` v 0.10. See https://github.com/codeceptjs/configure/pull/26
|
|
5
|
+
* [Playwright] Fixed properties types "waitForNavigation" and "firefox" by @mirao in #3401
|
|
6
|
+
* [REST] Changed "endpoint" to optional by @mirao in #3404
|
|
7
|
+
* [REST] Use [`secret`]() for form encoded string by @PeterNgTr:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
const secretData = secret('name=john&password=123456');
|
|
11
|
+
const response = await I.sendPostRequest('/user', secretData);
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* [Playwright]Fixed docs related to fixed properties types "waitForNavigation" and "firefox" by @mirao in #3407
|
|
15
|
+
* [Playwright]Fixed parameters of startActivity() by @mirao in #3408
|
|
16
|
+
* Move semver to prod dependencies by @timja in #3413
|
|
17
|
+
* check if browser is W3C instead of Android by @mikk150 in #3414
|
|
18
|
+
* Pass service configs with options and caps as array for browsers… by @07souravkunda in #3418
|
|
19
|
+
* fix for type of "webdriver.port" by @ngraf in #3421
|
|
20
|
+
* fix for type of "webdriver.smartWait" by @pmajewski24 in #3426
|
|
21
|
+
* fix(datatable): mask secret text by @PeterNgTr in #3432
|
|
22
|
+
* fix(playwright) - video name and missing type by @PeterNgTr in #3430
|
|
23
|
+
* fix for expected type of "bootstrap", "teardown", "bootstrapAll" and "teardownAll" by @ngraf in #3424
|
|
24
|
+
* Improve generate pageobject `gpo` command to work with TypeScript by @PeterNgTr in #3411
|
|
25
|
+
* Fixed dry-run to always return 0 code and exit
|
|
26
|
+
* Added minimal version notice for NodeJS >= 12
|
|
27
|
+
* fix(utils): remove . of test title to avoid confusion by @PeterNgTr in #3431
|
|
28
|
+
|
|
1
29
|
## 3.3.5
|
|
2
30
|
|
|
3
31
|
🛩️ Features
|
|
4
32
|
|
|
5
|
-
* Added **
|
|
6
|
-
|
|
7
|
-
|
|
33
|
+
* Added **TypeScript types for CodeceptJS config**.
|
|
34
|
+
|
|
35
|
+
Update `codecept.conf.js` to get intellisense when writing config file:
|
|
8
36
|
|
|
9
37
|
```js
|
|
10
|
-
|
|
11
|
-
/** @type {CodeceptJS.MainConfig} */
|
|
38
|
+
/**@type {CodeceptJS.MainConfig}**/
|
|
12
39
|
exports.config = {
|
|
13
40
|
//...
|
|
14
41
|
}
|
|
@@ -18,6 +45,9 @@ exports.config = {
|
|
|
18
45
|
* Puppeteer
|
|
19
46
|
* WebDriver
|
|
20
47
|
* REST
|
|
48
|
+
* Added **[TypeScript option](/typescript)** for installation via `codeceptjs init` to initialize new projects in TS (by @PeterNgTr and @davertmik)
|
|
49
|
+
* Includes `node-ts` automatically when using TypeScript setup.
|
|
50
|
+
|
|
21
51
|
|
|
22
52
|
🐛 Bugfixes
|
|
23
53
|
|
|
@@ -571,7 +601,7 @@ MyPage.hasFiles('first arg', 'second arg');
|
|
|
571
601
|
|
|
572
602
|
// OUTPUT:
|
|
573
603
|
MyPage: hasFile "First arg", "Second arg"
|
|
574
|
-
I see file "codecept.
|
|
604
|
+
I see file "codecept.js"
|
|
575
605
|
I see file "codecept.po.json"
|
|
576
606
|
```
|
|
577
607
|
* Introduced official [TypeScript boilerplate](https://github.com/codeceptjs/typescript-boilerplate). Started by @Vorobeyko.
|
|
@@ -2168,7 +2198,7 @@ module.exports = function(done) {
|
|
|
2168
2198
|
```js
|
|
2169
2199
|
// inside codecept.conf.js
|
|
2170
2200
|
exports.config = {
|
|
2171
|
-
// contents of codecept.
|
|
2201
|
+
// contents of codecept.js
|
|
2172
2202
|
}
|
|
2173
2203
|
```
|
|
2174
2204
|
* Added `--profile` option to pass its value to `codecept.conf.js` as `process.profile` for [dynamic configuration](http://codecept.io/configuration#dynamic-configuration).
|
package/bin/codecept.js
CHANGED
|
@@ -13,8 +13,8 @@ const errorHandler = (fn) => async (...args) => {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
if (process.versions.node && process.versions.node.split('.') && process.versions.node.split('.')[0] <
|
|
17
|
-
error('NodeJS >=
|
|
16
|
+
if (process.versions.node && process.versions.node.split('.') && process.versions.node.split('.')[0] < 12) {
|
|
17
|
+
error('NodeJS >= 12 is required to run.');
|
|
18
18
|
print();
|
|
19
19
|
print('Please upgrade your NodeJS engine');
|
|
20
20
|
print(`Current NodeJS version: ${process.version}`);
|
|
@@ -179,7 +179,7 @@ program.command('info [path]')
|
|
|
179
179
|
program.command('dry-run [test]')
|
|
180
180
|
.description('Prints step-by-step scenario for a test without actually running it')
|
|
181
181
|
.option('-p, --plugins <k=v,k2=v2,...>', 'enable plugins, comma-separated')
|
|
182
|
-
.option('--bootstrap', 'enable bootstrap
|
|
182
|
+
.option('--bootstrap', 'enable bootstrap & teardown scripts for dry-run')
|
|
183
183
|
.option('-c, --config [file]', 'configuration file to be used')
|
|
184
184
|
.option('--all', 'run all suites')
|
|
185
185
|
.option('--features', 'run only *.feature files and skip tests')
|
|
@@ -192,6 +192,43 @@ program.command('dry-run [test]')
|
|
|
192
192
|
.option('--debug', 'output additional information')
|
|
193
193
|
.action(errorHandler(require('../lib/command/dryRun')));
|
|
194
194
|
|
|
195
|
+
program.command('run-rerun [test]')
|
|
196
|
+
.description('Executes tests in more than one test suite run')
|
|
197
|
+
|
|
198
|
+
// codecept-only options
|
|
199
|
+
.option('--steps', 'show step-by-step execution')
|
|
200
|
+
.option('--debug', 'output additional information')
|
|
201
|
+
.option('--verbose', 'output internal logging information')
|
|
202
|
+
.option('-o, --override [value]', 'override current config options')
|
|
203
|
+
.option('--profile [value]', 'configuration profile to be used')
|
|
204
|
+
.option('-c, --config [file]', 'configuration file to be used')
|
|
205
|
+
.option('--features', 'run only *.feature files and skip tests')
|
|
206
|
+
.option('--tests', 'run only JS test files and skip features')
|
|
207
|
+
.option('-p, --plugins <k=v,k2=v2,...>', 'enable plugins, comma-separated')
|
|
208
|
+
|
|
209
|
+
// mocha options
|
|
210
|
+
.option('--colors', 'force enabling of colors')
|
|
211
|
+
.option('--no-colors', 'force disabling of colors')
|
|
212
|
+
.option('-G, --growl', 'enable growl notification support')
|
|
213
|
+
.option('-O, --reporter-options <k=v,k2=v2,...>', 'reporter-specific options')
|
|
214
|
+
.option('-R, --reporter <name>', 'specify the reporter to use')
|
|
215
|
+
.option('-S, --sort', 'sort test files')
|
|
216
|
+
.option('-b, --bail', 'bail after first test failure')
|
|
217
|
+
.option('-d, --debug', "enable node's debugger, synonym for node --debug")
|
|
218
|
+
.option('-g, --grep <pattern>', 'only run tests matching <pattern>')
|
|
219
|
+
.option('-f, --fgrep <string>', 'only run tests containing <string>')
|
|
220
|
+
.option('-i, --invert', 'inverts --grep and --fgrep matches')
|
|
221
|
+
.option('--full-trace', 'display the full stack trace')
|
|
222
|
+
.option('--compilers <ext>:<module>,...', 'use the given module(s) to compile files')
|
|
223
|
+
.option('--debug-brk', "enable node's debugger breaking on the first line")
|
|
224
|
+
.option('--inline-diffs', 'display actual/expected differences inline within each string')
|
|
225
|
+
.option('--no-exit', 'require a clean shutdown of the event loop: mocha will not call process.exit')
|
|
226
|
+
.option('--recursive', 'include sub directories')
|
|
227
|
+
.option('--trace', 'trace function calls')
|
|
228
|
+
.option('--child <string>', 'option for child processes')
|
|
229
|
+
|
|
230
|
+
.action(require('../lib/command/run-rerun'));
|
|
231
|
+
|
|
195
232
|
program.on('command:*', (cmd) => {
|
|
196
233
|
console.log(`\nUnknown command ${cmd}\n`);
|
|
197
234
|
program.outputHelp();
|
package/docs/basics.md
CHANGED
|
@@ -27,7 +27,7 @@ CodeceptJS bypasses execution commands to helpers. Depending on the helper enabl
|
|
|
27
27
|
|
|
28
28
|
The following is a diagram of the CodeceptJS architecture:
|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
32
|
All helpers share the same API, so it's easy to migrate tests from one backend to another.
|
|
33
33
|
However, because of the difference in backends and their limitations, they are not guaranteed to be compatible with each other. For instance, you can't set request headers in WebDriver or Protractor, but you can do so in Puppeteer or Nightmare.
|
|
@@ -577,6 +577,18 @@ I.retry({
|
|
|
577
577
|
|
|
578
578
|
Pass a function to the `when` option to retry only when an error matches the expected one.
|
|
579
579
|
|
|
580
|
+
### Retry Multiple Steps
|
|
581
|
+
|
|
582
|
+
To retry a group of steps enable [retryTo plugin](/plugins/#retryto):
|
|
583
|
+
|
|
584
|
+
```js
|
|
585
|
+
// retry these steps 5 times before failing
|
|
586
|
+
await retryTo((tryNum) => {
|
|
587
|
+
I.switchTo('#editor frame');
|
|
588
|
+
I.click('Open');
|
|
589
|
+
I.see('Opened')
|
|
590
|
+
}, 5);
|
|
591
|
+
```
|
|
580
592
|
|
|
581
593
|
### Retry Scenario
|
|
582
594
|
|
|
@@ -608,6 +620,17 @@ Feature('Complex JS Stuff').retry(3);
|
|
|
608
620
|
Every Scenario inside this feature will be rerun 3 times.
|
|
609
621
|
You can make an exception for a specific scenario by passing the `retries` option to a Scenario.
|
|
610
622
|
|
|
623
|
+
### Retry Run
|
|
624
|
+
|
|
625
|
+
On the highest level of the "retry pyramid" there is an option to retry a complete run multiple times.
|
|
626
|
+
Even this is the slowest option of all, it can be helpful to detect flaky tests.
|
|
627
|
+
|
|
628
|
+
[`run-rerun`](https://codecept.io/commands/#run-rerun) command will restart the run multiple times to values you provide. You can set minimal and maximal number of restarts in configuration file.
|
|
629
|
+
|
|
630
|
+
```
|
|
631
|
+
npx codeceptjs run-rerun
|
|
632
|
+
```
|
|
633
|
+
|
|
611
634
|
|
|
612
635
|
## Before
|
|
613
636
|
|
package/docs/build/Appium.js
CHANGED
|
@@ -34,7 +34,7 @@ const webRoot = 'body';
|
|
|
34
34
|
*
|
|
35
35
|
* ## Helper configuration
|
|
36
36
|
*
|
|
37
|
-
* This helper should be configured in codecept.
|
|
37
|
+
* This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
38
38
|
*
|
|
39
39
|
* * `app`: Application path. Local path or remote URL to an .ipa or .apk file, or a .zip containing one of these. Alias to desiredCapabilities.appPackage
|
|
40
40
|
* * `host`: (default: 'localhost') Appium host
|
|
@@ -788,9 +788,11 @@ class Appium extends Webdriver {
|
|
|
788
788
|
* I.startActivity('io.selendroid.testapp', '.RegisterUserActivity');
|
|
789
789
|
* ```
|
|
790
790
|
*
|
|
791
|
-
* @return {Promise<void>}
|
|
792
|
-
*
|
|
793
791
|
* Appium: support only Android
|
|
792
|
+
*
|
|
793
|
+
* @param {string} appPackage
|
|
794
|
+
* @param {string} appActivity
|
|
795
|
+
* @return {Promise<void>}
|
|
794
796
|
*/
|
|
795
797
|
async startActivity(appPackage, appActivity) {
|
|
796
798
|
onlyForApps.call(this, 'Android');
|
|
@@ -1332,7 +1334,8 @@ class Appium extends Webdriver {
|
|
|
1332
1334
|
* ```
|
|
1333
1335
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
1334
1336
|
* @param {string} value text value to append.
|
|
1335
|
-
*
|
|
1337
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1338
|
+
*
|
|
1336
1339
|
*
|
|
1337
1340
|
*/
|
|
1338
1341
|
async appendField(field, value) {
|
|
@@ -1353,7 +1356,8 @@ class Appium extends Webdriver {
|
|
|
1353
1356
|
* ```
|
|
1354
1357
|
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1355
1358
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1356
|
-
*
|
|
1359
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1360
|
+
*
|
|
1357
1361
|
*
|
|
1358
1362
|
*/
|
|
1359
1363
|
async checkOption(field) {
|
|
@@ -1386,7 +1390,7 @@ class Appium extends Webdriver {
|
|
|
1386
1390
|
*
|
|
1387
1391
|
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1388
1392
|
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1389
|
-
*
|
|
1393
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1390
1394
|
*
|
|
1391
1395
|
*
|
|
1392
1396
|
*/
|
|
@@ -1405,7 +1409,8 @@ class Appium extends Webdriver {
|
|
|
1405
1409
|
* ```
|
|
1406
1410
|
*
|
|
1407
1411
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1408
|
-
*
|
|
1412
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1413
|
+
*
|
|
1409
1414
|
*
|
|
1410
1415
|
*/
|
|
1411
1416
|
async dontSeeCheckboxIsChecked(field) {
|
|
@@ -1421,7 +1426,8 @@ class Appium extends Webdriver {
|
|
|
1421
1426
|
* ```
|
|
1422
1427
|
*
|
|
1423
1428
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1424
|
-
*
|
|
1429
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1430
|
+
*
|
|
1425
1431
|
*/
|
|
1426
1432
|
async dontSeeElement(locator) {
|
|
1427
1433
|
if (this.isWeb) return super.dontSeeElement(locator);
|
|
@@ -1439,7 +1445,8 @@ class Appium extends Webdriver {
|
|
|
1439
1445
|
*
|
|
1440
1446
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1441
1447
|
* @param {string} value value to check.
|
|
1442
|
-
*
|
|
1448
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1449
|
+
*
|
|
1443
1450
|
*
|
|
1444
1451
|
*/
|
|
1445
1452
|
async dontSeeInField(field, value) {
|
|
@@ -1458,7 +1465,8 @@ class Appium extends Webdriver {
|
|
|
1458
1465
|
*
|
|
1459
1466
|
* @param {string} text which is not present.
|
|
1460
1467
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1461
|
-
*
|
|
1468
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1469
|
+
*
|
|
1462
1470
|
*/
|
|
1463
1471
|
async dontSee(text, context = null) {
|
|
1464
1472
|
if (this.isWeb) return super.dontSee(text, context);
|
|
@@ -1481,7 +1489,8 @@ class Appium extends Webdriver {
|
|
|
1481
1489
|
* ```
|
|
1482
1490
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1483
1491
|
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
1484
|
-
*
|
|
1492
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1493
|
+
*
|
|
1485
1494
|
*
|
|
1486
1495
|
*/
|
|
1487
1496
|
async fillField(field, value) {
|
|
@@ -1617,7 +1626,7 @@ class Appium extends Webdriver {
|
|
|
1617
1626
|
}
|
|
1618
1627
|
|
|
1619
1628
|
/**
|
|
1620
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
1629
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
1621
1630
|
* Filename is relative to output folder.
|
|
1622
1631
|
*
|
|
1623
1632
|
* ```js
|
|
@@ -1642,7 +1651,8 @@ class Appium extends Webdriver {
|
|
|
1642
1651
|
*
|
|
1643
1652
|
* @param {LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1644
1653
|
* @param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
1645
|
-
*
|
|
1654
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1655
|
+
*
|
|
1646
1656
|
*
|
|
1647
1657
|
* Supported only for web testing
|
|
1648
1658
|
*/
|
|
@@ -1660,7 +1670,8 @@ class Appium extends Webdriver {
|
|
|
1660
1670
|
* ```
|
|
1661
1671
|
*
|
|
1662
1672
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1663
|
-
*
|
|
1673
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1674
|
+
*
|
|
1664
1675
|
*
|
|
1665
1676
|
*/
|
|
1666
1677
|
async seeCheckboxIsChecked(field) {
|
|
@@ -1676,7 +1687,8 @@ class Appium extends Webdriver {
|
|
|
1676
1687
|
* I.seeElement('#modal');
|
|
1677
1688
|
* ```
|
|
1678
1689
|
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1679
|
-
*
|
|
1690
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1691
|
+
*
|
|
1680
1692
|
*
|
|
1681
1693
|
*/
|
|
1682
1694
|
async seeElement(locator) {
|
|
@@ -1696,7 +1708,8 @@ class Appium extends Webdriver {
|
|
|
1696
1708
|
* ```
|
|
1697
1709
|
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1698
1710
|
* @param {string} value value to check.
|
|
1699
|
-
*
|
|
1711
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1712
|
+
*
|
|
1700
1713
|
*
|
|
1701
1714
|
*/
|
|
1702
1715
|
async seeInField(field, value) {
|
|
@@ -1715,7 +1728,8 @@ class Appium extends Webdriver {
|
|
|
1715
1728
|
* ```
|
|
1716
1729
|
* @param {string} text expected on page.
|
|
1717
1730
|
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1718
|
-
*
|
|
1731
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1732
|
+
*
|
|
1719
1733
|
*
|
|
1720
1734
|
*/
|
|
1721
1735
|
async see(text, context) {
|
|
@@ -1744,7 +1758,8 @@ class Appium extends Webdriver {
|
|
|
1744
1758
|
* ```
|
|
1745
1759
|
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
1746
1760
|
* @param {string|Array<*>} option visible text or value of option.
|
|
1747
|
-
*
|
|
1761
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1762
|
+
*
|
|
1748
1763
|
*
|
|
1749
1764
|
* Supported only for web testing
|
|
1750
1765
|
*/
|
|
@@ -1764,7 +1779,8 @@ class Appium extends Webdriver {
|
|
|
1764
1779
|
*
|
|
1765
1780
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1766
1781
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1767
|
-
*
|
|
1782
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1783
|
+
*
|
|
1768
1784
|
*
|
|
1769
1785
|
*/
|
|
1770
1786
|
async waitForElement(locator, sec = null) {
|
|
@@ -1782,7 +1798,8 @@ class Appium extends Webdriver {
|
|
|
1782
1798
|
*
|
|
1783
1799
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1784
1800
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1785
|
-
*
|
|
1801
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1802
|
+
*
|
|
1786
1803
|
*
|
|
1787
1804
|
*/
|
|
1788
1805
|
async waitForVisible(locator, sec = null) {
|
|
@@ -1800,7 +1817,8 @@ class Appium extends Webdriver {
|
|
|
1800
1817
|
*
|
|
1801
1818
|
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1802
1819
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1803
|
-
*
|
|
1820
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1821
|
+
*
|
|
1804
1822
|
*
|
|
1805
1823
|
*/
|
|
1806
1824
|
async waitForInvisible(locator, sec = null) {
|
|
@@ -1821,7 +1839,8 @@ class Appium extends Webdriver {
|
|
|
1821
1839
|
* @param {string }text to wait for.
|
|
1822
1840
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1823
1841
|
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
1824
|
-
*
|
|
1842
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1843
|
+
*
|
|
1825
1844
|
*
|
|
1826
1845
|
*/
|
|
1827
1846
|
async waitForText(text, sec = null, context = null) {
|
package/docs/build/FileSystem.js
CHANGED