codeceptjs 3.5.6 → 3.5.7

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 (139) hide show
  1. package/README.md +5 -1
  2. package/docs/advanced.md +1 -1
  3. package/docs/bdd.md +11 -7
  4. package/docs/build/ApiDataFactory.js +2 -1
  5. package/docs/build/Appium.js +26 -23
  6. package/docs/build/Expect.js +422 -0
  7. package/docs/build/Nightmare.js +53 -56
  8. package/docs/build/Playwright.js +202 -103
  9. package/docs/build/Protractor.js +66 -69
  10. package/docs/build/Puppeteer.js +124 -81
  11. package/docs/build/TestCafe.js +56 -55
  12. package/docs/build/WebDriver.js +81 -82
  13. package/docs/changelog.md +562 -1
  14. package/docs/commands.md +12 -0
  15. package/docs/community-helpers.md +8 -4
  16. package/docs/examples.md +8 -2
  17. package/docs/helpers/Appium.md +50 -32
  18. package/docs/helpers/Expect.md +275 -0
  19. package/docs/helpers/Nightmare.md +141 -94
  20. package/docs/helpers/Playwright.md +360 -261
  21. package/docs/helpers/Protractor.md +229 -169
  22. package/docs/helpers/Puppeteer.md +270 -187
  23. package/docs/helpers/TestCafe.md +201 -149
  24. package/docs/helpers/WebDriver.md +252 -178
  25. package/docs/mobile.md +17 -21
  26. package/docs/plugins.md +35 -1
  27. package/docs/webapi/amOnPage.mustache +1 -1
  28. package/docs/webapi/appendField.mustache +1 -1
  29. package/docs/webapi/attachFile.mustache +1 -1
  30. package/docs/webapi/blur.mustache +1 -0
  31. package/docs/webapi/checkOption.mustache +1 -1
  32. package/docs/webapi/clearCookie.mustache +1 -1
  33. package/docs/webapi/clearField.mustache +1 -1
  34. package/docs/webapi/click.mustache +1 -1
  35. package/docs/webapi/clickLink.mustache +1 -1
  36. package/docs/webapi/closeCurrentTab.mustache +1 -1
  37. package/docs/webapi/closeOtherTabs.mustache +1 -1
  38. package/docs/webapi/dontSee.mustache +1 -1
  39. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  40. package/docs/webapi/dontSeeCookie.mustache +1 -1
  41. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  42. package/docs/webapi/dontSeeElement.mustache +1 -1
  43. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  44. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  45. package/docs/webapi/dontSeeInField.mustache +1 -1
  46. package/docs/webapi/dontSeeInSource.mustache +1 -1
  47. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  48. package/docs/webapi/doubleClick.mustache +1 -1
  49. package/docs/webapi/downloadFile.mustache +1 -1
  50. package/docs/webapi/dragAndDrop.mustache +1 -1
  51. package/docs/webapi/dragSlider.mustache +1 -1
  52. package/docs/webapi/executeAsyncScript.mustache +0 -2
  53. package/docs/webapi/executeScript.mustache +0 -2
  54. package/docs/webapi/fillField.mustache +1 -1
  55. package/docs/webapi/focus.mustache +1 -0
  56. package/docs/webapi/forceClick.mustache +1 -1
  57. package/docs/webapi/forceRightClick.mustache +1 -1
  58. package/docs/webapi/grabCookie.mustache +1 -1
  59. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  60. package/docs/webapi/moveCursorTo.mustache +1 -1
  61. package/docs/webapi/openNewTab.mustache +1 -1
  62. package/docs/webapi/pressKey.mustache +1 -1
  63. package/docs/webapi/pressKeyDown.mustache +1 -1
  64. package/docs/webapi/pressKeyUp.mustache +1 -1
  65. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  66. package/docs/webapi/refreshPage.mustache +1 -1
  67. package/docs/webapi/resizeWindow.mustache +1 -1
  68. package/docs/webapi/rightClick.mustache +1 -1
  69. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  70. package/docs/webapi/saveScreenshot.mustache +1 -1
  71. package/docs/webapi/say.mustache +1 -1
  72. package/docs/webapi/scrollIntoView.mustache +1 -1
  73. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  74. package/docs/webapi/scrollPageToTop.mustache +1 -1
  75. package/docs/webapi/scrollTo.mustache +1 -1
  76. package/docs/webapi/see.mustache +1 -1
  77. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  78. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  79. package/docs/webapi/seeCookie.mustache +1 -1
  80. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  81. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  82. package/docs/webapi/seeElement.mustache +1 -1
  83. package/docs/webapi/seeElementInDOM.mustache +1 -1
  84. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  85. package/docs/webapi/seeInField.mustache +1 -1
  86. package/docs/webapi/seeInPopup.mustache +1 -1
  87. package/docs/webapi/seeInSource.mustache +1 -1
  88. package/docs/webapi/seeInTitle.mustache +1 -1
  89. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  90. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  91. package/docs/webapi/seeTextEquals.mustache +1 -1
  92. package/docs/webapi/seeTitleEquals.mustache +1 -1
  93. package/docs/webapi/selectOption.mustache +1 -1
  94. package/docs/webapi/setCookie.mustache +1 -1
  95. package/docs/webapi/setGeoLocation.mustache +1 -1
  96. package/docs/webapi/switchTo.mustache +1 -1
  97. package/docs/webapi/switchToNextTab.mustache +1 -1
  98. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  99. package/docs/webapi/type.mustache +1 -1
  100. package/docs/webapi/uncheckOption.mustache +1 -1
  101. package/docs/webapi/wait.mustache +1 -1
  102. package/docs/webapi/waitForClickable.mustache +1 -1
  103. package/docs/webapi/waitForDetached.mustache +1 -1
  104. package/docs/webapi/waitForElement.mustache +1 -1
  105. package/docs/webapi/waitForEnabled.mustache +1 -1
  106. package/docs/webapi/waitForFunction.mustache +1 -1
  107. package/docs/webapi/waitForInvisible.mustache +1 -1
  108. package/docs/webapi/waitForText.mustache +1 -1
  109. package/docs/webapi/waitForValue.mustache +1 -1
  110. package/docs/webapi/waitForVisible.mustache +1 -1
  111. package/docs/webapi/waitInUrl.mustache +1 -1
  112. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  113. package/docs/webapi/waitToHide.mustache +1 -1
  114. package/docs/webapi/waitUrlEquals.mustache +1 -1
  115. package/docs/webdriver.md +1 -1
  116. package/lib/cli.js +3 -1
  117. package/lib/command/dryRun.js +2 -1
  118. package/lib/helper/ApiDataFactory.js +2 -1
  119. package/lib/helper/Appium.js +8 -5
  120. package/lib/helper/Expect.js +422 -0
  121. package/lib/helper/Playwright.js +127 -32
  122. package/lib/helper/Puppeteer.js +47 -4
  123. package/lib/interfaces/gherkin.js +21 -2
  124. package/lib/output.js +1 -1
  125. package/lib/plugin/autoLogin.js +41 -3
  126. package/lib/utils.js +1 -1
  127. package/lib/workers.js +23 -2
  128. package/package.json +25 -16
  129. package/translations/de-DE.js +5 -0
  130. package/translations/fr-FR.js +1 -0
  131. package/translations/it-IT.js +1 -0
  132. package/translations/ja-JP.js +5 -0
  133. package/translations/pl-PL.js +5 -0
  134. package/translations/pt-BR.js +1 -0
  135. package/translations/ru-RU.js +1 -0
  136. package/translations/zh-CN.js +5 -0
  137. package/translations/zh-TW.js +5 -0
  138. package/typings/promiseBasedTypes.d.ts +928 -862
  139. package/typings/types.d.ts +932 -845
@@ -27,6 +27,10 @@ or
27
27
 
28
28
  npm i playwright-core@^1.18 --save
29
29
 
30
+ Breaking Changes: if you use Playwright v1.38 and later, it will no longer download browsers automatically.
31
+
32
+ Run `npx playwright install` to download browsers after `npm install`.
33
+
30
34
  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.
31
35
 
32
36
 
@@ -41,40 +45,40 @@ Type: [object][5]
41
45
 
42
46
  - `url` **[string][8]?** base url of website to be tested
43
47
  - `browser` **(`"chromium"` | `"firefox"` | `"webkit"` | `"electron"`)?** a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
