codeceptjs 3.2.2 → 3.3.0-beta.3

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/docs/advanced.md +2 -2
  3. package/docs/api.md +227 -188
  4. package/docs/build/ApiDataFactory.js +13 -6
  5. package/docs/build/Appium.js +98 -36
  6. package/docs/build/FileSystem.js +11 -1
  7. package/docs/build/GraphQL.js +11 -0
  8. package/docs/build/JSONResponse.js +297 -0
  9. package/docs/build/Nightmare.js +48 -48
  10. package/docs/build/Playwright.js +271 -151
  11. package/docs/build/Puppeteer.js +76 -67
  12. package/docs/build/REST.js +36 -0
  13. package/docs/build/TestCafe.js +44 -44
  14. package/docs/build/WebDriver.js +69 -69
  15. package/docs/changelog.md +7 -0
  16. package/docs/configuration.md +8 -8
  17. package/docs/custom-helpers.md +1 -1
  18. package/docs/data.md +9 -9
  19. package/docs/helpers/ApiDataFactory.md +7 -0
  20. package/docs/helpers/Appium.md +240 -198
  21. package/docs/helpers/FileSystem.md +11 -1
  22. package/docs/helpers/JSONResponse.md +230 -0
  23. package/docs/helpers/Playwright.md +283 -216
  24. package/docs/helpers/Puppeteer.md +9 -1
  25. package/docs/helpers/REST.md +30 -9
  26. package/docs/installation.md +3 -1
  27. package/docs/internal-api.md +265 -0
  28. package/docs/mobile.md +11 -11
  29. package/docs/nightmare.md +3 -3
  30. package/docs/playwright.md +73 -18
  31. package/docs/plugins.md +136 -36
  32. package/docs/puppeteer.md +28 -12
  33. package/docs/quickstart.md +2 -3
  34. package/docs/reports.md +44 -3
  35. package/docs/testcafe.md +1 -1
  36. package/docs/translation.md +2 -2
  37. package/docs/videos.md +2 -2
  38. package/docs/visual.md +2 -2
  39. package/docs/vue.md +1 -1
  40. package/docs/webdriver.md +92 -4
  41. package/lib/cli.js +25 -20
  42. package/lib/command/init.js +5 -15
  43. package/lib/command/workers/runTests.js +25 -7
  44. package/lib/config.js +17 -13
  45. package/lib/helper/ApiDataFactory.js +13 -6
  46. package/lib/helper/Appium.js +65 -3
  47. package/lib/helper/FileSystem.js +11 -1
  48. package/lib/helper/GraphQL.js +11 -0
  49. package/lib/helper/JSONResponse.js +297 -0
  50. package/lib/helper/Playwright.js +209 -89
  51. package/lib/helper/Puppeteer.js +12 -3
  52. package/lib/helper/REST.js +36 -0
  53. package/lib/helper/extras/Console.js +8 -0
  54. package/lib/helper/extras/PlaywrightRestartOpts.js +35 -0
  55. package/lib/interfaces/bdd.js +3 -1
  56. package/lib/plugin/allure.js +12 -0
  57. package/lib/plugin/autoLogin.js +1 -1
  58. package/lib/plugin/eachElement.js +127 -0
  59. package/lib/plugin/tryTo.js +6 -0
  60. package/lib/utils.js +20 -0
  61. package/package.json +25 -23
  62. package/translations/pt-BR.js +8 -0
  63. package/typings/index.d.ts +4 -0
  64. package/typings/types.d.ts +318 -109
@@ -19,9 +19,15 @@ Uses [Playwright][1] library to run tests inside:
19
19
 
20
20
  This helper works with a browser out of the box with no additional tools required to install.
21
21
 
22
- Requires `playwright` package version ^1 to be installed:
22
+ Requires `playwright` or `playwright-core` package version ^1 to be installed:
23
23
 
24
- npm i playwright@^1 --save
24
+ npm i playwright@^1.18 --save
25
+
26
+ or
27
+
28
+ npm i playwright-core@^1.18 --save
29
+
30
+ Using playwright-core package, will prevent the download of browser binaries and allow connecting to an existing browser installation or for connecting to a remote one.
25
31
 
26
32
  ## Configuration
27
33
 
@@ -30,17 +36,21 @@ This helper should be configured in codecept.json or codecept.conf.js
30
36
  - `url`: base url of website to be tested
31
37
  - `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
32
38
  - `show`: - show browser window.
33
- - `restart`: - restart browser between tests.
39
+ - `restart`: - restart strategy between tests. Possible values:
40
+ - 'context' or **false** - restarts [browser context][2] but keeps running browser. Recommended by Playwright team to keep tests isolated.
41
+ - 'browser' or **true** - closes browser and opens it again between tests.
42
+ - '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
43
+ - `timeout`: - [timeout][3] in ms of all Playwright actions .
34
44
  - `disableScreenshots`: - don't save screenshot on failure.
35
45
  - `emulate`: launch browser in device emulation mode.
36
46
  - `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
37
- - `trace`: record [tracing information][2] with screenshots and snapshots.
47
+ - `trace`: record [tracing information][4] with screenshots and snapshots.
38
48
  - `fullPageScreenshots` - make full page screenshots on failure.
39
49
  - `uniqueScreenshotNames`: - option to prevent screenshot override if you have scenarios with the same name in different suites.
40
- - `keepBrowserState`: - keep browser state between tests when `restart` is set to false.
41
- - `keepCookies`: - keep cookies between tests when `restart` is set to false.
50
+ - `keepBrowserState`: - keep browser state between tests when `restart` is set to 'session'.
51
+ - `keepCookies`: - keep cookies between tests when `restart` is set to 'session'.
42
52
  - `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
43
- - `waitForNavigation`: . When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][3].
53
+ - `waitForNavigation`: . When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][5].
44
54
  - `pressKeyDelay`: . Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
45
55
  - `getPageTimeout` config option to set maximum navigation time in milliseconds.
46
56
  - `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
@@ -51,6 +61,7 @@ This helper should be configured in codecept.json or codecept.conf.js
51
61
  - `manualStart`: - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
52
62
  - `chromium`: (optional) pass additional chromium options
53
63
  - `electron`: (optional) pass additional electron options
64
+ - `channel`: (optional) 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][6].
54
65
 
55
66
  #### Video Recording Customization
56
67
 
@@ -58,7 +69,7 @@ By default, video is saved to `output/video` dir. You can customize this path by
58
69
 
59
70
  - `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
60
71
  - `keepVideoForPassedTests`: - save videos for passed tests
61
- - `recordVideo`: [additional options for videos customization][4]
72
+ - `recordVideo`: [additional options for videos customization][7]
62
73
 
63
74
  #### Trace Recording Customization
64
75
 
@@ -111,7 +122,7 @@ Traces will be saved to `output/trace`
111
122
  }
112
123
  ```
113
124
 
114
- #### Example #4: Connect to remote browser by specifying [websocket endpoint][5]
125
+ #### Example #4: Connect to remote browser by specifying [websocket endpoint][8]
115
126
 
