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
|
@@ -11,7 +11,28 @@ But what happens when it's not?
|
|
|
11
11
|
|
|
12
12
|
## Picking a Specific Element
|
|
13
13
|
|
|
14
|
-
Say you have a list of items and you want to click the second one. You could write a more specific CSS selector, but sometimes the simplest approach is to tell CodeceptJS which element you want by position:
|
|
14
|
+
Say you have a list of items and you want to click the second one. You could write a more specific CSS selector, but sometimes the simplest approach is to tell CodeceptJS which element you want by position. Chain `first()`, `last()` or `at()` to the action:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
I.click('a').first()
|
|
18
|
+
|
|
19
|
+
// click the last link
|
|
20
|
+
I.click('a').last()
|
|
21
|
+
|
|
22
|
+
// click the 2nd link
|
|
23
|
+
I.click('a').at(2)
|
|
24
|
+
|
|
25
|
+
// fill the second-to-last matching input
|
|
26
|
+
I.fillField('.email-input', 'test@example.com').at(-2)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Chain the selection directly to the action, in the same expression. `await I.click('a').last()` works too. Calling it after the step has run throws an error.
|
|
30
|
+
|
|
31
|
+
These methods exist on helper actions only. They are not available on custom steps and page object methods.
|
|
32
|
+
|
|
33
|
+
They differ from `locate('a').first()`, which builds a position into the locator. A chained selection picks from whatever the action matched, including fuzzy matches like `I.click('Submit').last()`.
|
|
34
|
+
|
|
35
|
+
The same selection is available as a step option:
|
|
15
36
|
|
|
16
37
|
```js
|
|
17
38
|
import step from 'codeceptjs/steps'
|
|
@@ -108,10 +129,12 @@ It works the other way too. If your helper has `strict: true` globally but you n
|
|
|
108
129
|
I.click('a', step.opts({ exact: false }))
|
|
109
130
|
```
|
|
110
131
|
|
|
111
|
-
And when you know there are multiple matches and want a specific one, `elementIndex`
|
|
132
|
+
And when you know there are multiple matches and want a specific one, `first()`, `last()`, `at()` and `elementIndex` override the strict check — no error is thrown because you've explicitly chosen which element to use:
|
|
112
133
|
|
|
113
134
|
```js
|
|
114
|
-
// strict: true in config, but
|
|
135
|
+
// strict: true in config, but these work without error
|
|
136
|
+
I.click('a').first()
|
|
137
|
+
I.click('a').at(2)
|
|
115
138
|
I.click('a', step.opts({ elementIndex: 2 }))
|
|
116
139
|
```
|
|
117
140
|
|
|
@@ -120,6 +143,6 @@ I.click('a', step.opts({ elementIndex: 2 }))
|
|
|
120
143
|
| Situation | Approach |
|
|
121
144
|
|-----------|----------|
|
|
122
145
|
| You want to catch ambiguous locators early | Enable `strict: true` in helper config |
|
|
123
|
-
| You need a specific element from a known list |
|
|
146
|
+
| You need a specific element from a known list | Chain `.first()`, `.last()` or `.at(N)` to the action |
|
|
124
147
|
| You want to iterate over all matching elements | Use [`eachElement`](/els) from the `els` module |
|
|
125
148
|
| You need full control over element inspection | Use [`grabWebElements`](/WebElement) to get all matches |
|
package/docs/helpers/Appium.md
CHANGED
|
@@ -174,7 +174,7 @@ I.amOnPage('/login'); // opens a login page
|
|
|
174
174
|
|
|
175
175
|
* `url` **[string][5]** url path or global url.
|
|
176
176
|
|
|
177
|
-
Returns **
|
|
177
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
178
178
|
|
|
179
179
|
### appendField
|
|
180
180
|
|
|
@@ -197,7 +197,7 @@ I.appendField('name', 'John', '.form-container');
|
|
|
197
197
|
* `value` **[string][5]** text value to append.
|
|
198
198
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
199
199
|
|
|
200
|
-
Returns **
|
|
200
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
201
201
|
|
|
202
202
|
### attachFile
|
|
203
203
|
|
|
@@ -229,7 +229,7 @@ I.attachFile('#dropzone', 'data/avatar.jpg');
|
|
|
229
229
|
* `pathToFile` **[string][5]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
230
230
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
231
231
|
|
|
232
|
-
Returns **
|
|
232
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
233
233
|
|
|
234
234
|
### blur
|
|
235
235
|
|
|
@@ -254,7 +254,7 @@ I.dontSee('#add-to-cart-btn');
|
|
|
254
254
|
* `locator` **([string][5] | [object][6])** field located by label|name|CSS|XPath|strict locator.
|
|
255
255
|
* `options` **any?** Playwright only: [Additional options][8] for available options object as 2nd argument.
|
|
256
256
|
|
|
257
|
-
Returns **
|
|
257
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
258
258
|
|
|
259
259
|
### capabilities
|
|
260
260
|
|
|
@@ -292,7 +292,7 @@ I.checkOption('agree', '//form');
|
|
|
292
292
|
* `field` **([string][5] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
293
293
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
294
294
|
|
|
295
|
-
Returns **
|
|
295
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
296
296
|
|
|
297
297
|
### clearClipboard
|
|
298
298
|
|
|
@@ -303,7 +303,7 @@ I.clearClipboard();
|
|
|
303
303
|
I.seeClipboardEquals('');
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
Returns **
|
|
306
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorderAppium: support both Android and iOS
|
|
307
307
|
|
|
308
308
|
### clearField
|
|
309
309
|
|
|
@@ -325,7 +325,7 @@ I.clearField('Email', '.form-container');
|
|
|
325
325
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
326
326
|
* `editable` **([string][5] | [object][6])** field located by label|name|CSS|XPath|strict locator.
|
|
327
327
|
|
|
328
|
-
Returns **
|
|
328
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder.
|
|
329
329
|
|
|
330
330
|
### click
|
|
331
331
|
|
|
@@ -364,7 +364,7 @@ I.click({role: 'button', name: 'Submit'});
|
|
|
364
364
|
* `locator` **([string][5] | [object][6])** (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
365
365
|
* `context` **([string][5]? | [object][6] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
366
366
|
|
|
367
|
-
Returns **
|
|
367
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
368
368
|
|
|
369
369
|
### clickXY
|
|
370
370
|
|
|
@@ -406,7 +406,7 @@ Close all tabs except for the current one.
|
|
|
406
406
|
I.closeOtherTabs();
|
|
407
407
|
```
|
|
408
408
|
|
|
409
|
-
Returns **
|
|
409
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
410
410
|
|
|
411
411
|
### defineTimeout
|
|
412
412
|
|
|
@@ -438,7 +438,7 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
438
438
|
* `text` **[string][5]** which is not present.
|
|
439
439
|
* `context` **([string][5] | [object][6])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
440
440
|
|
|
441
|
-
Returns **
|
|
441
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
442
442
|
|
|
443
443
|
### dontSeeCheckboxIsChecked
|
|
444
444
|
|
|
@@ -454,7 +454,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
454
454
|
|
|
455
455
|
* `field` **([string][5] | [object][6])** located by label|name|CSS|XPath|strict locator.
|
|
456
456
|
|
|
457
|
-
Returns **
|
|
457
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
458
458
|
|
|
459
459
|
### dontSeeCurrentPathEquals
|
|
460
460
|
|
|
@@ -470,7 +470,7 @@ I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
|
470
470
|
|
|
471
471
|
* `path` **[string][5]** value to check.
|
|
472
472
|
|
|
473
|
-
Returns **
|
|
473
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
474
474
|
|
|
475
475
|
### dontSeeElement
|
|
476
476
|
|
|
@@ -488,7 +488,7 @@ I.dontSeeElement('.modal', '#container');
|
|
|
488
488
|
* `locator` **([string][5] | [object][6])** located by CSS|XPath|Strict locator.
|
|
489
489
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
490
490
|
|
|
491
|
-
Returns **
|
|
491
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
492
492
|
|
|
493
493
|
### dontSeeElementInDOM
|
|
494
494
|
|
|
@@ -502,7 +502,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
502
502
|
|
|
503
503
|
* `locator` **([string][5] | [object][6])** located by CSS|XPath|Strict locator.
|
|
504
504
|
|
|
505
|
-
Returns **
|
|
505
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
506
506
|
|
|
507
507
|
### dontSeeInField
|
|
508
508
|
|
|
@@ -524,7 +524,7 @@ I.dontSeeInField('Name', 'old_value', '.form-container');
|
|
|
524
524
|
* `value` **([string][5] | [object][6])** value to check.
|
|
525
525
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
526
526
|
|
|
527
|
-
Returns **
|
|
527
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
528
528
|
|
|
529
529
|
### dontSeeInSource
|
|
530
530
|
|
|
@@ -539,7 +539,7 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
539
539
|
* `text`  
|
|
540
540
|
* `value` **[string][5]** to check.
|
|
541
541
|
|
|
542
|
-
Returns **
|
|
542
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
543
543
|
|
|
544
544
|
### doubleClick
|
|
545
545
|
|
|
@@ -558,7 +558,7 @@ I.doubleClick('.btn.edit');
|
|
|
558
558
|
* `locator` **([string][5] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
559
559
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
560
560
|
|
|
561
|
-
Returns **
|
|
561
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
562
562
|
|
|
563
563
|
### dragAndDrop
|
|
564
564
|
|
|
@@ -574,7 +574,7 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
574
574
|
* `srcElement` **([string][5] | [object][6])** located by CSS|XPath|strict locator.
|
|
575
575
|
* `destElement` **([string][5] | [object][6])** located by CSS|XPath|strict locator.
|
|
576
576
|
|
|
577
|
-
Returns **
|
|
577
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
578
578
|
|
|
579
579
|
### dragSlider
|
|
580
580
|
|
|
@@ -591,7 +591,7 @@ I.dragSlider('#slider', -70);
|
|
|
591
591
|
* `locator` **([string][5] | [object][6])** located by label|name|CSS|XPath|strict locator.
|
|
592
592
|
* `offsetX` **[number][12]** position to drag.
|
|
593
593
|
|
|
594
|
-
Returns **
|
|
594
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
595
595
|
|
|
596
596
|
### fillField
|
|
597
597
|
|
|
@@ -623,7 +623,7 @@ I.fillField('Name', 'John', '#section2');
|
|
|
623
623
|
* `value` **([string][5] | [object][6])** text value to fill.
|
|
624
624
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
625
625
|
|
|
626
|
-
Returns **
|
|
626
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
627
627
|
|
|
628
628
|
### focus
|
|
629
629
|
|
|
@@ -642,7 +642,7 @@ I.see('#add-to-cart-bnt');
|
|
|
642
642
|
* `locator` **([string][5] | [object][6])** field located by label|name|CSS|XPath|strict locator.
|
|
643
643
|
* `options` **any?** Playwright only: [Additional options][14] for available options object as 2nd argument.
|
|
644
644
|
|
|
645
|
-
Returns **
|
|
645
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
646
646
|
|
|
647
647
|
### forceClick
|
|
648
648
|
|
|
@@ -676,7 +676,7 @@ I.forceClick({css: 'nav a.login'});
|
|
|
676
676
|
* `locator` **([string][5] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
677
677
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
678
678
|
|
|
679
|
-
Returns **
|
|
679
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
680
680
|
|
|
681
681
|
### forceRightClick
|
|
682
682
|
|
|
@@ -700,7 +700,7 @@ I.forceRightClick('Menu');
|
|
|
700
700
|
* `locator` **([string][5] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
701
701
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
702
702
|
|
|
703
|
-
Returns **
|
|
703
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
704
704
|
|
|
705
705
|
### grabAllContexts
|
|
706
706
|
|
|
@@ -1032,7 +1032,7 @@ const webElement = await I.grabWebElement('#button');
|
|
|
1032
1032
|
|
|
1033
1033
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1034
1034
|
|
|
1035
|
-
Returns **[Promise][9]<
|
|
1035
|
+
Returns **[Promise][9]<CodeceptJS.WebElement>** WebElement of being used Web helper
|
|
1036
1036
|
|
|
1037
1037
|
### grabWebElements
|
|
1038
1038
|
|
|
@@ -1047,7 +1047,7 @@ const webElements = await I.grabWebElements('#button');
|
|
|
1047
1047
|
|
|
1048
1048
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1049
1049
|
|
|
1050
|
-
Returns **[Promise][9]<
|
|
1050
|
+
Returns **[Promise][9]<[Array][15]<CodeceptJS.WebElement>>** WebElements of being used Web helper
|
|
1051
1051
|
|
|
1052
1052
|
### hideDeviceKeyboard
|
|
1053
1053
|
|
|
@@ -1115,7 +1115,7 @@ I.moveCursorTo('#submit', '.container');
|
|
|
1115
1115
|
* `offsetX` **([number][12] | [string][5] | [object][6])** (optional, `0` by default) X-axis offset or context locator.
|
|
1116
1116
|
* `offsetY` **[number][12]** (optional, `0` by default) Y-axis offset.
|
|
1117
1117
|
|
|
1118
|
-
Returns **
|
|
1118
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1119
1119
|
|
|
1120
1120
|
### openNotifications
|
|
1121
1121
|
|
|
@@ -1198,7 +1198,7 @@ I.rightClick('Click me', '.context');
|
|
|
1198
1198
|
* `locator` **([string][5] | [object][6])** clickable element located by CSS|XPath|strict locator.
|
|
1199
1199
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1200
1200
|
|
|
1201
|
-
Returns **
|
|
1201
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1202
1202
|
|
|
1203
1203
|
### rotate
|
|
1204
1204
|
|
|
@@ -1318,7 +1318,7 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1318
1318
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1319
1319
|
* `fileName` **[string][5]** file name to save.
|
|
1320
1320
|
|
|
1321
|
-
Returns **
|
|
1321
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1322
1322
|
|
|
1323
1323
|
### saveScreenshot
|
|
1324
1324
|
|
|
@@ -1333,7 +1333,7 @@ I.saveScreenshot('debug.png');
|
|
|
1333
1333
|
|
|
1334
1334
|
* `fileName` **[string][5]** file name to save.
|
|
1335
1335
|
|
|
1336
|
-
Returns **
|
|
1336
|
+
Returns **CodeceptJS.StepPromise** 
|
|
1337
1337
|
|
|
1338
1338
|
### scrollIntoView
|
|
1339
1339
|
|
|
@@ -1350,7 +1350,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
1350
1350
|
* `locator` **([string][5] | [object][6])** located by CSS|XPath|strict locator.
|
|
1351
1351
|
* `scrollIntoViewOptions` **(ScrollIntoViewOptions | [boolean][10])** either alignToTop=true|false or scrollIntoViewOptions. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][19].
|
|
1352
1352
|
|
|
1353
|
-
Returns **
|
|
1353
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorderSupported only for web testing
|
|
1354
1354
|
|
|
1355
1355
|
### scrollPageToBottom
|
|
1356
1356
|
|
|
@@ -1360,7 +1360,7 @@ Scroll page to the bottom.
|
|
|
1360
1360
|
I.scrollPageToBottom();
|
|
1361
1361
|
```
|
|
1362
1362
|
|
|
1363
|
-
Returns **
|
|
1363
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1364
1364
|
|
|
1365
1365
|
### scrollPageToTop
|
|
1366
1366
|
|
|
@@ -1370,7 +1370,7 @@ Scroll page to the top.
|
|
|
1370
1370
|
I.scrollPageToTop();
|
|
1371
1371
|
```
|
|
1372
1372
|
|
|
1373
|
-
Returns **
|
|
1373
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1374
1374
|
|
|
1375
1375
|
### scrollTo
|
|
1376
1376
|
|
|
@@ -1388,7 +1388,7 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1388
1388
|
* `offsetX` **[number][12]** (optional, `0` by default) X-axis offset.
|
|
1389
1389
|
* `offsetY` **[number][12]** (optional, `0` by default) Y-axis offset.
|
|
1390
1390
|
|
|
1391
|
-
Returns **
|
|
1391
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
1392
1392
|
|
|
1393
1393
|
### see
|
|
1394
1394
|
|
|
@@ -1406,7 +1406,7 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1406
1406
|
* `text` **[string][5]** expected on page.
|
|
1407
1407
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1408
1408
|
|
|
1409
|
-
Returns **
|
|
1409
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1410
1410
|
|
|
1411
1411
|
### seeAppIsInstalled
|
|
1412
1412
|
|
|
@@ -1449,7 +1449,7 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1449
1449
|
* `locator` **([string][5] | [object][6])** located by CSS|XPath|strict locator.
|
|
1450
1450
|
* `attributes` **[object][6]** attributes and their values to check.
|
|
1451
1451
|
|
|
1452
|
-
Returns **
|
|
1452
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1453
1453
|
|
|
1454
1454
|
### seeCheckboxIsChecked
|
|
1455
1455
|
|
|
@@ -1465,7 +1465,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1465
1465
|
|
|
1466
1466
|
* `field` **([string][5] | [object][6])** located by label|name|CSS|XPath|strict locator.
|
|
1467
1467
|
|
|
1468
|
-
Returns **
|
|
1468
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1469
1469
|
|
|
1470
1470
|
### seeClipboardEquals
|
|
1471
1471
|
|
|
@@ -1483,7 +1483,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1483
1483
|
|
|
1484
1484
|
* `text` **[string][5]** value to check.
|
|
1485
1485
|
|
|
1486
|
-
Returns **
|
|
1486
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1487
1487
|
|
|
1488
1488
|
### seeCurrentActivityIs
|
|
1489
1489
|
|
|
@@ -1513,7 +1513,7 @@ I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
|
1513
1513
|
|
|
1514
1514
|
* `path` **[string][5]** value to check.
|
|
1515
1515
|
|
|
1516
|
-
Returns **
|
|
1516
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1517
1517
|
|
|
1518
1518
|
### seeDeviceIsLocked
|
|
1519
1519
|
|
|
@@ -1556,7 +1556,7 @@ I.seeElement({role: 'dialog'});
|
|
|
1556
1556
|
* `locator` **([string][5] | [object][6])** located by CSS|XPath|strict locator.
|
|
1557
1557
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1558
1558
|
|
|
1559
|
-
Returns **
|
|
1559
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1560
1560
|
|
|
1561
1561
|
### seeElementInDOM
|
|
1562
1562
|
|
|
@@ -1571,7 +1571,7 @@ I.seeElementInDOM('#modal');
|
|
|
1571
1571
|
|
|
1572
1572
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1573
1573
|
|
|
1574
|
-
Returns **
|
|
1574
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1575
1575
|
|
|
1576
1576
|
### seeInClipboard
|
|
1577
1577
|
|
|
@@ -1589,7 +1589,7 @@ in Chromium-based browsers, where read access is granted automatically.
|
|
|
1589
1589
|
|
|
1590
1590
|
* `text` **[string][5]** value to check.
|
|
1591
1591
|
|
|
1592
|
-
Returns **
|
|
1592
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1593
1593
|
|
|
1594
1594
|
### seeInField
|
|
1595
1595
|
|
|
@@ -1613,7 +1613,7 @@ I.seeInField('Name', 'John', '.form-container');
|
|
|
1613
1613
|
* `value` **([string][5] | [object][6])** value to check.
|
|
1614
1614
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1615
1615
|
|
|
1616
|
-
Returns **
|
|
1616
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1617
1617
|
|
|
1618
1618
|
### seeInSource
|
|
1619
1619
|
|
|
@@ -1627,7 +1627,7 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1627
1627
|
|
|
1628
1628
|
* `text` **[string][5]** value to check.
|
|
1629
1629
|
|
|
1630
|
-
Returns **
|
|
1630
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1631
1631
|
|
|
1632
1632
|
### seeNumberOfElements
|
|
1633
1633
|
|
|
@@ -1643,7 +1643,7 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
1643
1643
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1644
1644
|
* `num` **[number][12]** number of elements.
|
|
1645
1645
|
|
|
1646
|
-
Returns **
|
|
1646
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1647
1647
|
|
|
1648
1648
|
### seeNumberOfVisibleElements
|
|
1649
1649
|
|
|
@@ -1659,7 +1659,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1659
1659
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
1660
1660
|
* `num` **[number][12]** number of elements.
|
|
1661
1661
|
|
|
1662
|
-
Returns **
|
|
1662
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1663
1663
|
|
|
1664
1664
|
### seeOrientationIs
|
|
1665
1665
|
|
|
@@ -1689,7 +1689,7 @@ I.seeTextEquals('text', 'h1');
|
|
|
1689
1689
|
* `text` **[string][5]** element value to check.
|
|
1690
1690
|
* `context` **([string][5] | [object][6])?** element located by CSS|XPath|strict locator.
|
|
1691
1691
|
|
|
1692
|
-
Returns **
|
|
1692
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1693
1693
|
|
|
1694
1694
|
### selectOption
|
|
1695
1695
|
|
|
@@ -1722,7 +1722,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1722
1722
|
* `option` **([string][5] | [Array][15]<any>)** visible text or value of option.
|
|
1723
1723
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1724
1724
|
|
|
1725
|
-
Returns **
|
|
1725
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorderSupported only for web testing
|
|
1726
1726
|
|
|
1727
1727
|
### sendDeviceKeyEvent
|
|
1728
1728
|
|
|
@@ -1981,7 +1981,7 @@ I.switchTo(); // switch back to main page
|
|
|
1981
1981
|
|
|
1982
1982
|
* `locator` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1983
1983
|
|
|
1984
|
-
Returns **
|
|
1984
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
1985
1985
|
|
|
1986
1986
|
### switchToContext
|
|
1987
1987
|
|
|
@@ -2119,7 +2119,7 @@ I.type(secret('123456'));
|
|
|
2119
2119
|
* `delay` **[number][12]?** (optional) delay in ms between key presses
|
|
2120
2120
|
* `key` **([string][5] | [Array][15]<[string][5]>)** or array of keys to type.
|
|
2121
2121
|
|
|
2122
|
-
Returns **
|
|
2122
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
2123
2123
|
|
|
2124
2124
|
### uncheckOption
|
|
2125
2125
|
|
|
@@ -2140,7 +2140,7 @@ I.uncheckOption('agree', '//form');
|
|
|
2140
2140
|
* `field` **([string][5] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
2141
2141
|
* `context` **([string][5]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2142
2142
|
|
|
2143
|
-
Returns **
|
|
2143
|
+
Returns **CodeceptJS.ElementStepPromise** automatically synchronized promise through #recorder
|
|
2144
2144
|
|
|
2145
2145
|
### useWebDriverTo
|
|
2146
2146
|
|
|
@@ -2178,7 +2178,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
2178
2178
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
2179
2179
|
* `sec` **[number][12]?** (optional, `1` by default) time in seconds to wait
|
|
2180
2180
|
|
|
2181
|
-
Returns **
|
|
2181
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
2182
2182
|
|
|
2183
2183
|
### waitForInvisible
|
|
2184
2184
|
|
|
@@ -2194,7 +2194,7 @@ I.waitForInvisible('#popup');
|
|
|
2194
2194
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
2195
2195
|
* `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
|
|
2196
2196
|
|
|
2197
|
-
Returns **
|
|
2197
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
2198
2198
|
|
|
2199
2199
|
### waitForText
|
|
2200
2200
|
|
|
@@ -2213,7 +2213,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
2213
2213
|
* `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
|
|
2214
2214
|
* `context` **([string][5] | [object][6])?** (optional) element located by CSS|XPath|strict locator.
|
|
2215
2215
|
|
|
2216
|
-
Returns **
|
|
2216
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
2217
2217
|
|
|
2218
2218
|
### waitForVisible
|
|
2219
2219
|
|
|
@@ -2229,7 +2229,7 @@ I.waitForVisible('#popup');
|
|
|
2229
2229
|
* `locator` **([string][5] | [object][6])** element located by CSS|XPath|strict locator.
|
|
2230
2230
|
* `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
|
|
2231
2231
|
|
|
2232
|
-
Returns **
|
|
2232
|
+
Returns **CodeceptJS.StepPromise** automatically synchronized promise through #recorder
|
|
2233
2233
|
|
|
2234
2234
|
### _isShadowLocator
|
|
2235
2235
|
|