codeceptjs 3.5.9 → 3.5.10

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.
@@ -39,46 +39,47 @@ Using playwright-core package, will prevent the download of browser binaries and
39
39
 
40
40
  This helper should be configured in codecept.conf.(js|ts)
41
41
 
42
- Type: [object][5]
42
+ Type: [object][6]
43
43
 
44
44
  ### Properties
45
45
 
46
- - `url` **[string][8]?** base url of website to be tested
46
+ - `url` **[string][9]?** base url of website to be tested
47
47
  - `browser` **(`"chromium"` | `"firefox"` | `"webkit"` | `"electron"`)?** a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
48
- - `show` **[boolean][25]?** show browser window.
49
- - `restart` **([string][8] | [boolean][25])?** restart strategy between tests. Possible values:- 'context' or **false** - restarts [browser context][42] but keeps running browser. Recommended by Playwright team to keep tests isolated.
48
+ - `show` **[boolean][26]?** show browser window.
49
+ - `restart` **([string][9] | [boolean][26])?** restart strategy between tests. Possible values:- 'context' or **false** - restarts [browser context][44] but keeps running browser. Recommended by Playwright team to keep tests isolated.
50
50
  - 'browser' or **true** - closes browser and opens it again between tests.
51
51
  - 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default before CodeceptJS 3.1
52
- - `timeout` **[number][19]?** - [timeout][43] in ms of all Playwright actions .
53
- - `disableScreenshots` **[boolean][25]?** don't save screenshot on failure.
52
+ - `timeout` **[number][20]?** - [timeout][45] in ms of all Playwright actions .
53
+ - `disableScreenshots` **[boolean][26]?** don't save screenshot on failure.
54
54
  - `emulate` **any?** browser in device emulation mode.
55
- - `video` **[boolean][25]?** enables video recording for failed tests; videos are saved into `output/videos` folder
56
- - `keepVideoForPassedTests` **[boolean][25]?** save videos for passed tests; videos are saved into `output/videos` folder
57
- - `trace` **[boolean][25]?** record [tracing information][44] with screenshots and snapshots.
58
- - `keepTraceForPassedTests` **[boolean][25]?** save trace for passed tests.
59
- - `fullPageScreenshots` **[boolean][25]?** make full page screenshots on failure.
60
- - `uniqueScreenshotNames` **[boolean][25]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
61
- - `keepBrowserState` **[boolean][25]?** keep browser state between tests when `restart` is set to 'session'.
62
- - `keepCookies` **[boolean][25]?** keep cookies between tests when `restart` is set to 'session'.
63
- - `waitForAction` **[number][19]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
64
- - `waitForNavigation` **(`"load"` | `"domcontentloaded"` | `"commit"`)?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `commit`. Choose one of those options is possible. See [Playwright API][40].
65
- - `pressKeyDelay` **[number][19]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
66
- - `getPageTimeout` **[number][19]?** config option to set maximum navigation time in milliseconds.
67
- - `waitForTimeout` **[number][19]?** default wait* timeout in ms. Default: 1000.
68
- - `basicAuth` **[object][5]?** the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
69
- - `windowSize` **[string][8]?** default window size. Set a dimension like `640x480`.
55
+ - `video` **[boolean][26]?** enables video recording for failed tests; videos are saved into `output/videos` folder
56
+ - `keepVideoForPassedTests` **[boolean][26]?** save videos for passed tests; videos are saved into `output/videos` folder
57
+ - `trace` **[boolean][26]?** record [tracing information][46] with screenshots and snapshots.
58
+ - `keepTraceForPassedTests` **[boolean][26]?** save trace for passed tests.
59
+ - `fullPageScreenshots` **[boolean][26]?** make full page screenshots on failure.
60
+ - `uniqueScreenshotNames` **[boolean][26]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
61
+ - `keepBrowserState` **[boolean][26]?** keep browser state between tests when `restart` is set to 'session'.
62
+ - `keepCookies` **[boolean][26]?** keep cookies between tests when `restart` is set to 'session'.
63
+ - `waitForAction` **[number][20]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
64
+ - `waitForNavigation` **(`"load"` | `"domcontentloaded"` | `"commit"`)?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `commit`. Choose one of those options is possible. See [Playwright API][42].
65
+ - `pressKeyDelay` **[number][20]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
66
+ - `getPageTimeout` **[number][20]?** config option to set maximum navigation time in milliseconds.
67
+ - `waitForTimeout` **[number][20]?** default wait* timeout in ms. Default: 1000.
68
+ - `basicAuth` **[object][6]?** the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
69
+ - `windowSize` **[string][9]?** default window size. Set a dimension like `640x480`.
70
70
  - `colorScheme` **(`"dark"` | `"light"` | `"no-preference"`)?** default color scheme. Possible values: `dark` | `light` | `no-preference`.