116
127
  ```js
117
128
  {
@@ -128,7 +139,7 @@ Traces will be saved to `output/trace`
128
139
 
129
140
  #### Example #5: Testing with Chromium extensions
130
141
 
131
- [official docs][6]
142
+ [official docs][9]
132
143
 
133
144
  ```js
134
145
  {
@@ -277,13 +288,13 @@ Set current page
277
288
 
278
289
  #### Parameters
279
290
 
280
- - `page` **[object][7]** page to set
291
+ - `page` **[object][10]** page to set
281
292
 
282
293
  ### acceptPopup
283
294
 
284
295
  Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
285
296
  Don't confuse popups with modal windows, as created by [various
286
- libraries][8].
297
+ libraries][11].
287
298
 
288
299
  ### amAcceptingPopups
289
300
 
@@ -320,7 +331,7 @@ I.amOnPage('/login'); // opens a login page
320
331
 
321
332
  #### Parameters
322
333
 
323
- - `url` **[string][9]** url path or global url.
334
+ - `url` **[string][12]** url path or global url.
324
335
 
325
336
  ### appendField
326
337
 
@@ -333,8 +344,8 @@ I.appendField('#myTextField', 'appended');
333
344
 
334
345
  #### Parameters
335
346
 
336
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator
337
- - `value` **[string][9]** text value to append.
347
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator
348
+ - `value` **[string][12]** text value to append.
338
349
 
339
350
  ### attachFile
340
351
 
@@ -349,8 +360,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
349
360
 
350
361
  #### Parameters
351
362
 
352
- - `locator` **([string][9] | [object][7])** field located by label|name|CSS|XPath|strict locator.
353
- - `pathToFile` **[string][9]** local file path relative to codecept.json config file.
363
+ - `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
364
+ - `pathToFile` **[string][12]** local file path relative to codecept.json config file.
354
365
 
355
366
  ### cancelPopup
356
367
 
@@ -371,8 +382,12 @@ I.checkOption('agree', '//form');
371
382
 
372
383
  #### Parameters
373
384
 
374
- - `field` **([string][9] | [object][7])** checkbox located by label | name | CSS | XPath | strict locator.
375
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element located by CSS | XPath | strict locator.
385
+ - `field` **([string][12] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
386
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.[Additional options][13] for check available as 3rd argument.Examples:```js
387
+ // click on element at position
388
+ I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
389
+ ```> ⚠️ To avoid flakiness, option `force: true` is set by default
390
+ - `options`
376
391
 
377
392
  ### clearCookie
378
393
 
@@ -386,7 +401,7 @@ I.clearCookie('test');
386
401
 
387
402
  #### Parameters
388
403
 
389
- - `cookie` **[string][9]?** (optional, `null` by default) cookie name
404
+ - `cookie` **[string][12]?** (optional, `null` by default) cookie name
390
405
 
391
406
  ### clearField
392
407
 
@@ -401,7 +416,7 @@ I.clearField('#email');
401
416
  #### Parameters
402
417
 
403
418
  - `field`
404
- - `editable` **([string][9] | [object][7])** field located by label|name|CSS|XPath|strict locator.
419
+ - `editable` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
405
420
 
406
421
  ### click
407
422
 
@@ -429,8 +444,15 @@ I.click({css: 'nav a.login'});
429
444
 
430
445
  #### Parameters
431
446
 
432
- - `locator` **([string][9] | [object][7])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
433
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
447
+ - `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
448
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.[Additional options][14] for click available as 3rd argument.Examples:```js
449
+ // click on element at position
450
+ I.click('canvas', '.model', { position: { x: 20, y: 40 } })
451
+
452
+ // make ctrl-click
453
+ I.click('.edit', null, { modifiers: ['Ctrl'] } )
454
+ ```
455
+ - `opts`
434
456
 
435
457
  ### clickLink
436
458
 
@@ -469,8 +491,8 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
469
491
 
470
492
  #### Parameters
471
493
 
472
- - `text` **[string][9]** which is not present.
473
- - `context` **([string][9] | [object][7])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
494
+ - `text` **[string][12]** which is not present.
495
+ - `context` **([string][12] | [object][10])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
474
496
 
475
497
  ### dontSeeCheckboxIsChecked
476
498
 
@@ -484,7 +506,7 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
484
506
 
485
507
  #### Parameters
486
508
 
487
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
509
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
488
510
 
489
511
  ### dontSeeCookie
490
512
 
@@ -496,7 +518,7 @@ I.dontSeeCookie('auth'); // no auth cookie
496
518
 
497
519
  #### Parameters
498
520
 
499
- - `name` **[string][9]** cookie name.
521
+ - `name` **[string][12]** cookie name.
500
522
 
501
523
  ### dontSeeCurrentUrlEquals
502
524
 
@@ -510,7 +532,7 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
510
532
 
511
533
  #### Parameters
512
534
 
513
- - `url` **[string][9]** value to check.
535
+ - `url` **[string][12]** value to check.
514
536
 
515
537
  ### dontSeeElement
516
538
 
@@ -522,7 +544,7 @@ I.dontSeeElement('.modal'); // modal is not shown
522
544
 
523
545
  #### Parameters
524
546
 
525
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|Strict locator.
547
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|Strict locator.
526
548
 
527
549
  ### dontSeeElementInDOM
528
550
 
@@ -534,7 +556,7 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
534
556
 
535
557
  #### Parameters
536
558
 
537
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|Strict locator.
559
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|Strict locator.
538
560
 
539
561
  ### dontSeeInCurrentUrl
540
562
 
@@ -542,7 +564,7 @@ Checks that current url does not contain a provided fragment.
542
564
 
543
565
  #### Parameters
544
566
 
545
- - `url` **[string][9]** value to check.
567
+ - `url` **[string][12]** value to check.
546
568
 
547
569
  ### dontSeeInField
548
570
 
@@ -556,8 +578,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
556
578
 
557
579
  #### Parameters
558
580
 
559
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
560
- - `value` **[string][9]** value to check.
581
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
582
+ - `value` **[string][12]** value to check.
561
583
 
562
584
  ### dontSeeInSource
563
585
 
@@ -570,7 +592,7 @@ I.dontSeeInSource('<!--'); // no comments in source
570
592
  #### Parameters
571
593
 
572
594
  - `text`
573
- - `value` **[string][9]** to check.
595
+ - `value` **[string][12]** to check.
574
596
 
575
597
  ### dontSeeInTitle
576
598
 
@@ -582,7 +604,7 @@ I.dontSeeInTitle('Error');
582
604
 
583
605
  #### Parameters
584
606
 
585
- - `text` **[string][9]** value to check.
607
+ - `text` **[string][12]** value to check.
586
608
 
587
609
  ### doubleClick
588
610
 
@@ -598,8 +620,8 @@ I.doubleClick('.btn.edit');
598
620
 
599
621
  #### Parameters
600
622
 