44
- - `show` **[boolean][32]?** show browser window.
45
- - `restart` **([string][8] | [boolean][32])?** restart strategy between tests. Possible values:- 'context' or **false** - restarts [browser context][40] but keeps running browser. Recommended by Playwright team to keep tests isolated.
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.
46
50
  - 'browser' or **true** - closes browser and opens it again between tests.
47
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
48
- - `timeout` **[number][19]?** - [timeout][41] in ms of all Playwright actions .
49
- - `disableScreenshots` **[boolean][32]?** don't save screenshot on failure.
52
+ - `timeout` **[number][20]?** - [timeout][43] in ms of all Playwright actions .
53
+ - `disableScreenshots` **[boolean][25]?** don't save screenshot on failure.
50
54
  - `emulate` **any?** browser in device emulation mode.
51
- - `video` **[boolean][32]?** enables video recording for failed tests; videos are saved into `output/videos` folder
52
- - `keepVideoForPassedTests` **[boolean][32]?** save videos for passed tests; videos are saved into `output/videos` folder
53
- - `trace` **[boolean][32]?** record [tracing information][42] with screenshots and snapshots.
54
- - `keepTraceForPassedTests` **[boolean][32]?** save trace for passed tests.
55
- - `fullPageScreenshots` **[boolean][32]?** make full page screenshots on failure.
56
- - `uniqueScreenshotNames` **[boolean][32]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
57
- - `keepBrowserState` **[boolean][32]?** keep browser state between tests when `restart` is set to 'session'.
58
- - `keepCookies` **[boolean][32]?** keep cookies between tests when `restart` is set to 'session'.
59
- - `waitForAction` **[number][19]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
60
- - `waitForNavigation` **(`"load"` | `"domcontentloaded"` | `"commit"`)?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `commit`. Choose one of those options is possible. See [Playwright API][38].
61
- - `pressKeyDelay` **[number][19]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
62
- - `getPageTimeout` **[number][19]?** config option to set maximum navigation time in milliseconds.
63
- - `waitForTimeout` **[number][19]?** default wait* timeout in ms. Default: 1000.
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][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][40].
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.
64
68
  - `basicAuth` **[object][5]?** the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
65
69
  - `windowSize` **[string][8]?** default window size. Set a dimension like `640x480`.
66
70
  - `colorScheme` **(`"dark"` | `"light"` | `"no-preference"`)?** default color scheme. Possible values: `dark` | `light` | `no-preference`.
67
71
  - `userAgent` **[string][8]?** user-agent string.
68
72
  - `locale` **[string][8]?** locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
69
- - `manualStart` **[boolean][32]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
73
+ - `manualStart` **[boolean][25]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
70
74
  - `chromium` **[object][5]?** pass additional chromium options
71
75
  - `firefox` **[object][5]?** pass additional firefox options
72
76
  - `electron` **[object][5]?** (pass additional electron options
73
- - `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][43].
74
- - `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][44].
75
- - `ignoreHTTPSErrors` **[boolean][32]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
76
- - `bypassCSP` **[boolean][32]?** bypass Content Security Policy or CSP
77
- - `highlightElement` **[boolean][32]?** highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
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][10]<[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).
78
82
 
79
83
 
80
84
 
@@ -400,7 +404,7 @@ I.amOnPage('/login'); // opens a login page
400
404
 
401
405
  - `url` **[string][8]** url path or global url.
402
406
 
403
- Returns **void** automatically synchronized promise with recorder #!
407
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
404
408
 
405
409
  ### appendField
406
410
 
@@ -417,7 +421,8 @@ I.appendField('password', secret('123456'));
417
421
 
418
422
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator
419
423
  - `value` **[string][8]** text value to append.
420
- ⚠️ returns a _promise_ which is synchronized internally by recorder
424
+
425
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
421
426
 
422
427
  ### attachFile
423
428
 
@@ -434,7 +439,8 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
434
439
 
435
440
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
436
441
  - `pathToFile` **[string][8]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
437
- ⚠️ returns a _promise_ which is synchronized internally by recorder
442
+
443
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
438
444
 
439
445
  ### blockTraffic
440
446
 
