codeceptjs 3.3.0-beta.5 → 3.3.2
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 +50 -1
- package/README.md +6 -1
- package/docs/api.md +45 -30
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +53 -48
- 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 +101 -72
- package/docs/build/Playwright.js +166 -113
- package/docs/build/Protractor.js +72 -34
- package/docs/build/Puppeteer.js +143 -100
- package/docs/build/REST.js +5 -2
- package/docs/build/TestCafe.js +97 -66
- package/docs/build/WebDriver.js +183 -135
- package/docs/changelog.md +99 -0
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/email.md +5 -0
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +217 -175
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/MockRequest.md +8 -6
- package/docs/helpers/Nightmare.md +98 -45
- package/docs/helpers/Playwright.md +151 -59
- package/docs/helpers/Puppeteer.md +103 -26
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +77 -22
- package/docs/helpers/WebDriver.md +150 -62
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/videos.md +2 -2
- 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/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -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 +2 -7
- 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 +28 -17
- package/lib/helper/REST.js +5 -2
- package/lib/helper/WebDriver.js +4 -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 +578 -109
package/docs/helpers/TestCafe.md
CHANGED
|
@@ -107,6 +107,8 @@ I.amOnPage('/login'); // opens a login page
|
|
|
107
107
|
|
|
108
108
|
- `url` **[string][4]** url path or global url.
|
|
109
109
|
|
|
110
|
+
Returns **void** automatically synchronized promise with recorder #!
|
|
111
|
+
|
|
110
112
|
### appendField
|
|
111
113
|
|
|
112
114
|
Appends text to a input field or textarea.
|
|
@@ -120,6 +122,7 @@ I.appendField('#myTextField', 'appended');
|
|
|
120
122
|
|
|
121
123
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator
|
|
122
124
|
- `value` **[string][4]** text value to append.
|
|
125
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
123
126
|
|
|
124
127
|
### attachFile
|
|
125
128
|
|
|
@@ -136,6 +139,7 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
136
139
|
|
|
137
140
|
- `field`
|
|
138
141
|
- `pathToFile` **[string][4]** local file path relative to codecept.json config file.
|
|
142
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
139
143
|
- `locator` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
140
144
|
|
|
141
145
|
### checkOption
|
|
@@ -154,7 +158,8 @@ I.checkOption('agree', '//form');
|
|
|
154
158
|
#### Parameters
|
|
155
159
|
|
|
156
160
|
- `field` **([string][4] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
157
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
161
|
+
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
162
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
158
163
|
|
|
159
164
|
### clearCookie
|
|
160
165
|
|
|
@@ -169,7 +174,8 @@ I.clearCookie('test');
|
|
|
169
174
|
#### Parameters
|
|
170
175
|
|
|
171
176
|
- `cookieName`
|
|
172
|
-
- `cookie` **[string][4]?** (optional, `null` by default) cookie name
|
|
177
|
+
- `cookie` **[string][4]?** (optional, `null` by default) cookie name
|
|
178
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
173
179
|
|
|
174
180
|
### clearField
|
|
175
181
|
|
|
@@ -185,6 +191,7 @@ I.clearField('#email');
|
|
|
185
191
|
|
|
186
192
|
- `field`
|
|
187
193
|
- `editable` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
194
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
188
195
|
|
|
189
196
|
### click
|
|
190
197
|
|
|
@@ -213,7 +220,8 @@ I.click({css: 'nav a.login'});
|
|
|
213
220
|
#### Parameters
|
|
214
221
|
|
|
215
222
|
- `locator` **([string][4] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
216
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
223
|
+
- `context` **([string][4]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
224
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
217
225
|
|
|
218
226
|
### dontSee
|
|
219
227
|
|
|
@@ -228,7 +236,8 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
228
236
|
#### Parameters
|
|
229
237
|
|
|
230
238
|
- `text` **[string][4]** which is not present.
|
|
231
|
-
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
239
|
+
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
240
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
232
241
|
|
|
233
242
|
### dontSeeCheckboxIsChecked
|
|
234
243
|
|
|
@@ -243,6 +252,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
243
252
|
#### Parameters
|
|
244
253
|
|
|
245
254
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
255
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
246
256
|
|
|
247
257
|
### dontSeeCookie
|
|
248
258
|
|
|
@@ -255,6 +265,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
255
265
|
#### Parameters
|
|
256
266
|
|
|
257
267
|
- `name` **[string][4]** cookie name.
|
|
268
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
258
269
|
|
|
259
270
|
### dontSeeCurrentUrlEquals
|
|
260
271
|
|
|
@@ -269,6 +280,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
269
280
|
#### Parameters
|
|
270
281
|
|
|
271
282
|
- `url` **[string][4]** value to check.
|
|
283
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
272
284
|
|
|
273
285
|
### dontSeeElement
|
|
274
286
|
|
|
@@ -281,6 +293,7 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
281
293
|
#### Parameters
|
|
282
294
|
|
|
283
295
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|Strict locator.
|
|
296
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
284
297
|
|
|
285
298
|
### dontSeeElementInDOM
|
|
286
299
|
|
|
@@ -293,6 +306,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
293
306
|
#### Parameters
|
|
294
307
|
|
|
295
308
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|Strict locator.
|
|
309
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
296
310
|
|
|
297
311
|
### dontSeeInCurrentUrl
|
|
298
312
|
|
|
@@ -301,6 +315,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
301
315
|
#### Parameters
|
|
302
316
|
|
|
303
317
|
- `url` **[string][4]** value to check.
|
|
318
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
304
319
|
|
|
305
320
|
### dontSeeInField
|
|
306
321
|
|
|
@@ -316,6 +331,7 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
316
331
|
|
|
317
332
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
318
333
|
- `value` **[string][4]** value to check.
|
|
334
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
319
335
|
|
|
320
336
|
### dontSeeInSource
|
|
321
337
|
|
|
@@ -329,6 +345,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
329
345
|
|
|
330
346
|
- `text`
|
|
331
347
|
- `value` **[string][4]** to check.
|
|
348
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
332
349
|
|
|
333
350
|
### doubleClick
|
|
334
351
|
|
|
@@ -345,7 +362,8 @@ I.doubleClick('.btn.edit');
|
|
|
345
362
|
#### Parameters
|
|
346
363
|
|
|
347
364
|
- `locator` **([string][4] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
348
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
365
|
+
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
366
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
349
367
|
|
|
350
368
|
### executeScript
|
|
351
369
|
|
|
@@ -377,8 +395,7 @@ let date = await I.executeScript(function(el) {
|
|
|
377
395
|
|
|
378
396
|
- `fn` **([string][4] | [function][6])** function to be executed in browser context.
|
|
379
397
|
- `args` **...any** to be passed to function.
|
|
380
|
-
|
|
381
|
-
Returns **[Promise][7]<any>** If a function returns a Promise It will wait for it resolution.
|
|
398
|
+
[!] returns a _promise_ which is synchronized internally by recorderIf a function returns a Promise It will wait for it resolution.
|
|
382
399
|
|
|
383
400
|
### fillField
|
|
384
401
|
|
|
@@ -400,6 +417,7 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
400
417
|
|
|
401
418
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
402
419
|
- `value` **([string][4] | [object][5])** text value to fill.
|
|
420
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
403
421
|
|
|
404
422
|
### grabAttributeFrom
|
|
405
423
|
|
|
@@ -587,7 +605,8 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
587
605
|
|
|
588
606
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
589
607
|
- `offsetX` **[number][9]** (optional, `0` by default) X-axis offset.
|
|
590
|
-
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
608
|
+
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
609
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
591
610
|
|
|
592
611
|
### pressKey
|
|
593
612
|
|
|
@@ -604,6 +623,7 @@ I.pressKey(['Control','a']);
|
|
|
604
623
|
#### Parameters
|
|
605
624
|
|
|
606
625
|
- `key` **([string][4] | [Array][8]<[string][4]>)** key or array of keys to press.
|
|
626
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
607
627
|
|
|
608
628
|
|
|
609
629
|
[Valid key names](https://w3c.github.io/webdriver/#keyboard-actions) are:
|
|
@@ -646,6 +666,8 @@ Reload the current page.
|
|
|
646
666
|
I.refreshPage();
|
|
647
667
|
```
|
|
648
668
|
|
|
669
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
670
|
+
|
|
649
671
|
### resizeWindow
|
|
650
672
|
|
|
651
673
|
Resize the current window to provided width and height.
|
|
@@ -655,6 +677,7 @@ First parameter can be set to `maximize`.
|
|
|
655
677
|
|
|
656
678
|
- `width` **[number][9]** width in pixels or `maximize`.
|
|
657
679
|
- `height` **[number][9]** height in pixels.
|
|
680
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
658
681
|
|
|
659
682
|
### rightClick
|
|
660
683
|
|
|
@@ -672,7 +695,8 @@ I.rightClick('Click me', '.context');
|
|
|
672
695
|
#### Parameters
|
|
673
696
|
|
|
674
697
|
- `locator` **([string][4] | [object][5])** clickable element located by CSS|XPath|strict locator.
|
|
675
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
698
|
+
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
699
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
676
700
|
|
|
677
701
|
### saveElementScreenshot
|
|
678
702
|
|
|
@@ -687,6 +711,7 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
687
711
|
|
|
688
712
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
689
713
|
- `fileName` **[string][4]** file name to save.
|
|
714
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
690
715
|
|
|
691
716
|
### saveScreenshot
|
|
692
717
|
|
|
@@ -702,7 +727,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
702
727
|
#### Parameters
|
|
703
728
|
|
|
704
729
|
- `fileName` **[string][4]** file name to save.
|
|
705
|
-
- `fullPage` **[boolean][11]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
730
|
+
- `fullPage` **[boolean][11]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
731
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
706
732
|
|
|
707
733
|
### scrollPageToBottom
|
|
708
734
|
|
|
@@ -712,6 +738,8 @@ Scroll page to the bottom.
|
|
|
712
738
|
I.scrollPageToBottom();
|
|
713
739
|
```
|
|
714
740
|
|
|
741
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
742
|
+
|
|
715
743
|
### scrollPageToTop
|
|
716
744
|
|
|
717
745
|
Scroll page to the top.
|
|
@@ -720,6 +748,8 @@ Scroll page to the top.
|
|
|
720
748
|
I.scrollPageToTop();
|
|
721
749
|
```
|
|
722
750
|
|
|
751
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
752
|
+
|
|
723
753
|
### scrollTo
|
|
724
754
|
|
|
725
755
|
Scrolls to element matched by locator.
|
|
@@ -734,7 +764,8 @@ I.scrollTo('#submit', 5, 5);
|
|
|
734
764
|
|
|
735
765
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
736
766
|
- `offsetX` **[number][9]** (optional, `0` by default) X-axis offset.
|
|
737
|
-
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
767
|
+
- `offsetY` **[number][9]** (optional, `0` by default) Y-axis offset.
|
|
768
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
738
769
|
|
|
739
770
|
### see
|
|
740
771
|
|
|
@@ -750,7 +781,8 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
750
781
|
#### Parameters
|
|
751
782
|
|
|
752
783
|
- `text` **[string][4]** expected on page.
|
|
753
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
784
|
+
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
785
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
754
786
|
|
|
755
787
|
### seeCheckboxIsChecked
|
|
756
788
|
|
|
@@ -765,6 +797,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
765
797
|
#### Parameters
|
|
766
798
|
|
|
767
799
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
800
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
768
801
|
|
|
769
802
|
### seeCookie
|
|
770
803
|
|
|
@@ -777,6 +810,7 @@ I.seeCookie('Auth');
|
|
|
777
810
|
#### Parameters
|
|
778
811
|
|
|
779
812
|
- `name` **[string][4]** cookie name.
|
|
813
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
780
814
|
|
|
781
815
|
### seeCurrentUrlEquals
|
|
782
816
|
|
|
@@ -792,6 +826,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
792
826
|
#### Parameters
|
|
793
827
|
|
|
794
828
|
- `url` **[string][4]** value to check.
|
|
829
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
795
830
|
|
|
796
831
|
### seeElement
|
|
797
832
|
|
|
@@ -805,6 +840,7 @@ I.seeElement('#modal');
|
|
|
805
840
|
#### Parameters
|
|
806
841
|
|
|
807
842
|
- `locator` **([string][4] | [object][5])** located by CSS|XPath|strict locator.
|
|
843
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
808
844
|
|
|
809
845
|
### seeElementInDOM
|
|
810
846
|
|
|
@@ -818,6 +854,7 @@ I.seeElementInDOM('#modal');
|
|
|
818
854
|
#### Parameters
|
|
819
855
|
|
|
820
856
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
857
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
821
858
|
|
|
822
859
|
### seeInCurrentUrl
|
|
823
860
|
|
|
@@ -830,6 +867,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
830
867
|
#### Parameters
|
|
831
868
|
|
|
832
869
|
- `url` **[string][4]** a fragment to check
|
|
870
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
833
871
|
|
|
834
872
|
### seeInField
|
|
835
873
|
|
|
@@ -847,6 +885,7 @@ I.seeInField('#searchform input','Search');
|
|
|
847
885
|
|
|
848
886
|
- `field` **([string][4] | [object][5])** located by label|name|CSS|XPath|strict locator.
|
|
849
887
|
- `value` **[string][4]** value to check.
|
|
888
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
850
889
|
|
|
851
890
|
### seeInSource
|
|
852
891
|
|
|
@@ -859,6 +898,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
859
898
|
#### Parameters
|
|
860
899
|
|
|
861
900
|
- `text` **[string][4]** value to check.
|
|
901
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
862
902
|
|
|
863
903
|
### seeNumberOfVisibleElements
|
|
864
904
|
|
|
@@ -873,6 +913,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
873
913
|
|
|
874
914
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
875
915
|
- `num` **[number][9]** number of elements.
|
|
916
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
876
917
|
|
|
877
918
|
### seeTextEquals
|
|
878
919
|
|
|
@@ -912,6 +953,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
912
953
|
|
|
913
954
|
- `select` **([string][4] | [object][5])** field located by label|name|CSS|XPath|strict locator.
|
|
914
955
|
- `option` **([string][4] | [Array][8]<any>)** visible text or value of option.
|
|
956
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
915
957
|
|
|
916
958
|
### setCookie
|
|
917
959
|
|
|
@@ -932,6 +974,7 @@ I.setCookie([
|
|
|
932
974
|
#### Parameters
|
|
933
975
|
|
|
934
976
|
- `cookie` **(Cookie | [Array][8]<Cookie>)** a cookie object or array of cookie objects.
|
|
977
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
935
978
|
|
|
936
979
|
### switchTo
|
|
937
980
|
|
|
@@ -944,7 +987,8 @@ I.switchTo(); // switch back to main page
|
|
|
944
987
|
|
|
945
988
|
#### Parameters
|
|
946
989
|
|
|
947
|
-
- `locator` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
990
|
+
- `locator` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
991
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
948
992
|
|
|
949
993
|
### uncheckOption
|
|
950
994
|
|
|
@@ -962,7 +1006,8 @@ I.uncheckOption('agree', '//form');
|
|
|
962
1006
|
#### Parameters
|
|
963
1007
|
|
|
964
1008
|
- `field` **([string][4] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
965
|
-
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1009
|
+
- `context` **([string][4]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1010
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
966
1011
|
|
|
967
1012
|
### useTestCafeTo
|
|
968
1013
|
|
|
@@ -995,6 +1040,7 @@ I.wait(2); // wait 2 secs
|
|
|
995
1040
|
#### Parameters
|
|
996
1041
|
|
|
997
1042
|
- `sec` **[number][9]** number of second to wait.
|
|
1043
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
998
1044
|
|
|
999
1045
|
### waitForElement
|
|
1000
1046
|
|
|
@@ -1010,6 +1056,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1010
1056
|
|
|
1011
1057
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1012
1058
|
- `sec` **[number][9]?** (optional, `1` by default) time in seconds to wait
|
|
1059
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1013
1060
|
|
|
1014
1061
|
### waitForFunction
|
|
1015
1062
|
|
|
@@ -1030,7 +1077,8 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1030
1077
|
|
|
1031
1078
|
- `fn` **([string][4] | [function][6])** to be executed in browser context.
|
|
1032
1079
|
- `argsOrSec` **([Array][8]<any> | [number][9])?** (optional, `1` by default) arguments for function or seconds.
|
|
1033
|
-
- `sec` **[number][9]?** (optional, `1` by default) time in seconds to wait
|
|
1080
|
+
- `sec` **[number][9]?** (optional, `1` by default) time in seconds to wait
|
|
1081
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1034
1082
|
|
|
1035
1083
|
### waitForInvisible
|
|
1036
1084
|
|
|
@@ -1044,7 +1092,8 @@ I.waitForInvisible('#popup');
|
|
|
1044
1092
|
#### Parameters
|
|
1045
1093
|
|
|
1046
1094
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1047
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1095
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1096
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1048
1097
|
|
|
1049
1098
|
### waitForText
|
|
1050
1099
|
|
|
@@ -1061,7 +1110,8 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1061
1110
|
|
|
1062
1111
|
- `text` **[string][4]** to wait for.
|
|
1063
1112
|
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1064
|
-
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
|
|
1113
|
+
- `context` **([string][4] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
|
|
1114
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1065
1115
|
|
|
1066
1116
|
### waitForVisible
|
|
1067
1117
|
|
|
@@ -1075,7 +1125,8 @@ I.waitForVisible('#popup');
|
|
|
1075
1125
|
#### Parameters
|
|
1076
1126
|
|
|
1077
1127
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1078
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1128
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1129
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1079
1130
|
|
|
1080
1131
|
### waitInUrl
|
|
1081
1132
|
|
|
@@ -1088,7 +1139,8 @@ I.waitInUrl('/info', 2);
|
|
|
1088
1139
|
#### Parameters
|
|
1089
1140
|
|
|
1090
1141
|
- `urlPart` **[string][4]** value to check.
|
|
1091
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1142
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1143
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1092
1144
|
|
|
1093
1145
|
### waitNumberOfVisibleElements
|
|
1094
1146
|
|
|
@@ -1102,7 +1154,8 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
1102
1154
|
|
|
1103
1155
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1104
1156
|
- `num` **[number][9]** number of elements.
|
|
1105
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1157
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1158
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1106
1159
|
|
|
1107
1160
|
### waitToHide
|
|
1108
1161
|
|
|
@@ -1116,7 +1169,8 @@ I.waitToHide('#popup');
|
|
|
1116
1169
|
#### Parameters
|
|
1117
1170
|
|
|
1118
1171
|
- `locator` **([string][4] | [object][5])** element located by CSS|XPath|strict locator.
|
|
1119
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1172
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1173
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1120
1174
|
|
|
1121
1175
|
### waitUrlEquals
|
|
1122
1176
|
|
|
@@ -1130,7 +1184,8 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
1130
1184
|
#### Parameters
|
|
1131
1185
|
|
|
1132
1186
|
- `urlPart` **[string][4]** value to check.
|
|
1133
|
-
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1187
|
+
- `sec` **[number][9]** (optional, `1` by default) time in seconds to wait
|
|
1188
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1134
1189
|
|
|
1135
1190
|
## getPageUrl
|
|
1136
1191
|
|