601
- - `locator` **([string][9] | [object][7])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
602
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
623
+ - `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
624
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
603
625
 
604
626
  ### dragAndDrop
605
627
 
@@ -611,8 +633,12 @@ I.dragAndDrop('#dragHandle', '#container');
611
633
 
612
634
  #### Parameters
613
635
 
614
- - `srcElement` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
615
- - `destElement` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
636
+ - `srcElement` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
637
+ - `destElement` **([string][12] | [object][10])** located by CSS|XPath|strict locator.[Additional options][15] can be passed as 3rd argument.```js
638
+ // specify coordinates for source position
639
+ I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
640
+ ```> By default option `force: true` is set
641
+ - `options`
616
642
 
617
643
  ### dragSlider
618
644
 
@@ -626,8 +652,8 @@ I.dragSlider('#slider', -70);
626
652
 
627
653
  #### Parameters
628
654
 
629
- - `locator` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
630
- - `offsetX` **[number][10]** position to drag.
655
+ - `locator` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
656
+ - `offsetX` **[number][16]** position to drag.
631
657
 
632
658
  ### executeScript
633
659
 
@@ -654,10 +680,10 @@ If a function returns a Promise it will wait for its resolution.
654
680
 
655
681
  #### Parameters
656
682
 
657
- - `fn` **([string][9] | [function][11])** function to be executed in browser context.
683
+ - `fn` **([string][12] | [function][17])** function to be executed in browser context.
658
684
  - `arg` **any?** optional argument to pass to the function
659
685
 
660
- Returns **[Promise][12]&lt;any>**
686
+ Returns **[Promise][18]&lt;any>**
661
687
 
662
688
  ### fillField
663
689
 
@@ -677,8 +703,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
677
703
 
678
704
  #### Parameters
679
705
 
680
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
681
- - `value` **([string][9] | [object][7])** text value to fill.
706
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
707
+ - `value` **([string][12] | [object][10])** text value to fill.
682
708
 
683
709
  ### forceClick
684
710
 
@@ -709,8 +735,8 @@ I.forceClick({css: 'nav a.login'});
709
735
 
710
736
  #### Parameters
711
737
 
712
- - `locator` **([string][9] | [object][7])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
713
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
738
+ - `locator` **([string][12] | [object][10])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
739
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
714
740
 
715
741
  ### grabAttributeFrom
716
742
 
@@ -724,10 +750,10 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
724
750
 
725
751
  #### Parameters
726
752
 
727
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
728
- - `attr` **[string][9]** attribute name.
753
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
754
+ - `attr` **[string][12]** attribute name.
729
755
 
730
- Returns **[Promise][12]&lt;[string][9]>** attribute value
756
+ Returns **[Promise][18]&lt;[string][12]>** attribute value
731
757
 
732
758
  ### grabAttributeFromAll
733
759
 
@@ -740,10 +766,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
740
766
 
741
767
  #### Parameters
742
768
 
743
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
744
- - `attr` **[string][9]** attribute name.
769
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
770
+ - `attr` **[string][12]** attribute name.
745
771
 
746
- Returns **[Promise][12]&lt;[Array][13]&lt;[string][9]>>** attribute value
772
+ Returns **[Promise][18]&lt;[Array][19]&lt;[string][12]>>** attribute value
747
773
 
748
774
  ### grabBrowserLogs
749
775
 
@@ -754,7 +780,7 @@ let logs = await I.grabBrowserLogs();
754
780
  console.log(JSON.stringify(logs))
755
781
  ```
756
782
 
757
- Returns **[Promise][12]&lt;[Array][13]&lt;any>>**
783
+ Returns **[Promise][18]&lt;[Array][19]&lt;any>>**
758
784
 
759
785
  ### grabCookie
760
786
 
@@ -769,9 +795,9 @@ assert(cookie.value, '123456');
769
795
 
770
796
  #### Parameters
771
797
 
772
- - `name` **[string][9]?** cookie name.
798
+ - `name` **[string][12]?** cookie name.
773
799
 
