codeceptjs 4.2.3 → 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/docs/element-selection.md +27 -4
- package/docs/helpers/Appium.md +54 -54
- package/docs/helpers/Kitesurf.md +64 -64
- package/docs/helpers/Lightpanda.md +64 -64
- package/docs/helpers/Moli.md +64 -64
- package/docs/helpers/Obscura.md +64 -64
- package/docs/helpers/Playwright.md +125 -125
- package/docs/helpers/Puppeteer.md +85 -85
- package/docs/helpers/WebDriver.md +86 -86
- package/docs/locators.md +5 -7
- package/docs/migration-4.md +7 -3
- package/docs/retry.md +1 -1
- package/docs/timeouts.md +2 -2
- package/lib/actor.js +20 -2
- package/lib/data/context.js +24 -0
- package/lib/element/WebElement.js +5 -5
- package/lib/helper/Appium.js +1 -1
- package/lib/helper/Playwright.js +21 -11
- package/lib/helper/Puppeteer.js +2 -8
- package/lib/recorder.js +2 -1
- package/lib/step/base.js +8 -1
- package/lib/step/record.js +22 -17
- package/lib/step/retry.js +13 -6
- package/lib/utils/typescript.js +86 -12
- package/package.json +2 -1
- package/typings/index.d.ts +12 -0
- package/typings/promiseBasedTypes.d.ts +690 -345
- package/typings/types.d.ts +479 -346
package/docs/helpers/Obscura.md
CHANGED
|
@@ -169,7 +169,7 @@ I.amOnPage('/login'); // opens a login page
|
|
|
169
169
|
|
|
170
170
|
* `url` **[string][3]** url path or global url.
|
|
171
171
|
|
|
172
|
-
Returns **
|
|
172
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
173
173
|
|
|
174
174
|
### appendField
|
|
175
175
|
|
|
@@ -192,7 +192,7 @@ I.appendField('name', 'John', '.form-container');
|
|
|
192
192
|
* `value` **[string][3]** text value to append.
|
|
193
193
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
194
194
|
|
|
195
|
-
Returns **
|
|
195
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
196
196
|
|
|
197
197
|
### attachFile
|
|
198
198
|
|
|
@@ -223,7 +223,7 @@ I.attachFile('#dropzone', 'data/avatar.jpg');
|
|
|
223
223
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
224
224
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
225
225
|
|
|
226
|
-
Returns **
|
|
226
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
227
227
|
|
|
228
228
|
### blur
|
|
229
229
|
|
|
@@ -248,7 +248,7 @@ I.dontSee('#add-to-cart-btn');
|
|
|
248
248
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
249
249
|
* `options` **any?** Playwright only: [Additional options][6] for available options object as 2nd argument.
|
|
250
250
|
|
|
251
|
-
Returns **
|
|
251
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
252
252
|
|
|
253
253
|
### capabilities
|
|
254
254
|
|
|
@@ -272,7 +272,7 @@ I.checkOption('agree', '//form');
|
|
|
272
272
|
* `field` **([string][3] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
273
273
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
274
274
|
|
|
275
|
-
Returns **
|
|
275
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
276
276
|
|
|
277
277
|
### clearClipboard
|
|
278
278
|
|
|
@@ -283,7 +283,7 @@ I.clearClipboard();
|
|
|
283
283
|
I.seeClipboardEquals('');
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
Returns **
|
|
286
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
287
287
|
|
|
288
288
|
### clearCookie
|
|
289
289
|
|
|
@@ -320,7 +320,7 @@ I.clearField('Email', '.form-container');
|
|
|
320
320
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
321
321
|
* `editable` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
322
322
|
|
|
323
|
-
Returns **
|
|
323
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder.
|
|
324
324
|
|
|
325
325
|
### click
|
|
326
326
|
|
|
@@ -359,7 +359,7 @@ I.click({role: 'button', name: 'Submit'});
|
|
|
359
359
|
* `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.
|
|
360
360
|
* `context` **([string][3]? | [object][4] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
361
361
|
|
|
362
|
-
Returns **
|
|
362
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
363
363
|
|
|
364
364
|
### clickXY
|
|
365
365
|
|
|
@@ -394,7 +394,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
394
394
|
* `text` **[string][3]** which is not present.
|
|
395
395
|
* `context` **([string][3] | [object][4])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
396
396
|
|
|
397
|
-
Returns **
|
|
397
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
398
398
|
|
|
399
399
|
### dontSeeCheckboxIsChecked
|
|
400
400
|
|
|
@@ -411,7 +411,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
411
411
|
* `locator`  
|
|
412
412
|
* `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
413
413
|
|
|
414
|
-
Returns **
|
|
414
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
415
415
|
|
|
416
416
|
### dontSeeCookie
|
|
417
417
|
|
|
@@ -425,7 +425,7 @@ I.dontSeeCookie('auth'); // no auth cookie
|
|
|
425
425
|
|
|
426
426
|
* `name` **[string][3]** cookie name.
|
|
427
427
|
|
|
428
|
-
Returns **
|
|
428
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
429
429
|
|
|
430
430
|
### dontSeeCurrentPathEquals
|
|
431
431
|
|
|
@@ -441,7 +441,7 @@ I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
|
441
441
|
|
|
442
442
|
* `path` **[string][3]** value to check.
|
|
443
443
|
|
|
444
|
-
Returns **
|
|
444
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
445
445
|
|
|
446
446
|
### dontSeeCurrentUrlEquals
|
|
447
447
|
|
|
@@ -457,7 +457,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
457
457
|
|
|
458
458
|
* `url` **[string][3]** value to check.
|
|
459
459
|
|
|
460
|
-
Returns **
|
|
460
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
461
461
|
|
|
462
462
|
### dontSeeElement
|
|
463
463
|
|
|
@@ -475,7 +475,7 @@ I.dontSeeElement('.modal', '#container');
|
|
|
475
475
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|Strict locator.
|
|
476
476
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
477
477
|
|
|
478
|
-
Returns **
|
|
478
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
479
479
|
|
|
480
480
|
### dontSeeElementInDOM
|
|
481
481
|
|
|
@@ -489,7 +489,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
489
489
|
|
|
490
490
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|Strict locator.
|
|
491
491
|
|
|
492
|
-
Returns **
|
|
492
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
493
493
|
|
|
494
494
|
### dontSeeInCurrentUrl
|
|
495
495
|
|
|
@@ -499,7 +499,7 @@ Checks that current url does not contain a provided fragment.
|
|
|
499
499
|
|
|
500
500
|
* `url` **[string][3]** value to check.
|
|
501
501
|
|
|
502
|
-
Returns **
|
|
502
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
503
503
|
|
|
504
504
|
### dontSeeInField
|
|
505
505
|
|
|
@@ -521,7 +521,7 @@ I.dontSeeInField('Name', 'old_value', '.form-container');
|
|
|
521
521
|
* `value` **([string][3] | [object][4])** value to check.
|
|
522
522
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
523
523
|
|
|
524
|
-
Returns **
|
|
524
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
525
525
|
|
|
526
526
|
### dontSeeInSource
|
|
527
527
|
|
|
@@ -536,7 +536,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
536
536
|
* `text`  
|
|
537
537
|
* `value` **[string][3]** to check.
|
|
538
538
|
|
|
539
|
-
Returns **
|
|
539
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
540
540
|
|
|
541
541
|
### dontSeeInTitle
|
|
542
542
|
|
|
@@ -550,7 +550,7 @@ I.dontSeeInTitle('Error');
|
|
|
550
550
|
|
|
551
551
|
* `text` **[string][3]** value to check.
|
|
552
552
|
|
|
553
|
-
Returns **
|
|
553
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
554
554
|
|
|
555
555
|
### dontSeeTraffic
|
|
556
556
|
|
|
@@ -589,7 +589,7 @@ I.doubleClick('.btn.edit');
|
|
|
589
589
|
* `locator` **([string][3] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
590
590
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
591
591
|
|
|
592
|
-
Returns **
|
|
592
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
593
593
|
|
|
594
594
|
### executeAsyncScript
|
|
595
595
|
|
|
@@ -684,7 +684,7 @@ I.fillField('Name', 'John', '#section2');
|
|
|
684
684
|
* `value` **([string][3] | [object][4])** text value to fill.
|
|
685
685
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
686
686
|
|
|
687
|
-
Returns **
|
|
687
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
688
688
|
|
|
689
689
|
### flushNetworkTraffics
|
|
690
690
|
|
|
@@ -711,7 +711,7 @@ I.see('#add-to-cart-bnt');
|
|
|
711
711
|
* `locator` **([string][3] | [object][4])** field located by label|name|CSS|XPath|strict locator.
|
|
712
712
|
* `options` **any?** Playwright only: [Additional options][13] for available options object as 2nd argument.
|
|
713
713
|
|
|
714
|
-
Returns **
|
|
714
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
715
715
|
|
|
716
716
|
### forceClick
|
|
717
717
|
|
|
@@ -745,7 +745,7 @@ I.forceClick({css: 'nav a.login'});
|
|
|
745
745
|
* `locator` **([string][3] | [object][4])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
746
746
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
747
747
|
|
|
748
|
-
Returns **
|
|
748
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
749
749
|
|
|
750
750
|
### grabAriaSnapshot
|
|
751
751
|
|
|
@@ -1069,7 +1069,7 @@ const webElement = await I.grabWebElement('#button');
|
|
|
1069
1069
|
|
|
1070
1070
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1071
1071
|
|
|
1072
|
-
Returns **[Promise][12]<
|
|
1072
|
+
Returns **[Promise][12]<CodeceptJS.WebElement>** WebElement of being used Web helper
|
|
1073
1073
|
|
|
1074
1074
|
### grabWebElements
|
|
1075
1075
|
|
|
@@ -1084,7 +1084,7 @@ const webElements = await I.grabWebElements('#button');
|
|
|
1084
1084
|
|
|
1085
1085
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1086
1086
|
|
|
1087
|
-
Returns **[Promise][12]<
|
|
1087
|
+
Returns **[Promise][12]<[Array][15]<CodeceptJS.WebElement>>** WebElements of being used Web helper
|
|
1088
1088
|
|
|
1089
1089
|
### pressKey
|
|
1090
1090
|
|
|
@@ -1109,7 +1109,7 @@ Reload the current page.
|
|
|
1109
1109
|
I.refreshPage();
|
|
1110
1110
|
```
|
|
1111
1111
|
|
|
1112
|
-
Returns **
|
|
1112
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1113
1113
|
|
|
1114
1114
|
### resizeWindow
|
|
1115
1115
|
|
|
@@ -1121,7 +1121,7 @@ First parameter can be set to `maximize`.
|
|
|
1121
1121
|
* `width` **[number][8]** width in pixels or `maximize`.
|
|
1122
1122
|
* `height` **[number][8]** height in pixels.
|
|
1123
1123
|
|
|
1124
|
-
Returns **
|
|
1124
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1125
1125
|
|
|
1126
1126
|
### rightClick
|
|
1127
1127
|
|
|
@@ -1141,7 +1141,7 @@ I.rightClick('Click me', '.context');
|
|
|
1141
1141
|
* `locator` **([string][3] | [object][4])** clickable element located by CSS|XPath|strict locator.
|
|
1142
1142
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1143
1143
|
|
|
1144
|
-
Returns **
|
|
1144
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1145
1145
|
|
|
1146
1146
|
### saveElementScreenshot
|
|
1147
1147
|
|
|
@@ -1157,7 +1157,7 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1157
1157
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1158
1158
|
* `fileName` **[string][3]** file name to save.
|
|
1159
1159
|
|
|
1160
|
-
Returns **
|
|
1160
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1161
1161
|
|
|
1162
1162
|
### saveScreenshot
|
|
1163
1163
|
|
|
@@ -1182,7 +1182,7 @@ Scroll page to the bottom.
|
|
|
1182
1182
|
I.scrollPageToBottom();
|
|
1183
1183
|
```
|
|
1184
1184
|
|
|
1185
|
-
Returns **
|
|
1185
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1186
1186
|
|
|
1187
1187
|
### scrollPageToTop
|
|
1188
1188
|
|
|
@@ -1192,7 +1192,7 @@ Scroll page to the top.
|
|
|
1192
1192
|
I.scrollPageToTop();
|
|
1193
1193
|
```
|
|
1194
1194
|
|
|
1195
|
-
Returns **
|
|
1195
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1196
1196
|
|
|
1197
1197
|
### scrollTo
|
|
1198
1198
|
|
|
@@ -1210,7 +1210,7 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1210
1210
|
* `offsetX` **[number][8]** (optional, `0` by default) X-axis offset.
|
|
1211
1211
|
* `offsetY` **[number][8]** (optional, `0` by default) Y-axis offset.
|
|
1212
1212
|
|
|
1213
|
-
Returns **
|
|
1213
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1214
1214
|
|
|
1215
1215
|
### see
|
|
1216
1216
|
|
|
@@ -1228,7 +1228,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1228
1228
|
* `text` **[string][3]** expected on page.
|
|
1229
1229
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1230
1230
|
|
|
1231
|
-
Returns **
|
|
1231
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1232
1232
|
|
|
1233
1233
|
### seeAttributesOnElements
|
|
1234
1234
|
|
|
@@ -1243,7 +1243,7 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1243
1243
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1244
1244
|
* `attributes` **[object][4]** attributes and their values to check.
|
|
1245
1245
|
|
|
1246
|
-
Returns **
|
|
1246
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1247
1247
|
|
|
1248
1248
|
### seeCheckboxIsChecked
|
|
1249
1249
|
|
|
@@ -1260,7 +1260,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1260
1260
|
* `locator`  
|
|
1261
1261
|
* `field` **([string][3] | [object][4])** located by label|name|CSS|XPath|strict locator.
|
|
1262
1262
|
|
|
1263
|
-
Returns **
|
|
1263
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1264
1264
|
|
|
1265
1265
|
### seeClipboardEquals
|
|
1266
1266
|
|
|
@@ -1278,7 +1278,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1278
1278
|
|
|
1279
1279
|
* `text` **[string][3]** value to check.
|
|
1280
1280
|
|
|
1281
|
-
Returns **
|
|
1281
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1282
1282
|
|
|
1283
1283
|
### seeCookie
|
|
1284
1284
|
|
|
@@ -1292,7 +1292,7 @@ I.seeCookie('Auth');
|
|
|
1292
1292
|
|
|
1293
1293
|
* `name` **[string][3]** cookie name.
|
|
1294
1294
|
|
|
1295
|
-
Returns **
|
|
1295
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1296
1296
|
|
|
1297
1297
|
### seeCssPropertiesOnElements
|
|
1298
1298
|
|
|
@@ -1307,7 +1307,7 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
1307
1307
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1308
1308
|
* `cssProperties` **[object][4]** object with CSS properties and their values to check.
|
|
1309
1309
|
|
|
1310
|
-
Returns **
|
|
1310
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1311
1311
|
|
|
1312
1312
|
### seeCurrentPathEquals
|
|
1313
1313
|
|
|
@@ -1323,7 +1323,7 @@ I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
|
1323
1323
|
|
|
1324
1324
|
* `path` **[string][3]** value to check.
|
|
1325
1325
|
|
|
1326
|
-
Returns **
|
|
1326
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1327
1327
|
|
|
1328
1328
|
### seeCurrentUrlEquals
|
|
1329
1329
|
|
|
@@ -1340,7 +1340,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
|
1340
1340
|
|
|
1341
1341
|
* `url` **[string][3]** value to check.
|
|
1342
1342
|
|
|
1343
|
-
Returns **
|
|
1343
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1344
1344
|
|
|
1345
1345
|
### seeElement
|
|
1346
1346
|
|
|
@@ -1363,7 +1363,7 @@ I.seeElement({role: 'dialog'});
|
|
|
1363
1363
|
* `locator` **([string][3] | [object][4])** located by CSS|XPath|strict locator.
|
|
1364
1364
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1365
1365
|
|
|
1366
|
-
Returns **
|
|
1366
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1367
1367
|
|
|
1368
1368
|
### seeElementInDOM
|
|
1369
1369
|
|
|
@@ -1378,7 +1378,7 @@ I.seeElementInDOM('#modal');
|
|
|
1378
1378
|
|
|
1379
1379
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1380
1380
|
|
|
1381
|
-
Returns **
|
|
1381
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1382
1382
|
|
|
1383
1383
|
### seeInClipboard
|
|
1384
1384
|
|
|
@@ -1396,7 +1396,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1396
1396
|
|
|
1397
1397
|
* `text` **[string][3]** value to check.
|
|
1398
1398
|
|
|
1399
|
-
Returns **
|
|
1399
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1400
1400
|
|
|
1401
1401
|
### seeInCurrentUrl
|
|
1402
1402
|
|
|
@@ -1410,7 +1410,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
|
|
|
1410
1410
|
|
|
1411
1411
|
* `url` **[string][3]** a fragment to check
|
|
1412
1412
|
|
|
1413
|
-
Returns **
|
|
1413
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1414
1414
|
|
|
1415
1415
|
### seeInField
|
|
1416
1416
|
|
|
@@ -1434,7 +1434,7 @@ I.seeInField('Name', 'John', '.form-container');
|
|
|
1434
1434
|
* `value` **([string][3] | [object][4])** value to check.
|
|
1435
1435
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1436
1436
|
|
|
1437
|
-
Returns **
|
|
1437
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1438
1438
|
|
|
1439
1439
|
### seeInSource
|
|
1440
1440
|
|
|
@@ -1448,7 +1448,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1448
1448
|
|
|
1449
1449
|
* `text` **[string][3]** value to check.
|
|
1450
1450
|
|
|
1451
|
-
Returns **
|
|
1451
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1452
1452
|
|
|
1453
1453
|
### seeInTitle
|
|
1454
1454
|
|
|
@@ -1462,7 +1462,7 @@ I.seeInTitle('Home Page');
|
|
|
1462
1462
|
|
|
1463
1463
|
* `text` **[string][3]** text value to check.
|
|
1464
1464
|
|
|
1465
|
-
Returns **
|
|
1465
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1466
1466
|
|
|
1467
1467
|
### seeNumberOfVisibleElements
|
|
1468
1468
|
|
|
@@ -1478,7 +1478,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1478
1478
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1479
1479
|
* `num` **[number][8]** number of elements.
|
|
1480
1480
|
|
|
1481
|
-
Returns **
|
|
1481
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1482
1482
|
|
|
1483
1483
|
### seeTraffic
|
|
1484
1484
|
|
|
@@ -1554,7 +1554,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1554
1554
|
* `option` **([string][3] | [Array][15]<any>)** visible text or value of option.
|
|
1555
1555
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1556
1556
|
|
|
1557
|
-
Returns **
|
|
1557
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1558
1558
|
|
|
1559
1559
|
### setCookie
|
|
1560
1560
|
|
|
@@ -1576,7 +1576,7 @@ I.setCookie([
|
|
|
1576
1576
|
|
|
1577
1577
|
* `cookie` **(Cookie | [Array][15]<Cookie>)** a cookie object or array of cookie objects.
|
|
1578
1578
|
|
|
1579
|
-
Returns **
|
|
1579
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1580
1580
|
|
|
1581
1581
|
### startRecordingTraffic
|
|
1582
1582
|
|
|
@@ -1587,7 +1587,7 @@ This also resets recorded network requests.
|
|
|
1587
1587
|
I.startRecordingTraffic();
|
|
1588
1588
|
```
|
|
1589
1589
|
|
|
1590
|
-
Returns **
|
|
1590
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1591
1591
|
|
|
1592
1592
|
### startScreencast
|
|
1593
1593
|
|
|
@@ -1652,7 +1652,7 @@ I.type(secret('123456'));
|
|
|
1652
1652
|
* `delay` **[number][8]?** (optional) delay in ms between key presses
|
|
1653
1653
|
* `key` **([string][3] | [Array][15]<[string][3]>)** or array of keys to type.
|
|
1654
1654
|
|
|
1655
|
-
Returns **
|
|
1655
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1656
1656
|
|
|
1657
1657
|
### uncheckOption
|
|
1658
1658
|
|
|
@@ -1672,7 +1672,7 @@ I.uncheckOption('agree', '//form');
|
|
|
1672
1672
|
* `field` **([string][3] | [object][4])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1673
1673
|
* `context` **([string][3]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1674
1674
|
|
|
1675
|
-
Returns **
|
|
1675
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1676
1676
|
|
|
1677
1677
|
### wait
|
|
1678
1678
|
|
|
@@ -1686,7 +1686,7 @@ I.wait(2); // wait 2 secs
|
|
|
1686
1686
|
|
|
1687
1687
|
* `sec` **[number][8]** number of second to wait.
|
|
1688
1688
|
|
|
1689
|
-
Returns **
|
|
1689
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1690
1690
|
|
|
1691
1691
|
### waitCurrentPathEquals
|
|
1692
1692
|
|
|
@@ -1717,7 +1717,7 @@ I.waitForCookie("token");
|
|
|
1717
1717
|
* `name` **[string][3]** expected cookie name.
|
|
1718
1718
|
* `sec` **[number][8]** (optional, `3` by default) time in seconds to wait
|
|
1719
1719
|
|
|
1720
|
-
Returns **
|
|
1720
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1721
1721
|
|
|
1722
1722
|
### waitForDetached
|
|
1723
1723
|
|
|
@@ -1733,7 +1733,7 @@ I.waitForDetached('#popup');
|
|
|
1733
1733
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1734
1734
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1735
1735
|
|
|
1736
|
-
Returns **
|
|
1736
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1737
1737
|
|
|
1738
1738
|
### waitForElement
|
|
1739
1739
|
|
|
@@ -1750,7 +1750,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1750
1750
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1751
1751
|
* `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1752
1752
|
|
|
1753
|
-
Returns **
|
|
1753
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1754
1754
|
|
|
1755
1755
|
### waitForFunction
|
|
1756
1756
|
|
|
@@ -1773,7 +1773,7 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
|
|
|
1773
1773
|
* `argsOrSec` **([Array][15]<any> | [number][8])?** (optional, `1` by default) arguments for function or seconds.
|
|
1774
1774
|
* `sec` **[number][8]?** (optional, `1` by default) time in seconds to wait
|
|
1775
1775
|
|
|
1776
|
-
Returns **
|
|
1776
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1777
1777
|
|
|
1778
1778
|
### waitForInvisible
|
|
1779
1779
|
|
|
@@ -1789,7 +1789,7 @@ I.waitForInvisible('#popup');
|
|
|
1789
1789
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1790
1790
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1791
1791
|
|
|
1792
|
-
Returns **
|
|
1792
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1793
1793
|
|
|
1794
1794
|
### waitForText
|
|
1795
1795
|
|
|
@@ -1808,7 +1808,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1808
1808
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1809
1809
|
* `context` **([string][3] | [object][4])?** (optional) element located by CSS|XPath|strict locator.
|
|
1810
1810
|
|
|
1811
|
-
Returns **
|
|
1811
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1812
1812
|
|
|
1813
1813
|
### waitForVisible
|
|
1814
1814
|
|
|
@@ -1824,7 +1824,7 @@ I.waitForVisible('#popup');
|
|
|
1824
1824
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1825
1825
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1826
1826
|
|
|
1827
|
-
Returns **
|
|
1827
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1828
1828
|
|
|
1829
1829
|
### waitInUrl
|
|
1830
1830
|
|
|
@@ -1839,7 +1839,7 @@ I.waitInUrl('/info', 2);
|
|
|
1839
1839
|
* `urlPart` **[string][3]** value to check.
|
|
1840
1840
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1841
1841
|
|
|
1842
|
-
Returns **
|
|
1842
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1843
1843
|
|
|
1844
1844
|
### waitToHide
|
|
1845
1845
|
|
|
@@ -1855,7 +1855,7 @@ I.waitToHide('#popup');
|
|
|
1855
1855
|
* `locator` **([string][3] | [object][4])** element located by CSS|XPath|strict locator.
|
|
1856
1856
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1857
1857
|
|
|
1858
|
-
Returns **
|
|
1858
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1859
1859
|
|
|
1860
1860
|
### waitUrlEquals
|
|
1861
1861
|
|
|
@@ -1871,7 +1871,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
1871
1871
|
* `urlPart` **[string][3]** value to check.
|
|
1872
1872
|
* `sec` **[number][8]** (optional, `1` by default) time in seconds to wait
|
|
1873
1873
|
|
|
1874
|
-
Returns **
|
|
1874
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1875
1875
|
|
|
1876
1876
|
### _connect
|
|
1877
1877
|
|