71
- - `userAgent` **[string][8]?** user-agent string.
72
- - `locale` **[string][8]?** locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
73
- - `manualStart` **[boolean][25]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
74
- - `chromium` **[object][5]?** pass additional chromium options
75
- - `firefox` **[object][5]?** pass additional firefox options
76
- - `electron` **[object][5]?** (pass additional electron options
77
- - `channel` **any?** (While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge][45].
78
- - `ignoreLog` **[Array][9]<[string][8]>?** An array with console message types that are not logged to debug log. Default value is `['warning', 'log']`. E.g. you can set `[]` to log all messages. See all possible [values][46].
79
- - `ignoreHTTPSErrors` **[boolean][25]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
80
- - `bypassCSP` **[boolean][25]?** bypass Content Security Policy or CSP
81
- - `highlightElement` **[boolean][25]?** highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
71
+ - `userAgent` **[string][9]?** user-agent string.
72
+ - `locale` **[string][9]?** locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
73
+ - `manualStart` **[boolean][26]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
74
+ - `chromium` **[object][6]?** pass additional chromium options
75
+ - `firefox` **[object][6]?** pass additional firefox options
76
+ - `electron` **[object][6]?** (pass additional electron options
77
+ - `channel` **any?** (While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge][47].
78
+ - `ignoreLog` **[Array][10]<[string][9]>?** An array with console message types that are not logged to debug log. Default value is `['warning', 'log']`. E.g. you can set `[]` to log all messages. See all possible [values][48].
79
+ - `ignoreHTTPSErrors` **[boolean][26]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
80
+ - `bypassCSP` **[boolean][26]?** bypass Content Security Policy or CSP
81
+ - `highlightElement` **[boolean][26]?** highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
82
+ - `recordHar` **[object][6]?** record HAR and will be saved to `output/har`. See more of [HAR options][3].
82
83
 
83
84
 
84
85
 
@@ -99,6 +100,19 @@ Traces will be saved to `output/trace`
99
100
  - `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
100
101
  - `keepTraceForPassedTests`: - save trace for passed tests
101
102
 
103
+ #### HAR Recording Customization
104
+
105
+ A HAR file is an HTTP Archive file that contains a record of all the network requests that are made when a page is loaded.
106
+ It contains information about the request and response headers, cookies, content, timings, and more. You can use HAR files to mock network requests in your tests.
107
+ HAR will be saved to `output/har`. More info could be found here [https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har][3].
108
+
109
+ ...
110
+ recordHar: {
111
+ mode: 'minimal', // possible values: 'minimal'|'full'.
112
+ content: 'embed' // possible values: "omit"|"embed"|"attach".
113
+ }
114
+ ...
115
+
102
116
  #### Example #1: Wait for 0 network connections.
103
117
 
104
118
  ```js
@@ -142,7 +156,7 @@ Traces will be saved to `output/trace`
142
156
  }
143
157
  ```
144
158
 
145
- #### Example #4: Connect to remote browser by specifying [websocket endpoint][3]
159
+ #### Example #4: Connect to remote browser by specifying [websocket endpoint][4]
146
160
 
147
161
  ```js
148
162
  {
@@ -160,7 +174,7 @@ Traces will be saved to `output/trace`
160
174
 
161
175
  #### Example #5: Testing with Chromium extensions
162
176
 
163
- [official docs][4]
177
+ [official docs][5]
164
178
 
165
179
  ```js
166
180
  {
@@ -283,7 +297,7 @@ Usually it should be run from a custom helper after call of `_startBrowser()`
283
297
 
284
298
  #### Parameters
285
299
 
286
- - `contextOptions` **[object][5]?** See [https://playwright.dev/docs/api/class-browser#browser-new-context][6]
300
+ - `contextOptions` **[object][6]?** See [https://playwright.dev/docs/api/class-browser#browser-new-context][7]
287
301
 
288
302
  ### _getPageUrl
289
303
 
@@ -359,13 +373,13 @@ Set current page
359
373
 
360
374
  #### Parameters
361
375
 
362
- - `page` **[object][5]** page to set
376
+ - `page` **[object][6]** page to set
363
377
 
364
378
  ### acceptPopup
365
379
 
366
380
  Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
367
381
  Don't confuse popups with modal windows, as created by [various
368
- libraries][7].
382
+ libraries][8].
369
383
 
370
384
  ### amAcceptingPopups
371
385
 
@@ -402,7 +416,7 @@ I.amOnPage('/login'); // opens a login page
402
416
 
403
417
  #### Parameters
404
418
 
405
- - `url` **[string][8]** url path or global url.
419
+ - `url` **[string][9]** url path or global url.
406
420
 
407
421
  Returns **void** automatically synchronized promise through #recorder
408
422
 
@@ -419,8 +433,8 @@ I.appendField('password', secret('123456'));
419
433
 
420
434
  #### Parameters
421
435
 
422
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator
423
- - `value` **[string][8]** text value to append.
436
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator
437
+ - `value` **[string][9]** text value to append.
424
438
 
425
439
  Returns **void** automatically synchronized promise through #recorder
426
440
 
@@ -437,8 +451,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
437
451
 
438
452
  #### Parameters
439
453
 
440
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
441
- - `pathToFile` **[string][8]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
454
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
455
+ - `pathToFile` **[string][9]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
442
456
 
443
457
  Returns **void** automatically synchronized promise through #recorder
444
458
 
@@ -461,12 +475,12 @@ I.blockTraffic(['http://example.com/css/style.css', 'http://example.com/css/*.cs
461
475
 
462
476
  #### Parameters
463
477
 
464
- - `urls` **([string][8] | [Array][9] | [RegExp][10])** URL or a list of URLs to block . URL can contain * for wildcards. Example: [https://www.example.com**][11] to block all traffic for that domain. Regexp are also supported.
478
+ - `urls` **([string][9] | [Array][10] | [RegExp][11])** URL or a list of URLs to block . URL can contain * for wildcards. Example: [https://www.example.com**][12] to block all traffic for that domain. Regexp are also supported.
465
479
 
466
480
  ### blur
467
481
 
468
482
  Remove focus from a text input, button, etc.
469
- Calls [blur][12] on the element.
483
+ Calls [blur][13] on the element.
470
484
 
471
485
  Examples:
472
486
 
@@ -483,8 +497,8 @@ I.dontSee('#add-to-cart-btn');
483
497
 
484
498
  #### Parameters
485
499
 
486
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
487
- - `options` **any?** Playwright only: [Additional options][13] for available options object as 2nd argument.
500
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
501
+ - `options` **any?** Playwright only: [Additional options][14] for available options object as 2nd argument.
488
502
 
489
503
  Returns **void** automatically synchronized promise through #recorder
490
504
 
@@ -507,11 +521,11 @@ I.checkOption('agree', '//form');
507
521
 
508
522
  #### Parameters
509
523
 
510
- - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
511
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
524
+ - `field` **([string][9] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
525
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
512
526
  - `options`
513
527
 
514
- Returns **void** automatically synchronized promise through #recorder[Additional options][14] for check available as 3rd argument.Examples:```js
528
+ Returns **void** automatically synchronized promise through #recorder[Additional options][15] for check available as 3rd argument.Examples:```js
515
529
  // click on element at position
516
530
  I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
517
531
  ```> ⚠️ To avoid flakiness, option `force: true` is set by default
@@ -528,7 +542,7 @@ I.clearCookie('test'); // Playwright currently doesn't support clear a particula
528
542
 
529
543
  #### Parameters
530
544
 
531
- - `cookie` **[string][8]?** (optional, `null` by default) cookie name
545
+ - `cookie` **[string][9]?** (optional, `null` by default) cookie name
532
546
 
533
547
  ### clearField
534
548
 
@@ -543,12 +557,12 @@ I.clearField('.text-area')
543
557
  I.clearField('#submit', { force: true })
544
558
  ```
545
559
 
546
- Use `force` to bypass the [actionability][15] checks.
560
+ Use `force` to bypass the [actionability][16] checks.
547
561
 
548
562
  #### Parameters
549
563
 
550
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
551
- - `options` **any?** [Additional options][16] for available options object as 2nd argument.
564
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
565
+ - `options` **any?** [Additional options][17] for available options object as 2nd argument.
552
566
 
553
567
  ### click
554
568
 
@@ -576,9 +590,9 @@ I.click({css: 'nav a.login'});
576
590
 
577
591
  #### Parameters
578
592
 
579
- - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
580
- - `context` **([string][8]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
581
- - `options` **any?** [Additional options][17] for click available as 3rd argument.Examples:```js
593
+ - `locator` **([string][9] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
594
+ - `context` **([string][9]? | [object][6] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
595
+ - `options` **any?** [Additional options][18] for click available as 3rd argument.Examples:```js
582
596
  // click on element at position
583
597
  I.click('canvas', '.model', { position: { x: 20, y: 40 } })
584
598
 
@@ -625,8 +639,8 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
625
639
 
626
640
  #### Parameters
627
641
 
628
- - `text` **[string][8]** which is not present.
629
- - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
642
+ - `text` **[string][9]** which is not present.
643
+ - `context` **([string][9] | [object][6])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
630
644
 
631
645
  Returns **void** automatically synchronized promise through #recorder
632
646
 
@@ -642,7 +656,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
642
656
 
643
657
  #### Parameters
644
658
 
645
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
659
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
646
660
 
647
661
  Returns **void** automatically synchronized promise through #recorder
648
662
 
@@ -656,7 +670,7 @@ I.dontSeeCookie('auth'); // no auth cookie
656
670
 
657
671
  #### Parameters
658
672
 
659
- - `name` **[string][8]** cookie name.
673
+ - `name` **[string][9]** cookie name.
660
674
 
661
675
  Returns **void** automatically synchronized promise through #recorder
662
676
 
@@ -672,7 +686,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
672
686
 
673
687
  #### Parameters
674
688
 
675
- - `url` **[string][8]** value to check.
689
+ - `url` **[string][9]** value to check.
676
690
 
677
691
  Returns **void** automatically synchronized promise through #recorder
678
692
 
@@ -686,7 +700,7 @@ I.dontSeeElement('.modal'); // modal is not shown
686
700
 
687
701
  #### Parameters
688
702
 
689
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|Strict locator.
703
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|Strict locator.
690
704
 
691
705
  Returns **void** automatically synchronized promise through #recorder
692
706
 
@@ -700,7 +714,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
700
714
 
701
715
  #### Parameters
702
716
 
703
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|Strict locator.
717
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|Strict locator.
704
718
 
705
719
  Returns **void** automatically synchronized promise through #recorder
706
720
 
@@ -710,7 +724,7 @@ Checks that current url does not contain a provided fragment.
710
724
 
711
725
  #### Parameters
712
726
 
713
- - `url` **[string][8]** value to check.
727
+ - `url` **[string][9]** value to check.
714
728
 
715
729
  Returns **void** automatically synchronized promise through #recorder
716
730
 
@@ -726,8 +740,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
726
740
 
727
741
  #### Parameters
728
742
 
729
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
730
- - `value` **([string][8] | [object][5])** value to check.
743
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
744
+ - `value` **([string][9] | [object][6])** value to check.
731
745
 
732
746
  Returns **void** automatically synchronized promise through #recorder
733
747
 
@@ -742,7 +756,7 @@ I.dontSeeInSource('<!--'); // no comments in source
742
756
  #### Parameters
743
757
 
744
758
  - `text`
745
- - `value` **[string][8]** to check.
759
+ - `value` **[string][9]** to check.
746
760
 
747
761
  Returns **void** automatically synchronized promise through #recorder
748
762
 
@@ -756,7 +770,7 @@ I.dontSeeInTitle('Error');
756
770
 
757
771
  #### Parameters
758
772
 
759
- - `text` **[string][8]** value to check.
773
+ - `text` **[string][9]** value to check.
760
774
 
761
775
  Returns **void** automatically synchronized promise through #recorder
762
776
 
@@ -773,9 +787,9 @@ I.dontSeeTraffic({ name: 'Unexpected API Call of "user" endpoint', url: /api.exa
773
787
 
774
788
  #### Parameters
775
789
 
776
- - `opts` **[Object][5]** options when checking the traffic network.
777
- - `opts.name` **[string][8]** A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
778
- - `opts.url` **([string][8] | [RegExp][10])** Expected URL of request in network traffic. Can be a string or a regular expression.
790
+ - `opts` **[Object][6]** options when checking the traffic network.
791
+ - `opts.name` **[string][9]** A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
792
+ - `opts.url` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.
779
793
 
780
794
  ### doubleClick
781
795
 
@@ -791,8 +805,8 @@ I.doubleClick('.btn.edit');
791
805
 
792
806
  #### Parameters
793
807
 
794
- - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
795
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
808
+ - `locator` **([string][9] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
809
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
796
810
 
797
811
  Returns **void** automatically synchronized promise through #recorder
798
812
 
@@ -806,9 +820,9 @@ I.dragAndDrop('#dragHandle', '#container');
806
820
 
807
821
  #### Parameters
808
822
 
809
- - `srcElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
810
- - `destElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
811
- - `options` **any?** [Additional options][18] can be passed as 3rd argument.```js
823
+ - `srcElement` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
824
+ - `destElement` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
825
+ - `options` **any?** [Additional options][19] can be passed as 3rd argument.```js
812
826
  // specify coordinates for source position
813
827
  I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
814
828
  ```> When no option is set, custom drag and drop would be used, to use the dragAndDrop API from Playwright, please set options, for example `force: true`
@@ -827,8 +841,8 @@ I.dragSlider('#slider', -70);
827
841
 
828
842
  #### Parameters
829
843
 
830
- - `locator` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
831
- - `offsetX` **[number][19]** position to drag.
844
+ - `locator` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
845
+ - `offsetX` **[number][20]** position to drag.
832
846
 
833
847
  Returns **void** automatically synchronized promise through #recorder
834
848
 
@@ -857,10 +871,10 @@ If a function returns a Promise it will wait for its resolution.
857
871
 
858
872
  #### Parameters
859
873
 
860
- - `fn` **([string][8] | [function][20])** function to be executed in browser context.
874
+ - `fn` **([string][9] | [function][21])** function to be executed in browser context.
861
875
  - `arg` **any?** optional argument to pass to the function
862
876
 
863
- Returns **[Promise][21]&lt;any>**
877
+ Returns **[Promise][22]&lt;any>**
864
878
 
865
879
  ### fillField
866
880
 
@@ -880,8 +894,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
880
894
 
881
895
  #### Parameters
882
896
 
883
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
884
- - `value` **([string][8] | [object][5])** text value to fill.
897
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
898
+ - `value` **([string][9] | [object][6])** text value to fill.
885
899
 
886
900
  Returns **void** automatically synchronized promise through #recorder
887
901
 
@@ -895,7 +909,7 @@ Resets all recorded WS messages.
895
909
 
896
910
  ### focus
897
911
 
898
- Calls [focus][12] on the matching element.
912
+ Calls [focus][13] on the matching element.
899
913
 
900
914
  Examples:
901
915
 
@@ -907,8 +921,8 @@ I.see('#add-to-cart-bnt');
907
921
 
908
922
  #### Parameters
909
923
 
910
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
911
- - `options` **any?** Playwright only: [Additional options][22] for available options object as 2nd argument.
924
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
925
+ - `options` **any?** Playwright only: [Additional options][23] for available options object as 2nd argument.
912
926
 
913
927
  Returns **void** automatically synchronized promise through #recorder
914
928
 
@@ -941,8 +955,8 @@ I.forceClick({css: 'nav a.login'});
941
955
 
942
956
  #### Parameters
943
957
 
944
- - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
945
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
958
+ - `locator` **([string][9] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
959
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
946
960
 
947
961
  Returns **void** automatically synchronized promise through #recorder
948
962
 
@@ -958,10 +972,10 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
958
972
 
959
973
  #### Parameters
960
974
 
961
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
962
- - `attr` **[string][8]** attribute name.
975
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
976
+ - `attr` **[string][9]** attribute name.
963
977
 
964
- Returns **[Promise][21]&lt;[string][8]>** attribute value
978
+ Returns **[Promise][22]&lt;[string][9]>** attribute value
965
979
 
966
980
  ### grabAttributeFromAll
967
981
 
@@ -974,10 +988,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
974
988
 
975
989
  #### Parameters
976
990
 
977
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
978
- - `attr` **[string][8]** attribute name.
991
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
992
+ - `attr` **[string][9]** attribute name.
979
993
 
980
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
994
+ Returns **[Promise][22]&lt;[Array][10]&lt;[string][9]>>** attribute value
981
995
 
982
996
  ### grabBrowserLogs
983
997
 
@@ -989,9 +1003,9 @@ const errors = logs.map(l => ({ type: l.type(), text: l.text() })).filter(l => l
989
1003
  console.log(JSON.stringify(errors));
990
1004
  ```
991
1005
 
992
- [Learn more about console messages][23]
1006
+ [Learn more about console messages][24]
993
1007
 
994
- Returns **[Promise][21]&lt;[Array][9]&lt;any>>**
1008
+ Returns **[Promise][22]&lt;[Array][10]&lt;any>>**
995
1009
 
996
1010
  ### grabCheckedElementStatus
997
1011
 
@@ -999,10 +1013,10 @@ Return the checked status of given element.
999
1013
 
1000
1014
  #### Parameters
1001
1015
 
1002
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1003
- - `options` **[object][5]?** See [https://playwright.dev/docs/api/class-locator#locator-is-checked][24]
1016
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1017
+ - `options` **[object][6]?** See [https://playwright.dev/docs/api/class-locator#locator-is-checked][25]
1004
1018
 
1005
- Returns **[Promise][21]&lt;[boolean][25]>**
1019
+ Returns **[Promise][22]&lt;[boolean][26]>**
1006
1020
 
1007
1021
  ### grabCookie
1008
1022
 
@@ -1017,7 +1031,7 @@ assert(cookie.value, '123456');
1017
1031
 
1018
1032
  #### Parameters
1019
1033
 
1020
- - `name` **[string][8]?** cookie name.
1034
+ - `name` **[string][9]?** cookie name.
1021
1035
 
1022
1036
  Returns **any** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
1023
1037
 
@@ -1033,10 +1047,10 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
1033
1047
 
1034
1048
  #### Parameters
1035
1049
 
1036
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1037
- - `cssProperty` **[string][8]** CSS property name.
1050
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1051
+ - `cssProperty` **[string][9]** CSS property name.
1038
1052
 
1039
- Returns **[Promise][21]&lt;[string][8]>** CSS value
1053
+ Returns **[Promise][22]&lt;[string][9]>** CSS value
1040
1054
 
1041
1055
  ### grabCssPropertyFromAll
1042
1056
 
@@ -1049,10 +1063,10 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
1049
1063
 
1050
1064
  #### Parameters
1051
1065
 
1052
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1053
- - `cssProperty` **[string][8]** CSS property name.
1066
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1067
+ - `cssProperty` **[string][9]** CSS property name.
1054
1068
 
1055
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** CSS value
1069
+ Returns **[Promise][22]&lt;[Array][10]&lt;[string][9]>>** CSS value
1056
1070
 
1057
1071
  ### grabCurrentUrl
1058
1072
 
@@ -1064,7 +1078,7 @@ let url = await I.grabCurrentUrl();
1064
1078
  console.log(`Current URL is [${url}]`);
1065
1079
  ```
1066
1080
 
1067
- Returns **[Promise][21]&lt;[string][8]>** current URL
1081
+ Returns **[Promise][22]&lt;[string][9]>** current URL
1068
1082
 
1069
1083
  ### grabDataFromPerformanceTiming
1070
1084
 
@@ -1097,10 +1111,10 @@ Return the disabled status of given element.
1097
1111
 
1098
1112
  #### Parameters
1099
1113
 
1100
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1101
- - `options` **[object][5]?** See [https://playwright.dev/docs/api/class-locator#locator-is-disabled][26]
1114
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1115
+ - `options` **[object][6]?** See [https://playwright.dev/docs/api/class-locator#locator-is-disabled][27]
1102
1116
 
1103
- Returns **[Promise][21]&lt;[boolean][25]>**
1117
+ Returns **[Promise][22]&lt;[boolean][26]>**
1104
1118
 
1105
1119
  ### grabElementBoundingRect
1106
1120
 
@@ -1124,11 +1138,11 @@ const width = await I.grabElementBoundingRect('h3', 'width');
1124
1138
 
1125
1139
  #### Parameters
1126
1140
 
1127
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1141
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1128
1142
  - `prop`
1129
- - `elementSize` **[string][8]?** x, y, width or height of the given element.
1143
+ - `elementSize` **[string][9]?** x, y, width or height of the given element.
1130
1144
 
1131
- Returns **([Promise][21]&lt;DOMRect> | [Promise][21]&lt;[number][19]>)** Element bounding rectangle
1145
+ Returns **([Promise][22]&lt;DOMRect> | [Promise][22]&lt;[number][20]>)** Element bounding rectangle
1132
1146
 
1133
1147
  ### grabHTMLFrom
1134
1148
 
@@ -1143,9 +1157,9 @@ let postHTML = await I.grabHTMLFrom('#post');
1143
1157
  #### Parameters
1144
1158
 
1145
1159
  - `locator`
1146
- - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1160
+ - `element` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1147
1161
 
1148
- Returns **[Promise][21]&lt;[string][8]>** HTML code for an element
1162
+ Returns **[Promise][22]&lt;[string][9]>** HTML code for an element
1149
1163
 
1150
1164
  ### grabHTMLFromAll
1151
1165
 
@@ -1159,9 +1173,9 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
1159
1173
  #### Parameters
1160
1174
 
1161
1175
  - `locator`
1162
- - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1176
+ - `element` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1163
1177
 
1164
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** HTML code for an element
1178
+ Returns **[Promise][22]&lt;[Array][10]&lt;[string][9]>>** HTML code for an element
1165
1179
 
1166
1180
  ### grabMetrics
1167
1181
 
@@ -1215,7 +1229,7 @@ const metrics = await I.grabMetrics();
1215
1229
  ]
1216
1230
  ```
1217
1231
 
1218
- Returns **[Promise][21]&lt;[Array][9]&lt;[Object][5]>>**
1232
+ Returns **[Promise][22]&lt;[Array][10]&lt;[Object][6]>>**
1219
1233
 
1220
1234
  ### grabNumberOfOpenTabs
1221
1235
 
@@ -1226,7 +1240,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1226
1240
  let tabs = await I.grabNumberOfOpenTabs();
1227
1241
  ```
1228
1242
 
1229
- Returns **[Promise][21]&lt;[number][19]>** number of open tabs
1243
+ Returns **[Promise][22]&lt;[number][20]>** number of open tabs
1230
1244
 
1231
1245
  ### grabNumberOfVisibleElements
1232
1246
 
@@ -1239,9 +1253,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
1239
1253
 
1240
1254
  #### Parameters
1241
1255
 
1242
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1256
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1243
1257
 
1244
- Returns **[Promise][21]&lt;[number][19]>** number of visible elements
1258
+ Returns **[Promise][22]&lt;[number][20]>** number of visible elements
1245
1259
 
1246
1260
  ### grabPageScrollPosition
1247
1261
 
@@ -1252,7 +1266,7 @@ Resumes test execution, so **should be used inside an async function with `await
1252
1266
  let { x, y } = await I.grabPageScrollPosition();
1253
1267
  ```
1254
1268
 
1255
- Returns **[Promise][21]&lt;PageScrollPosition>** scroll position
1269
+ Returns **[Promise][22]&lt;PageScrollPosition>** scroll position
1256
1270
 
1257
1271
  ### grabPopupText
1258
1272
 
@@ -1262,7 +1276,7 @@ Grab the text within the popup. If no popup is visible then it will return null
1262
1276
  await I.grabPopupText();
1263
1277
  ```
1264
1278
 
1265
- Returns **[Promise][21]&lt;([string][8] | null)>**
1279
+ Returns **[Promise][22]&lt;([string][9] | null)>**
1266
1280
 
1267
1281
  ### grabRecordedNetworkTraffics
1268
1282
 
@@ -1275,7 +1289,7 @@ expect(traffics[0].response.status).to.equal(200);
1275
1289
  expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
1276
1290
  ```
1277
1291
 
1278
- Returns **[Promise][21]&lt;[Array][9]&lt;any>>**
1292
+ Returns **[Promise][22]&lt;[Array][10]&lt;any>>**
1279
1293
 
1280
1294
  ### grabSource
1281
1295
 
@@ -1286,7 +1300,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1286
1300
  let pageSource = await I.grabSource();
1287
1301
  ```
1288
1302
 
1289
- Returns **[Promise][21]&lt;[string][8]>** source code
1303
+ Returns **[Promise][22]&lt;[string][9]>** source code
1290
1304
 
1291
1305
  ### grabTextFrom
1292
1306
 
@@ -1301,9 +1315,9 @@ If multiple elements found returns first element.
1301
1315
 
1302
1316
  #### Parameters
1303
1317
 
1304
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1318
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1305
1319
 
1306
- Returns **[Promise][21]&lt;[string][8]>** attribute value
1320
+ Returns **[Promise][22]&lt;[string][9]>** attribute value
1307
1321
 
1308
1322
  ### grabTextFromAll
1309
1323
 
@@ -1316,9 +1330,9 @@ let pins = await I.grabTextFromAll('#pin li');
1316
1330
 
1317
1331
  #### Parameters
1318
1332
 
1319
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1333
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1320
1334
 
1321
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
1335
+ Returns **[Promise][22]&lt;[Array][10]&lt;[string][9]>>** attribute value
1322
1336
 
1323
1337
  ### grabTitle
1324
1338
 
@@ -1329,7 +1343,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
1329
1343
  let title = await I.grabTitle();
1330
1344
  ```
1331
1345
 
1332
- Returns **[Promise][21]&lt;[string][8]>** title
1346
+ Returns **[Promise][22]&lt;[string][9]>** title
1333
1347
 
1334
1348
  ### grabTrafficUrl
1335
1349
 
@@ -1337,12 +1351,12 @@ Returns full URL of request matching parameter "urlMatch".
1337
1351
 
1338
1352
  #### Parameters
1339
1353
 
1340
- - `urlMatch` **([string][8] | [RegExp][10])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js
1354
+ - `urlMatch` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js
1341
1355
  I.grabTrafficUrl('https://api.example.com/session');
1342
1356
  I.grabTrafficUrl(/session.*start/);
1343
1357
  ```
1344
1358
 
1345
- Returns **[Promise][21]&lt;any>**
1359
+ Returns **[Promise][22]&lt;any>**
1346
1360
 
1347
1361
  ### grabValueFrom
1348
1362
 
@@ -1356,9 +1370,9 @@ let email = await I.grabValueFrom('input[name=email]');
1356
1370
 
1357
1371
  #### Parameters
1358
1372
 
1359
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1373
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
1360
1374
 
1361
- Returns **[Promise][21]&lt;[string][8]>** attribute value
1375
+ Returns **[Promise][22]&lt;[string][9]>** attribute value
1362
1376
 
1363
1377
  ### grabValueFromAll
1364
1378
 
@@ -1371,22 +1385,52 @@ let inputs = await I.grabValueFromAll('//form/input');
1371
1385
 
1372
1386
  #### Parameters
1373
1387
 
1374
- - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1388
+ - `locator` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
1389
+
1390
+ Returns **[Promise][22]&lt;[Array][10]&lt;[string][9]>>** attribute value
1391
+
1392
+ ### grabWebElement
1393
+
1394
+ Grab WebElement for given locator
1395
+ Resumes test execution, so **should be used inside an async function with `await`** operator.
1396
+
1397
+ ```js
1398
+ const webElement = await I.grabWebElement('#button');
1399
+ ```
1400
+
1401
+ #### Parameters
1402
+
1403
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1375
1404
 
1376
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
1405
+ Returns **[Promise][22]&lt;any>** WebElement of being used Web helper
1406
+
1407
+ ### grabWebElements
1408
+
1409
+ Grab WebElements for given locator
1410
+ Resumes test execution, so **should be used inside an async function with `await`** operator.
1411
+
1412
+ ```js
1413
+ const webElements = await I.grabWebElements('#button');
1414
+ ```
1415
+
1416
+ #### Parameters
1417
+
1418
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1419
+
1420
+ Returns **[Promise][22]&lt;any>** WebElement of being used Web helper
1377
1421
 
1378
1422
  ### grabWebSocketMessages
1379
1423
 
1380
1424
  Grab the recording WS messages
1381
1425
 
1382
- Returns **[Array][9]&lt;any>**
1426
+ Returns **[Array][10]&lt;any>**
1383
1427
 
1384
1428
  ### handleDownloads
1385
1429
 
1386
1430
  Handles a file download. A file name is required to save the file on disk.
1387
1431
  Files are saved to "output" directory.
1388
1432
 
1389
- Should be used with [FileSystem helper][27] to check that file were downloaded correctly.
1433
+ Should be used with [FileSystem helper][28] to check that file were downloaded correctly.
1390
1434
 
1391
1435
  ```js
1392
1436
  I.handleDownloads('downloads/avatar.jpg');
@@ -1397,13 +1441,13 @@ I.waitForFile('avatar.jpg', 5);
1397
1441
 
1398
1442
  #### Parameters
1399
1443
 
1400
- - `fileName` **[string][8]** set filename for downloaded file
1444
+ - `fileName` **[string][9]** set filename for downloaded file
1401
1445
 
1402
- Returns **[Promise][21]&lt;void>**
1446
+ Returns **[Promise][22]&lt;void>**
1403
1447
 
1404
1448
  ### makeApiRequest
1405
1449
 
1406
- Performs [api request][28] using
1450
+ Performs [api request][29] using
1407
1451
  the cookies from the current browser session.
1408
1452
 
1409
1453
  ```js
@@ -1416,26 +1460,26 @@ I.makeApiRequest('PATCH', )
1416
1460
 
1417
1461
  #### Parameters
1418
1462
 
1419
- - `method` **[string][8]** HTTP method
1420
- - `url` **[string][8]** endpoint
1421
- - `options` **[object][5]** request options depending on method used
1463
+ - `method` **[string][9]** HTTP method
1464
+ - `url` **[string][9]** endpoint
1465
+ - `options` **[object][6]** request options depending on method used
1422
1466
 
1423
- Returns **[Promise][21]&lt;[object][5]>** response
1467
+ Returns **[Promise][22]&lt;[object][6]>** response
1424
1468
 
1425
1469
  ### mockRoute
1426
1470
 
1427
- Mocks network request using [`browserContext.route`][29] of Playwright
1471
+ Mocks network request using [`browserContext.route`][30] of Playwright
1428
1472
 
1429
1473
  ```js
1430
1474
  I.mockRoute(/(.png$)|(.jpg$)/, route => route.abort());
1431
1475
  ```
1432
1476
 
1433
- This method allows intercepting and mocking requests & responses. [Learn more about it][30]
1477
+ This method allows intercepting and mocking requests & responses. [Learn more about it][31]
1434
1478
 
1435
1479
  #### Parameters
1436
1480
 
1437
- - `url` **([string][8] | [RegExp][10])?** URL, regex or pattern for to match URL
1438
- - `handler` **[function][20]?** a function to process reques
1481
+ - `url` **([string][9] | [RegExp][11])?** URL, regex or pattern for to match URL
1482
+ - `handler` **[function][21]?** a function to process reques
1439
1483
 
1440
1484
  ### mockTraffic
1441
1485
 
@@ -1468,9 +1512,9 @@ I.moveCursorTo('#submit', 5,5);
1468
1512
 
1469
1513
  #### Parameters
1470
1514
 
1471
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1472
- - `offsetX` **[number][19]** (optional, `0` by default) X-axis offset.
1473
- - `offsetY` **[number][19]** (optional, `0` by default) Y-axis offset.
1515
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1516
+ - `offsetX` **[number][20]** (optional, `0` by default) X-axis offset.
1517
+ - `offsetY` **[number][20]** (optional, `0` by default) Y-axis offset.
1474
1518
 
1475
1519
  Returns **void** automatically synchronized promise through #recorder
1476
1520
 
@@ -1482,7 +1526,7 @@ Open new tab and automatically switched to new tab
1482
1526
  I.openNewTab();
1483
1527
  ```
1484
1528
 
1485
- You can pass in [page options][31] to emulate device on this page
1529
+ You can pass in [page options][32] to emulate device on this page
1486
1530
 
1487
1531
  ```js
1488
1532
  // enable mobile
@@ -1497,7 +1541,7 @@ I.openNewTab({ isMobile: true });
1497
1541
 
1498
1542
  Presses a key in the browser (on a focused element).
1499
1543
 
1500
- _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][32].
1544
+ _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][33].
1501
1545
 
1502
1546
  ```js
1503
1547
  I.pressKey('Backspace');
@@ -1556,15 +1600,15 @@ Some of the supported key names are:
1556
1600
 
1557
1601
  #### Parameters
1558
1602
 
1559
- - `key` **([string][8] | [Array][9]&lt;[string][8]>)** key or array of keys to press.
1603
+ - `key` **([string][9] | [Array][10]&lt;[string][9]>)** key or array of keys to press.
1560
1604
 
1561
- Returns **void** automatically synchronized promise through #recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][33]).
1605
+ Returns **void** automatically synchronized promise through #recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][34]).
1562
1606
 
1563
1607
  ### pressKeyDown
1564
1608
 
1565
1609
  Presses a key in the browser and leaves it in a down state.
1566
1610
 
1567
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][34]).
1611
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][35]).
1568
1612
 
1569
1613
  ```js
1570
1614
  I.pressKeyDown('Control');
@@ -1574,7 +1618,7 @@ I.pressKeyUp('Control');
1574
1618
 
1575
1619
  #### Parameters
1576
1620
 
1577
- - `key` **[string][8]** name of key to press down.
1621
+ - `key` **[string][9]** name of key to press down.
1578
1622
 
1579
1623
  Returns **void** automatically synchronized promise through #recorder
1580
1624
 
@@ -1582,7 +1626,7 @@ Returns **void** automatically synchronized promise through #recorder
1582
1626
 
1583
1627
  Releases a key in the browser which was previously set to a down state.
1584
1628
 
1585
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][34]).
1629
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][35]).
1586
1630
 
1587
1631
  ```js
1588
1632
  I.pressKeyDown('Control');
@@ -1592,7 +1636,7 @@ I.pressKeyUp('Control');
1592
1636
 
1593
1637
  #### Parameters
1594
1638
 
1595
- - `key` **[string][8]** name of key to release.
1639
+ - `key` **[string][9]** name of key to release.
1596
1640
 
1597
1641
  Returns **void** automatically synchronized promise through #recorder
1598
1642
 
@@ -1606,6 +1650,26 @@ I.refreshPage();
1606
1650
 
1607
1651
  Returns **void** automatically synchronized promise through #recorder
1608
1652
 
1653
+ ### replayFromHar
1654
+
1655
+ Replaying from HAR
1656
+
1657
+ ```js
1658
+ // Replay API requests from HAR.
1659
+ // Either use a matching response from the HAR,
1660
+ // or abort the request if nothing matches.
1661
+ I.replayFromHar('./output/har/something.har', { url: "*/**/api/v1/fruits" });
1662
+ I.amOnPage('https://demo.playwright.dev/api-mocking');
1663
+ I.see('CodeceptJS');
1664
+ ```
1665
+
1666
+ #### Parameters
1667
+
1668
+ - `harFilePath` **[string][9]** Path to recorded HAR file
1669
+ - `opts` **[object][6]?** [Options for replaying from HAR][36]
1670
+
1671
+ Returns **any** Promise<void>
1672
+
1609
1673
  ### resizeWindow
1610
1674
 
1611
1675
  Resize the current window to provided width and height.
@@ -1613,8 +1677,8 @@ First parameter can be set to `maximize`.
1613
1677
 
1614
1678
  #### Parameters
1615
1679
 
1616
- - `width` **[number][19]** width in pixels or `maximize`.
1617
- - `height` **[number][19]** height in pixels.
1680
+ - `width` **[number][20]** width in pixels or `maximize`.
1681
+ - `height` **[number][20]** height in pixels.
1618
1682
 
1619
1683
  Returns **void** automatically synchronized promise through #recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
1620
1684
  Playwright does not control the window of a browser so it can't adjust its real size.
@@ -1639,7 +1703,7 @@ I.restartBrowser({ permissions: ['clipboard-read', 'clipboard-write'] });
1639
1703
 
1640
1704
  #### Parameters
1641
1705
 
1642
- - `contextOptions` **[object][5]?** [Options for browser context][6] when starting new browser
1706
+ - `contextOptions` **[object][6]?** [Options for browser context][7] when starting new browser
1643
1707
 
1644
1708
  ### rightClick
1645
1709
 
@@ -1656,8 +1720,8 @@ I.rightClick('Click me', '.context');
1656
1720
 
1657
1721
  #### Parameters
1658
1722
 
1659
- - `locator` **([string][8] | [object][5])** clickable element located by CSS|XPath|strict locator.
1660
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1723
+ - `locator` **([string][9] | [object][6])** clickable element located by CSS|XPath|strict locator.
1724
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1661
1725
 
1662
1726
  Returns **void** automatically synchronized promise through #recorder
1663
1727
 
@@ -1672,8 +1736,8 @@ I.saveElementScreenshot(`#submit`,'debug.png');
1672
1736
 
1673
1737
  #### Parameters
1674
1738
 
1675
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1676
- - `fileName` **[string][8]** file name to save.
1739
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1740
+ - `fileName` **[string][9]** file name to save.
1677
1741
 
1678
1742
  Returns **void** automatically synchronized promise through #recorder
1679
1743
 
@@ -1690,8 +1754,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
1690
1754
 
1691
1755
  #### Parameters
1692
1756
 
1693
- - `fileName` **[string][8]** file name to save.
1694
- - `fullPage` **[boolean][25]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1757
+ - `fileName` **[string][9]** file name to save.
1758
+ - `fullPage` **[boolean][26]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1695
1759
 
1696
1760
  Returns **void** automatically synchronized promise through #recorder
1697
1761
 
@@ -1727,9 +1791,9 @@ I.scrollTo('#submit', 5, 5);
1727
1791
 
1728
1792
  #### Parameters
1729
1793
 
1730
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1731
- - `offsetX` **[number][19]** (optional, `0` by default) X-axis offset.
1732
- - `offsetY` **[number][19]** (optional, `0` by default) Y-axis offset.
1794
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1795
+ - `offsetX` **[number][20]** (optional, `0` by default) X-axis offset.
1796
+ - `offsetY` **[number][20]** (optional, `0` by default) Y-axis offset.
1733
1797
 
1734
1798
  Returns **void** automatically synchronized promise through #recorder
1735
1799
 
@@ -1746,8 +1810,8 @@ I.see('Register', {css: 'form.register'}); // use strict locator
1746
1810
 
1747
1811
  #### Parameters
1748
1812
 
1749
- - `text` **[string][8]** expected on page.
1750
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1813
+ - `text` **[string][9]** expected on page.
1814
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1751
1815
 
1752
1816
  Returns **void** automatically synchronized promise through #recorder
1753
1817
 
@@ -1761,8 +1825,8 @@ I.seeAttributesOnElements('//form', { method: "post"});
1761
1825
 
1762
1826
  #### Parameters
1763
1827
 
1764
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1765
- - `attributes` **[object][5]** attributes and their values to check.
1828
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1829
+ - `attributes` **[object][6]** attributes and their values to check.
1766
1830
 
1767
1831
  Returns **void** automatically synchronized promise through #recorder
1768
1832
 
@@ -1778,7 +1842,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
1778
1842
 
1779
1843
  #### Parameters
1780
1844
 
1781
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
1845
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
1782
1846
 
1783
1847
  Returns **void** automatically synchronized promise through #recorder
1784
1848
 
@@ -1792,7 +1856,7 @@ I.seeCookie('Auth');
1792
1856
 
1793
1857
  #### Parameters
1794
1858
 
1795
- - `name` **[string][8]** cookie name.
1859
+ - `name` **[string][9]** cookie name.
1796
1860
 
1797
1861
  Returns **void** automatically synchronized promise through #recorder
1798
1862
 
@@ -1806,8 +1870,8 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
1806
1870
 
1807
1871
  #### Parameters
1808
1872
 
1809
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1810
- - `cssProperties` **[object][5]** object with CSS properties and their values to check.
1873
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1874
+ - `cssProperties` **[object][6]** object with CSS properties and their values to check.
1811
1875
 
1812
1876
  Returns **void** automatically synchronized promise through #recorder
1813
1877
 
@@ -1824,7 +1888,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
1824
1888
 
1825
1889
  #### Parameters
1826
1890
 
1827
- - `url` **[string][8]** value to check.
1891
+ - `url` **[string][9]** value to check.
1828
1892
 
1829
1893
  Returns **void** automatically synchronized promise through #recorder
1830
1894
 
@@ -1839,7 +1903,7 @@ I.seeElement('#modal');
1839
1903
 
1840
1904
  #### Parameters
1841
1905
 
1842
- - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1906
+ - `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1843
1907
 
1844
1908
  Returns **void** automatically synchronized promise through #recorder
1845
1909
 
@@ -1854,7 +1918,7 @@ I.seeElementInDOM('#modal');
1854
1918
 
1855
1919
  #### Parameters
1856
1920
 
1857
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1921
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
1858
1922
 
1859
1923
  Returns **void** automatically synchronized promise through #recorder
1860
1924
 
@@ -1868,7 +1932,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
1868
1932
 
1869
1933
  #### Parameters
1870
1934
 
1871
- - `url` **[string][8]** a fragment to check
1935
+ - `url` **[string][9]** a fragment to check
1872
1936
 
1873
1937
  Returns **void** automatically synchronized promise through #recorder
1874
1938
 
@@ -1886,8 +1950,8 @@ I.seeInField('#searchform input','Search');
1886
1950
 
1887
1951
  #### Parameters
1888
1952
 
1889
- - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
1890
- - `value` **([string][8] | [object][5])** value to check.
1953
+ - `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
1954
+ - `value` **([string][9] | [object][6])** value to check.
1891
1955
 
1892
1956
  Returns **void** automatically synchronized promise through #recorder
1893
1957
 
@@ -1902,7 +1966,7 @@ I.seeInPopup('Popup text');
1902
1966
 
1903
1967
  #### Parameters
1904
1968
 
1905
- - `text` **[string][8]** value to check.
1969
+ - `text` **[string][9]** value to check.
1906
1970
 
1907
1971
  Returns **void** automatically synchronized promise through #recorder
1908
1972
 
@@ -1916,7 +1980,7 @@ I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1916
1980
 
1917
1981
  #### Parameters
1918
1982
 
1919
- - `text` **[string][8]** value to check.
1983
+ - `text` **[string][9]** value to check.
1920
1984
 
1921
1985
  Returns **void** automatically synchronized promise through #recorder
1922
1986
 
@@ -1930,7 +1994,7 @@ I.seeInTitle('Home Page');
1930
1994
 
1931
1995
  #### Parameters
1932
1996
 
1933
- - `text` **[string][8]** text value to check.
1997
+ - `text` **[string][9]** text value to check.
1934
1998
 
1935
1999
  Returns **void** automatically synchronized promise through #recorder
1936
2000
 
@@ -1945,8 +2009,8 @@ I.seeNumberOfElements('#submitBtn', 1);
1945
2009
 
1946
2010
  #### Parameters
1947
2011
 
1948
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1949
- - `num` **[number][19]** number of elements.
2012
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2013
+ - `num` **[number][20]** number of elements.
1950
2014
 
1951
2015
  Returns **void** automatically synchronized promise through #recorder
1952
2016
 
@@ -1961,8 +2025,8 @@ I.seeNumberOfVisibleElements('.buttons', 3);
1961
2025
 
1962
2026
  #### Parameters
1963
2027
 
1964
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1965
- - `num` **[number][19]** number of elements.
2028
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2029
+ - `num` **[number][20]** number of elements.
1966
2030
 
1967
2031
  Returns **void** automatically synchronized promise through #recorder
1968
2032
 
@@ -1976,8 +2040,8 @@ I.seeTextEquals('text', 'h1');
1976
2040
 
1977
2041
  #### Parameters
1978
2042
 
1979
- - `text` **[string][8]** element value to check.
1980
- - `context` **([string][8] | [object][5])?** element located by CSS|XPath|strict locator.
2043
+ - `text` **[string][9]** element value to check.
2044
+ - `context` **([string][9] | [object][6])?** element located by CSS|XPath|strict locator.
1981
2045
 
1982
2046
  Returns **void** automatically synchronized promise through #recorder
1983
2047
 
@@ -1991,7 +2055,7 @@ I.seeTitleEquals('Test title.');
1991
2055
 
1992
2056
  #### Parameters
1993
2057
 
1994
- - `text` **[string][8]** value to check.
2058
+ - `text` **[string][9]** value to check.
1995
2059
 
1996
2060
  Returns **void** automatically synchronized promise through #recorder
1997
2061
 
@@ -2028,14 +2092,14 @@ await I.seeTraffic({
2028
2092
 
2029
2093
  #### Parameters
2030
2094
 
2031
- - `opts` **[Object][5]** options when checking the traffic network.
2032
- - `opts.name` **[string][8]** A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
2033
- - `opts.url` **[string][8]** Expected URL of request in network traffic
2034
- - `opts.parameters` **[Object][5]?** Expected parameters of that request in network traffic
2035
- - `opts.requestPostData` **[Object][5]?** Expected that request contains post data in network traffic
2036
- - `opts.timeout` **[number][19]?** Timeout to wait for request in seconds. Default is 10 seconds.
2095
+ - `opts` **[Object][6]** options when checking the traffic network.
2096
+ - `opts.name` **[string][9]** A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
2097
+ - `opts.url` **[string][9]** Expected URL of request in network traffic
2098
+ - `opts.parameters` **[Object][6]?** Expected parameters of that request in network traffic
2099
+ - `opts.requestPostData` **[Object][6]?** Expected that request contains post data in network traffic
2100
+ - `opts.timeout` **[number][20]?** Timeout to wait for request in seconds. Default is 10 seconds.
2037
2101
 
2038
- Returns **[Promise][21]&lt;any>**
2102
+ Returns **[Promise][22]&lt;any>**
2039
2103
 
2040
2104
  ### selectOption
2041
2105
 
@@ -2060,8 +2124,8 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
2060
2124
 
2061
2125
  #### Parameters
2062
2126
 
2063
- - `select` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
2064
- - `option` **([string][8] | [Array][9]&lt;any>)** visible text or value of option.
2127
+ - `select` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
2128
+ - `option` **([string][9] | [Array][10]&lt;any>)** visible text or value of option.
2065
2129
 
2066
2130
  Returns **void** automatically synchronized promise through #recorder
2067
2131
 
@@ -2083,7 +2147,7 @@ I.setCookie([
2083
2147
 
2084
2148
  #### Parameters
2085
2149
 
2086
- - `cookie` **(Cookie | [Array][9]&lt;Cookie>)** a cookie object or array of cookie objects.
2150
+ - `cookie` **(Cookie | [Array][10]&lt;Cookie>)** a cookie object or array of cookie objects.
2087
2151
 
2088
2152
  Returns **void** automatically synchronized promise through #recorder
2089
2153
 
@@ -2099,7 +2163,7 @@ I.setPlaywrightRequestHeaders({
2099
2163
 
2100
2164
  #### Parameters
2101
2165
 
2102
- - `customHeaders` **[object][5]** headers to set
2166
+ - `customHeaders` **[object][6]** headers to set
2103
2167
 
2104
2168
  ### startRecordingTraffic
2105
2169
 
@@ -2134,8 +2198,8 @@ If no handler is passed, all mock requests for the rote are disabled.
2134
2198
 
2135
2199
  #### Parameters
2136
2200
 
2137
- - `url` **([string][8] | [RegExp][10])?** URL, regex or pattern for to match URL
2138
- - `handler` **[function][20]?** a function to process reques
2201
+ - `url` **([string][9] | [RegExp][11])?** URL, regex or pattern for to match URL
2202
+ - `handler` **[function][21]?** a function to process reques
2139
2203
 
2140
2204
  ### stopRecordingTraffic
2141
2205
 
@@ -2164,7 +2228,7 @@ I.switchTo(); // switch back to main page
2164
2228
 
2165
2229
  #### Parameters
2166
2230
 
2167
- - `locator` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
2231
+ - `locator` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS|XPath|strict locator.
2168
2232
 
2169
2233
  Returns **void** automatically synchronized promise through #recorder
2170
2234
 
@@ -2179,7 +2243,7 @@ I.switchToNextTab(2);
2179
2243
 
2180
2244
  #### Parameters
2181
2245
 
2182
- - `num` **[number][19]**
2246
+ - `num` **[number][20]**
2183
2247
 
2184
2248
  ### switchToPreviousTab
2185
2249
 
@@ -2192,13 +2256,13 @@ I.switchToPreviousTab(2);
2192
2256
 
2193
2257
  #### Parameters
2194
2258
 
2195
- - `num` **[number][19]**
2259
+ - `num` **[number][20]**
2196
2260
 
2197
2261
  ### type
2198
2262
 
2199
2263
  Types out the given text into an active field.
2200
2264
  To slow down typing use a second parameter, to set interval between key presses.
2201
- _Note:_ Should be used when [`fillField`][32] is not an option.
2265
+ _Note:_ Should be used when [`fillField`][33] is not an option.
2202
2266
 
2203
2267
  ```js
2204
2268
  // passing in a string
@@ -2217,8 +2281,8 @@ I.type(secret('123456'));
2217
2281
  #### Parameters
2218
2282
 
2219
2283
  - `keys`
2220
- - `delay` **[number][19]?** (optional) delay in ms between key presses
2221
- - `key` **([string][8] | [Array][9]&lt;[string][8]>)** or array of keys to type.
2284
+ - `delay` **[number][20]?** (optional) delay in ms between key presses
2285
+ - `key` **([string][9] | [Array][10]&lt;[string][9]>)** or array of keys to type.
2222
2286
 
2223
2287
  Returns **void** automatically synchronized promise through #recorder
2224
2288
 
@@ -2237,11 +2301,11 @@ I.uncheckOption('agree', '//form');
2237
2301
 
2238
2302
  #### Parameters
2239
2303
 
2240
- - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
2241
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
2304
+ - `field` **([string][9] | [object][6])** checkbox located by label | name | CSS | XPath | strict locator.
2305
+ - `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
2242
2306
  - `options`
2243
2307
 
2244
- Returns **void** automatically synchronized promise through #recorder[Additional options][35] for uncheck available as 3rd argument.Examples:```js
2308
+ Returns **void** automatically synchronized promise through #recorder[Additional options][37] for uncheck available as 3rd argument.Examples:```js
2245
2309
  // click on element at position
2246
2310
  I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
2247
2311
  ```> ⚠️ To avoid flakiness, option `force: true` is set by default
@@ -2253,7 +2317,7 @@ Use Playwright API inside a test.
2253
2317
  First argument is a description of an action.
2254
2318
  Second argument is async function that gets this helper as parameter.
2255
2319
 
2256
- { [`page`][36], [`browserContext`][37] [`browser`][38] } objects from Playwright API are available.
2320
+ { [`page`][38], [`browserContext`][39] [`browser`][40] } objects from Playwright API are available.
2257
2321
 
2258
2322
  ```js
2259
2323
  I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
@@ -2263,8 +2327,8 @@ I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
2263
2327
 
2264
2328
  #### Parameters
2265
2329
 
2266
- - `description` **[string][8]** used to show in logs.
2267
- - `fn` **[function][20]** async function that executed with Playwright helper as argumen
2330
+ - `description` **[string][9]** used to show in logs.
2331
+ - `fn` **[function][21]** async function that executed with Playwright helper as argumen
2268
2332
 
2269
2333
  ### wait
2270
2334
 
@@ -2276,7 +2340,7 @@ I.wait(2); // wait 2 secs
2276
2340
 
2277
2341
  #### Parameters
2278
2342
 
2279
- - `sec` **[number][19]** number of second to wait.
2343
+ - `sec` **[number][20]** number of second to wait.
2280
2344
 
2281
2345
  Returns **void** automatically synchronized promise through #recorder
2282
2346
 
@@ -2292,9 +2356,9 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
2292
2356
 
2293
2357
  #### Parameters
2294
2358
 
2295
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2359
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2296
2360
  - `waitTimeout`
2297
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2361
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2298
2362
 
2299
2363
  Returns **void** automatically synchronized promise through #recorder
2300
2364
 
@@ -2309,8 +2373,8 @@ I.waitForDetached('#popup');
2309
2373
 
2310
2374
  #### Parameters
2311
2375
 
2312
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2313
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2376
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2377
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2314
2378
 
2315
2379
  Returns **void** automatically synchronized promise through #recorder
2316
2380
 
@@ -2326,8 +2390,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
2326
2390
 
2327
2391
  #### Parameters
2328
2392
 
2329
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2330
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2393
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2394
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2331
2395
 
2332
2396
  Returns **void** automatically synchronized promise through #recorder
2333
2397
 
@@ -2338,8 +2402,8 @@ Element can be located by CSS or XPath.
2338
2402
 
2339
2403
  #### Parameters
2340
2404
 
2341
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2342
- - `sec` **[number][19]** (optional) time in seconds to wait, 1 by default.
2405
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2406
+ - `sec` **[number][20]** (optional) time in seconds to wait, 1 by default.
2343
2407
 
2344
2408
  Returns **void** automatically synchronized promise through #recorder
2345
2409
 
@@ -2360,9 +2424,9 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
2360
2424
 
2361
2425
  #### Parameters
2362
2426
 
2363
- - `fn` **([string][8] | [function][20])** to be executed in browser context.
2364
- - `argsOrSec` **([Array][9]&lt;any> | [number][19])?** (optional, `1` by default) arguments for function or seconds.
2365
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2427
+ - `fn` **([string][9] | [function][21])** to be executed in browser context.
2428
+ - `argsOrSec` **([Array][10]&lt;any> | [number][20])?** (optional, `1` by default) arguments for function or seconds.
2429
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2366
2430
 
2367
2431
  Returns **void** automatically synchronized promise through #recorder
2368
2432
 
@@ -2377,8 +2441,8 @@ I.waitForInvisible('#popup');
2377
2441
 
2378
2442
  #### Parameters
2379
2443
 
2380
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2381
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2444
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2445
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2382
2446
 
2383
2447
  Returns **void** automatically synchronized promise through #recorder
2384
2448
 
@@ -2386,7 +2450,7 @@ Returns **void** automatically synchronized promise through #recorder
2386
2450
 
2387
2451
  Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
2388
2452
 
2389
- See [Playwright's reference][39]
2453
+ See [Playwright's reference][41]
2390
2454
 
2391
2455
  #### Parameters
2392
2456
 
@@ -2403,8 +2467,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
2403
2467
 
2404
2468
  #### Parameters
2405
2469
 
2406
- - `urlOrPredicate` **([string][8] | [function][20])**
2407
- - `sec` **[number][19]?** seconds to wait
2470
+ - `urlOrPredicate` **([string][9] | [function][21])**
2471
+ - `sec` **[number][20]?** seconds to wait
2408
2472
 
2409
2473
  ### waitForResponse
2410
2474
 
@@ -2417,8 +2481,8 @@ I.waitForResponse(response => response.url() === 'https://example.com' && respon
2417
2481
 
2418
2482
  #### Parameters
2419
2483
 
2420
- - `urlOrPredicate` **([string][8] | [function][20])**
2421
- - `sec` **[number][19]?** number of seconds to wait
2484
+ - `urlOrPredicate` **([string][9] | [function][21])**
2485
+ - `sec` **[number][20]?** number of seconds to wait
2422
2486
 
2423
2487
  ### waitForText
2424
2488
 
@@ -2433,9 +2497,9 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
2433
2497
 
2434
2498
  #### Parameters
2435
2499
 
2436
- - `text` **[string][8]** to wait for.
2437
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2438
- - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
2500
+ - `text` **[string][9]** to wait for.
2501
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2502
+ - `context` **([string][9] | [object][6])?** (optional) element located by CSS|XPath|strict locator.
2439
2503
 
2440
2504
  Returns **void** automatically synchronized promise through #recorder
2441
2505
 
@@ -2443,11 +2507,11 @@ Returns **void** automatically synchronized promise through #recorder
2443
2507
 
2444
2508
  Waits for page navigates to a new URL or reloads. By default, it takes configured `waitForNavigation` option.
2445
2509
 
2446
- See [Playwright's reference][40]
2510
+ See [Playwright's reference][42]
2447
2511
 
2448
2512
  #### Parameters
2449
2513
 
2450
- - `url` **([string][8] | [RegExp][10])** A glob pattern, regex pattern or predicate receiving URL to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
2514
+ - `url` **([string][9] | [RegExp][11])** A glob pattern, regex pattern or predicate receiving URL to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
2451
2515
  - `options` **any**
2452
2516
 
2453
2517
  ### waitForValue
@@ -2460,9 +2524,9 @@ I.waitForValue('//input', "GoodValue");
2460
2524
 
2461
2525
  #### Parameters
2462
2526
 
2463
- - `field` **([string][8] | [object][5])** input field.
2464
- - `value` **[string][8]** expected value.
2465
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2527
+ - `field` **([string][9] | [object][6])** input field.
2528
+ - `value` **[string][9]** expected value.
2529
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2466
2530
 
2467
2531
  Returns **void** automatically synchronized promise through #recorder
2468
2532
 
@@ -2477,10 +2541,10 @@ I.waitForVisible('#popup');
2477
2541
 
2478
2542
  #### Parameters
2479
2543
 
2480
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2481
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2544
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2545
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2482
2546
 
2483
- Returns **void** automatically synchronized promise through #recorderThis method accepts [React selectors][41].
2547
+ Returns **void** automatically synchronized promise through #recorderThis method accepts [React selectors][43].
2484
2548
 
2485
2549
  ### waitInUrl
2486
2550
 
@@ -2492,8 +2556,8 @@ I.waitInUrl('/info', 2);
2492
2556
 
2493
2557
  #### Parameters
2494
2558
 
2495
- - `urlPart` **[string][8]** value to check.
2496
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2559
+ - `urlPart` **[string][9]** value to check.
2560
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2497
2561
 
2498
2562
  Returns **void** automatically synchronized promise through #recorder
2499
2563
 
@@ -2507,9 +2571,9 @@ I.waitNumberOfVisibleElements('a', 3);
2507
2571
 
2508
2572
  #### Parameters
2509
2573
 
2510
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2511
- - `num` **[number][19]** number of elements.
2512
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2574
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2575
+ - `num` **[number][20]** number of elements.
2576
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2513
2577
 
2514
2578
  Returns **void** automatically synchronized promise through #recorder
2515
2579
 
@@ -2524,8 +2588,8 @@ I.waitToHide('#popup');
2524
2588
 
2525
2589
  #### Parameters
2526
2590
 
2527
- - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2528
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2591
+ - `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
2592
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2529
2593
 
2530
2594
  Returns **void** automatically synchronized promise through #recorder
2531
2595
 
@@ -2540,8 +2604,8 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2540
2604
 
2541
2605
  #### Parameters
2542
2606
 
2543
- - `urlPart` **[string][8]** value to check.
2544
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2607
+ - `urlPart` **[string][9]** value to check.
2608
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2545
2609
 
2546
2610
  Returns **void** automatically synchronized promise through #recorder
2547
2611
 
@@ -2549,90 +2613,94 @@ Returns **void** automatically synchronized promise through #recorder
2549
2613
 
2550
2614
  [2]: https://playwright.dev/docs/next/api/class-browser#browser-new-context
2551
2615
 
2552
- [3]: https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams
2616
+ [3]: https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har
2617
+
2618
+ [4]: https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams
2619
+
2620
+ [5]: https://github.com/microsoft/playwright/blob/v0.11.0/docs/api.md#working-with-chrome-extensions
2553
2621
 
2554
- [4]: https://github.com/microsoft/playwright/blob/v0.11.0/docs/api.md#working-with-chrome-extensions
2622
+ [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
2555
2623
 
2556
- [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
2624
+ [7]: https://playwright.dev/docs/api/class-browser#browser-new-context
2557
2625
 
2558
- [6]: https://playwright.dev/docs/api/class-browser#browser-new-context
2626
+ [8]: http://jster.net/category/windows-modals-popups
2559
2627
 
2560
- [7]: http://jster.net/category/windows-modals-popups
2628
+ [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
2561
2629
 
2562
- [8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
2630
+ [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2563
2631
 
2564
- [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2632
+ [11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2565
2633
 
2566
- [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2634
+ [12]: https://www.example.com**
2567
2635
 
2568
- [11]: https://www.example.com**
2636
+ [13]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
2569
2637
 
2570
- [12]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
2638
+ [14]: https://playwright.dev/docs/api/class-locator#locator-blur
2571
2639
 
2572
- [13]: https://playwright.dev/docs/api/class-locator#locator-blur
2640
+ [15]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2573
2641
 
2574
- [14]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2642
+ [16]: https://playwright.dev/docs/actionability
2575
2643
 
2576
- [15]: https://playwright.dev/docs/actionability
2644
+ [17]: https://playwright.dev/docs/api/class-locator#locator-clear
2577
2645
 
2578
- [16]: https://playwright.dev/docs/api/class-locator#locator-clear
2646
+ [18]: https://playwright.dev/docs/api/class-page#page-click
2579
2647
 
2580
- [17]: https://playwright.dev/docs/api/class-page#page-click
2648
+ [19]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2581
2649
 
2582
- [18]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2650
+ [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2583
2651
 
2584
- [19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2652
+ [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2585
2653
 
2586
- [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2654
+ [22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2587
2655
 
2588
- [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2656
+ [23]: https://playwright.dev/docs/api/class-locator#locator-focus
2589
2657
 
2590
- [22]: https://playwright.dev/docs/api/class-locator#locator-focus
2658
+ [24]: https://playwright.dev/docs/api/class-consolemessage
2591
2659
 
2592
- [23]: https://playwright.dev/docs/api/class-consolemessage
2660
+ [25]: https://playwright.dev/docs/api/class-locator#locator-is-checked
2593
2661
 
2594
- [24]: https://playwright.dev/docs/api/class-locator#locator-is-checked
2662
+ [26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2595
2663
 
2596
- [25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2664
+ [27]: https://playwright.dev/docs/api/class-locator#locator-is-disabled
2597
2665
 
2598
- [26]: https://playwright.dev/docs/api/class-locator#locator-is-disabled
2666
+ [28]: https://codecept.io/helpers/FileSystem
2599
2667
 
2600
- [27]: https://codecept.io/helpers/FileSystem
2668
+ [29]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2601
2669
 
2602
- [28]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2670
+ [30]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2603
2671
 
2604
- [29]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2672
+ [31]: https://playwright.dev/docs/network#handle-requests
2605
2673
 
2606
- [30]: https://playwright.dev/docs/network#handle-requests
2674
+ [32]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2607
2675
 
2608
- [31]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2676
+ [33]: #fillfield
2609
2677
 
2610
- [32]: #fillfield
2678
+ [34]: https://github.com/GoogleChrome/puppeteer/issues/1313
2611
2679
 
2612
- [33]: https://github.com/GoogleChrome/puppeteer/issues/1313
2680
+ [35]: #click
2613
2681
 
2614
- [34]: #click
2682
+ [36]: https://playwright.dev/docs/api/class-page#page-route-from-har
2615
2683
 
2616
- [35]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2684
+ [37]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2617
2685
 
2618
- [36]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2686
+ [38]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2619
2687
 
2620
- [37]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2688
+ [39]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2621
2689
 
2622
- [38]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2690
+ [40]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2623
2691
 
2624
- [39]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2692
+ [41]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2625
2693
 
2626
- [40]: https://playwright.dev/docs/api/class-page#page-wait-for-url
2694
+ [42]: https://playwright.dev/docs/api/class-page#page-wait-for-url
2627
2695
 
2628
- [41]: https://codecept.io/react
2696
+ [43]: https://codecept.io/react
2629
2697
 
2630
- [42]: https://playwright.dev/docs/api/class-browsercontext
2698
+ [44]: https://playwright.dev/docs/api/class-browsercontext
2631
2699
 
2632
- [43]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2700
+ [45]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2633
2701
 
2634
- [44]: https://playwright.dev/docs/trace-viewer
2702
+ [46]: https://playwright.dev/docs/trace-viewer
2635
2703
 
2636
- [45]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2704
+ [47]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2637
2705
 
2638
- [46]: https://playwright.dev/docs/api/class-consolemessage#console-message-type
2706
+ [48]: https://playwright.dev/docs/api/class-consolemessage#console-message-type