774
- Returns **([Promise][12]&lt;[string][9]> | [Promise][12]&lt;[Array][13]&lt;[string][9]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
800
+ Returns **([Promise][18]&lt;[string][12]> | [Promise][18]&lt;[Array][19]&lt;[string][12]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
775
801
 
776
802
  ### grabCssPropertyFrom
777
803
 
@@ -785,10 +811,10 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
785
811
 
786
812
  #### Parameters
787
813
 
788
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
789
- - `cssProperty` **[string][9]** CSS property name.
814
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
815
+ - `cssProperty` **[string][12]** CSS property name.
790
816
 
791
- Returns **[Promise][12]&lt;[string][9]>** CSS value
817
+ Returns **[Promise][18]&lt;[string][12]>** CSS value
792
818
 
793
819
  ### grabCssPropertyFromAll
794
820
 
@@ -801,10 +827,10 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
801
827
 
802
828
  #### Parameters
803
829
 
804
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
805
- - `cssProperty` **[string][9]** CSS property name.
830
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
831
+ - `cssProperty` **[string][12]** CSS property name.
806
832
 
807
- Returns **[Promise][12]&lt;[Array][13]&lt;[string][9]>>** CSS value
833
+ Returns **[Promise][18]&lt;[Array][19]&lt;[string][12]>>** CSS value
808
834
 
809
835
  ### grabCurrentUrl
810
836
 
@@ -816,7 +842,7 @@ let url = await I.grabCurrentUrl();
816
842
  console.log(`Current URL is [${url}]`);
817
843
  ```
818
844
 
819
- Returns **[Promise][12]&lt;[string][9]>** current URL
845
+ Returns **[Promise][18]&lt;[string][12]>** current URL
820
846
 
821
847
  ### grabDataFromPerformanceTiming
822
848
 
@@ -863,11 +889,11 @@ const width = await I.grabElementBoundingRect('h3', 'width');
863
889
 
864
890
  #### Parameters
865
891
 
866
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
892
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
867
893
  - `prop`
868
- - `elementSize` **[string][9]?** x, y, width or height of the given element.
894
+ - `elementSize` **[string][12]?** x, y, width or height of the given element.
869
895
 
870
- Returns **([Promise][12]&lt;DOMRect> | [Promise][12]&lt;[number][10]>)** Element bounding rectangle
896
+ Returns **([Promise][18]&lt;DOMRect> | [Promise][18]&lt;[number][16]>)** Element bounding rectangle
871
897
 
872
898
  ### grabHTMLFrom
873
899
 
@@ -882,9 +908,9 @@ let postHTML = await I.grabHTMLFrom('#post');
882
908
  #### Parameters
883
909
 
884
910
  - `locator`
885
- - `element` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
911
+ - `element` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
886
912
 
887
- Returns **[Promise][12]&lt;[string][9]>** HTML code for an element
913
+ Returns **[Promise][18]&lt;[string][12]>** HTML code for an element
888
914
 
889
915
  ### grabHTMLFromAll
890
916
 
@@ -898,9 +924,9 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
898
924
  #### Parameters
899
925
 
900
926
  - `locator`
901
- - `element` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
927
+ - `element` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
902
928
 
903
- Returns **[Promise][12]&lt;[Array][13]&lt;[string][9]>>** HTML code for an element
929
+ Returns **[Promise][18]&lt;[Array][19]&lt;[string][12]>>** HTML code for an element
904
930
 
905
931
  ### grabNumberOfOpenTabs
906
932
 
@@ -911,7 +937,7 @@ Resumes test execution, so **should be used inside async function with `await`**
911
937
  let tabs = await I.grabNumberOfOpenTabs();
912
938
  ```
913
939
 
914
- Returns **[Promise][12]&lt;[number][10]>** number of open tabs
940
+ Returns **[Promise][18]&lt;[number][16]>** number of open tabs
915
941
 
916
942
  ### grabNumberOfVisibleElements
917
943
 
@@ -924,9 +950,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
924
950
 
925
951
  #### Parameters
926
952
 
927
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
953
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
928
954
 
929
- Returns **[Promise][12]&lt;[number][10]>** number of visible elements
955
+ Returns **[Promise][18]&lt;[number][16]>** number of visible elements
930
956
 
931
957
  ### grabPageScrollPosition
932
958
 
@@ -937,7 +963,7 @@ Resumes test execution, so **should be used inside an async function with `await
937
963
  let { x, y } = await I.grabPageScrollPosition();
938
964
  ```
939
965
 
940
- Returns **[Promise][12]&lt;PageScrollPosition>** scroll position
966
+ Returns **[Promise][18]&lt;PageScrollPosition>** scroll position
941
967
 
942
968
  ### grabPopupText
943
969
 
@@ -947,7 +973,7 @@ Grab the text within the popup. If no popup is visible then it will return null
947
973
  await I.grabPopupText();
948
974
  ```
949
975
 
950
- Returns **[Promise][12]&lt;([string][9] | null)>**
976
+ Returns **[Promise][18]&lt;([string][12] | null)>**
951
977
 
952
978
  ### grabSource
953
979
 
@@ -958,7 +984,7 @@ Resumes test execution, so **should be used inside async function with `await`**
958
984
  let pageSource = await I.grabSource();
959
985
  ```
960
986
 
961
- Returns **[Promise][12]&lt;[string][9]>** source code
987
+ Returns **[Promise][18]&lt;[string][12]>** source code
962
988
 
963
989
  ### grabTextFrom
964
990
 
@@ -973,9 +999,9 @@ If multiple elements found returns first element.
973
999
 
974
1000
  #### Parameters
975
1001
 
976
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1002
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
977
1003
 
978
- Returns **[Promise][12]&lt;[string][9]>** attribute value
1004
+ Returns **[Promise][18]&lt;[string][12]>** attribute value
979
1005
 
980
1006
  ### grabTextFromAll
981
1007
 
@@ -988,9 +1014,9 @@ let pins = await I.grabTextFromAll('#pin li');
988
1014
 
989
1015
  #### Parameters
990
1016
 
991
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1017
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
992
1018
 
993
- Returns **[Promise][12]&lt;[Array][13]&lt;[string][9]>>** attribute value
1019
+ Returns **[Promise][18]&lt;[Array][19]&lt;[string][12]>>** attribute value
994
1020
 
995
1021
  ### grabTitle
996
1022
 
@@ -1001,7 +1027,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
1001
1027
  let title = await I.grabTitle();
1002
1028
  ```
1003
1029
 
1004
- Returns **[Promise][12]&lt;[string][9]>** title
1030
+ Returns **[Promise][18]&lt;[string][12]>** title
1005
1031
 
1006
1032
  ### grabValueFrom
1007
1033
 
@@ -1015,9 +1041,9 @@ let email = await I.grabValueFrom('input[name=email]');
1015
1041
 
1016
1042
  #### Parameters
1017
1043
 
1018
- - `locator` **([string][9] | [object][7])** field located by label|name|CSS|XPath|strict locator.
1044
+ - `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
1019
1045
 
1020
- Returns **[Promise][12]&lt;[string][9]>** attribute value
1046
+ Returns **[Promise][18]&lt;[string][12]>** attribute value
1021
1047
 
1022
1048
  ### grabValueFromAll
1023
1049
 
@@ -1030,16 +1056,16 @@ let inputs = await I.grabValueFromAll('//form/input');
1030
1056
 
1031
1057
  #### Parameters
1032
1058
 
1033
- - `locator` **([string][9] | [object][7])** field located by label|name|CSS|XPath|strict locator.
1059
+ - `locator` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
1034
1060
 
1035
- Returns **[Promise][12]&lt;[Array][13]&lt;[string][9]>>** attribute value
1061
+ Returns **[Promise][18]&lt;[Array][19]&lt;[string][12]>>** attribute value
1036
1062
 
1037
1063
  ### handleDownloads
1038
1064
 
1039
1065
  Handles a file download.Aa file name is required to save the file on disk.
1040
1066
  Files are saved to "output" directory.
1041
1067
 
1042
- Should be used with [FileSystem helper][14] to check that file were downloaded correctly.
1068
+ Should be used with [FileSystem helper][20] to check that file were downloaded correctly.
1043
1069
 
1044
1070
  ```js
1045
1071
  I.handleDownloads('downloads/avatar.jpg');
@@ -1050,7 +1076,7 @@ I.waitForFile('downloads/avatar.jpg', 5);
1050
1076
 
1051
1077
  #### Parameters
1052
1078
 
1053
- - `fileName` **[string][9]?** set filename for downloaded file
1079
+ - `fileName` **[string][12]?** set filename for downloaded file
1054
1080
 
1055
1081
  ### haveRequestHeaders
1056
1082
 
@@ -1064,22 +1090,43 @@ I.haveRequestHeaders({
1064
1090
 
1065
1091
  #### Parameters
1066
1092
 
1067
- - `customHeaders` **[object][7]** headers to set
1093
+ - `customHeaders` **[object][10]** headers to set
1094
+
1095
+ ### makeApiRequest
1096
+
1097
+ Performs [api request][21] using
1098
+ the cookies from the current browser session.
1099
+
1100
+ ```js
1101
+ const users = await I.makeApiRequest('GET', '/api/users', { params: { page: 1 }});
1102
+ users[0]
1103
+ I.makeApiRequest('PATCH', )
1104
+ ```
1105
+
1106
+ > This is Playwright's built-in alternative to using REST helper's sendGet, sendPost, etc methods.
1107
+
1108
+ #### Parameters
1109
+
1110
+ - `method` **[string][12]** HTTP method
1111
+ - `url` **[string][12]** endpoint
1112
+ - `options` **[object][10]** request options depending on method used
1113
+
1114
+ Returns **[Promise][18]&lt;[object][10]>** response
1068
1115
 
1069
1116
  ### mockRoute
1070
1117
 
1071
- Mocks network request using [`browserContext.route`][15] of Playwright
1118
+ Mocks network request using [`browserContext.route`][22] of Playwright
1072
1119
 
1073
1120
  ```js
1074
1121
  I.mockRoute(/(.png$)|(.jpg$)/, route => route.abort());
1075
1122
  ```
1076
1123
 
1077
- This method allows intercepting and mocking requests & responses. [Learn more about it][16]
1124
+ This method allows intercepting and mocking requests & responses. [Learn more about it][23]
1078
1125
 
1079
1126
  #### Parameters
1080
1127
 
1081
- - `url` **[string][9]?** URL, regex or pattern for to match URL
1082
- - `handler` **[function][11]?** a function to process request
1128
+ - `url` **[string][12]?** URL, regex or pattern for to match URL
1129
+ - `handler` **[function][17]?** a function to process request
1083
1130
 
1084
1131
  ### moveCursorTo
1085
1132
 
@@ -1093,9 +1140,9 @@ I.moveCursorTo('#submit', 5,5);
1093
1140
 
1094
1141
  #### Parameters
1095
1142
 
1096
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
1097
- - `offsetX` **[number][10]** (optional, `0` by default) X-axis offset.
1098
- - `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
1143
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
1144
+ - `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
1145
+ - `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
1099
1146
 
1100
1147
  ### openNewTab
1101
1148
 
@@ -1105,7 +1152,7 @@ Open new tab and automatically switched to new tab
1105
1152
  I.openNewTab();
1106
1153
  ```
1107
1154
 
1108
- You can pass in [page options][17] to emulate device on this page
1155
+ You can pass in [page options][24] to emulate device on this page
1109
1156
 
1110
1157
  ```js
1111
1158
  // enable mobile
@@ -1120,7 +1167,7 @@ I.openNewTab({ isMobile: true });
1120
1167
 
1121
1168
  Presses a key in the browser (on a focused element).
1122
1169
 
1123
- _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][18].
1170
+ _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][25].
1124
1171
 