@@ -455,12 +461,12 @@ I.blockTraffic(['http://example.com/css/style.css', 'http://example.com/css/*.cs
455
461
 
456
462
  #### Parameters
457
463
 
458
- - `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.
464
+ - `urls` **([string][8] | [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.
459
465
 
460
466
  ### blur
461
467
 
462
468
  Remove focus from a text input, button, etc.
463
- Calls [blur][12] on the element.
469
+ Calls [blur][13] on the element.
464
470
 
465
471
  Examples:
466
472
 
@@ -478,7 +484,9 @@ I.dontSee('#add-to-cart-btn');
478
484
  #### Parameters
479
485
 
480
486
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
481
- - `options` **any?** Playwright only: [Additional options][13] for available options object as 2nd argument.
487
+ - `options` **any?** Playwright only: [Additional options][14] for available options object as 2nd argument.
488
+
489
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
482
490
 
483
491
  ### cancelPopup
484
492
 
@@ -500,13 +508,14 @@ I.checkOption('agree', '//form');
500
508
  #### Parameters
501
509
 
502
510
  - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
503
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
504
- ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][14] for check available as 3rd argument.Examples:```js
505
- // click on element at position
506
- I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
507
- ```> ⚠️ To avoid flakiness, option `force: true` is set by default
511
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
508
512
  - `options`
509
513
 
514
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder[Additional options][15] for check available as 3rd argument.Examples:```js
515
+ // click on element at position
516
+ I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
517
+ ```> ⚠️ To avoid flakiness, option `force: true` is set by default
518
+
510
519
  ### clearCookie
511
520
 
512
521
  Clears a cookie by name,
@@ -519,8 +528,9 @@ I.clearCookie('test');
519
528
 
520
529
  #### Parameters
521
530
 
522
- - `cookie` **[string][8]?** (optional, `null` by default) cookie name
523
- ⚠️ returns a _promise_ which is synchronized internally by recorder
531
+ - `cookie` **[string][8]?** (optional, `null` by default) cookie name
532
+
533
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
524
534
 
525
535
  ### clearField
526
536
 
@@ -535,12 +545,12 @@ I.clearField('.text-area')
535
545
  I.clearField('#submit', { force: true })
536
546
  ```
537
547
 
538
- Use `force` to bypass the [actionability][15] checks.
548
+ Use `force` to bypass the [actionability][16] checks.
539
549
 
540
550
  #### Parameters
541
551
 
542
552
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
543
- - `options` **any?** [Additional options][16] for available options object as 2nd argument.
553
+ - `options` **any?** [Additional options][17] for available options object as 2nd argument.
544
554
 
545
555
  ### click
546
556
 
@@ -569,9 +579,8 @@ I.click({css: 'nav a.login'});
569
579
  #### Parameters
570
580
 
571
581
  - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
572
- - `context` **([string][8]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
573
- ⚠️ returns a _promise_ which is synchronized internally by recorder
574
- - `options` **any?** [Additional options][17] for click available as 3rd argument.Examples:```js
582
+ - `context` **([string][8]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
583
+ - `options` **any?** [Additional options][18] for click available as 3rd argument.Examples:```js
575
584
  // click on element at position
576
585
  I.click('canvas', '.model', { position: { x: 20, y: 40 } })
577
586
 
@@ -579,6 +588,8 @@ I.click({css: 'nav a.login'});
579
588
  I.click('.edit', null, { modifiers: ['Ctrl'] } )
580
589
  ```
581
590
 
591
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
592
+
582
593
  ### clickLink
583
594
 
584
595
  Clicks link and waits for navigation (deprecated)
@@ -617,8 +628,9 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
617
628
  #### Parameters
618
629
 
619
630
  - `text` **[string][8]** which is not present.
620
- - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
621
- ⚠️ returns a _promise_ which is synchronized internally by recorder
631
+ - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
632
+
633
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
622
634
 
623
635
  ### dontSeeCheckboxIsChecked
624
636
 
@@ -633,7 +645,8 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
633
645
  #### Parameters
634
646
 
635
647
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
636
- ⚠️ returns a _promise_ which is synchronized internally by recorder
648
+
649
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
637
650
 
638
651
  ### dontSeeCookie
639
652
 
@@ -646,7 +659,8 @@ I.dontSeeCookie('auth'); // no auth cookie
646
659
  #### Parameters
647
660
 
648
661
  - `name` **[string][8]** cookie name.
649
- ⚠️ returns a _promise_ which is synchronized internally by recorder
662
+
663
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
650
664
 
651
665
  ### dontSeeCurrentUrlEquals
652
666
 
@@ -661,7 +675,8 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
661
675
  #### Parameters
662
676
 
663
677
  - `url` **[string][8]** value to check.
664
- ⚠️ returns a _promise_ which is synchronized internally by recorder
678
+
679
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
665
680
 
666
681
  ### dontSeeElement
667
682
 
@@ -674,7 +689,8 @@ I.dontSeeElement('.modal'); // modal is not shown
674
689
  #### Parameters
675
690
 
676
691
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|Strict locator.
677
- ⚠️ returns a _promise_ which is synchronized internally by recorder
692
+
693
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
678
694
 
679
695
  ### dontSeeElementInDOM
680
696
 
@@ -687,7 +703,8 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
687
703
  #### Parameters
688
704
 
689
705
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|Strict locator.
690
- ⚠️ returns a _promise_ which is synchronized internally by recorder
706
+
707
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
691
708
 
692
709
  ### dontSeeInCurrentUrl
693
710
 
@@ -696,7 +713,8 @@ Checks that current url does not contain a provided fragment.
696
713
  #### Parameters
697
714
 
698
715
  - `url` **[string][8]** value to check.
699
- ⚠️ returns a _promise_ which is synchronized internally by recorder
716
+
717
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
700
718
 
701
719
  ### dontSeeInField
702
720
 
@@ -712,7 +730,8 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
712
730
 
713
731
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
714
732
  - `value` **([string][8] | [object][5])** value to check.
715
- ⚠️ returns a _promise_ which is synchronized internally by recorder
733
+
734
+ Returns **[Promise][9]<void>** automatically synchronized promise through #recorder
716
735
 
717
736
  ### dontSeeInSource
718
737
 
@@ -726,7 +745,8 @@ I.dontSeeInSource('<!--'); // no comments in source
726
745
 
727
746
  - `text`
728
747
  - `value` **[string][8]** to check.
729
- ⚠️ returns a _promise_ which is synchronized internally by recorder
748
+
749
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
730
750
 
731
751
  ### dontSeeInTitle
732
752
 
@@ -739,7 +759,8 @@ I.dontSeeInTitle('Error');
739
759
  #### Parameters
740
760
 
741
761
  - `text` **[string][8]** value to check.
742
- ⚠️ returns a _promise_ which is synchronized internally by recorder
762
+
763
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
743
764
 
744
765
  ### dontSeeTraffic
745
766
 
@@ -756,7 +777,7 @@ I.dontSeeTraffic({ name: 'Unexpected API Call of "user" endpoint', url: /api.exa
756
777
 
757
778
  - `opts` **[Object][5]** options when checking the traffic network.
758
779
  - `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.
759
- - `opts.url` **([string][8] | [RegExp][10])** Expected URL of request in network traffic. Can be a string or a regular expression.
780
+ - `opts.url` **([string][8] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.
760
781
 
761
782
  ### doubleClick
762
783
 
@@ -773,8 +794,9 @@ I.doubleClick('.btn.edit');
773
794
  #### Parameters
774
795
 
775
796
  - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
776
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
777
- ⚠️ returns a _promise_ which is synchronized internally by recorder
797
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
798
+
799
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
778
800
 
779
801
  ### dragAndDrop
780
802
 
@@ -788,12 +810,13 @@ I.dragAndDrop('#dragHandle', '#container');
788
810
 
789
811
  - `srcElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
790
812
  - `destElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
791
- ⚠️ returns a _promise_ which is synchronized internally by recorder
792
- - `options` **any?** [Additional options][18] can be passed as 3rd argument.```js
813
+ - `options` **any?** [Additional options][19] can be passed as 3rd argument.```js
793
814
  // specify coordinates for source position
794
815
  I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
795
816
  ```> 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`
796
817
 
818
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
819
+
797
820
  ### dragSlider
798
821
 
799
822
  Drag the scrubber of a slider to a given position
@@ -807,8 +830,9 @@ I.dragSlider('#slider', -70);
807
830
  #### Parameters
808
831
 
809
832
  - `locator` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
810
- - `offsetX` **[number][19]** position to drag.
811
- ⚠️ returns a _promise_ which is synchronized internally by recorder
833
+ - `offsetX` **[number][20]** position to drag.
834
+
835
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
812
836
 
813
837
  ### executeScript
814
838
 
@@ -835,10 +859,10 @@ If a function returns a Promise it will wait for its resolution.
835
859
 
836
860
  #### Parameters
837
861
 
838
- - `fn` **([string][8] | [function][20])** function to be executed in browser context.
862
+ - `fn` **([string][8] | [function][21])** function to be executed in browser context.
839
863
  - `arg` **any?** optional argument to pass to the function
840
864
 
841
- Returns **[Promise][21]&lt;any>**
865
+ Returns **[Promise][9]&lt;any>**
842
866
 
843
867
  ### fillField
844
868
 
@@ -860,7 +884,8 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
860
884
 
861
885
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
862
886
  - `value` **([string][8] | [object][5])** text value to fill.
863
- ⚠️ returns a _promise_ which is synchronized internally by recorder
887
+
888
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
864
889
 
865
890
  ### flushNetworkTraffics
866
891
 
@@ -872,7 +897,7 @@ Resets all recorded WS messages.
872
897
 
873
898
  ### focus
874
899
 
875
- Calls [focus][12] on the matching element.
900
+ Calls [focus][13] on the matching element.
876
901
 
877
902
  Examples:
878
903
 
@@ -887,6 +912,8 @@ I.see('#add-to-cart-bnt');
887
912
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
888
913
  - `options` **any?** Playwright only: [Additional options][22] for available options object as 2nd argument.
889
914
 
915
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
916
+
890
917
  ### forceClick
891
918
 
892
919
  Perform an emulated click on a link or a button, given by a locator.
@@ -917,8 +944,9 @@ I.forceClick({css: 'nav a.login'});
917
944
  #### Parameters
918
945
 
919
946
  - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
920
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
921
- ⚠️ returns a _promise_ which is synchronized internally by recorder
947
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
948
+
949
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
922
950
 
923
951
  ### grabAttributeFrom
924
952
 
@@ -935,7 +963,7 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
935
963
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
936
964
  - `attr` **[string][8]** attribute name.
937
965
 
938
- Returns **[Promise][21]&lt;[string][8]>** attribute value
966
+ Returns **[Promise][9]&lt;[string][8]>** attribute value
939
967
 
940
968
  ### grabAttributeFromAll
941
969
 
@@ -951,7 +979,7 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
951
979
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
952
980
  - `attr` **[string][8]** attribute name.
953
981
 
954
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
982
+ Returns **[Promise][9]&lt;[Array][10]&lt;[string][8]>>** attribute value
955
983
 
956
984
  ### grabBrowserLogs
957
985
 
@@ -965,7 +993,18 @@ console.log(JSON.stringify(errors));
965
993
 
966
994
  [Learn more about console messages][23]
967
995
 
968
- Returns **[Promise][21]&lt;[Array][9]&lt;any>>**
996
+ Returns **[Promise][9]&lt;[Array][10]&lt;any>>**
997
+
998
+ ### grabCheckedElementStatus
999
+
1000
+ Return the checked status of given element.
1001
+
1002
+ #### Parameters
1003
+
1004
+ - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1005
+ - `options` **[object][5]?** See [https://playwright.dev/docs/api/class-locator#locator-is-checked][24]
1006
+
1007
+ Returns **[Promise][9]&lt;[boolean][25]>**
969
1008
 
970
1009
  ### grabCookie
971
1010
 
@@ -982,7 +1021,7 @@ assert(cookie.value, '123456');
982
1021
 
983
1022
  - `name` **[string][8]?** cookie name.
984
1023
 
985
- Returns **([Promise][21]&lt;[string][8]> | [Promise][21]&lt;[Array][9]&lt;[string][8]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
1024
+ Returns **any** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
986
1025
 
987
1026
  ### grabCssPropertyFrom
988
1027
 
@@ -999,7 +1038,7 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
999
1038
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1000
1039
  - `cssProperty` **[string][8]** CSS property name.
1001
1040
 
1002
- Returns **[Promise][21]&lt;[string][8]>** CSS value
1041
+ Returns **[Promise][9]&lt;[string][8]>** CSS value
1003
1042
 
1004
1043
  ### grabCssPropertyFromAll
1005
1044
 
@@ -1015,7 +1054,7 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
1015
1054
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1016
1055
  - `cssProperty` **[string][8]** CSS property name.
1017
1056
 
1018
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** CSS value
1057
+ Returns **[Promise][9]&lt;[Array][10]&lt;[string][8]>>** CSS value
1019
1058
 
1020
1059
  ### grabCurrentUrl
1021
1060
 
@@ -1027,7 +1066,7 @@ let url = await I.grabCurrentUrl();
1027
1066
  console.log(`Current URL is [${url}]`);
1028
1067
  ```
1029
1068
 
1030
- Returns **[Promise][21]&lt;[string][8]>** current URL
1069
+ Returns **[Promise][9]&lt;[string][8]>** current URL
1031
1070
 
1032
1071
  ### grabDataFromPerformanceTiming
1033
1072
 
@@ -1052,7 +1091,18 @@ let data = await I.grabDataFromPerformanceTiming();
1052
1091
  }
1053
1092
  ```
1054
1093
 
1055
- Returns **[Promise][21]&lt;any>** automatically synchronized promise through #recorder
1094
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1095
+
1096
+ ### grabDisabledElementStatus
1097
+
1098
+ Return the disabled status of given element.
1099
+
1100
+ #### Parameters
1101
+
1102
+ - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1103
+ - `options` **[object][5]?** See [https://playwright.dev/docs/api/class-locator#locator-is-disabled][26]
1104
+
1105
+ Returns **[Promise][9]&lt;[boolean][25]>**
1056
1106
 
1057
1107
  ### grabElementBoundingRect
1058
1108
 
@@ -1080,7 +1130,7 @@ const width = await I.grabElementBoundingRect('h3', 'width');
1080
1130
  - `prop`
1081
1131
  - `elementSize` **[string][8]?** x, y, width or height of the given element.
1082
1132
 
1083
- Returns **([Promise][21]&lt;DOMRect> | [Promise][21]&lt;[number][19]>)** Element bounding rectangle
1133
+ Returns **([Promise][9]&lt;DOMRect> | [Promise][9]&lt;[number][20]>)** Element bounding rectangle
1084
1134
 
1085
1135
  ### grabHTMLFrom
1086
1136
 
@@ -1097,7 +1147,7 @@ let postHTML = await I.grabHTMLFrom('#post');
1097
1147
  - `locator`
1098
1148
  - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1099
1149
 
1100
- Returns **[Promise][21]&lt;[string][8]>** HTML code for an element
1150
+ Returns **[Promise][9]&lt;[string][8]>** HTML code for an element
1101
1151
 
1102
1152
  ### grabHTMLFromAll
1103
1153
 
@@ -1113,7 +1163,7 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
1113
1163
  - `locator`
1114
1164
  - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1115
1165
 
1116
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** HTML code for an element
1166
+ Returns **[Promise][9]&lt;[Array][10]&lt;[string][8]>>** HTML code for an element
1117
1167
 
1118
1168
  ### grabMetrics
1119
1169
 
@@ -1167,7 +1217,7 @@ const metrics = await I.grabMetrics();
1167
1217
  ]
1168
1218
  ```
1169
1219
 
1170
- Returns **[Promise][21]&lt;[Array][9]&lt;[Object][5]>>**
1220
+ Returns **[Promise][9]&lt;[Array][10]&lt;[Object][5]>>**
1171
1221
 
1172
1222
  ### grabNumberOfOpenTabs
1173
1223
 
@@ -1178,7 +1228,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1178
1228
  let tabs = await I.grabNumberOfOpenTabs();
1179
1229
  ```
1180
1230
 
1181
- Returns **[Promise][21]&lt;[number][19]>** number of open tabs
1231
+ Returns **[Promise][9]&lt;[number][20]>** number of open tabs
1182
1232
 
1183
1233
  ### grabNumberOfVisibleElements
1184
1234
 
@@ -1193,7 +1243,7 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
1193
1243
 
1194
1244
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1195
1245
 
1196
- Returns **[Promise][21]&lt;[number][19]>** number of visible elements
1246
+ Returns **[Promise][9]&lt;[number][20]>** number of visible elements
1197
1247
 
1198
1248
  ### grabPageScrollPosition
1199
1249
 
@@ -1204,7 +1254,7 @@ Resumes test execution, so **should be used inside an async function with `await
1204
1254
  let { x, y } = await I.grabPageScrollPosition();
1205
1255
  ```
1206
1256
 
1207
- Returns **[Promise][21]&lt;PageScrollPosition>** scroll position
1257
+ Returns **[Promise][9]&lt;PageScrollPosition>** scroll position
1208
1258
 
1209
1259
  ### grabPopupText
1210
1260
 
@@ -1214,7 +1264,7 @@ Grab the text within the popup. If no popup is visible then it will return null
1214
1264
  await I.grabPopupText();
1215
1265
  ```
1216
1266
 
1217
- Returns **[Promise][21]&lt;([string][8] | null)>**
1267
+ Returns **[Promise][9]&lt;([string][8] | null)>**
1218
1268
 
1219
1269
  ### grabRecordedNetworkTraffics
1220
1270
 
@@ -1227,7 +1277,7 @@ expect(traffics[0].response.status).to.equal(200);
1227
1277
  expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
1228
1278
  ```
1229
1279
 
1230
- Returns **[Promise][21]&lt;[Array][9]&lt;any>>**
1280
+ Returns **[Promise][9]&lt;[Array][10]&lt;any>>**
1231
1281
 
1232
1282
  ### grabSource
1233
1283
 
@@ -1238,7 +1288,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1238
1288
  let pageSource = await I.grabSource();
1239
1289
  ```
1240
1290
 
1241
- Returns **[Promise][21]&lt;[string][8]>** source code
1291
+ Returns **[Promise][9]&lt;[string][8]>** source code
1242
1292
 
1243
1293
  ### grabTextFrom
1244
1294
 
@@ -1255,7 +1305,7 @@ If multiple elements found returns first element.
1255
1305
 
1256
1306
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1257
1307
 
1258
- Returns **[Promise][21]&lt;[string][8]>** attribute value
1308
+ Returns **[Promise][9]&lt;[string][8]>** attribute value
1259
1309
 
1260
1310
  ### grabTextFromAll
1261
1311
 
@@ -1270,7 +1320,7 @@ let pins = await I.grabTextFromAll('#pin li');
1270
1320
 
1271
1321
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1272
1322
 
1273
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
1323
+ Returns **[Promise][9]&lt;[Array][10]&lt;[string][8]>>** attribute value
1274
1324
 
1275
1325
  ### grabTitle
1276
1326
 
@@ -1281,7 +1331,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
1281
1331
  let title = await I.grabTitle();
1282
1332
  ```
1283
1333
 
1284
- Returns **[Promise][21]&lt;[string][8]>** title
1334
+ Returns **[Promise][9]&lt;[string][8]>** title
1285
1335
 
1286
1336
  ### grabTrafficUrl
1287
1337
 
@@ -1289,12 +1339,12 @@ Returns full URL of request matching parameter "urlMatch".
1289
1339
 
1290
1340
  #### Parameters
1291
1341
 
1292
- - `urlMatch` **([string][8] | [RegExp][10])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js
1342
+ - `urlMatch` **([string][8] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js
1293
1343
  I.grabTrafficUrl('https://api.example.com/session');
1294
1344
  I.grabTrafficUrl(/session.*start/);
1295
1345
  ```
1296
1346
 
1297
- Returns **[Promise][21]&lt;any>**
1347
+ Returns **[Promise][9]&lt;any>**
1298
1348
 
1299
1349
  ### grabValueFrom
1300
1350
 
@@ -1310,7 +1360,7 @@ let email = await I.grabValueFrom('input[name=email]');
1310
1360
 
1311
1361
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1312
1362
 
1313
- Returns **[Promise][21]&lt;[string][8]>** attribute value
1363
+ Returns **[Promise][9]&lt;[string][8]>** attribute value
1314
1364
 
1315
1365
  ### grabValueFromAll
1316
1366
 
@@ -1325,20 +1375,20 @@ let inputs = await I.grabValueFromAll('//form/input');
1325
1375
 
1326
1376
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1327
1377
 
1328
- Returns **[Promise][21]&lt;[Array][9]&lt;[string][8]>>** attribute value
1378
+ Returns **[Promise][9]&lt;[Array][10]&lt;[string][8]>>** attribute value
1329
1379
 
1330
1380
  ### grabWebSocketMessages
1331
1381
 
1332
1382
  Grab the recording WS messages
1333
1383
 
1334
- Returns **[Array][9]&lt;any>**
1384
+ Returns **[Array][10]&lt;any>**
1335
1385
 
1336
1386
  ### handleDownloads
1337
1387
 
1338
1388
  Handles a file download. A file name is required to save the file on disk.
1339
1389
  Files are saved to "output" directory.
1340
1390
 
1341
- Should be used with [FileSystem helper][24] to check that file were downloaded correctly.
1391
+ Should be used with [FileSystem helper][27] to check that file were downloaded correctly.
1342
1392
 
1343
1393
  ```js
1344
1394
  I.handleDownloads('downloads/avatar.jpg');
@@ -1351,25 +1401,11 @@ I.waitForFile('avatar.jpg', 5);
1351
1401
 
1352
1402
  - `fileName` **[string][8]** set filename for downloaded file
1353
1403
 
1354
- Returns **[Promise][21]&lt;void>**
1355
-
1356
- ### haveRequestHeaders
1357
-
1358
- Set headers for all next requests
1359
-
1360
- ```js
1361
- I.haveRequestHeaders({
1362
- 'X-Sent-By': 'CodeceptJS',
1363
- });
1364
- ```
1365
-
1366
- #### Parameters
1367
-
1368
- - `customHeaders` **[object][5]** headers to set
1404
+ Returns **[Promise][9]&lt;void>**
1369
1405
 
1370
1406
  ### makeApiRequest
1371
1407
 
1372
- Performs [api request][25] using
1408
+ Performs [api request][28] using
1373
1409
  the cookies from the current browser session.
1374
1410
 
1375
1411
  ```js
@@ -1386,22 +1422,22 @@ I.makeApiRequest('PATCH', )
1386
1422
  - `url` **[string][8]** endpoint
1387
1423
  - `options` **[object][5]** request options depending on method used
1388
1424
 
1389
- Returns **[Promise][21]&lt;[object][5]>** response
1425
+ Returns **[Promise][9]&lt;[object][5]>** response
1390
1426
 
1391
1427
  ### mockRoute
1392
1428
 
1393
- Mocks network request using [`browserContext.route`][26] of Playwright
1429
+ Mocks network request using [`browserContext.route`][29] of Playwright
1394
1430
 
1395
1431
  ```js
1396
1432
  I.mockRoute(/(.png$)|(.jpg$)/, route => route.abort());
1397
1433
  ```
1398
1434
 
1399
- This method allows intercepting and mocking requests & responses. [Learn more about it][27]
1435
+ This method allows intercepting and mocking requests & responses. [Learn more about it][30]
1400
1436
 
1401
1437
  #### Parameters
1402
1438
 
1403
- - `url` **([string][8] | [RegExp][10])?** URL, regex or pattern for to match URL
1404
- - `handler` **[function][20]?** a function to process reques
1439
+ - `url` **([string][8] | [RegExp][11])?** URL, regex or pattern for to match URL
1440
+ - `handler` **[function][21]?** a function to process reques
1405
1441
 
1406
1442
  ### mockTraffic
1407
1443
 
@@ -1435,9 +1471,10 @@ I.moveCursorTo('#submit', 5,5);
1435
1471
  #### Parameters
1436
1472
 
1437
1473
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1438
- - `offsetX` **[number][19]** (optional, `0` by default) X-axis offset.
1439
- - `offsetY` **[number][19]** (optional, `0` by default) Y-axis offset.
1440
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1474
+ - `offsetX` **[number][20]** (optional, `0` by default) X-axis offset.
1475
+ - `offsetY` **[number][20]** (optional, `0` by default) Y-axis offset.
1476
+
1477
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1441
1478
 
1442
1479
  ### openNewTab
1443
1480
 
@@ -1447,7 +1484,7 @@ Open new tab and automatically switched to new tab
1447
1484
  I.openNewTab();
1448
1485
  ```
1449
1486
 
1450
- You can pass in [page options][28] to emulate device on this page
1487
+ You can pass in [page options][31] to emulate device on this page
1451
1488
 
1452
1489
  ```js
1453
1490
  // enable mobile
@@ -1462,7 +1499,7 @@ I.openNewTab({ isMobile: true });
1462
1499
 
1463
1500
  Presses a key in the browser (on a focused element).
1464
1501
 
1465
- _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][29].
1502
+ _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][32].
1466
1503
 
1467
1504
  ```js
1468
1505
  I.pressKey('Backspace');
@@ -1521,14 +1558,15 @@ Some of the supported key names are:
1521
1558
 
1522
1559
  #### Parameters
1523
1560
 
1524
- - `key` **([string][8] | [Array][9]&lt;[string][8]>)** key or array of keys to press.
1525
- ⚠️ returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][30]).
1561
+ - `key` **([string][8] | [Array][10]&lt;[string][8]>)** key or array of keys to press.
1562
+
1563
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][33]).
1526
1564
 
1527
1565
  ### pressKeyDown
1528
1566
 
1529
1567
  Presses a key in the browser and leaves it in a down state.
1530
1568
 
1531
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][31]).
1569
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][34]).
1532
1570
 
