codeceptjs 3.3.5 → 3.3.6
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 +48 -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/docs/helpers/TestCafe.md
CHANGED
|
@@ -20,7 +20,7 @@ Requires `testcafe` package to be installed.
|
|
|
20
20
|
|
|
21
21
|
## Configuration
|
|
22
22
|
|
|
23
|
-
This helper should be configured in codecept.
|
|
23
|
+
This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
24
24
|
|
|
25
25
|
- `url`: base url of website to be tested
|
|
26
26
|
- `show`: - show browser window.
|
|
@@ -122,12 +122,12 @@ I.appendField('#myTextField', 'appended');
|
|
|
122
122
|
|
|
123
123
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator
|
|
124
124
|
- `value` **[string][4]** text value to append.
|
|
125
|
-
|
|
125
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
126
126
|
|
|
127
127
|
### attachFile
|
|
128
128
|
|
|
129
129
|
Attaches a file to element located by label, name, CSS or XPath
|
|
130
|
-
Path to file is relative current codecept directory (where codecept.
|
|
130
|
+
Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
131
131
|
File will be uploaded to remote system (if tests are running remotely).
|
|
132
132
|
|
|
133
133
|
```js
|
|
@@ -138,8 +138,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
138
138
|
#### Parameters
|
|
139
139
|
|
|
140
140
|
- `field`
|
|
141
|
-
- `pathToFile` **[string][4]** local file path relative to codecept.
|
|
142
|
-
|
|
141
|
+
- `pathToFile` **[string][4]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
142
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
143
143
|
- `locator` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
144
144
|
|
|
145
145
|
### checkOption
|
|
@@ -159,7 +159,7 @@ I.checkOption('agree', '//form');
|
|
|
159
159
|
|
|
160
160
|
- `field` **([string][4] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
161
161
|
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
162
|
-
|
|
162
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
163
163
|
|
|
164
164
|
### clearCookie
|
|
165
165
|
|
|
@@ -175,7 +175,7 @@ I.clearCookie('test');
|
|
|
175
175
|
|
|
176
176
|
- `cookieName`
|
|
177
177
|
- `cookie` **[string][4]?** (optional, `null` by default) cookie name
|
|
178
|
-
|
|
178
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
179
179
|
|
|
180
180
|
### clearField
|
|
181
181
|
|
|
@@ -191,7 +191,7 @@ I.clearField('#email');
|
|
|
191
191
|
|
|
192
192
|
- `field`
|
|
193
193
|
- `editable` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
194
|
-
|
|
194
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
195
195
|
|
|
196
196
|
### click
|
|
197
197
|
|
|
@@ -221,7 +221,7 @@ I.click({css: 'nav a.login'});
|
|
|
221
221
|
|
|
222
222
|
- `locator` **([string][4] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
223
223
|
- `context` **([string][4]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
224
|
-
|
|
224
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
225
225
|
|
|
226
226
|
### dontSee
|
|
227
227
|
|
|
@@ -237,7 +237,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
237
237
|
|
|
238
238
|
- `text` **[string][4]** which is not present.
|
|
239
239
|
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
240
|
-
|
|
240
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
241
241
|
|
|
242
242
|
### dontSeeCheckboxIsChecked
|
|
243
243
|
|
|
@@ -252,7 +252,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
252
252
|
#### Parameters
|
|
253
253
|
|
|
254
254
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
255
|
-
|
|
255
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
256
256
|
|
|
257
257
|
### dontSeeCookie
|
|
258
258
|
|
|
@@ -265,7 +265,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
265
265
|
#### Parameters
|
|
266
266
|
|
|
267
267
|
- `name` **[string][4]** cookie name.
|
|
268
|
-
|
|
268
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
269
269
|
|
|
270
270
|
### dontSeeCurrentUrlEquals
|
|
271
271
|
|
|
@@ -280,7 +280,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
280
280
|
#### Parameters
|
|
281
281
|
|
|
282
282
|
- `url` **[string][4]** value to check.
|
|
283
|
-
|
|
283
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
284
284
|
|
|
285
285
|
### dontSeeElement
|
|
286
286
|
|
|
@@ -293,7 +293,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
293
293
|
#### Parameters
|
|
294
294
|
|
|
295
295
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|Strict locator.
|
|
296
|
-
|
|
296
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
297
297
|
|
|
298
298
|
### dontSeeElementInDOM
|
|
299
299
|
|
|
@@ -306,7 +306,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
306
306
|
#### Parameters
|
|
307
307
|
|
|
308
308
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|Strict locator.
|
|
309
|
-
|
|
309
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
310
310
|
|
|
311
311
|
### dontSeeInCurrentUrl
|
|
312
312
|
|
|
@@ -315,7 +315,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
315
315
|
#### Parameters
|
|
316
316
|
|
|
317
317
|
- `url` **[string][4]** value to check.
|
|
318
|
-
|
|
318
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
319
319
|
|
|
320
320
|
### dontSeeInField
|
|
321
321
|
|
|
@@ -331,7 +331,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
331
331
|
|
|
332
332
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
333
333
|
- `value` **[string][4]** value to check.
|
|
334
|
-
|
|
334
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
335
335
|
|
|
336
336
|
### dontSeeInSource
|
|
337
337
|
|
|
@@ -345,7 +345,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
345
345
|
|
|
346
346
|
- `text`
|
|
347
347
|
- `value` **[string][4]** to check.
|
|
348
|
-
|
|
348
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
349
349
|
|
|
350
350
|
### doubleClick
|
|
351
351
|
|
|
@@ -363,7 +363,7 @@ I.doubleClick('.btn.edit');
|
|
|
363
363
|
|
|
364
364
|
- `locator` **([string][4] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
365
365
|
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
366
|
-
|
|
366
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
367
367
|
|
|
368
368
|
### executeScript
|
|
369
369
|
|
|
@@ -395,7 +395,7 @@ let date = await I.executeScript(function(el) {
|
|
|
395
395
|
|
|
396
396
|
- `fn` **([string][4] | [function][6])** function to be executed in browser context.
|
|
397
397
|
- `args` **...any** to be passed to function.
|
|
398
|
-
|
|
398
|
+
⚠️ returns a _promise_ which is synchronized internally by recorderIf a function returns a Promise It will wait for it resolution.
|
|
399
399
|
|
|
400
400
|
### fillField
|
|
401
401
|
|
|
@@ -417,7 +417,7 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
417
417
|
|
|
418
418
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
419
419
|
- `value` **([string][4] | [object][5])** text value to fill.
|
|
420
|
-
|
|
420
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
421
421
|
|
|
422
422
|
### grabAttributeFrom
|
|
423
423
|
|
|
@@ -606,7 +606,7 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
606
606
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
607
607
|
- `offsetX` **[number][9]** (optional, `0` by default) X-axis offset.
|
|
608
608
|
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
609
|
-
|
|
609
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
610
610
|
|
|
611
611
|
### pressKey
|
|
612
612
|
|
|
@@ -623,7 +623,7 @@ I.pressKey(['Control','a']);
|
|
|
623
623
|
#### Parameters
|
|
624
624
|
|
|
625
625
|
- `key` **([string][4] | [Array][8]<[string][4]>)** key or array of keys to press.
|
|
626
|
-
|
|
626
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
627
627
|
|
|
628
628
|
|
|
629
629
|
[Valid key names](https://w3c.github.io/webdriver/#keyboard-actions) are:
|
|
@@ -666,7 +666,7 @@ Reload the current page.
|
|
|
666
666
|
I.refreshPage();
|
|
667
667
|
```
|
|
668
668
|
|
|
669
|
-
|
|
669
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
670
670
|
|
|
671
671
|
### resizeWindow
|
|
672
672
|
|
|
@@ -677,7 +677,7 @@ First parameter can be set to `maximize`.
|
|
|
677
677
|
|
|
678
678
|
- `width` **[number][9]** width in pixels or `maximize`.
|
|
679
679
|
- `height` **[number][9]** height in pixels.
|
|
680
|
-
|
|
680
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
681
681
|
|
|
682
682
|
### rightClick
|
|
683
683
|
|
|
@@ -696,11 +696,11 @@ I.rightClick('Click me', '.context');
|
|
|
696
696
|
|
|
697
697
|
- `locator` **([string][4] | [object][5])** clickable element located by CSS|XPath|strict locator.
|
|
698
698
|
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
699
|
-
|
|
699
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
700
700
|
|
|
701
701
|
### saveElementScreenshot
|
|
702
702
|
|
|
703
|
-
Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
703
|
+
Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
704
704
|
Filename is relative to output folder.
|
|
705
705
|
|
|
706
706
|
```js
|
|
@@ -711,11 +711,11 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
711
711
|
|
|
712
712
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
713
713
|
- `fileName` **[string][4]** file name to save.
|
|
714
|
-
|
|
714
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
715
715
|
|
|
716
716
|
### saveScreenshot
|
|
717
717
|
|
|
718
|
-
Saves a screenshot to ouput folder (set in codecept.
|
|
718
|
+
Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
719
719
|
Filename is relative to output folder.
|
|
720
720
|
Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
721
721
|
|
|
@@ -728,7 +728,7 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
728
728
|
|
|
729
729
|
- `fileName` **[string][4]** file name to save.
|
|
730
730
|
- `fullPage` **[boolean][11]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
731
|
-
|
|
731
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
732
732
|
|
|
733
733
|
### scrollPageToBottom
|
|
734
734
|
|
|
@@ -738,7 +738,7 @@ Scroll page to the bottom.
|
|
|
738
738
|
I.scrollPageToBottom();
|
|
739
739
|
```
|
|
740
740
|
|
|
741
|
-
|
|
741
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
742
742
|
|
|
743
743
|
### scrollPageToTop
|
|
744
744
|
|
|
@@ -748,7 +748,7 @@ Scroll page to the top.
|
|
|
748
748
|
I.scrollPageToTop();
|
|
749
749
|
```
|
|
750
750
|
|
|
751
|
-
|
|
751
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
752
752
|
|
|
753
753
|
### scrollTo
|
|
754
754
|
|
|
@@ -765,7 +765,7 @@ I.scrollTo('#submit', 5, 5);
|
|
|
765
765
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
766
766
|
- `offsetX` **[number][9]** (optional, `0` by default) X-axis offset.
|
|
767
767
|
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
768
|
-
|
|
768
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
769
769
|
|
|
770
770
|
### see
|
|
771
771
|
|
|
@@ -782,7 +782,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
782
782
|
|
|
783
783
|
- `text` **[string][4]** expected on page.
|
|
784
784
|
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
785
|
-
|
|
785
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
786
786
|
|
|
787
787
|
### seeCheckboxIsChecked
|
|
788
788
|
|
|
@@ -797,7 +797,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
797
797
|
#### Parameters
|
|
798
798
|
|
|
799
799
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
800
|
-
|
|
800
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
801
801
|
|
|
802
802
|
### seeCookie
|
|
803
803
|
|
|
@@ -810,7 +810,7 @@ I.seeCookie('Auth');
|
|
|
810
810
|
#### Parameters
|
|
811
811
|
|
|
812
812
|
- `name` **[string][4]** cookie name.
|
|
813
|
-
|
|
813
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
814
814
|
|
|
815
815
|
### seeCurrentUrlEquals
|
|
816
816
|
|
|
@@ -826,7 +826,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
826
826
|
#### Parameters
|
|
827
827
|
|
|
828
828
|
- `url` **[string][4]** value to check.
|
|
829
|
-
|
|
829
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
830
830
|
|
|
831
831
|
### seeElement
|
|
832
832
|
|
|
@@ -840,7 +840,7 @@ I.seeElement('#modal');
|
|
|
840
840
|
#### Parameters
|
|
841
841
|
|
|
842
842
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
843
|
-
|
|
843
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
844
844
|
|
|
845
845
|
### seeElementInDOM
|
|
846
846
|
|
|
@@ -854,7 +854,7 @@ I.seeElementInDOM('#modal');
|
|
|
854
854
|
#### Parameters
|
|
855
855
|
|
|
856
856
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
857
|
-
|
|
857
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
858
858
|
|
|
859
859
|
### seeInCurrentUrl
|
|
860
860
|
|
|
@@ -867,7 +867,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
867
867
|
#### Parameters
|
|
868
868
|
|
|
869
869
|
- `url` **[string][4]** a fragment to check
|
|
870
|
-
|
|
870
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
871
871
|
|
|
872
872
|
### seeInField
|
|
873
873
|
|
|
@@ -885,7 +885,7 @@ I.seeInField('#searchform input','Search');
|
|
|
885
885
|
|
|
886
886
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
887
887
|
- `value` **[string][4]** value to check.
|
|
888
|
-
|
|
888
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
889
889
|
|
|
890
890
|
### seeInSource
|
|
891
891
|
|
|
@@ -898,7 +898,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
898
898
|
#### Parameters
|
|
899
899
|
|
|
900
900
|
- `text` **[string][4]** value to check.
|
|
901
|
-
|
|
901
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
902
902
|
|
|
903
903
|
### seeNumberOfVisibleElements
|
|
904
904
|
|
|
@@ -913,7 +913,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
913
913
|
|
|
914
914
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
915
915
|
- `num` **[number][9]** number of elements.
|
|
916
|
-
|
|
916
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
917
917
|
|
|
918
918
|
### seeTextEquals
|
|
919
919
|
|
|
@@ -953,7 +953,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
953
953
|
|
|
954
954
|
- `select` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
955
955
|
- `option` **([string][4] | [Array][8]<any>)** visible text or value of option.
|
|
956
|
-
|
|
956
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
957
957
|
|
|
958
958
|
### setCookie
|
|
959
959
|
|
|
@@ -974,7 +974,7 @@ I.setCookie([
|
|
|
974
974
|
#### Parameters
|
|
975
975
|
|
|
976
976
|
- `cookie` **(Cookie | [Array][8]<Cookie>)** a cookie object or array of cookie objects.
|
|
977
|
-
|
|
977
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
978
978
|
|
|
979
979
|
### switchTo
|
|
980
980
|
|
|
@@ -988,7 +988,7 @@ I.switchTo(); // switch back to main page
|
|
|
988
988
|
#### Parameters
|
|
989
989
|
|
|
990
990
|
- `locator` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
991
|
-
|
|
991
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
992
992
|
|
|
993
993
|
### uncheckOption
|
|
994
994
|
|
|
@@ -1007,7 +1007,7 @@ I.uncheckOption('agree', '//form');
|
|
|
1007
1007
|
|
|
1008
1008
|
- `field` **([string][4] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1009
1009
|
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1010
|
-
|
|
1010
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1011
1011
|
|
|
1012
1012
|
### useTestCafeTo
|
|
1013
1013
|
|
|
@@ -1040,7 +1040,7 @@ I.wait(2); // wait 2 secs
|
|
|
1040
1040
|
#### Parameters
|
|
1041
1041
|
|
|
1042
1042
|
- `sec` **[number][9]** number of second to wait.
|
|
1043
|
-
|
|
1043
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1044
1044
|
|
|
1045
1045
|
### waitForElement
|
|
1046
1046
|
|
|
@@ -1056,7 +1056,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1056
1056
|
|
|
1057
1057
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1058
1058
|
- `sec` **[number][9]?** (optional, `1` by default) time in seconds to wait
|
|
1059
|
-
|
|
1059
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1060
1060
|
|
|
1061
1061
|
### waitForFunction
|
|
1062
1062
|
|
|
@@ -1078,7 +1078,7 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1078
1078
|
- `fn` **([string][4] | [function][6])** to be executed in browser context.
|
|
1079
1079
|
- `argsOrSec` **([Array][8]<any> | [number][9])?** (optional, `1` by default) arguments for function or seconds.
|
|
1080
1080
|
- `sec` **[number][9]?** (optional, `1` by default) time in seconds to wait
|
|
1081
|
-
|
|
1081
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1082
1082
|
|
|
1083
1083
|
### waitForInvisible
|
|
1084
1084
|
|
|
@@ -1093,7 +1093,7 @@ I.waitForInvisible('#popup');
|
|
|
1093
1093
|
|
|
1094
1094
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1095
1095
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1096
|
-
|
|
1096
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1097
1097
|
|
|
1098
1098
|
### waitForText
|
|
1099
1099
|
|
|
@@ -1111,7 +1111,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1111
1111
|
- `text` **[string][4]** to wait for.
|
|
1112
1112
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1113
1113
|
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
|
|
1114
|
-
|
|
1114
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1115
1115
|
|
|
1116
1116
|
### waitForVisible
|
|
1117
1117
|
|
|
@@ -1126,7 +1126,7 @@ I.waitForVisible('#popup');
|
|
|
1126
1126
|
|
|
1127
1127
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1128
1128
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1129
|
-
|
|
1129
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1130
1130
|
|
|
1131
1131
|
### waitInUrl
|
|
1132
1132
|
|
|
@@ -1140,7 +1140,7 @@ I.waitInUrl('/info', 2);
|
|
|
1140
1140
|
|
|
1141
1141
|
- `urlPart` **[string][4]** value to check.
|
|
1142
1142
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1143
|
-
|
|
1143
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1144
1144
|
|
|
1145
1145
|
### waitNumberOfVisibleElements
|
|
1146
1146
|
|
|
@@ -1155,7 +1155,7 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
1155
1155
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1156
1156
|
- `num` **[number][9]** number of elements.
|
|
1157
1157
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1158
|
-
|
|
1158
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1159
1159
|
|
|
1160
1160
|
### waitToHide
|
|
1161
1161
|
|
|
@@ -1170,7 +1170,7 @@ I.waitToHide('#popup');
|
|
|
1170
1170
|
|
|
1171
1171
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1172
1172
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1173
|
-
|
|
1173
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1174
1174
|
|
|
1175
1175
|
### waitUrlEquals
|
|
1176
1176
|
|
|
@@ -1185,7 +1185,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
1185
1185
|
|
|
1186
1186
|
- `urlPart` **[string][4]** value to check.
|
|
1187
1187
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1188
|
-
|
|
1188
|
+
⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1189
1189
|
|
|
1190
1190
|
## getPageUrl
|
|
1191
1191
|
|