1125
1172
  ```js
1126
1173
  I.pressKey('Backspace');
@@ -1179,13 +1226,13 @@ Some of the supported key names are:
1179
1226
 
1180
1227
  #### Parameters
1181
1228
 
1182
- - `key` **([string][9] | [Array][13]&lt;[string][9]>)** key or array of keys to press._Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][19]).
1229
+ - `key` **([string][12] | [Array][19]&lt;[string][12]>)** key or array of keys to press._Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][26]).
1183
1230
 
1184
1231
  ### pressKeyDown
1185
1232
 
1186
1233
  Presses a key in the browser and leaves it in a down state.
1187
1234
 
1188
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][20]).
1235
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][27]).
1189
1236
 
1190
1237
  ```js
1191
1238
  I.pressKeyDown('Control');
@@ -1195,13 +1242,13 @@ I.pressKeyUp('Control');
1195
1242
 
1196
1243
  #### Parameters
1197
1244
 
1198
- - `key` **[string][9]** name of key to press down.
1245
+ - `key` **[string][12]** name of key to press down.
1199
1246
 
1200
1247
  ### pressKeyUp
1201
1248
 
1202
1249
  Releases a key in the browser which was previously set to a down state.
1203
1250
 
1204
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][20]).
1251
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][27]).
1205
1252
 
1206
1253
  ```js
1207
1254
  I.pressKeyDown('Control');
@@ -1211,7 +1258,7 @@ I.pressKeyUp('Control');
1211
1258
 
1212
1259
  #### Parameters
1213
1260
 
1214
- - `key` **[string][9]** name of key to release.
1261
+ - `key` **[string][12]** name of key to release.
1215
1262
 
1216
1263
  ### refreshPage
1217
1264
 
@@ -1228,8 +1275,8 @@ First parameter can be set to `maximize`.
1228
1275
 
1229
1276
  #### Parameters
1230
1277
 
1231
- - `width` **[number][10]** width in pixels or `maximize`.
1232
- - `height` **[number][10]** height in pixels.Unlike other drivers Playwright changes the size of a viewport, not the window!
1278
+ - `width` **[number][16]** width in pixels or `maximize`.
1279
+ - `height` **[number][16]** height in pixels.Unlike other drivers Playwright changes the size of a viewport, not the window!
1233
1280
  Playwright does not control the window of a browser so it can't adjust its real size.
1234
1281
  It also can't maximize a window.Update configuration to change real window size on start:```js
1235
1282
  // inside codecept.conf.js
@@ -1252,8 +1299,8 @@ I.rightClick('Click me', '.context');
1252
1299
 
1253
1300
  #### Parameters
1254
1301
 
1255
- - `locator` **([string][9] | [object][7])** clickable element located by CSS|XPath|strict locator.
1256
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1302
+ - `locator` **([string][12] | [object][10])** clickable element located by CSS|XPath|strict locator.
1303
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1257
1304
 
1258
1305
  ### saveElementScreenshot
1259
1306
 
@@ -1266,8 +1313,8 @@ I.saveElementScreenshot(`#submit`,'debug.png');
1266
1313
 
1267
1314
  #### Parameters
1268
1315
 
1269
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1270
- - `fileName` **[string][9]** file name to save.
1316
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1317
+ - `fileName` **[string][12]** file name to save.
1271
1318
 
1272
1319
  ### saveScreenshot
1273
1320
 
@@ -1282,8 +1329,8 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
1282
1329
 
1283
1330
  #### Parameters
1284
1331
 
1285
- - `fileName` **[string][9]** file name to save.
1286
- - `fullPage` **[boolean][21]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1332
+ - `fileName` **[string][12]** file name to save.
1333
+ - `fullPage` **[boolean][28]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1287
1334
 
1288
1335
  ### scrollPageToBottom
1289
1336
 
@@ -1313,9 +1360,9 @@ I.scrollTo('#submit', 5, 5);
1313
1360
 
1314
1361
  #### Parameters
1315
1362
 