1533
1571
  ```js
1534
1572
  I.pressKeyDown('Control');
@@ -1539,13 +1577,14 @@ I.pressKeyUp('Control');
1539
1577
  #### Parameters
1540
1578
 
1541
1579
  - `key` **[string][8]** name of key to press down.
1542
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1580
+
1581
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1543
1582
 
1544
1583
  ### pressKeyUp
1545
1584
 
1546
1585
  Releases a key in the browser which was previously set to a down state.
1547
1586
 
1548
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][31]).
1587
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][34]).
1549
1588
 
1550
1589
  ```js
1551
1590
  I.pressKeyDown('Control');
@@ -1556,7 +1595,8 @@ I.pressKeyUp('Control');
1556
1595
  #### Parameters
1557
1596
 
1558
1597
  - `key` **[string][8]** name of key to release.
1559
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1598
+
1599
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1560
1600
 
1561
1601
  ### refreshPage
1562
1602
 
@@ -1566,7 +1606,7 @@ Reload the current page.
1566
1606
  I.refreshPage();
1567
1607
  ```
1568
1608
 
1569
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1609
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1570
1610
 
1571
1611
  ### resizeWindow
1572
1612
 
@@ -1575,15 +1615,16 @@ First parameter can be set to `maximize`.
1575
1615
 
1576
1616
  #### Parameters
1577
1617
 
1578
- - `width` **[number][19]** width in pixels or `maximize`.
1579
- - `height` **[number][19]** height in pixels.
1580
- ⚠️ returns a _promise_ which is synchronized internally by recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
1581
- Playwright does not control the window of a browser so it can't adjust its real size.
1582
- It also can't maximize a window.Update configuration to change real window size on start:```js
1583
- // inside codecept.conf.js
1584
- // @codeceptjs/configure package must be installed
1585
- { setWindowSize } = require('@codeceptjs/configure');
1586
- ```
1618
+ - `width` **[number][20]** width in pixels or `maximize`.
1619
+ - `height` **[number][20]** height in pixels.
1620
+
1621
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
1622
+ Playwright does not control the window of a browser so it can't adjust its real size.
1623
+ It also can't maximize a window.Update configuration to change real window size on start:```js
1624
+ // inside codecept.conf.js
1625
+ // @codeceptjs/configure package must be installed
1626
+ { setWindowSize } = require('@codeceptjs/configure');
1627
+ ```
1587
1628
 
1588
1629
  ### restartBrowser
1589
1630
 
@@ -1618,8 +1659,9 @@ I.rightClick('Click me', '.context');
1618
1659
  #### Parameters
1619
1660
 
1620
1661
  - `locator` **([string][8] | [object][5])** clickable element located by CSS|XPath|strict locator.
1621
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1622
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1662
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
1663
+
1664
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1623
1665
 
1624
1666
  ### saveElementScreenshot
1625
1667
 
@@ -1634,7 +1676,8 @@ I.saveElementScreenshot(`#submit`,'debug.png');
1634
1676
 
