codeceptjs 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/docs/ai.md +1 -1
- package/docs/alternative-browsers.md +4 -4
- package/docs/api.md +13 -13
- package/docs/assertions.md +6 -6
- package/docs/best.md +1 -1
- package/docs/bootstrap.md +1 -1
- package/docs/data.md +8 -8
- package/docs/element-selection.md +27 -4
- package/docs/helpers/ApiDataFactory.md +2 -2
- package/docs/helpers/Appium.md +56 -56
- package/docs/helpers/Decision.md +1 -1
- package/docs/helpers/Detox.md +1 -1
- package/docs/helpers/ExpectHelper.md +1 -1
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/GraphQL.md +1 -1
- package/docs/helpers/GraphQLDataFactory.md +2 -2
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/Kitesurf.md +65 -65
- package/docs/helpers/Lightpanda.md +65 -65
- package/docs/helpers/MockRequest.md +1 -1
- package/docs/helpers/Moli.md +65 -65
- package/docs/helpers/Obscura.md +65 -65
- package/docs/helpers/Playwright.md +127 -127
- package/docs/helpers/Puppeteer.md +88 -88
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/WebDriver.md +87 -87
- package/docs/installation.md +1 -1
- package/docs/locators.md +5 -7
- package/docs/migration-4.md +7 -3
- package/docs/mobile.md +2 -2
- package/docs/parallel.md +1 -1
- package/docs/playwright.md +5 -5
- package/docs/plugins/aiTrace.md +1 -1
- package/docs/plugins/autoDelay.md +1 -1
- package/docs/plugins/customLocator.md +1 -1
- package/docs/plugins/customReporter.md +1 -1
- package/docs/plugins/junitReporter.md +2 -2
- package/docs/plugins/pageInfo.md +1 -1
- package/docs/plugins/pauseOnFail.md +1 -1
- package/docs/plugins/retryFailedStep.md +1 -1
- package/docs/plugins/screenshotOnFail.md +1 -1
- package/docs/plugins/stepTimeout.md +1 -1
- package/docs/plugins.md +10 -10
- package/docs/puppeteer.md +4 -4
- package/docs/retry.md +1 -1
- package/docs/timeouts.md +7 -7
- package/docs/webdriver.md +8 -8
- package/lib/actor.js +20 -2
- package/lib/aria.js +1 -0
- package/lib/codecept.js +1 -1
- package/lib/data/context.js +24 -0
- package/lib/element/WebElement.js +5 -5
- package/lib/helper/ApiDataFactory.js +1 -1
- package/lib/helper/Appium.js +2 -2
- package/lib/helper/GraphQLDataFactory.js +1 -1
- package/lib/helper/Playwright.js +22 -12
- package/lib/helper/Puppeteer.js +5 -11
- package/lib/mocha/asyncWrapper.js +14 -3
- package/lib/mocha/test.js +1 -0
- package/lib/plugin/auth.js +3 -0
- package/lib/plugin/junitReporter.js +21 -12
- package/lib/recorder.js +22 -3
- package/lib/step/base.js +8 -1
- package/lib/step/func.js +1 -1
- package/lib/step/helper.js +1 -1
- package/lib/step/record.js +22 -17
- package/lib/step/retry.js +13 -6
- package/lib/utils/typescript.js +86 -12
- package/lib/workers.js +15 -0
- package/package.json +2 -1
- package/typings/index.d.ts +12 -0
- package/typings/promiseBasedTypes.d.ts +696 -351
- package/typings/types.d.ts +485 -352
package/docs/helpers/Kitesurf.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
permalink: /helpers/
|
|
2
|
+
permalink: /helpers/kitesurf
|
|
3
3
|
editLink: false
|
|
4
4
|
sidebar: auto
|
|
5
5
|
title: Kitesurf
|
|
@@ -109,7 +109,7 @@ I.amOnPage('/login'); // opens a login page
|
|
|
109
109
|
|
|
110
110
|
* `url` **[string][3]** url path or global url.
|
|
111
111
|
|
|
112
|
-
Returns **
|
|
112
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
113
113
|
|
|
114
114
|
### appendField
|
|
115
115
|
|
|
@@ -132,7 +132,7 @@ I.appendField('name', 'John', '.form-container');
|
|
|
132
132
|
* `value` **[string][3]** text value to append.
|
|
133
133
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
134
134
|
|
|
135
|
-
Returns **
|
|
135
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
136
136
|
|
|
137
137
|
### attachFile
|
|
138
138
|
|
|
@@ -163,7 +163,7 @@ I.attachFile('#dropzone', 'data/avatar.jpg');
|
|
|
163
163
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
164
164
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
165
165
|
|
|
166
|
-
Returns **
|
|
166
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
167
167
|
|
|
168
168
|
### blur
|
|
169
169
|
|
|
@@ -188,7 +188,7 @@ I.dontSee('#add-to-cart-btn');
|
|
|
188
188
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
189
189
|
* `options` **any?** Playwright only: [Additional options][6] for available options object as 2nd argument.
|
|
190
190
|
|
|
191
|
-
Returns **
|
|
191
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
192
192
|
|
|
193
193
|
### capabilities
|
|
194
194
|
|
|
@@ -212,7 +212,7 @@ I.checkOption('agree', '//form');
|
|
|
212
212
|
* `field` **([string][3] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
213
213
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
214
214
|
|
|
215
|
-
Returns **
|
|
215
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
216
216
|
|
|
217
217
|
### clearClipboard
|
|
218
218
|
|
|
@@ -223,7 +223,7 @@ I.clearClipboard();
|
|
|
223
223
|
I.seeClipboardEquals('');
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
Returns **
|
|
226
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
227
227
|
|
|
228
228
|
### clearCookie
|
|
229
229
|
|
|
@@ -260,7 +260,7 @@ I.clearField('Email', '.form-container');
|
|
|
260
260
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
261
261
|
* `editable` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
262
262
|
|
|
263
|
-
Returns **
|
|
263
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder.
|
|
264
264
|
|
|
265
265
|
### click
|
|
266
266
|
|
|
@@ -299,7 +299,7 @@ I.click({role: 'button', name: 'Submit'});
|
|
|
299
299
|
* `locator` **([string][3] | [object][4])** (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
300
300
|
* `context` **([string][3]? | [object][4] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
301
301
|
|
|
302
|
-
Returns **
|
|
302
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
303
303
|
|
|
304
304
|
### clickXY
|
|
305
305
|
|
|
@@ -334,7 +334,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
334
334
|
* `text` **[string][3]** which is not present.
|
|
335
335
|
* `context` **([string][3] | [object][4])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
336
336
|
|
|
337
|
-
Returns **
|
|
337
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
338
338
|
|
|
339
339
|
### dontSeeCheckboxIsChecked
|
|
340
340
|
|
|
@@ -351,7 +351,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
351
351
|
* `locator`  
|
|
352
352
|
* `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
353
353
|
|
|
354
|
-
Returns **
|
|
354
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
355
355
|
|
|
356
356
|
### dontSeeCookie
|
|
357
357
|
|
|
@@ -365,7 +365,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
365
365
|
|
|
366
366
|
* `name` **[string][3]** cookie name.
|
|
367
367
|
|
|
368
|
-
Returns **
|
|
368
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
369
369
|
|
|
370
370
|
### dontSeeCurrentPathEquals
|
|
371
371
|
|
|
@@ -381,7 +381,7 @@ I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
|
381
381
|
|
|
382
382
|
* `path` **[string][3]** value to check.
|
|
383
383
|
|
|
384
|
-
Returns **
|
|
384
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
385
385
|
|
|
386
386
|
### dontSeeCurrentUrlEquals
|
|
387
387
|
|
|
@@ -397,7 +397,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
397
397
|
|
|
398
398
|
* `url` **[string][3]** value to check.
|
|
399
399
|
|
|
400
|
-
Returns **
|
|
400
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
401
401
|
|
|
402
402
|
### dontSeeElement
|
|
403
403
|
|
|
@@ -415,7 +415,7 @@ I.dontSeeElement('.modal', '#container');
|
|
|
415
415
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|Strict locator.
|
|
416
416
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
417
417
|
|
|
418
|
-
Returns **
|
|
418
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
419
419
|
|
|
420
420
|
### dontSeeElementInDOM
|
|
421
421
|
|
|
@@ -429,7 +429,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
429
429
|
|
|
430
430
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|Strict locator.
|
|
431
431
|
|
|
432
|
-
Returns **
|
|
432
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
433
433
|
|
|
434
434
|
### dontSeeInCurrentUrl
|
|
435
435
|
|
|
@@ -439,7 +439,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
439
439
|
|
|
440
440
|
* `url` **[string][3]** value to check.
|
|
441
441
|
|
|
442
|
-
Returns **
|
|
442
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
443
443
|
|
|
444
444
|
### dontSeeInField
|
|
445
445
|
|
|
@@ -461,7 +461,7 @@ I.dontSeeInField('Name', 'old_value', '.form-container');
|
|
|
461
461
|
* `value` **([string][3] | [object][4])** value to check.
|
|
462
462
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
463
463
|
|
|
464
|
-
Returns **
|
|
464
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
465
465
|
|
|
466
466
|
### dontSeeInSource
|
|
467
467
|
|
|
@@ -476,7 +476,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
476
476
|
* `text`  
|
|
477
477
|
* `value` **[string][3]** to check.
|
|
478
478
|
|
|
479
|
-
Returns **
|
|
479
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
480
480
|
|
|
481
481
|
### dontSeeInTitle
|
|
482
482
|
|
|
@@ -490,7 +490,7 @@ I.dontSeeInTitle('Error');
|
|
|
490
490
|
|
|
491
491
|
* `text` **[string][3]** value to check.
|
|
492
492
|
|
|
493
|
-
Returns **
|
|
493
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
494
494
|
|
|
495
495
|
### dontSeeTraffic
|
|
496
496
|
|
|
@@ -529,7 +529,7 @@ I.doubleClick('.btn.edit');
|
|
|
529
529
|
* `locator` **([string][3] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
530
530
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
531
531
|
|
|
532
|
-
Returns **
|
|
532
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
533
533
|
|
|
534
534
|
### executeAsyncScript
|
|
535
535
|
|
|
@@ -624,7 +624,7 @@ I.fillField('Name', 'John', '#section2');
|
|
|
624
624
|
* `value` **([string][3] | [object][4])** text value to fill.
|
|
625
625
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
626
626
|
|
|
627
|
-
Returns **
|
|
627
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
628
628
|
|
|
629
629
|
### flushNetworkTraffics
|
|
630
630
|
|
|
@@ -651,7 +651,7 @@ I.see('#add-to-cart-bnt');
|
|
|
651
651
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
652
652
|
* `options` **any?** Playwright only: [Additional options][13] for available options object as 2nd argument.
|
|
653
653
|
|
|
654
|
-
Returns **
|
|
654
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
655
655
|
|
|
656
656
|
### forceClick
|
|
657
657
|
|
|
@@ -685,7 +685,7 @@ I.forceClick({css: 'nav a.login'});
|
|
|
685
685
|
* `locator` **([string][3] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
686
686
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
687
687
|
|
|
688
|
-
Returns **
|
|
688
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
689
689
|
|
|
690
690
|
### grabAriaSnapshot
|
|
691
691
|
|
|
@@ -1009,7 +1009,7 @@ const webElement = await I.grabWebElement('#button');
|
|
|
1009
1009
|
|
|
1010
1010
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1011
1011
|
|
|
1012
|
-
Returns **[Promise][12]<
|
|
1012
|
+
Returns **[Promise][12]<CodeceptJS.WebElement>** WebElement of being used Web helper
|
|
1013
1013
|
|
|
1014
1014
|
### grabWebElements
|
|
1015
1015
|
|
|
@@ -1024,7 +1024,7 @@ const webElements = await I.grabWebElements('#button');
|
|
|
1024
1024
|
|
|
1025
1025
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1026
1026
|
|
|
1027
|
-
Returns **[Promise][12]<
|
|
1027
|
+
Returns **[Promise][12]<[Array][15]<CodeceptJS.WebElement>>** WebElements of being used Web helper
|
|
1028
1028
|
|
|
1029
1029
|
### pressKey
|
|
1030
1030
|
|
|
@@ -1049,7 +1049,7 @@ Reload the current page.
|
|
|
1049
1049
|
I.refreshPage();
|
|
1050
1050
|
```
|
|
1051
1051
|
|
|
1052
|
-
Returns **
|
|
1052
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1053
1053
|
|
|
1054
1054
|
### resizeWindow
|
|
1055
1055
|
|
|
@@ -1061,7 +1061,7 @@ First parameter can be set to `maximize`.
|
|
|
1061
1061
|
* `width` **[number][8]** width in pixels or `maximize`.
|
|
1062
1062
|
* `height` **[number][8]** height in pixels.
|
|
1063
1063
|
|
|
1064
|
-
Returns **
|
|
1064
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1065
1065
|
|
|
1066
1066
|
### rightClick
|
|
1067
1067
|
|
|
@@ -1081,7 +1081,7 @@ I.rightClick('Click me', '.context');
|
|
|
1081
1081
|
* `locator` **([string][3] | [object][4])** clickable element located by CSS|XPath|strict locator.
|
|
1082
1082
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1083
1083
|
|
|
1084
|
-
Returns **
|
|
1084
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1085
1085
|
|
|
1086
1086
|
### saveElementScreenshot
|
|
1087
1087
|
|
|
@@ -1097,7 +1097,7 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1097
1097
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1098
1098
|
* `fileName` **[string][3]** file name to save.
|
|
1099
1099
|
|
|
1100
|
-
Returns **
|
|
1100
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1101
1101
|
|
|
1102
1102
|
### saveScreenshot
|
|
1103
1103
|
|
|
@@ -1122,7 +1122,7 @@ Scroll page to the bottom.
|
|
|
1122
1122
|
I.scrollPageToBottom();
|
|
1123
1123
|
```
|
|
1124
1124
|
|
|
1125
|
-
Returns **
|
|
1125
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1126
1126
|
|
|
1127
1127
|
### scrollPageToTop
|
|
1128
1128
|
|
|
@@ -1132,7 +1132,7 @@ Scroll page to the top.
|
|
|
1132
1132
|
I.scrollPageToTop();
|
|
1133
1133
|
```
|
|
1134
1134
|
|
|
1135
|
-
Returns **
|
|
1135
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1136
1136
|
|
|
1137
1137
|
### scrollTo
|
|
1138
1138
|
|
|
@@ -1150,7 +1150,7 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1150
1150
|
* `offsetX` **[number][8]** (optional, `0` by default) X-axis offset.
|
|
1151
1151
|
* `offsetY` **[number][8]** (optional, `0` by default) Y-axis offset.
|
|
1152
1152
|
|
|
1153
|
-
Returns **
|
|
1153
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1154
1154
|
|
|
1155
1155
|
### see
|
|
1156
1156
|
|
|
@@ -1168,7 +1168,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1168
1168
|
* `text` **[string][3]** expected on page.
|
|
1169
1169
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1170
1170
|
|
|
1171
|
-
Returns **
|
|
1171
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1172
1172
|
|
|
1173
1173
|
### seeAttributesOnElements
|
|
1174
1174
|
|
|
@@ -1183,7 +1183,7 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1183
1183
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1184
1184
|
* `attributes` **[object][4]** attributes and their values to check.
|
|
1185
1185
|
|
|
1186
|
-
Returns **
|
|
1186
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1187
1187
|
|
|
1188
1188
|
### seeCheckboxIsChecked
|
|
1189
1189
|
|
|
@@ -1200,7 +1200,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1200
1200
|
* `locator`  
|
|
1201
1201
|
* `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
1202
1202
|
|
|
1203
|
-
Returns **
|
|
1203
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1204
1204
|
|
|
1205
1205
|
### seeClipboardEquals
|
|
1206
1206
|
|
|
@@ -1218,7 +1218,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1218
1218
|
|
|
1219
1219
|
* `text` **[string][3]** value to check.
|
|
1220
1220
|
|
|
1221
|
-
Returns **
|
|
1221
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1222
1222
|
|
|
1223
1223
|
### seeCookie
|
|
1224
1224
|
|
|
@@ -1232,7 +1232,7 @@ I.seeCookie('Auth');
|
|
|
1232
1232
|
|
|
1233
1233
|
* `name` **[string][3]** cookie name.
|
|
1234
1234
|
|
|
1235
|
-
Returns **
|
|
1235
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1236
1236
|
|
|
1237
1237
|
### seeCssPropertiesOnElements
|
|
1238
1238
|
|
|
@@ -1247,7 +1247,7 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
1247
1247
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1248
1248
|
* `cssProperties` **[object][4]** object with CSS properties and their values to check.
|
|
1249
1249
|
|
|
1250
|
-
Returns **
|
|
1250
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1251
1251
|
|
|
1252
1252
|
### seeCurrentPathEquals
|
|
1253
1253
|
|
|
@@ -1263,7 +1263,7 @@ I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
|
1263
1263
|
|
|
1264
1264
|
* `path` **[string][3]** value to check.
|
|
1265
1265
|
|
|
1266
|
-
Returns **
|
|
1266
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1267
1267
|
|
|
1268
1268
|
### seeCurrentUrlEquals
|
|
1269
1269
|
|
|
@@ -1280,7 +1280,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
1280
1280
|
|
|
1281
1281
|
* `url` **[string][3]** value to check.
|
|
1282
1282
|
|
|
1283
|
-
Returns **
|
|
1283
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1284
1284
|
|
|
1285
1285
|
### seeElement
|
|
1286
1286
|
|
|
@@ -1303,7 +1303,7 @@ I.seeElement({role: 'dialog'});
|
|
|
1303
1303
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1304
1304
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1305
1305
|
|
|
1306
|
-
Returns **
|
|
1306
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1307
1307
|
|
|
1308
1308
|
### seeElementInDOM
|
|
1309
1309
|
|
|
@@ -1318,7 +1318,7 @@ I.seeElementInDOM('#modal');
|
|
|
1318
1318
|
|
|
1319
1319
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1320
1320
|
|
|
1321
|
-
Returns **
|
|
1321
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1322
1322
|
|
|
1323
1323
|
### seeInClipboard
|
|
1324
1324
|
|
|
@@ -1336,7 +1336,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1336
1336
|
|
|
1337
1337
|
* `text` **[string][3]** value to check.
|
|
1338
1338
|
|
|
1339
|
-
Returns **
|
|
1339
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1340
1340
|
|
|
1341
1341
|
### seeInCurrentUrl
|
|
1342
1342
|
|
|
@@ -1350,7 +1350,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
1350
1350
|
|
|
1351
1351
|
* `url` **[string][3]** a fragment to check
|
|
1352
1352
|
|
|
1353
|
-
Returns **
|
|
1353
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1354
1354
|
|
|
1355
1355
|
### seeInField
|
|
1356
1356
|
|
|
@@ -1374,7 +1374,7 @@ I.seeInField('Name', 'John', '.form-container');
|
|
|
1374
1374
|
* `value` **([string][3] | [object][4])** value to check.
|
|
1375
1375
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1376
1376
|
|
|
1377
|
-
Returns **
|
|
1377
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1378
1378
|
|
|
1379
1379
|
### seeInSource
|
|
1380
1380
|
|
|
@@ -1388,7 +1388,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1388
1388
|
|
|
1389
1389
|
* `text` **[string][3]** value to check.
|
|
1390
1390
|
|
|
1391
|
-
Returns **
|
|
1391
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1392
1392
|
|
|
1393
1393
|
### seeInTitle
|
|
1394
1394
|
|
|
@@ -1402,7 +1402,7 @@ I.seeInTitle('Home Page');
|
|
|
1402
1402
|
|
|
1403
1403
|
* `text` **[string][3]** text value to check.
|
|
1404
1404
|
|
|
1405
|
-
Returns **
|
|
1405
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1406
1406
|
|
|
1407
1407
|
### seeNumberOfVisibleElements
|
|
1408
1408
|
|
|
@@ -1418,7 +1418,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1418
1418
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1419
1419
|
* `num` **[number][8]** number of elements.
|
|
1420
1420
|
|
|
1421
|
-
Returns **
|
|
1421
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1422
1422
|
|
|
1423
1423
|
### seeTraffic
|
|
1424
1424
|
|
|
@@ -1494,7 +1494,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1494
1494
|
* `option` **([string][3] | [Array][15]<any>)** visible text or value of option.
|
|
1495
1495
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1496
1496
|
|
|
1497
|
-
Returns **
|
|
1497
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1498
1498
|
|
|
1499
1499
|
### setCookie
|
|
1500
1500
|
|
|
@@ -1516,7 +1516,7 @@ I.setCookie([
|
|
|
1516
1516
|
|
|
1517
1517
|
* `cookie` **(Cookie | [Array][15]<Cookie>)** a cookie object or array of cookie objects.
|
|
1518
1518
|
|
|
1519
|
-
Returns **
|
|
1519
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1520
1520
|
|
|
1521
1521
|
### startRecordingTraffic
|
|
1522
1522
|
|
|
@@ -1527,7 +1527,7 @@ This also resets recorded network requests.
|
|
|
1527
1527
|
I.startRecordingTraffic();
|
|
1528
1528
|
```
|
|
1529
1529
|
|
|
1530
|
-
Returns **
|
|
1530
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1531
1531
|
|
|
1532
1532
|
### startScreencast
|
|
1533
1533
|
|
|
@@ -1592,7 +1592,7 @@ I.type(secret('123456'));
|
|
|
1592
1592
|
* `delay` **[number][8]?** (optional) delay in ms between key presses
|
|
1593
1593
|
* `key` **([string][3] | [Array][15]<[string][3]>)** or array of keys to type.
|
|
1594
1594
|
|
|
1595
|
-
Returns **
|
|
1595
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1596
1596
|
|
|
1597
1597
|
### uncheckOption
|
|
1598
1598
|
|
|
@@ -1612,7 +1612,7 @@ I.uncheckOption('agree', '//form');
|
|
|
1612
1612
|
* `field` **([string][3] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1613
1613
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1614
1614
|
|
|
1615
|
-
Returns **
|
|
1615
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1616
1616
|
|
|
1617
1617
|
### wait
|
|
1618
1618
|
|
|
@@ -1626,7 +1626,7 @@ I.wait(2); // wait 2 secs
|
|
|
1626
1626
|
|
|
1627
1627
|
* `sec` **[number][8]** number of second to wait.
|
|
1628
1628
|
|
|
1629
|
-
Returns **
|
|
1629
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1630
1630
|
|
|
1631
1631
|
### waitCurrentPathEquals
|
|
1632
1632
|
|
|
@@ -1657,7 +1657,7 @@ I.waitForCookie("token");
|
|
|
1657
1657
|
* `name` **[string][3]** expected cookie name.
|
|
1658
1658
|
* `sec` **[number][8]** (optional, `3` by default) time in seconds to wait
|
|
1659
1659
|
|
|
1660
|
-
Returns **
|
|
1660
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1661
1661
|
|
|
1662
1662
|
### waitForDetached
|
|
1663
1663
|
|
|
@@ -1673,7 +1673,7 @@ I.waitForDetached('#popup');
|
|
|
1673
1673
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1674
1674
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1675
1675
|
|
|
1676
|
-
Returns **
|
|
1676
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1677
1677
|
|
|
1678
1678
|
### waitForElement
|
|
1679
1679
|
|
|
@@ -1690,7 +1690,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1690
1690
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1691
1691
|
* `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1692
1692
|
|
|
1693
|
-
Returns **
|
|
1693
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1694
1694
|
|
|
1695
1695
|
### waitForFunction
|
|
1696
1696
|
|
|
@@ -1713,7 +1713,7 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1713
1713
|
* `argsOrSec` **([Array][15]<any> | [number][8])?** (optional, `1` by default) arguments for function or seconds.
|
|
1714
1714
|
* `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1715
1715
|
|
|
1716
|
-
Returns **
|
|
1716
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1717
1717
|
|
|
1718
1718
|
### waitForInvisible
|
|
1719
1719
|
|
|
@@ -1729,7 +1729,7 @@ I.waitForInvisible('#popup');
|
|
|
1729
1729
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1730
1730
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1731
1731
|
|
|
1732
|
-
Returns **
|
|
1732
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1733
1733
|
|
|
1734
1734
|
### waitForText
|
|
1735
1735
|
|
|
@@ -1748,7 +1748,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1748
1748
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1749
1749
|
* `context` **([string][3] | [object][4])?** (optional) element located by CSS|XPath|strict locator.
|
|
1750
1750
|
|
|
1751
|
-
Returns **
|
|
1751
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1752
1752
|
|
|
1753
1753
|
### waitForVisible
|
|
1754
1754
|
|
|
@@ -1764,7 +1764,7 @@ I.waitForVisible('#popup');
|
|
|
1764
1764
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1765
1765
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1766
1766
|
|
|
1767
|
-
Returns **
|
|
1767
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1768
1768
|
|
|
1769
1769
|
### waitInUrl
|
|
1770
1770
|
|
|
@@ -1779,7 +1779,7 @@ I.waitInUrl('/info', 2);
|
|
|
1779
1779
|
* `urlPart` **[string][3]** value to check.
|
|
1780
1780
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1781
1781
|
|
|
1782
|
-
Returns **
|
|
1782
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1783
1783
|
|
|
1784
1784
|
### waitToHide
|
|
1785
1785
|
|
|
@@ -1795,7 +1795,7 @@ I.waitToHide('#popup');
|
|
|
1795
1795
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1796
1796
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1797
1797
|
|
|
1798
|
-
Returns **
|
|
1798
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1799
1799
|
|
|
1800
1800
|
### waitUrlEquals
|
|
1801
1801
|
|
|
@@ -1811,7 +1811,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
1811
1811
|
* `urlPart` **[string][3]** value to check.
|
|
1812
1812
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1813
1813
|
|
|
1814
|
-
Returns **
|
|
1814
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1815
1815
|
|
|
1816
1816
|
### _connect
|
|
1817
1817
|
|