1316
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
1317
- - `offsetX` **[number][10]** (optional, `0` by default) X-axis offset.
1318
- - `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
1363
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
1364
+ - `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
1365
+ - `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
1319
1366
 
1320
1367
  ### see
1321
1368
 
@@ -1330,8 +1377,8 @@ I.see('Register', {css: 'form.register'}); // use strict locator
1330
1377
 
1331
1378
  #### Parameters
1332
1379
 
1333
- - `text` **[string][9]** expected on page.
1334
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1380
+ - `text` **[string][12]** expected on page.
1381
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1335
1382
 
1336
1383
  ### seeAttributesOnElements
1337
1384
 
@@ -1343,8 +1390,8 @@ I.seeAttributesOnElements('//form', { method: "post"});
1343
1390
 
1344
1391
  #### Parameters
1345
1392
 
1346
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
1347
- - `attributes` **[object][7]** attributes and their values to check.
1393
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
1394
+ - `attributes` **[object][10]** attributes and their values to check.
1348
1395
 
1349
1396
  ### seeCheckboxIsChecked
1350
1397
 
@@ -1358,7 +1405,7 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
1358
1405
 
1359
1406
  #### Parameters
1360
1407
 
1361
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
1408
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
1362
1409
 
1363
1410
  ### seeCookie
1364
1411
 
@@ -1370,7 +1417,7 @@ I.seeCookie('Auth');
1370
1417
 
1371
1418
  #### Parameters
1372
1419
 
1373
- - `name` **[string][9]** cookie name.
1420
+ - `name` **[string][12]** cookie name.
1374
1421
 
1375
1422
  ### seeCssPropertiesOnElements
1376
1423
 
@@ -1382,8 +1429,8 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
1382
1429
 
1383
1430
  #### Parameters
1384
1431
 
1385
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
1386
- - `cssProperties` **[object][7]** object with CSS properties and their values to check.
1432
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
1433
+ - `cssProperties` **[object][10]** object with CSS properties and their values to check.
1387
1434
 
1388
1435
  ### seeCurrentUrlEquals
1389
1436
 
@@ -1398,7 +1445,7 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
1398
1445
 
1399
1446
  #### Parameters
1400
1447
 
1401
- - `url` **[string][9]** value to check.
1448
+ - `url` **[string][12]** value to check.
1402
1449
 
1403
1450
  ### seeElement
1404
1451
 
@@ -1411,7 +1458,7 @@ I.seeElement('#modal');
1411
1458
 
1412
1459
  #### Parameters
1413
1460
 
1414
- - `locator` **([string][9] | [object][7])** located by CSS|XPath|strict locator.
1461
+ - `locator` **([string][12] | [object][10])** located by CSS|XPath|strict locator.
1415
1462
 
1416
1463
  ### seeElementInDOM
1417
1464
 
@@ -1424,7 +1471,7 @@ I.seeElementInDOM('#modal');
1424
1471
 
1425
1472
  #### Parameters
1426
1473
 
1427
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1474
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1428
1475
 
1429
1476
  ### seeInCurrentUrl
1430
1477
 
@@ -1436,7 +1483,7 @@ I.seeInCurrentUrl('/register'); // we are on registration page
1436
1483
 
1437
1484
  #### Parameters
1438
1485
 
1439
- - `url` **[string][9]** a fragment to check
1486
+ - `url` **[string][12]** a fragment to check
1440
1487
 
1441
1488
  ### seeInField
1442
1489
 
@@ -1452,8 +1499,8 @@ I.seeInField('#searchform input','Search');
1452
1499
 
1453
1500
  #### Parameters
1454
1501
 
1455
- - `field` **([string][9] | [object][7])** located by label|name|CSS|XPath|strict locator.
1456
- - `value` **[string][9]** value to check.
1502
+ - `field` **([string][12] | [object][10])** located by label|name|CSS|XPath|strict locator.
1503
+ - `value` **[string][12]** value to check.
1457
1504
 
1458
1505
  ### seeInPopup
1459
1506
 
@@ -1466,7 +1513,7 @@ I.seeInPopup('Popup text');
1466
1513
 
1467
1514
  #### Parameters
1468
1515
 
1469
- - `text` **[string][9]** value to check.
1516
+ - `text` **[string][12]** value to check.
1470
1517
 
1471
1518
  ### seeInSource
1472
1519
 
@@ -1478,7 +1525,7 @@ I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1478
1525
 
1479
1526
  #### Parameters
1480
1527
 
1481
- - `text` **[string][9]** value to check.
1528
+ - `text` **[string][12]** value to check.
1482
1529
 
1483
1530
  ### seeInTitle
1484
1531
 
@@ -1490,7 +1537,7 @@ I.seeInTitle('Home Page');
1490
1537
 
1491
1538
  #### Parameters
1492
1539
 
1493
- - `text` **[string][9]** text value to check.
1540
+ - `text` **[string][12]** text value to check.
1494
1541
 
1495
1542
  ### seeNumberOfElements
1496
1543
 
@@ -1503,8 +1550,8 @@ I.seeNumberOfElements('#submitBtn', 1);
1503
1550
 
1504
1551
  #### Parameters
1505
1552
 
1506
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1507
- - `num` **[number][10]** number of elements.
1553
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1554
+ - `num` **[number][16]** number of elements.
1508
1555
 
1509
1556
  ### seeNumberOfVisibleElements
1510
1557
 
@@ -1517,8 +1564,8 @@ I.seeNumberOfVisibleElements('.buttons', 3);
1517
1564
 
1518
1565
  #### Parameters
1519
1566
 
1520
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1521
- - `num` **[number][10]** number of elements.
1567
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1568
+ - `num` **[number][16]** number of elements.
1522
1569
 
1523
1570
  ### seeTextEquals
1524
1571
 
@@ -1530,8 +1577,8 @@ I.seeTextEquals('text', 'h1');
1530
1577
 
1531
1578
  #### Parameters
1532
1579
 
1533
- - `text` **[string][9]** element value to check.
1534
- - `context` **([string][9] | [object][7])?** element located by CSS|XPath|strict locator.
1580
+ - `text` **[string][12]** element value to check.
1581
+ - `context` **([string][12] | [object][10])?** element located by CSS|XPath|strict locator.
1535
1582
 
1536
1583
  ### seeTitleEquals
1537
1584
 
@@ -1543,7 +1590,7 @@ I.seeTitleEquals('Test title.');
1543
1590
 
1544
1591
  #### Parameters
1545
1592
 
1546
- - `text` **[string][9]** value to check.
1593
+ - `text` **[string][12]** value to check.
1547
1594
 
1548
1595
  ### selectOption
1549
1596
 
@@ -1568,8 +1615,8 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
1568
1615
 
1569
1616
  #### Parameters
1570
1617
 
1571
- - `select` **([string][9] | [object][7])** field located by label|name|CSS|XPath|strict locator.
1572
- - `option` **([string][9] | [Array][13]&lt;any>)** visible text or value of option.
1618
+ - `select` **([string][12] | [object][10])** field located by label|name|CSS|XPath|strict locator.
1619
+ - `option` **([string][12] | [Array][19]&lt;any>)** visible text or value of option.
1573
1620
 
1574
1621
  ### setCookie
1575
1622
 
@@ -1589,7 +1636,7 @@ I.setCookie([
1589
1636
 
1590
1637
  #### Parameters
1591
1638
 
1592
- - `cookie` **(Cookie | [Array][13]&lt;Cookie>)** a cookie object or array of cookie objects.
1639
+ - `cookie` **(Cookie | [Array][19]&lt;Cookie>)** a cookie object or array of cookie objects.
1593
1640
 
1594
1641
  ### stopMockingRoute
1595
1642
 
@@ -1604,8 +1651,8 @@ If no handler is passed, all mock requests for the rote are disabled.
1604
1651
 
1605
1652
  #### Parameters
1606
1653
 
1607
- - `url` **[string][9]?** URL, regex or pattern for to match URL
1608
- - `handler` **[function][11]?** a function to process request
1654
+ - `url` **[string][12]?** URL, regex or pattern for to match URL
1655
+ - `handler` **[function][17]?** a function to process request
1609
1656
 
1610
1657
  ### switchTo
1611
1658
 
@@ -1618,7 +1665,7 @@ I.switchTo(); // switch back to main page
1618
1665
 
1619
1666
  #### Parameters
1620
1667
 
1621
- - `locator` **([string][9]? | [object][7])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1668
+ - `locator` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1622
1669
 
1623
1670
  ### switchToNextTab
1624
1671
 
@@ -1631,7 +1678,7 @@ I.switchToNextTab(2);
1631
1678
 
1632
1679
  #### Parameters
1633
1680
 
1634
- - `num` **[number][10]**
1681
+ - `num` **[number][16]**
1635
1682
 
1636
1683
  ### switchToPreviousTab
1637
1684
 
@@ -1644,13 +1691,13 @@ I.switchToPreviousTab(2);
1644
1691
 
1645
1692
  #### Parameters
1646
1693
 
1647
- - `num` **[number][10]**
1694
+ - `num` **[number][16]**
1648
1695
 
1649
1696
  ### type
1650
1697
 
1651
1698
  Types out the given text into an active field.
1652
1699
  To slow down typing use a second parameter, to set interval between key presses.
1653
- _Note:_ Should be used when [`fillField`][18] is not an option.
1700
+ _Note:_ Should be used when [`fillField`][25] is not an option.
1654
1701
 
1655
1702
  ```js