1635
1677
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1636
1678
  - `fileName` **[string][8]** file name to save.
1637
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1679
+
1680
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1638
1681
 
1639
1682
  ### saveScreenshot
1640
1683
 
@@ -1650,8 +1693,9 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
1650
1693
  #### Parameters
1651
1694
 
1652
1695
  - `fileName` **[string][8]** file name to save.
1653
- - `fullPage` **[boolean][32]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1654
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1696
+ - `fullPage` **[boolean][25]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1697
+
1698
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1655
1699
 
1656
1700
  ### scrollPageToBottom
1657
1701
 
@@ -1661,7 +1705,7 @@ Scroll page to the bottom.
1661
1705
  I.scrollPageToBottom();
1662
1706
  ```
1663
1707
 
1664
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1708
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1665
1709
 
1666
1710
  ### scrollPageToTop
1667
1711
 
@@ -1671,7 +1715,7 @@ Scroll page to the top.
1671
1715
  I.scrollPageToTop();
1672
1716
  ```
1673
1717
 
1674
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1718
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1675
1719
 
1676
1720
  ### scrollTo
1677
1721
 
@@ -1686,9 +1730,10 @@ I.scrollTo('#submit', 5, 5);
1686
1730
  #### Parameters
1687
1731
 
1688
1732
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1689
- - `offsetX` **[number][19]** (optional, `0` by default) X-axis offset.
1690
- - `offsetY` **[number][19]** (optional, `0` by default) Y-axis offset.
1691
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1733
+ - `offsetX` **[number][20]** (optional, `0` by default) X-axis offset.
1734
+ - `offsetY` **[number][20]** (optional, `0` by default) Y-axis offset.
1735
+
1736
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1692
1737
 