1656
1703
  // passing in a string
@@ -1666,8 +1713,8 @@ I.type(['T', 'E', 'X', 'T']);
1666
1713
  #### Parameters
1667
1714
 
1668
1715
  - `keys`
1669
- - `delay` **[number][10]?** (optional) delay in ms between key presses
1670
- - `key` **([string][9] | [Array][13]&lt;[string][9]>)** or array of keys to type.
1716
+ - `delay` **[number][16]?** (optional) delay in ms between key presses
1717
+ - `key` **([string][12] | [Array][19]&lt;[string][12]>)** or array of keys to type.
1671
1718
 
1672
1719
  ### uncheckOption
1673
1720
 
@@ -1684,8 +1731,12 @@ I.uncheckOption('agree', '//form');
1684
1731
 
1685
1732
  #### Parameters
1686
1733
 
1687
- - `field` **([string][9] | [object][7])** checkbox located by label | name | CSS | XPath | strict locator.
1688
- - `context` **([string][9]? | [object][7])** (optional, `null` by default) element located by CSS | XPath | strict locator.
1734
+ - `field` **([string][12] | [object][10])** checkbox located by label | name | CSS | XPath | strict locator.
1735
+ - `context` **([string][12]? | [object][10])** (optional, `null` by default) element located by CSS | XPath | strict locator.[Additional options][29] for uncheck available as 3rd argument.Examples:```js
1736
+ // click on element at position
1737
+ I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
1738
+ ```> ⚠️ To avoid flakiness, option `force: true` is set by default
1739
+ - `options`
1689
1740
 
1690
1741
  ### usePlaywrightTo
1691
1742
 
@@ -1694,18 +1745,18 @@ Use Playwright API inside a test.
1694
1745
  First argument is a description of an action.
1695
1746
  Second argument is async function that gets this helper as parameter.
1696
1747
 
1697
- { [`page`][22], [`context`][23] [`browser`][24] } objects from Playwright API are available.
1748
+ { [`page`][30], [`browserContext`][31] [`browser`][32] } objects from Playwright API are available.
1698
1749
 
1699
1750
  ```js
1700
- I.usePlaywrightTo('emulate offline mode', async ({ context }) {
1701
- await context.setOffline(true);
1751
+ I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
1752
+ await browserContext.setOffline(true);
1702
1753
  });
1703
1754
  ```
1704
1755
 
1705
1756
  #### Parameters
1706
1757
 
1707
- - `description` **[string][9]** used to show in logs.
1708
- - `fn` **[function][11]** async functuion that executed with Playwright helper as argument
1758
+ - `description` **[string][12]** used to show in logs.
1759
+ - `fn` **[function][17]** async function that executed with Playwright helper as argument
1709
1760
 
1710
1761
  ### wait
1711
1762
 
@@ -1717,7 +1768,7 @@ I.wait(2); // wait 2 secs
1717
1768
 
1718
1769
  #### Parameters
1719
1770
 
1720
- - `sec` **[number][10]** number of second to wait.
1771
+ - `sec` **[number][16]** number of second to wait.
1721
1772
 
1722
1773
  ### waitForClickable
1723
1774
 
@@ -1731,9 +1782,9 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
1731
1782
 
1732
1783
  #### Parameters
1733
1784
 
1734
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1785
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1735
1786
  - `waitTimeout`
1736
- - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1787
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1737
1788
 
1738
1789
  ### waitForDetached
1739
1790
 
@@ -1746,8 +1797,8 @@ I.waitForDetached('#popup');
1746
1797
 
1747
1798
  #### Parameters
1748
1799
 
1749
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1750
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1800
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1801
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1751
1802
 
1752
1803
  ### waitForElement
1753
1804
 
@@ -1761,8 +1812,8 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
1761
1812
 
1762
1813
  #### Parameters
1763
1814
 
1764
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1765
- - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1815
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1816
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1766
1817
 
1767
1818
  ### waitForEnabled
1768
1819
 
@@ -1771,8 +1822,8 @@ Element can be located by CSS or XPath.
1771
1822
 
1772
1823
  #### Parameters
1773
1824
 
1774
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1775
- - `sec` **[number][10]** (optional) time in seconds to wait, 1 by default.
1825
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1826
+ - `sec` **[number][16]** (optional) time in seconds to wait, 1 by default.
1776
1827
 
1777
1828
  ### waitForFunction
1778
1829
 
@@ -1791,9 +1842,9 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
1791
1842
 
1792
1843
  #### Parameters
1793
1844
 