1693
1738
  ### see
1694
1739
 
@@ -1704,8 +1749,9 @@ I.see('Register', {css: 'form.register'}); // use strict locator
1704
1749
  #### Parameters
1705
1750
 
1706
1751
  - `text` **[string][8]** expected on page.
1707
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1708
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1752
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1753
+
1754
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1709
1755
 
1710
1756
  ### seeAttributesOnElements
1711
1757
 
@@ -1719,7 +1765,8 @@ I.seeAttributesOnElements('//form', { method: "post"});
1719
1765
 
1720
1766
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1721
1767
  - `attributes` **[object][5]** attributes and their values to check.
1722
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1768
+
1769
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1723
1770
 
1724
1771
  ### seeCheckboxIsChecked
1725
1772
 
@@ -1734,7 +1781,8 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
1734
1781
  #### Parameters
1735
1782
 
1736
1783
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
1737
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1784
+
1785
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1738
1786
 
1739
1787
  ### seeCookie
1740
1788
 
@@ -1747,7 +1795,8 @@ I.seeCookie('Auth');
1747
1795
  #### Parameters
1748
1796
 
1749
1797
  - `name` **[string][8]** cookie name.
1750
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1798
+
1799
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1751
1800
 
1752
1801
  ### seeCssPropertiesOnElements
1753
1802
 
@@ -1761,7 +1810,8 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
1761
1810
 
1762
1811
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1763
1812
  - `cssProperties` **[object][5]** object with CSS properties and their values to check.
1764
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1813
+
1814
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1765
1815
 
1766
1816
  ### seeCurrentUrlEquals
1767
1817
 
@@ -1777,7 +1827,8 @@ I.seeCurrentUrlEquals('http://my.site.com/register');
1777
1827
  #### Parameters
1778
1828
 
1779
1829
  - `url` **[string][8]** value to check.
1780
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1830
+
1831
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1781
1832
 
1782
1833
  ### seeElement
1783
1834
 
@@ -1791,7 +1842,8 @@ I.seeElement('#modal');
1791
1842
  #### Parameters
1792
1843
 
1793
1844
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1794
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1845
+
1846
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1795
1847
 
1796
1848
  ### seeElementInDOM
1797
1849
 
@@ -1805,7 +1857,8 @@ I.seeElementInDOM('#modal');
1805
1857
  #### Parameters
1806
1858
 
1807
1859
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1808
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1860
+
1861
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1809
1862
 
1810
1863
  ### seeInCurrentUrl
1811
1864
 
@@ -1818,7 +1871,8 @@ I.seeInCurrentUrl('/register'); // we are on registration page
1818
1871
  #### Parameters
1819
1872
 
1820
1873
  - `url` **[string][8]** a fragment to check
1821
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1874
+
1875
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1822
1876
 
1823
1877
  ### seeInField
1824
1878
 
@@ -1836,7 +1890,8 @@ I.seeInField('#searchform input','Search');
1836
1890
 
1837
1891
  - `field` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
1838
1892
  - `value` **([string][8] | [object][5])** value to check.
1839
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1893
+
1894
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1840
1895
 
1841
1896
  ### seeInPopup
1842
1897
 
@@ -1850,7 +1905,8 @@ I.seeInPopup('Popup text');
1850
1905
  #### Parameters
1851
1906
 
1852
1907
  - `text` **[string][8]** value to check.
1853
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1908
+
1909
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1854
1910
 
1855
1911
  ### seeInSource
1856
1912
 
@@ -1863,7 +1919,8 @@ I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1863
1919
  #### Parameters
1864
1920
 
1865
1921
  - `text` **[string][8]** value to check.
1866
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1922
+
1923
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1867
1924
 
1868
1925
  ### seeInTitle
1869
1926
 
@@ -1876,7 +1933,8 @@ I.seeInTitle('Home Page');
1876
1933
  #### Parameters
1877
1934
 
1878
1935
  - `text` **[string][8]** text value to check.
1879
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1936
+
1937
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1880
1938
 
1881
1939
  ### seeNumberOfElements
1882
1940
 
@@ -1890,8 +1948,9 @@ I.seeNumberOfElements('#submitBtn', 1);
1890
1948
  #### Parameters
1891
1949
 
1892
1950
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1893
- - `num` **[number][19]** number of elements.
1894
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1951
+ - `num` **[number][20]** number of elements.
1952
+
1953
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1895
1954
 
1896
1955
  ### seeNumberOfVisibleElements
1897
1956
 
@@ -1905,8 +1964,9 @@ I.seeNumberOfVisibleElements('.buttons', 3);
1905
1964
  #### Parameters
1906
1965
 
1907
1966
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1908
- - `num` **[number][19]** number of elements.
1909
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1967
+ - `num` **[number][20]** number of elements.
1968
+
1969
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1910
1970
 
1911
1971
  ### seeTextEquals
1912
1972
 
@@ -1919,8 +1979,9 @@ I.seeTextEquals('text', 'h1');
1919
1979
  #### Parameters
1920
1980
 
1921
1981
  - `text` **[string][8]** element value to check.
1922
- - `context` **([string][8] | [object][5])?** element located by CSS|XPath|strict locator.
1923
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1982
+ - `context` **([string][8] | [object][5])?** element located by CSS|XPath|strict locator.
1983
+
1984
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1924
1985
 
1925
1986
  ### seeTitleEquals
1926
1987
 
@@ -1933,7 +1994,8 @@ I.seeTitleEquals('Test title.');
1933
1994
  #### Parameters
1934
1995
 
1935
1996
  - `text` **[string][8]** value to check.
1936
- ⚠️ returns a _promise_ which is synchronized internally by recorder
1997
+
1998
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
1937
1999
 
1938
2000
  ### seeTraffic
1939
2001
 