1794
- - `fn` **([string][9] | [function][11])** to be executed in browser context.
1795
- - `argsOrSec` **([Array][13]&lt;any> | [number][10])?** (optional, `1` by default) arguments for function or seconds.
1796
- - `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
1845
+ - `fn` **([string][12] | [function][17])** to be executed in browser context.
1846
+ - `argsOrSec` **([Array][19]&lt;any> | [number][16])?** (optional, `1` by default) arguments for function or seconds.
1847
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1797
1848
 
1798
1849
  ### waitForInvisible
1799
1850
 
@@ -1806,14 +1857,14 @@ I.waitForInvisible('#popup');
1806
1857
 
1807
1858
  #### Parameters
1808
1859
 
1809
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1810
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1860
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1861
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1811
1862
 
1812
1863
  ### waitForNavigation
1813
1864
 
1814
1865
  Waits for navigation to finish. By default takes configured `waitForNavigation` option.
1815
1866
 
1816
- See [Playwright's reference][25]
1867
+ See [Playwright's reference][33]
1817
1868
 
1818
1869
  #### Parameters
1819
1870
 
@@ -1830,8 +1881,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
1830
1881
 
1831
1882
  #### Parameters
1832
1883
 
1833
- - `urlOrPredicate` **([string][9] | [function][11])**
1834
- - `sec` **[number][10]?** seconds to wait
1884
+ - `urlOrPredicate` **([string][12] | [function][17])**
1885
+ - `sec` **[number][16]?** seconds to wait
1835
1886
 
1836
1887
  ### waitForResponse
1837
1888
 
@@ -1844,8 +1895,8 @@ I.waitForResponse(response => response.url() === 'https://example.com' && respon
1844
1895
 
1845
1896
  #### Parameters
1846
1897
 
1847
- - `urlOrPredicate` **([string][9] | [function][11])**
1848
- - `sec` **[number][10]?** number of seconds to wait
1898
+ - `urlOrPredicate` **([string][12] | [function][17])**
1899
+ - `sec` **[number][16]?** number of seconds to wait
1849
1900
 
1850
1901
  ### waitForText
1851
1902
 
@@ -1860,9 +1911,9 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
1860
1911
 
1861
1912
  #### Parameters
1862
1913
 
1863
- - `text` **[string][9]** to wait for.
1864
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1865
- - `context` **([string][9] | [object][7])?** (optional) element located by CSS|XPath|strict locator.
1914
+ - `text` **[string][12]** to wait for.
1915
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1916
+ - `context` **([string][12] | [object][10])?** (optional) element located by CSS|XPath|strict locator.
1866
1917
 
1867
1918
  ### waitForValue
1868
1919
 
@@ -1874,9 +1925,9 @@ I.waitForValue('//input', "GoodValue");
1874
1925
 
1875
1926
  #### Parameters
1876
1927
 
1877
- - `field` **([string][9] | [object][7])** input field.
1878
- - `value` **[string][9]** expected value.
1879
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1928
+ - `field` **([string][12] | [object][10])** input field.
1929
+ - `value` **[string][12]** expected value.
1930
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1880
1931
 
1881
1932
  ### waitForVisible
1882
1933
 
@@ -1889,8 +1940,8 @@ I.waitForVisible('#popup');
1889
1940
 
1890
1941
  #### Parameters
1891
1942
 
1892
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1893
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to waitThis method accepts [React selectors][26].
1943
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1944
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to waitThis method accepts [React selectors][34].
1894
1945
 
1895
1946
  ### waitInUrl
1896
1947
 
@@ -1902,8 +1953,8 @@ I.waitInUrl('/info', 2);
1902
1953
 
1903
1954
  #### Parameters
1904
1955
 
1905
- - `urlPart` **[string][9]** value to check.
1906
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1956
+ - `urlPart` **[string][12]** value to check.
1957
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1907
1958
 
1908
1959
  ### waitNumberOfVisibleElements
1909
1960
 
@@ -1915,9 +1966,9 @@ I.waitNumberOfVisibleElements('a', 3);
1915
1966
 
1916
1967
  #### Parameters
1917
1968
 
1918
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1919
- - `num` **[number][10]** number of elements.
1920
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1969
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1970
+ - `num` **[number][16]** number of elements.
1971
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1921
1972
 
1922
1973
  ### waitToHide
1923
1974
 
@@ -1930,8 +1981,8 @@ I.waitToHide('#popup');
1930
1981
 
1931
1982
  #### Parameters
1932
1983
 
1933
- - `locator` **([string][9] | [object][7])** element located by CSS|XPath|strict locator.
1934
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1984
+ - `locator` **([string][12] | [object][10])** element located by CSS|XPath|strict locator.
1985
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1935
1986
 
1936
1987
  ### waitUrlEquals
1937
1988
 
@@ -1944,57 +1995,73 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
1944
1995
 
1945
1996
  #### Parameters
1946
1997
 
1947
- - `urlPart` **[string][9]** value to check.
1948
- - `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
1998
+ - `urlPart` **[string][12]** value to check.
1999
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1949
2000
 
1950
2001
  [1]: https://github.com/microsoft/playwright
1951
2002
 
1952
- [2]: https://playwright.dev/docs/trace-viewer
2003
+ [2]: https://playwright.dev/docs/api/class-browsercontext
2004
+
2005
+ [3]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2006
+
2007
+ [4]: https://playwright.dev/docs/trace-viewer
2008
+
2009
+ [5]: https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions
2010
+
2011
+ [6]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2012
+
2013
+ [7]: https://playwright.dev/docs/next/api/class-browser#browser-new-context
2014
+
2015
+ [8]: https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams
2016
+
2017
+ [9]: https://github.com/microsoft/playwright/blob/v0.11.0/docs/api.md#working-with-chrome-extensions
2018
+
2019
+ [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1953
2020
 
1954
- [3]: https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitfornavigationoptions
2021
+ [11]: http://jster.net/category/windows-modals-popups
1955
2022
 
1956
- [4]: https://playwright.dev/docs/next/api/class-browser#browser-new-context
2023
+ [12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1957
2024
 
1958
- [5]: https://playwright.dev/docs/api/class-browsertype#browsertypeconnectparams
2025
+ [13]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
1959
2026
 
1960
- [6]: https://github.com/microsoft/playwright/blob/v0.11.0/docs/api.md#working-with-chrome-extensions
2027
+ [14]: https://playwright.dev/docs/api/class-page#page-click
1961
2028
 
1962
- [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
2029
+ [15]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
1963
2030
 
1964
- [8]: http://jster.net/category/windows-modals-popups
2031
+ [16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
1965
2032
 
1966
- [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
2033
+ [17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
1967
2034
 
1968
- [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2035
+ [18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1969
2036
 
1970
- [11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2037
+ [19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1971
2038
 
1972
- [12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2039
+ [20]: https://codecept.io/helpers/FileSystem
1973
2040
 
1974
- [13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2041
+ [21]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
1975
2042
 
1976
- [14]: https://codecept.io/helpers/FileSystem
2043
+ [22]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
1977
2044
 
1978
- [15]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2045
+ [23]: https://playwright.dev/docs/network#handle-requests
1979
2046
 
1980
- [16]: https://playwright.dev/docs/network#handle-requests
2047
+ [24]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
1981
2048
 
1982
- [17]: https://github.com/microsoft/playwright/blob/master/docs/api.md#browsernewpageoptions
2049
+ [25]: #fillfield
1983
2050
 
1984
- [18]: #fillfield
2051
+ [26]: https://github.com/GoogleChrome/puppeteer/issues/1313
1985
2052
 
1986
- [19]: https://github.com/GoogleChrome/puppeteer/issues/1313
2053
+ [27]: #click
1987
2054
 
1988
- [20]: #click
2055
+ [28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
1989
2056
 
1990
- [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2057
+ [29]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
1991
2058
 
1992
- [22]: https://github.com/microsoft/playwright/blob/master/docs/api.md#class-page
2059
+ [30]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
1993
2060
 
1994
- [23]: https://github.com/microsoft/playwright/blob/master/docs/api.md#class-context
2061
+ [31]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
1995
2062
 
1996
- [24]: https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browser
2063
+ [32]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
1997
2064
 
1998
- [25]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2065
+ [33]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
1999
2066
 
2000
- [26]: https://codecept.io/react
2067
+ [34]: https://codecept.io/react