@@ -1973,9 +2035,9 @@ await I.seeTraffic({
1973
2035
  - `opts.url` **[string][8]** Expected URL of request in network traffic
1974
2036
  - `opts.parameters` **[Object][5]?** Expected parameters of that request in network traffic
1975
2037
  - `opts.requestPostData` **[Object][5]?** Expected that request contains post data in network traffic
1976
- - `opts.timeout` **[number][19]?** Timeout to wait for request in seconds. Default is 10 seconds.
2038
+ - `opts.timeout` **[number][20]?** Timeout to wait for request in seconds. Default is 10 seconds.
1977
2039
 
1978
- Returns **[Promise][21]&lt;any>**
2040
+ Returns **[Promise][9]&lt;any>**
1979
2041
 
1980
2042
  ### selectOption
1981
2043
 
@@ -2001,8 +2063,9 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
2001
2063
  #### Parameters
2002
2064
 
2003
2065
  - `select` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
2004
- - `option` **([string][8] | [Array][9]&lt;any>)** visible text or value of option.
2005
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2066
+ - `option` **([string][8] | [Array][10]&lt;any>)** visible text or value of option.
2067
+
2068
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2006
2069
 
2007
2070
  ### setCookie
2008
2071
 
@@ -2022,8 +2085,23 @@ I.setCookie([
2022
2085
 
2023
2086
  #### Parameters
2024
2087
 
2025
- - `cookie` **(Cookie | [Array][9]&lt;Cookie>)** a cookie object or array of cookie objects.
2026
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2088
+ - `cookie` **(Cookie | [Array][10]&lt;Cookie>)** a cookie object or array of cookie objects.
2089
+
2090
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2091
+
2092
+ ### setPlaywrightRequestHeaders
2093
+
2094
+ Set headers for all next requests
2095
+
2096
+ ```js
2097
+ I.setPlaywrightRequestHeaders({
2098
+ 'X-Sent-By': 'CodeceptJS',
2099
+ });
2100
+ ```
2101
+
2102
+ #### Parameters
2103
+
2104
+ - `customHeaders` **[object][5]** headers to set
2027
2105
 
2028
2106
  ### startRecordingTraffic
2029
2107
 
@@ -2058,8 +2136,8 @@ If no handler is passed, all mock requests for the rote are disabled.
2058
2136
 
2059
2137
  #### Parameters
2060
2138
 
2061
- - `url` **([string][8] | [RegExp][10])?** URL, regex or pattern for to match URL
2062
- - `handler` **[function][20]?** a function to process reques
2139
+ - `url` **([string][8] | [RegExp][11])?** URL, regex or pattern for to match URL
2140
+ - `handler` **[function][21]?** a function to process reques
2063
2141
 
2064
2142
  ### stopRecordingTraffic
2065
2143
 
@@ -2088,8 +2166,9 @@ I.switchTo(); // switch back to main page
2088
2166
 
2089
2167
  #### Parameters
2090
2168
 
2091
- - `locator` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
2092
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2169
+ - `locator` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS|XPath|strict locator.
2170
+
2171
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2093
2172
 
2094
2173
  ### switchToNextTab
2095
2174
 
@@ -2102,7 +2181,7 @@ I.switchToNextTab(2);
2102
2181
 
2103
2182
  #### Parameters
2104
2183
 
2105
- - `num` **[number][19]**
2184
+ - `num` **[number][20]**
2106
2185
 
2107
2186
  ### switchToPreviousTab
2108
2187
 
@@ -2115,13 +2194,13 @@ I.switchToPreviousTab(2);
2115
2194
 
2116
2195
  #### Parameters
2117
2196
 
2118
- - `num` **[number][19]**
2197
+ - `num` **[number][20]**
2119
2198
 
2120
2199
  ### type
2121
2200
 
2122
2201
  Types out the given text into an active field.
2123
2202
  To slow down typing use a second parameter, to set interval between key presses.
2124
- _Note:_ Should be used when [`fillField`][29] is not an option.
2203
+ _Note:_ Should be used when [`fillField`][32] is not an option.
2125
2204
 
2126
2205
  ```js
2127
2206
  // passing in a string
@@ -2140,9 +2219,10 @@ I.type(secret('123456'));
2140
2219
  #### Parameters
2141
2220
 
2142
2221
  - `keys`
2143
- - `delay` **[number][19]?** (optional) delay in ms between key presses
2144
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2145
- - `key` **([string][8] | [Array][9]&lt;[string][8]>)** or array of keys to type.
2222
+ - `delay` **[number][20]?** (optional) delay in ms between key presses
2223
+ - `key` **([string][8] | [Array][10]&lt;[string][8]>)** or array of keys to type.
2224
+
2225
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2146
2226
 
2147
2227
  ### uncheckOption
2148
2228
 
@@ -2160,13 +2240,14 @@ I.uncheckOption('agree', '//form');
2160
2240
  #### Parameters
2161
2241
 
2162
2242
  - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
2163
- - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
2164
- ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][33] for uncheck available as 3rd argument.Examples:```js
2165
- // click on element at position
2166
- I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
2167
- ```> ⚠️ To avoid flakiness, option `force: true` is set by default
2243
+ - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
2168
2244
  - `options`
2169
2245
 
2246
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder[Additional options][35] for uncheck available as 3rd argument.Examples:```js
2247
+ // click on element at position
2248
+ I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
2249
+ ```> ⚠️ To avoid flakiness, option `force: true` is set by default
2250
+
2170
2251
  ### usePlaywrightTo
2171
2252
 
2172
2253
  Use Playwright API inside a test.
@@ -2174,7 +2255,7 @@ Use Playwright API inside a test.
2174
2255
  First argument is a description of an action.
2175
2256
  Second argument is async function that gets this helper as parameter.
2176
2257
 
2177
- { [`page`][34], [`browserContext`][35] [`browser`][36] } objects from Playwright API are available.
2258
+ { [`page`][36], [`browserContext`][37] [`browser`][38] } objects from Playwright API are available.
2178
2259
 
2179
2260
  ```js
2180
2261
  I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
@@ -2185,7 +2266,7 @@ I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
2185
2266
  #### Parameters
2186
2267
 
2187
2268
  - `description` **[string][8]** used to show in logs.
2188
- - `fn` **[function][20]** async function that executed with Playwright helper as argumen
2269
+ - `fn` **[function][21]** async function that executed with Playwright helper as argumen
2189
2270
 
2190
2271
  ### wait
2191
2272
 
@@ -2197,8 +2278,9 @@ I.wait(2); // wait 2 secs
2197
2278
 
2198
2279
  #### Parameters
2199
2280
 
2200
- - `sec` **[number][19]** number of second to wait.
2201
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2281
+ - `sec` **[number][20]** number of second to wait.
2282
+
2283
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2202
2284
 
2203
2285
  ### waitForClickable
2204
2286
 
@@ -2214,8 +2296,9 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
2214
2296
 
2215
2297
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2216
2298
  - `waitTimeout`
2217
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2218
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2299
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2300
+
2301
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2219
2302
 
2220
2303
  ### waitForDetached
2221
2304
 
@@ -2229,8 +2312,9 @@ I.waitForDetached('#popup');
2229
2312
  #### Parameters
2230
2313
 
2231
2314
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2232
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2233
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2315
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2316
+
2317
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2234
2318
 
2235
2319
  ### waitForElement
2236
2320
 
@@ -2245,8 +2329,9 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
2245
2329
  #### Parameters
2246
2330
 
2247
2331
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2248
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2249
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2332
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2333
+
2334
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2250
2335
 
2251
2336
  ### waitForEnabled
2252
2337
 
@@ -2256,8 +2341,9 @@ Element can be located by CSS or XPath.
2256
2341
  #### Parameters
2257
2342
 
2258
2343
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2259
- - `sec` **[number][19]** (optional) time in seconds to wait, 1 by default.
2260
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2344
+ - `sec` **[number][20]** (optional) time in seconds to wait, 1 by default.
2345
+
2346
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2261
2347
 
2262
2348
  ### waitForFunction
2263
2349
 
@@ -2276,10 +2362,11 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
2276
2362
 
2277
2363
  #### Parameters
2278
2364
 
2279
- - `fn` **([string][8] | [function][20])** to be executed in browser context.
2280
- - `argsOrSec` **([Array][9]&lt;any> | [number][19])?** (optional, `1` by default) arguments for function or seconds.
2281
- - `sec` **[number][19]?** (optional, `1` by default) time in seconds to wait
2282
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2365
+ - `fn` **([string][8] | [function][21])** to be executed in browser context.
2366
+ - `argsOrSec` **([Array][10]&lt;any> | [number][20])?** (optional, `1` by default) arguments for function or seconds.
2367
+ - `sec` **[number][20]?** (optional, `1` by default) time in seconds to wait
2368
+
2369
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2283
2370
 
2284
2371
  ### waitForInvisible
2285
2372
 
@@ -2293,14 +2380,15 @@ I.waitForInvisible('#popup');
2293
2380
  #### Parameters
2294
2381
 
2295
2382
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2296
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2297
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2383
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2384
+
2385
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2298
2386
 
2299
2387
  ### waitForNavigation
2300
2388
 
2301
2389
  Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
2302
2390
 
2303
- See [Playwright's reference][37]
2391
+ See [Playwright's reference][39]
2304
2392
 
2305
2393
  #### Parameters
2306
2394
 
@@ -2317,8 +2405,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
2317
2405
 
2318
2406
  #### Parameters
2319
2407
 
2320
- - `urlOrPredicate` **([string][8] | [function][20])**
2321
- - `sec` **[number][19]?** seconds to wait
2408
+ - `urlOrPredicate` **([string][8] | [function][21])**
2409
+ - `sec` **[number][20]?** seconds to wait
2322
2410
 
2323
2411
  ### waitForResponse
2324
2412
 
@@ -2331,8 +2419,8 @@ I.waitForResponse(response => response.url() === 'https://example.com' && respon
2331
2419
 
2332
2420
  #### Parameters
2333
2421
 
2334
- - `urlOrPredicate` **([string][8] | [function][20])**
2335
- - `sec` **[number][19]?** number of seconds to wait
2422
+ - `urlOrPredicate` **([string][8] | [function][21])**
2423
+ - `sec` **[number][20]?** number of seconds to wait
2336
2424
 
2337
2425
  ### waitForText
2338
2426
 
@@ -2348,19 +2436,20 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
2348
2436
  #### Parameters
2349
2437
 
2350
2438
  - `text` **[string][8]** to wait for.
2351
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2352
- - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
2353
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2439
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2440
+ - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
2441
+
2442
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2354
2443
 
2355
2444
  ### waitForURL
2356
2445
 
2357
2446
  Waits for page navigates to a new URL or reloads. By default, it takes configured `waitForNavigation` option.
2358
2447
 
2359
- See [Playwright's reference][38]
2448
+ See [Playwright's reference][40]
2360
2449
 
2361
2450
  #### Parameters
2362
2451
 
2363
- - `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.
2452
+ - `url` **([string][8] | [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.
2364
2453
  - `options` **any**
2365
2454
 
2366
2455
  ### waitForValue
@@ -2375,8 +2464,9 @@ I.waitForValue('//input', "GoodValue");
2375
2464
 
2376
2465
  - `field` **([string][8] | [object][5])** input field.
2377
2466
  - `value` **[string][8]** expected value.
2378
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2379
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2467
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2468
+
2469
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2380
2470
 
2381
2471
  ### waitForVisible
2382
2472
 
@@ -2390,8 +2480,9 @@ I.waitForVisible('#popup');
2390
2480
  #### Parameters
2391
2481
 
2392
2482
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2393
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2394
- ⚠️ returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][39].
2483
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2484
+
2485
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorderThis method accepts [React selectors][41].
2395
2486
 
2396
2487
  ### waitInUrl
2397
2488
 
@@ -2404,8 +2495,9 @@ I.waitInUrl('/info', 2);
2404
2495
  #### Parameters
2405
2496
 
2406
2497
  - `urlPart` **[string][8]** value to check.
2407
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2408
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2498
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2499
+
2500
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2409
2501
 
2410
2502
  ### waitNumberOfVisibleElements
2411
2503
 
@@ -2418,9 +2510,10 @@ I.waitNumberOfVisibleElements('a', 3);
2418
2510
  #### Parameters
2419
2511
 
2420
2512
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2421
- - `num` **[number][19]** number of elements.
2422
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2423
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2513
+ - `num` **[number][20]** number of elements.
2514
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2515
+
2516
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2424
2517
 
2425
2518
  ### waitToHide
2426
2519
 
@@ -2434,8 +2527,9 @@ I.waitToHide('#popup');
2434
2527
  #### Parameters
2435
2528
 
2436
2529
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2437
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2438
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2530
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2531
+
2532
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2439
2533
 
2440
2534
  ### waitUrlEquals
2441
2535
 
@@ -2449,8 +2543,9 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2449
2543
  #### Parameters
2450
2544
 
2451
2545
  - `urlPart` **[string][8]** value to check.
2452
- - `sec` **[number][19]** (optional, `1` by default) time in seconds to wait
2453
- ⚠️ returns a _promise_ which is synchronized internally by recorder
2546
+ - `sec` **[number][20]** (optional, `1` by default) time in seconds to wait
2547
+
2548
+ Returns **[Promise][9]&lt;void>** automatically synchronized promise through #recorder
2454
2549
 
2455
2550
  [1]: https://github.com/microsoft/playwright
2456
2551
 
@@ -2468,74 +2563,78 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2468
2563
 
2469
2564
  [8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
2470
2565
 
2471
- [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2566
+ [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2472
2567
 
2473
- [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2568
+ [10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2474
2569
 
2475
- [11]: https://www.example.com**
2570
+ [11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2476
2571
 
2477
- [12]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
2572
+ [12]: https://www.example.com**
2478
2573
 
2479
- [13]: https://playwright.dev/docs/api/class-locator#locator-blur
2574
+ [13]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
2480
2575
 
2481
- [14]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2576
+ [14]: https://playwright.dev/docs/api/class-locator#locator-blur
2482
2577
 
2483
- [15]: https://playwright.dev/docs/actionability
2578
+ [15]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2484
2579
 
2485
- [16]: https://playwright.dev/docs/api/class-locator#locator-clear
2580
+ [16]: https://playwright.dev/docs/actionability
2486
2581
 
2487
- [17]: https://playwright.dev/docs/api/class-page#page-click
2582
+ [17]: https://playwright.dev/docs/api/class-locator#locator-clear
2488
2583
 
2489
- [18]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2584
+ [18]: https://playwright.dev/docs/api/class-page#page-click
2490
2585
 
2491
- [19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2586
+ [19]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2492
2587
 
2493
- [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2588
+ [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2494
2589
 
2495
- [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2590
+ [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2496
2591
 
2497
2592
  [22]: https://playwright.dev/docs/api/class-locator#locator-focus
2498
2593
 
2499
2594
  [23]: https://playwright.dev/docs/api/class-consolemessage
2500
2595
 
2501
- [24]: https://codecept.io/helpers/FileSystem
2596
+ [24]: https://playwright.dev/docs/api/class-locator#locator-is-checked
2597
+
2598
+ [25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2599
+
2600
+ [26]: https://playwright.dev/docs/api/class-locator#locator-is-disabled
2502
2601
 
2503
- [25]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2602
+ [27]: https://codecept.io/helpers/FileSystem
2504
2603
 
2505
- [26]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2604
+ [28]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2506
2605
 
2507
- [27]: https://playwright.dev/docs/network#handle-requests
2606
+ [29]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2508
2607
 
2509
- [28]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2608
+ [30]: https://playwright.dev/docs/network#handle-requests
2510
2609
 
2511
- [29]: #fillfield
2610
+ [31]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2512
2611
 
2513
- [30]: https://github.com/GoogleChrome/puppeteer/issues/1313
2612
+ [32]: #fillfield
2514
2613
 
2515
- [31]: #click
2614
+ [33]: https://github.com/GoogleChrome/puppeteer/issues/1313
2516
2615
 
2517
- [32]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2616
+ [34]: #click
2518
2617
 
2519
- [33]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2618
+ [35]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2520
2619
 
2521
- [34]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2620
+ [36]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2522
2621
 
2523
- [35]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2622
+ [37]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2524
2623
 
2525
- [36]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2624
+ [38]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2526
2625
 
2527
- [37]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2626
+ [39]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2528
2627
 
2529
- [38]: https://playwright.dev/docs/api/class-page#page-wait-for-url
2628
+ [40]: https://playwright.dev/docs/api/class-page#page-wait-for-url
2530
2629
 
2531
- [39]: https://codecept.io/react
2630
+ [41]: https://codecept.io/react
2532
2631
 
2533
- [40]: https://playwright.dev/docs/api/class-browsercontext
2632
+ [42]: https://playwright.dev/docs/api/class-browsercontext
2534
2633
 
2535
- [41]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2634
+ [43]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2536
2635
 
2537
- [42]: https://playwright.dev/docs/trace-viewer
2636
+ [44]: https://playwright.dev/docs/trace-viewer
2538
2637
 
2539
- [43]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2638
+ [45]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2540
2639
 
2541
- [44]: https://playwright.dev/docs/api/class-consolemessage#console-message-type
2640
+ [46]: https://playwright.dev/docs/api/class-consolemessage#console-message-type