codeceptjs 3.4.1 → 3.5.1

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 (75) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +11 -9
  3. package/bin/codecept.js +1 -1
  4. package/docs/ai.md +248 -0
  5. package/docs/build/Appium.js +47 -7
  6. package/docs/build/JSONResponse.js +4 -4
  7. package/docs/build/Nightmare.js +3 -1
  8. package/docs/build/OpenAI.js +122 -0
  9. package/docs/build/Playwright.js +234 -54
  10. package/docs/build/Protractor.js +3 -1
  11. package/docs/build/Puppeteer.js +101 -12
  12. package/docs/build/REST.js +15 -5
  13. package/docs/build/TestCafe.js +61 -2
  14. package/docs/build/WebDriver.js +85 -5
  15. package/docs/changelog.md +85 -0
  16. package/docs/helpers/Appium.md +152 -147
  17. package/docs/helpers/JSONResponse.md +4 -4
  18. package/docs/helpers/Nightmare.md +2 -0
  19. package/docs/helpers/OpenAI.md +70 -0
  20. package/docs/helpers/Playwright.md +228 -151
  21. package/docs/helpers/Puppeteer.md +153 -101
  22. package/docs/helpers/REST.md +6 -5
  23. package/docs/helpers/TestCafe.md +97 -49
  24. package/docs/helpers/WebDriver.md +159 -107
  25. package/docs/mobile.md +49 -2
  26. package/docs/parallel.md +56 -0
  27. package/docs/plugins.md +87 -33
  28. package/docs/secrets.md +6 -0
  29. package/docs/tutorial.md +2 -2
  30. package/docs/webapi/appendField.mustache +2 -0
  31. package/docs/webapi/blur.mustache +17 -0
  32. package/docs/webapi/focus.mustache +12 -0
  33. package/docs/webapi/type.mustache +3 -0
  34. package/lib/ai.js +171 -0
  35. package/lib/cli.js +10 -2
  36. package/lib/codecept.js +4 -0
  37. package/lib/command/dryRun.js +9 -1
  38. package/lib/command/generate.js +46 -3
  39. package/lib/command/init.js +23 -1
  40. package/lib/command/interactive.js +15 -1
  41. package/lib/command/run-workers.js +2 -1
  42. package/lib/container.js +13 -3
  43. package/lib/event.js +2 -0
  44. package/lib/helper/Appium.js +45 -7
  45. package/lib/helper/JSONResponse.js +4 -4
  46. package/lib/helper/Nightmare.js +1 -1
  47. package/lib/helper/OpenAI.js +122 -0
  48. package/lib/helper/Playwright.js +200 -45
  49. package/lib/helper/Protractor.js +1 -1
  50. package/lib/helper/Puppeteer.js +67 -12
  51. package/lib/helper/REST.js +15 -5
  52. package/lib/helper/TestCafe.js +30 -2
  53. package/lib/helper/WebDriver.js +51 -5
  54. package/lib/helper/scripts/blurElement.js +17 -0
  55. package/lib/helper/scripts/focusElement.js +17 -0
  56. package/lib/helper/scripts/highlightElement.js +20 -0
  57. package/lib/html.js +258 -0
  58. package/lib/interfaces/gherkin.js +8 -0
  59. package/lib/listener/retry.js +2 -1
  60. package/lib/pause.js +73 -17
  61. package/lib/plugin/debugErrors.js +67 -0
  62. package/lib/plugin/fakerTransform.js +4 -6
  63. package/lib/plugin/heal.js +177 -0
  64. package/lib/plugin/screenshotOnFail.js +11 -2
  65. package/lib/recorder.js +11 -8
  66. package/lib/secret.js +5 -4
  67. package/lib/step.js +6 -1
  68. package/lib/ui.js +4 -3
  69. package/lib/utils.js +17 -0
  70. package/lib/workers.js +57 -9
  71. package/package.json +25 -16
  72. package/translations/ja-JP.js +9 -9
  73. package/typings/index.d.ts +43 -9
  74. package/typings/promiseBasedTypes.d.ts +242 -25
  75. package/typings/types.d.ts +260 -35
@@ -33,46 +33,48 @@ Using playwright-core package, will prevent the download of browser binaries and
33
33
 
34
34
  ## Configuration
35
35
 
36
- This helper should be configured in codecept.conf.js
36
+ This helper should be configured in codecept.conf.(js|ts)
37
37
 
38
38
  Type: [object][5]
39
39
 
40
40
  ### Properties
41
41
 
42
- - `url` **[string][8]** base url of website to be tested
43
- - `browser` **[string][8]?** a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
44
- - `show` **[boolean][26]?** show browser window.
45
- - `restart` **([string][8] | [boolean][26])?** restart strategy between tests. Possible values:- 'context' or **false** - restarts [browser context][33] but keeps running browser. Recommended by Playwright team to keep tests isolated.
42
+ - `url` **[string][8]?** base url of website to be tested
43
+ - `browser` **(`"chromium"` | `"firefox"` | `"webkit"` | `"electron"`)?** a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
44
+ - `show` **[boolean][31]?** show browser window.
45
+ - `restart` **([string][8] | [boolean][31])?** restart strategy between tests. Possible values:- 'context' or **false** - restarts [browser context][38] but keeps running browser. Recommended by Playwright team to keep tests isolated.
46
46
  - 'browser' or **true** - closes browser and opens it again between tests.
47
47
  - '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][12]?** - [timeout][34] in ms of all Playwright actions .
49
- - `disableScreenshots` **[boolean][26]?** don't save screenshot on failure.
48
+ - `timeout` **[number][16]?** - [timeout][39] in ms of all Playwright actions .
49
+ - `disableScreenshots` **[boolean][31]?** don't save screenshot on failure.
50
50
  - `emulate` **any?** browser in device emulation mode.
51
- - `video` **[boolean][26]?** enables video recording for failed tests; videos are saved into `output/videos` folder
52
- - `keepVideoForPassedTests` **[boolean][26]?** save videos for passed tests; videos are saved into `output/videos` folder
53
- - `trace` **[boolean][26]?** record [tracing information][35] with screenshots and snapshots.
54
- - `keepTraceForPassedTests` **[boolean][26]?** save trace for passed tests.
55
- - `fullPageScreenshots` **[boolean][26]?** make full page screenshots on failure.
56
- - `uniqueScreenshotNames` **[boolean][26]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
57
- - `keepBrowserState` **[boolean][26]?** keep browser state between tests when `restart` is set to 'session'.
58
- - `keepCookies` **[boolean][26]?** keep cookies between tests when `restart` is set to 'session'.
59
- - `waitForAction` **[number][12]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
60
- - `waitForNavigation` **[string][8]?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][36].
61
- - `pressKeyDelay` **[number][12]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
62
- - `getPageTimeout` **[number][12]?** config option to set maximum navigation time in milliseconds.
63
- - `waitForTimeout` **[number][12]?** default wait* timeout in ms. Default: 1000.
51
+ - `video` **[boolean][31]?** enables video recording for failed tests; videos are saved into `output/videos` folder
52
+ - `keepVideoForPassedTests` **[boolean][31]?** save videos for passed tests; videos are saved into `output/videos` folder
53
+ - `trace` **[boolean][31]?** record [tracing information][40] with screenshots and snapshots.
54
+ - `keepTraceForPassedTests` **[boolean][31]?** save trace for passed tests.
55
+ - `fullPageScreenshots` **[boolean][31]?** make full page screenshots on failure.
56
+ - `uniqueScreenshotNames` **[boolean][31]?** option to prevent screenshot override if you have scenarios with the same name in different suites.
57
+ - `keepBrowserState` **[boolean][31]?** keep browser state between tests when `restart` is set to 'session'.
58
+ - `keepCookies` **[boolean][31]?** keep cookies between tests when `restart` is set to 'session'.
59
+ - `waitForAction` **[number][16]?** how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
60
+ - `waitForNavigation` **(`"load"` | `"domcontentloaded"` | `"networkidle"`)?** When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API][41].
61
+ - `pressKeyDelay` **[number][16]?** Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
62
+ - `getPageTimeout` **[number][16]?** config option to set maximum navigation time in milliseconds.
63
+ - `waitForTimeout` **[number][16]?** default wait* timeout in ms. Default: 1000.
64
64
  - `basicAuth` **[object][5]?** the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
65
65
  - `windowSize` **[string][8]?** default window size. Set a dimension like `640x480`.
66
- - `colorScheme` **[string][8]?** default color scheme. Possible values: `dark` | `light` | `no-preference`.
66
+ - `colorScheme` **(`"dark"` | `"light"` | `"no-preference"`)?** default color scheme. Possible values: `dark` | `light` | `no-preference`.
67
67
  - `userAgent` **[string][8]?** user-agent string.
68
68
  - `locale` **[string][8]?** locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
69
- - `manualStart` **[boolean][26]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
69
+ - `manualStart` **[boolean][31]?** do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
70
70
  - `chromium` **[object][5]?** pass additional chromium options
71
71
  - `firefox` **[object][5]?** pass additional firefox options
72
72
  - `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][37].
74
- - `ignoreLog` **[Array][15]<[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][38].
75
- - `ignoreHTTPSErrors` **[boolean][26]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
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][42].
74
+ - `ignoreLog` **[Array][20]<[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][43].
75
+ - `ignoreHTTPSErrors` **[boolean][31]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
76
+ - `bypassCSP` **[boolean][31]?** bypass Content Security Policy or CSP
77
+ - `highlightElement` **[boolean][31]?** highlight the interacting elements
76
78
 
77
79
 
78
80
 
@@ -87,7 +89,7 @@ By default, video is saved to `output/video` dir. You can customize this path by
87
89
 
88
90
  #### Trace Recording Customization
89
91
 
90
- Trace recording provides a complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
92
+ Trace recording provides complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
91
93
  Traces will be saved to `output/trace`
92
94
 
93
95
  - `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
@@ -215,6 +217,22 @@ const { devices } = require('playwright');
215
217
  }
216
218
  ```
217
219
 
220
+ - #### Example #9: Launch electron test
221
+
222
+ ```js
223
+ {
224
+ helpers: {
225
+ Playwright: {
226
+ browser: 'electron',
227
+ electron: {
228
+ executablePath: require("electron"),
229
+ args: [path.join('../', "main.js")],
230
+ },
231
+ }
232
+ },
233
+ }
234
+ ```
235
+
218
236
  Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
219
237
 
220
238
  ## Access From Helpers
@@ -377,6 +395,8 @@ Field is located by name, label, CSS or XPath
377
395
 
378
396
  ```js
379
397
  I.appendField('#myTextField', 'appended');
398
+ // typing secret
399
+ I.appendField('password', secret('123456'));
380
400
  ```
381
401
 
382
402
  #### Parameters
@@ -402,6 +422,29 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
402
422
  - `pathToFile` **[string][8]** local file path relative to codecept.conf.ts or codecept.conf.js config file.
403
423
  ⚠️ returns a _promise_ which is synchronized internally by recorder
404
424
 
425
+ ### blur
426
+
427
+ Remove focus from a text input, button, etc.
428
+ Calls [blur][9] on the element.
429
+
430
+ Examples:
431
+
432
+ ```js
433
+ I.blur('.text-area')
434
+ ```
435
+
436
+ ```js
437
+ //element `#product-tile` is focused
438
+ I.see('#add-to-cart-btn');
439
+ I.blur('#product-tile')
440
+ I.dontSee('#add-to-cart-btn');
441
+ ```
442
+
443
+ #### Parameters
444
+
445
+ - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
446
+ - `options` **any?** Playwright only: [Additional options][10] for available options object as 2nd argument.
447
+
405
448
  ### cancelPopup
406
449
 
407
450
  Dismisses the active JavaScript popup, as created by window.alert|window.confirm|window.prompt.
@@ -423,7 +466,7 @@ I.checkOption('agree', '//form');
423
466
 
424
467
  - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
425
468
  - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
426
- ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][9] for check available as 3rd argument.Examples:```js
469
+ ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][11] for check available as 3rd argument.Examples:```js
427
470
  // click on element at position
428
471
  I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
429
472
  ```> ⚠️ To avoid flakiness, option `force: true` is set by default
@@ -446,19 +489,23 @@ I.clearCookie('test');
446
489
 
447
490
  ### clearField
448
491
 
449
- Clears a `<textarea>` or text `<input>` element's value.
492
+ Clears the text input element: `<input>`, `<textarea>` or `[contenteditable]` .
493
+
494
+ Examples:
450
495
 
451
496
  ```js
452
- I.clearField('Email');
453
- I.clearField('user[email]');
454
- I.clearField('#email');
497
+ I.clearField('.text-area')
498
+
499
+ // if this doesn't work use force option
500
+ I.clearField('#submit', { force: true })
455
501
  ```
456
502
 
503
+ Use `force` to bypass the [actionability][12] checks.
504
+
457
505
  #### Parameters
458
506
 
459
- - `field`
460
- - `editable` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
461
- ⚠️ returns a _promise_ which is synchronized internally by recorder.
507
+ - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
508
+ - `options` **any?** [Additional options][13] for available options object as 2nd argument.
462
509
 
463
510
  ### click
464
511
 
@@ -489,7 +536,7 @@ I.click({css: 'nav a.login'});
489
536
  - `locator` **([string][8] | [object][5])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
490
537
  - `context` **([string][8]? | [object][5] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
491
538
  ⚠️ returns a _promise_ which is synchronized internally by recorder
492
- - `opts` **any?** [Additional options][10] for click available as 3rd argument.Examples:```js
539
+ - `options` **any?** [Additional options][14] for click available as 3rd argument.Examples:```js
493
540
  // click on element at position
494
541
  I.click('canvas', '.model', { position: { x: 20, y: 40 } })
495
542
 
@@ -690,10 +737,10 @@ I.dragAndDrop('#dragHandle', '#container');
690
737
  - `srcElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
691
738
  - `destElement` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
692
739
  ⚠️ returns a _promise_ which is synchronized internally by recorder
693
- - `options` **any?** [Additional options][11] can be passed as 3rd argument.```js
740
+ - `options` **any?** [Additional options][15] can be passed as 3rd argument.```js
694
741
  // specify coordinates for source position
695
742
  I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
696
- ```> By default option `force: true` is set
743
+ ```> 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`
697
744
 
698
745
  ### dragSlider
699
746
 
@@ -708,7 +755,7 @@ I.dragSlider('#slider', -70);
708
755
  #### Parameters
709
756
 
710
757
  - `locator` **([string][8] | [object][5])** located by label|name|CSS|XPath|strict locator.
711
- - `offsetX` **[number][12]** position to drag.
758
+ - `offsetX` **[number][16]** position to drag.
712
759
  ⚠️ returns a _promise_ which is synchronized internally by recorder
713
760
 
714
761
  ### executeScript
@@ -736,10 +783,10 @@ If a function returns a Promise it will wait for its resolution.
736
783
 
737
784
  #### Parameters
738
785
 
739
- - `fn` **([string][8] | [function][13])** function to be executed in browser context.
786
+ - `fn` **([string][8] | [function][17])** function to be executed in browser context.
740
787
  - `arg` **any?** optional argument to pass to the function
741
788
 
742
- Returns **[Promise][14]&lt;any>**
789
+ Returns **[Promise][18]&lt;any>**
743
790
 
744
791
  ### fillField
745
792
 
@@ -763,6 +810,23 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
763
810
  - `value` **([string][8] | [object][5])** text value to fill.
764
811
  ⚠️ returns a _promise_ which is synchronized internally by recorder
765
812
 
813
+ ### focus
814
+
815
+ Calls [focus][9] on the matching element.
816
+
817
+ Examples:
818
+
819
+ ```js
820
+ I.dontSee('#add-to-cart-btn');
821
+ I.focus('#product-tile')
822
+ I.see('#add-to-cart-bnt');
823
+ ```
824
+
825
+ #### Parameters
826
+
827
+ - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
828
+ - `options` **any?** Playwright only: [Additional options][19] for available options object as 2nd argument.
829
+
766
830
  ### forceClick
767
831
 
768
832
  Perform an emulated click on a link or a button, given by a locator.
@@ -811,7 +875,7 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
811
875
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
812
876
  - `attr` **[string][8]** attribute name.
813
877
 
814
- Returns **[Promise][14]&lt;[string][8]>** attribute value
878
+ Returns **[Promise][18]&lt;[string][8]>** attribute value
815
879
 
816
880
  ### grabAttributeFromAll
817
881
 
@@ -827,7 +891,7 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
827
891
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
828
892
  - `attr` **[string][8]** attribute name.
829
893
 
830
- Returns **[Promise][14]&lt;[Array][15]&lt;[string][8]>>** attribute value
894
+ Returns **[Promise][18]&lt;[Array][20]&lt;[string][8]>>** attribute value
831
895
 
832
896
  ### grabBrowserLogs
833
897
 
@@ -839,9 +903,9 @@ const errors = logs.map(l => ({ type: l.type(), text: l.text() })).filter(l => l
839
903
  console.log(JSON.stringify(errors));
840
904
  ```
841
905
 
842
- [Learn more about console messages][16]
906
+ [Learn more about console messages][21]
843
907
 
844
- Returns **[Promise][14]&lt;[Array][15]&lt;any>>**
908
+ Returns **[Promise][18]&lt;[Array][20]&lt;any>>**
845
909
 
846
910
  ### grabCookie
847
911
 
@@ -858,7 +922,7 @@ assert(cookie.value, '123456');
858
922
 
859
923
  - `name` **[string][8]?** cookie name.
860
924
 
861
- Returns **([Promise][14]&lt;[string][8]> | [Promise][14]&lt;[Array][15]&lt;[string][8]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
925
+ Returns **([Promise][18]&lt;[string][8]> | [Promise][18]&lt;[Array][20]&lt;[string][8]>>)** attribute valueReturns cookie in JSON format. If name not passed returns all cookies for this domain.
862
926
 
863
927
  ### grabCssPropertyFrom
864
928
 
@@ -875,7 +939,7 @@ const value = await I.grabCssPropertyFrom('h3', 'font-weight');
875
939
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
876
940
  - `cssProperty` **[string][8]** CSS property name.
877
941
 
878
- Returns **[Promise][14]&lt;[string][8]>** CSS value
942
+ Returns **[Promise][18]&lt;[string][8]>** CSS value
879
943
 
880
944
  ### grabCssPropertyFromAll
881
945
 
@@ -891,7 +955,7 @@ const values = await I.grabCssPropertyFromAll('h3', 'font-weight');
891
955
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
892
956
  - `cssProperty` **[string][8]** CSS property name.
893
957
 
894
- Returns **[Promise][14]&lt;[Array][15]&lt;[string][8]>>** CSS value
958
+ Returns **[Promise][18]&lt;[Array][20]&lt;[string][8]>>** CSS value
895
959
 
896
960
  ### grabCurrentUrl
897
961
 
@@ -903,7 +967,7 @@ let url = await I.grabCurrentUrl();
903
967
  console.log(`Current URL is [${url}]`);
904
968
  ```
905
969
 
906
- Returns **[Promise][14]&lt;[string][8]>** current URL
970
+ Returns **[Promise][18]&lt;[string][8]>** current URL
907
971
 
908
972
  ### grabDataFromPerformanceTiming
909
973
 
@@ -928,7 +992,7 @@ let data = await I.grabDataFromPerformanceTiming();
928
992
  }
929
993
  ```
930
994
 
931
- Returns **[Promise][14]&lt;any>** automatically synchronized promise through #recorder
995
+ Returns **[Promise][18]&lt;any>** automatically synchronized promise through #recorder
932
996
 
933
997
  ### grabElementBoundingRect
934
998
 
@@ -956,7 +1020,7 @@ const width = await I.grabElementBoundingRect('h3', 'width');
956
1020
  - `prop`
957
1021
  - `elementSize` **[string][8]?** x, y, width or height of the given element.
958
1022
 
959
- Returns **([Promise][14]&lt;DOMRect> | [Promise][14]&lt;[number][12]>)** Element bounding rectangle
1023
+ Returns **([Promise][18]&lt;DOMRect> | [Promise][18]&lt;[number][16]>)** Element bounding rectangle
960
1024
 
961
1025
  ### grabHTMLFrom
962
1026
 
@@ -973,7 +1037,7 @@ let postHTML = await I.grabHTMLFrom('#post');
973
1037
  - `locator`
974
1038
  - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
975
1039
 
976
- Returns **[Promise][14]&lt;[string][8]>** HTML code for an element
1040
+ Returns **[Promise][18]&lt;[string][8]>** HTML code for an element
977
1041
 
978
1042
  ### grabHTMLFromAll
979
1043
 
@@ -989,7 +1053,7 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
989
1053
  - `locator`
990
1054
  - `element` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
991
1055
 
992
- Returns **[Promise][14]&lt;[Array][15]&lt;[string][8]>>** HTML code for an element
1056
+ Returns **[Promise][18]&lt;[Array][20]&lt;[string][8]>>** HTML code for an element
993
1057
 
994
1058
  ### grabNumberOfOpenTabs
995
1059
 
@@ -1000,7 +1064,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1000
1064
  let tabs = await I.grabNumberOfOpenTabs();
1001
1065
  ```
1002
1066
 
1003
- Returns **[Promise][14]&lt;[number][12]>** number of open tabs
1067
+ Returns **[Promise][18]&lt;[number][16]>** number of open tabs
1004
1068
 
1005
1069
  ### grabNumberOfVisibleElements
1006
1070
 
@@ -1015,7 +1079,7 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
1015
1079
 
1016
1080
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1017
1081
 
1018
- Returns **[Promise][14]&lt;[number][12]>** number of visible elements
1082
+ Returns **[Promise][18]&lt;[number][16]>** number of visible elements
1019
1083
 
1020
1084
  ### grabPageScrollPosition
1021
1085
 
@@ -1026,7 +1090,7 @@ Resumes test execution, so **should be used inside an async function with `await
1026
1090
  let { x, y } = await I.grabPageScrollPosition();
1027
1091
  ```
1028
1092
 
1029
- Returns **[Promise][14]&lt;PageScrollPosition>** scroll position
1093
+ Returns **[Promise][18]&lt;PageScrollPosition>** scroll position
1030
1094
 
1031
1095
  ### grabPopupText
1032
1096
 
@@ -1036,7 +1100,7 @@ Grab the text within the popup. If no popup is visible then it will return null
1036
1100
  await I.grabPopupText();
1037
1101
  ```
1038
1102
 
1039
- Returns **[Promise][14]&lt;([string][8] | null)>**
1103
+ Returns **[Promise][18]&lt;([string][8] | null)>**
1040
1104
 
1041
1105
  ### grabSource
1042
1106
 
@@ -1047,7 +1111,7 @@ Resumes test execution, so **should be used inside async function with `await`**
1047
1111
  let pageSource = await I.grabSource();
1048
1112
  ```
1049
1113
 
1050
- Returns **[Promise][14]&lt;[string][8]>** source code
1114
+ Returns **[Promise][18]&lt;[string][8]>** source code
1051
1115
 
1052
1116
  ### grabTextFrom
1053
1117
 
@@ -1064,7 +1128,7 @@ If multiple elements found returns first element.
1064
1128
 
1065
1129
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1066
1130
 
1067
- Returns **[Promise][14]&lt;[string][8]>** attribute value
1131
+ Returns **[Promise][18]&lt;[string][8]>** attribute value
1068
1132
 
1069
1133
  ### grabTextFromAll
1070
1134
 
@@ -1079,7 +1143,7 @@ let pins = await I.grabTextFromAll('#pin li');
1079
1143
 
1080
1144
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1081
1145
 
1082
- Returns **[Promise][14]&lt;[Array][15]&lt;[string][8]>>** attribute value
1146
+ Returns **[Promise][18]&lt;[Array][20]&lt;[string][8]>>** attribute value
1083
1147
 
1084
1148
  ### grabTitle
1085
1149
 
@@ -1090,7 +1154,7 @@ Resumes test execution, so **should be used inside async with `await`** operator
1090
1154
  let title = await I.grabTitle();
1091
1155
  ```
1092
1156
 
1093
- Returns **[Promise][14]&lt;[string][8]>** title
1157
+ Returns **[Promise][18]&lt;[string][8]>** title
1094
1158
 
1095
1159
  ### grabValueFrom
1096
1160
 
@@ -1106,7 +1170,7 @@ let email = await I.grabValueFrom('input[name=email]');
1106
1170
 
1107
1171
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1108
1172
 
1109
- Returns **[Promise][14]&lt;[string][8]>** attribute value
1173
+ Returns **[Promise][18]&lt;[string][8]>** attribute value
1110
1174
 
1111
1175
  ### grabValueFromAll
1112
1176
 
@@ -1121,14 +1185,14 @@ let inputs = await I.grabValueFromAll('//form/input');
1121
1185
 
1122
1186
  - `locator` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1123
1187
 
1124
- Returns **[Promise][14]&lt;[Array][15]&lt;[string][8]>>** attribute value
1188
+ Returns **[Promise][18]&lt;[Array][20]&lt;[string][8]>>** attribute value
1125
1189
 
1126
1190
  ### handleDownloads
1127
1191
 
1128
1192
  Handles a file download. A file name is required to save the file on disk.
1129
1193
  Files are saved to "output" directory.
1130
1194
 
1131
- Should be used with [FileSystem helper][17] to check that file were downloaded correctly.
1195
+ Should be used with [FileSystem helper][22] to check that file were downloaded correctly.
1132
1196
 
1133
1197
  ```js
1134
1198
  I.handleDownloads('downloads/avatar.jpg');
@@ -1141,7 +1205,7 @@ I.waitForFile('avatar.jpg', 5);
1141
1205
 
1142
1206
  - `fileName` **[string][8]** set filename for downloaded file
1143
1207
 
1144
- Returns **[Promise][14]&lt;void>**
1208
+ Returns **[Promise][18]&lt;void>**
1145
1209
 
1146
1210
  ### haveRequestHeaders
1147
1211
 
@@ -1159,7 +1223,7 @@ I.haveRequestHeaders({
1159
1223
 
1160
1224
  ### makeApiRequest
1161
1225
 
1162
- Performs [api request][18] using
1226
+ Performs [api request][23] using
1163
1227
  the cookies from the current browser session.
1164
1228
 
1165
1229
  ```js
@@ -1176,22 +1240,22 @@ I.makeApiRequest('PATCH', )
1176
1240
  - `url` **[string][8]** endpoint
1177
1241
  - `options` **[object][5]** request options depending on method used
1178
1242
 
1179
- Returns **[Promise][14]&lt;[object][5]>** response
1243
+ Returns **[Promise][18]&lt;[object][5]>** response
1180
1244
 
1181
1245
  ### mockRoute
1182
1246
 
1183
- Mocks network request using [`browserContext.route`][19] of Playwright
1247
+ Mocks network request using [`browserContext.route`][24] of Playwright
1184
1248
 
1185
1249
  ```js
1186
1250
  I.mockRoute(/(.png$)|(.jpg$)/, route => route.abort());
1187
1251
  ```
1188
1252
 
1189
- This method allows intercepting and mocking requests & responses. [Learn more about it][20]
1253
+ This method allows intercepting and mocking requests & responses. [Learn more about it][25]
1190
1254
 
1191
1255
  #### Parameters
1192
1256
 
1193
- - `url` **([string][8] | [RegExp][21])?** URL, regex or pattern for to match URL
1194
- - `handler` **[function][13]?** a function to process reques
1257
+ - `url` **([string][8] | [RegExp][26])?** URL, regex or pattern for to match URL
1258
+ - `handler` **[function][17]?** a function to process reques
1195
1259
 
1196
1260
  ### moveCursorTo
1197
1261
 
@@ -1206,8 +1270,8 @@ I.moveCursorTo('#submit', 5,5);
1206
1270
  #### Parameters
1207
1271
 
1208
1272
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1209
- - `offsetX` **[number][12]** (optional, `0` by default) X-axis offset.
1210
- - `offsetY` **[number][12]** (optional, `0` by default) Y-axis offset.
1273
+ - `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
1274
+ - `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
1211
1275
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1212
1276
 
1213
1277
  ### openNewTab
@@ -1218,7 +1282,7 @@ Open new tab and automatically switched to new tab
1218
1282
  I.openNewTab();
1219
1283
  ```
1220
1284
 
1221
- You can pass in [page options][22] to emulate device on this page
1285
+ You can pass in [page options][27] to emulate device on this page
1222
1286
 
1223
1287
  ```js
1224
1288
  // enable mobile
@@ -1233,7 +1297,7 @@ I.openNewTab({ isMobile: true });
1233
1297
 
1234
1298
  Presses a key in the browser (on a focused element).
1235
1299
 
1236
- _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][23].
1300
+ _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`][28].
1237
1301
 
1238
1302
  ```js
1239
1303
  I.pressKey('Backspace');
@@ -1292,14 +1356,14 @@ Some of the supported key names are:
1292
1356
 
1293
1357
  #### Parameters
1294
1358
 
1295
- - `key` **([string][8] | [Array][15]&lt;[string][8]>)** key or array of keys to press.
1296
- ⚠️ returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][24]).
1359
+ - `key` **([string][8] | [Array][20]&lt;[string][8]>)** key or array of keys to press.
1360
+ ⚠️ returns a _promise_ which is synchronized internally by recorder_Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313][29]).
1297
1361
 
1298
1362
  ### pressKeyDown
1299
1363
 
1300
1364
  Presses a key in the browser and leaves it in a down state.
1301
1365
 
1302
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][25]).
1366
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][30]).
1303
1367
 
1304
1368
  ```js
1305
1369
  I.pressKeyDown('Control');
@@ -1316,7 +1380,7 @@ I.pressKeyUp('Control');
1316
1380
 
1317
1381
  Releases a key in the browser which was previously set to a down state.
1318
1382
 
1319
- To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][25]).
1383
+ To make combinations with modifier key and user operation (e.g. `'Control'` + [`click`][30]).
1320
1384
 
1321
1385
  ```js
1322
1386
  I.pressKeyDown('Control');
@@ -1346,8 +1410,8 @@ First parameter can be set to `maximize`.
1346
1410
 
1347
1411
  #### Parameters
1348
1412
 
1349
- - `width` **[number][12]** width in pixels or `maximize`.
1350
- - `height` **[number][12]** height in pixels.
1413
+ - `width` **[number][16]** width in pixels or `maximize`.
1414
+ - `height` **[number][16]** height in pixels.
1351
1415
  ⚠️ returns a _promise_ which is synchronized internally by recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
1352
1416
  Playwright does not control the window of a browser so it can't adjust its real size.
1353
1417
  It also can't maximize a window.Update configuration to change real window size on start:```js
@@ -1421,7 +1485,7 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
1421
1485
  #### Parameters
1422
1486
 
1423
1487
  - `fileName` **[string][8]** file name to save.
1424
- - `fullPage` **[boolean][26]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1488
+ - `fullPage` **[boolean][31]** (optional, `false` by default) flag to enable fullscreen screenshot mode.
1425
1489
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1426
1490
 
1427
1491
  ### scrollPageToBottom
@@ -1457,8 +1521,8 @@ I.scrollTo('#submit', 5, 5);
1457
1521
  #### Parameters
1458
1522
 
1459
1523
  - `locator` **([string][8] | [object][5])** located by CSS|XPath|strict locator.
1460
- - `offsetX` **[number][12]** (optional, `0` by default) X-axis offset.
1461
- - `offsetY` **[number][12]** (optional, `0` by default) Y-axis offset.
1524
+ - `offsetX` **[number][16]** (optional, `0` by default) X-axis offset.
1525
+ - `offsetY` **[number][16]** (optional, `0` by default) Y-axis offset.
1462
1526
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1463
1527
 
1464
1528
  ### see
@@ -1661,7 +1725,7 @@ I.seeNumberOfElements('#submitBtn', 1);
1661
1725
  #### Parameters
1662
1726
 
1663
1727
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1664
- - `num` **[number][12]** number of elements.
1728
+ - `num` **[number][16]** number of elements.
1665
1729
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1666
1730
 
1667
1731
  ### seeNumberOfVisibleElements
@@ -1676,7 +1740,7 @@ I.seeNumberOfVisibleElements('.buttons', 3);
1676
1740
  #### Parameters
1677
1741
 
1678
1742
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1679
- - `num` **[number][12]** number of elements.
1743
+ - `num` **[number][16]** number of elements.
1680
1744
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1681
1745
 
1682
1746
  ### seeTextEquals
@@ -1730,7 +1794,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
1730
1794
  #### Parameters
1731
1795
 
1732
1796
  - `select` **([string][8] | [object][5])** field located by label|name|CSS|XPath|strict locator.
1733
- - `option` **([string][8] | [Array][15]&lt;any>)** visible text or value of option.
1797
+ - `option` **([string][8] | [Array][20]&lt;any>)** visible text or value of option.
1734
1798
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1735
1799
 
1736
1800
  ### setCookie
@@ -1751,7 +1815,7 @@ I.setCookie([
1751
1815
 
1752
1816
  #### Parameters
1753
1817
 
1754
- - `cookie` **(Cookie | [Array][15]&lt;Cookie>)** a cookie object or array of cookie objects.
1818
+ - `cookie` **(Cookie | [Array][20]&lt;Cookie>)** a cookie object or array of cookie objects.
1755
1819
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1756
1820
 
1757
1821
  ### stopMockingRoute
@@ -1767,8 +1831,8 @@ If no handler is passed, all mock requests for the rote are disabled.
1767
1831
 
1768
1832
  #### Parameters
1769
1833
 
1770
- - `url` **([string][8] | [RegExp][21])?** URL, regex or pattern for to match URL
1771
- - `handler` **[function][13]?** a function to process reques
1834
+ - `url` **([string][8] | [RegExp][26])?** URL, regex or pattern for to match URL
1835
+ - `handler` **[function][17]?** a function to process reques
1772
1836
 
1773
1837
  ### switchTo
1774
1838
 
@@ -1795,7 +1859,7 @@ I.switchToNextTab(2);
1795
1859
 
1796
1860
  #### Parameters
1797
1861
 
1798
- - `num` **[number][12]**
1862
+ - `num` **[number][16]**
1799
1863
 
1800
1864
  ### switchToPreviousTab
1801
1865
 
@@ -1808,13 +1872,13 @@ I.switchToPreviousTab(2);
1808
1872
 
1809
1873
  #### Parameters
1810
1874
 
1811
- - `num` **[number][12]**
1875
+ - `num` **[number][16]**
1812
1876
 
1813
1877
  ### type
1814
1878
 
1815
1879
  Types out the given text into an active field.
1816
1880
  To slow down typing use a second parameter, to set interval between key presses.
1817
- _Note:_ Should be used when [`fillField`][23] is not an option.
1881
+ _Note:_ Should be used when [`fillField`][28] is not an option.
1818
1882
 
1819
1883
  ```js
1820
1884
  // passing in a string
@@ -1825,14 +1889,17 @@ I.type('4141555311111111', 100);
1825
1889
 
1826
1890
  // passing in an array
1827
1891
  I.type(['T', 'E', 'X', 'T']);
1892
+
1893
+ // passing a secret
1894
+ I.type(secret('123456'));
1828
1895
  ```
1829
1896
 
1830
1897
  #### Parameters
1831
1898
 
1832
1899
  - `keys`
1833
- - `delay` **[number][12]?** (optional) delay in ms between key presses
1900
+ - `delay` **[number][16]?** (optional) delay in ms between key presses
1834
1901
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1835
- - `key` **([string][8] | [Array][15]&lt;[string][8]>)** or array of keys to type.
1902
+ - `key` **([string][8] | [Array][20]&lt;[string][8]>)** or array of keys to type.
1836
1903
 
1837
1904
  ### uncheckOption
1838
1905
 
@@ -1851,7 +1918,7 @@ I.uncheckOption('agree', '//form');
1851
1918
 
1852
1919
  - `field` **([string][8] | [object][5])** checkbox located by label | name | CSS | XPath | strict locator.
1853
1920
  - `context` **([string][8]? | [object][5])** (optional, `null` by default) element located by CSS | XPath | strict locator.
1854
- ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][27] for uncheck available as 3rd argument.Examples:```js
1921
+ ⚠️ returns a _promise_ which is synchronized internally by recorder[Additional options][32] for uncheck available as 3rd argument.Examples:```js
1855
1922
  // click on element at position
1856
1923
  I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
1857
1924
  ```> ⚠️ To avoid flakiness, option `force: true` is set by default
@@ -1864,7 +1931,7 @@ Use Playwright API inside a test.
1864
1931
  First argument is a description of an action.
1865
1932
  Second argument is async function that gets this helper as parameter.
1866
1933
 
1867
- { [`page`][28], [`browserContext`][29] [`browser`][30] } objects from Playwright API are available.
1934
+ { [`page`][33], [`browserContext`][34] [`browser`][35] } objects from Playwright API are available.
1868
1935
 
1869
1936
  ```js
1870
1937
  I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
@@ -1875,7 +1942,7 @@ I.usePlaywrightTo('emulate offline mode', async ({ browserContext }) => {
1875
1942
  #### Parameters
1876
1943
 
1877
1944
  - `description` **[string][8]** used to show in logs.
1878
- - `fn` **[function][13]** async function that executed with Playwright helper as argumen
1945
+ - `fn` **[function][17]** async function that executed with Playwright helper as argumen
1879
1946
 
1880
1947
  ### wait
1881
1948
 
@@ -1887,7 +1954,7 @@ I.wait(2); // wait 2 secs
1887
1954
 
1888
1955
  #### Parameters
1889
1956
 
1890
- - `sec` **[number][12]** number of second to wait.
1957
+ - `sec` **[number][16]** number of second to wait.
1891
1958
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1892
1959
 
1893
1960
  ### waitForClickable
@@ -1904,7 +1971,7 @@ I.waitForClickable('.btn.continue', 5); // wait for 5 secs
1904
1971
 
1905
1972
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1906
1973
  - `waitTimeout`
1907
- - `sec` **[number][12]?** (optional, `1` by default) time in seconds to wait
1974
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1908
1975
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1909
1976
 
1910
1977
  ### waitForDetached
@@ -1919,7 +1986,7 @@ I.waitForDetached('#popup');
1919
1986
  #### Parameters
1920
1987
 
1921
1988
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1922
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
1989
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1923
1990
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1924
1991
 
1925
1992
  ### waitForElement
@@ -1935,7 +2002,7 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
1935
2002
  #### Parameters
1936
2003
 
1937
2004
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1938
- - `sec` **[number][12]?** (optional, `1` by default) time in seconds to wait
2005
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1939
2006
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1940
2007
 
1941
2008
  ### waitForEnabled
@@ -1946,7 +2013,7 @@ Element can be located by CSS or XPath.
1946
2013
  #### Parameters
1947
2014
 
1948
2015
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1949
- - `sec` **[number][12]** (optional) time in seconds to wait, 1 by default.
2016
+ - `sec` **[number][16]** (optional) time in seconds to wait, 1 by default.
1950
2017
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1951
2018
 
1952
2019
  ### waitForFunction
@@ -1966,9 +2033,9 @@ I.waitForFunction((count) => window.requests == count, [3], 5) // pass args and
1966
2033
 
1967
2034
  #### Parameters
1968
2035
 
1969
- - `fn` **([string][8] | [function][13])** to be executed in browser context.
1970
- - `argsOrSec` **([Array][15]&lt;any> | [number][12])?** (optional, `1` by default) arguments for function or seconds.
1971
- - `sec` **[number][12]?** (optional, `1` by default) time in seconds to wait
2036
+ - `fn` **([string][8] | [function][17])** to be executed in browser context.
2037
+ - `argsOrSec` **([Array][20]&lt;any> | [number][16])?** (optional, `1` by default) arguments for function or seconds.
2038
+ - `sec` **[number][16]?** (optional, `1` by default) time in seconds to wait
1972
2039
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1973
2040
 
1974
2041
  ### waitForInvisible
@@ -1983,18 +2050,18 @@ I.waitForInvisible('#popup');
1983
2050
  #### Parameters
1984
2051
 
1985
2052
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
1986
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2053
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
1987
2054
  ⚠️ returns a _promise_ which is synchronized internally by recorder
1988
2055
 
1989
2056
  ### waitForNavigation
1990
2057
 
1991
2058
  Waits for navigation to finish. By default takes configured `waitForNavigation` option.
1992
2059
 
1993
- See [Playwright's reference][31]
2060
+ See [Playwright's reference][36]
1994
2061
 
1995
2062
  #### Parameters
1996
2063
 
1997
- - `opts` **any**
2064
+ - `options` **any**
1998
2065
 
1999
2066
  ### waitForRequest
2000
2067
 
@@ -2007,8 +2074,8 @@ I.waitForRequest(request => request.url() === 'http://example.com' && request.me
2007
2074
 
2008
2075
  #### Parameters
2009
2076
 
2010
- - `urlOrPredicate` **([string][8] | [function][13])**
2011
- - `sec` **[number][12]?** seconds to wait
2077
+ - `urlOrPredicate` **([string][8] | [function][17])**
2078
+ - `sec` **[number][16]?** seconds to wait
2012
2079
 
2013
2080
  ### waitForResponse
2014
2081
 
@@ -2021,8 +2088,8 @@ I.waitForResponse(response => response.url() === 'https://example.com' && respon
2021
2088
 
2022
2089
  #### Parameters
2023
2090
 
2024
- - `urlOrPredicate` **([string][8] | [function][13])**
2025
- - `sec` **[number][12]?** number of seconds to wait
2091
+ - `urlOrPredicate` **([string][8] | [function][17])**
2092
+ - `sec` **[number][16]?** number of seconds to wait
2026
2093
 
2027
2094
  ### waitForText
2028
2095
 
@@ -2038,7 +2105,7 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
2038
2105
  #### Parameters
2039
2106
 
2040
2107
  - `text` **[string][8]** to wait for.
2041
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2108
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2042
2109
  - `context` **([string][8] | [object][5])?** (optional) element located by CSS|XPath|strict locator.
2043
2110
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2044
2111
 
@@ -2054,7 +2121,7 @@ I.waitForValue('//input', "GoodValue");
2054
2121
 
2055
2122
  - `field` **([string][8] | [object][5])** input field.
2056
2123
  - `value` **[string][8]** expected value.
2057
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2124
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2058
2125
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2059
2126
 
2060
2127
  ### waitForVisible
@@ -2069,8 +2136,8 @@ I.waitForVisible('#popup');
2069
2136
  #### Parameters
2070
2137
 
2071
2138
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2072
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2073
- ⚠️ returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][32].
2139
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2140
+ ⚠️ returns a _promise_ which is synchronized internally by recorderThis method accepts [React selectors][37].
2074
2141
 
2075
2142
  ### waitInUrl
2076
2143
 
@@ -2083,7 +2150,7 @@ I.waitInUrl('/info', 2);
2083
2150
  #### Parameters
2084
2151
 
2085
2152
  - `urlPart` **[string][8]** value to check.
2086
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2153
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2087
2154
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2088
2155
 
2089
2156
  ### waitNumberOfVisibleElements
@@ -2097,8 +2164,8 @@ I.waitNumberOfVisibleElements('a', 3);
2097
2164
  #### Parameters
2098
2165
 
2099
2166
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2100
- - `num` **[number][12]** number of elements.
2101
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2167
+ - `num` **[number][16]** number of elements.
2168
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2102
2169
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2103
2170
 
2104
2171
  ### waitToHide
@@ -2113,7 +2180,7 @@ I.waitToHide('#popup');
2113
2180
  #### Parameters
2114
2181
 
2115
2182
  - `locator` **([string][8] | [object][5])** element located by CSS|XPath|strict locator.
2116
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2183
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2117
2184
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2118
2185
 
2119
2186
  ### waitUrlEquals
@@ -2128,7 +2195,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2128
2195
  #### Parameters
2129
2196
 
2130
2197
  - `urlPart` **[string][8]** value to check.
2131
- - `sec` **[number][12]** (optional, `1` by default) time in seconds to wait
2198
+ - `sec` **[number][16]** (optional, `1` by default) time in seconds to wait
2132
2199
  ⚠️ returns a _promise_ which is synchronized internally by recorder
2133
2200
 
2134
2201
  [1]: https://github.com/microsoft/playwright
@@ -2147,62 +2214,72 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
2147
2214
 
2148
2215
  [8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
2149
2216
 
2150
- [9]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2217
+ [9]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
2218
+
2219
+ [10]: https://playwright.dev/docs/api/class-locator#locator-blur
2220
+
2221
+ [11]: https://playwright.dev/docs/api/class-elementhandle#element-handle-check
2222
+
2223
+ [12]: https://playwright.dev/docs/actionability
2224
+
2225
+ [13]: https://playwright.dev/docs/api/class-locator#locator-clear
2226
+
2227
+ [14]: https://playwright.dev/docs/api/class-page#page-click
2151
2228
 
2152
- [10]: https://playwright.dev/docs/api/class-page#page-click
2229
+ [15]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2153
2230
 
2154
- [11]: https://playwright.dev/docs/api/class-page#page-drag-and-drop
2231
+ [16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2155
2232
 
2156
- [12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
2233
+ [17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2157
2234
 
2158
- [13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
2235
+ [18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2159
2236
 
2160
- [14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
2237
+ [19]: https://playwright.dev/docs/api/class-locator#locator-focus
2161
2238
 
2162
- [15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2239
+ [20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
2163
2240
 
2164
- [16]: https://playwright.dev/docs/api/class-consolemessage
2241
+ [21]: https://playwright.dev/docs/api/class-consolemessage
2165
2242
 
2166
- [17]: https://codecept.io/helpers/FileSystem
2243
+ [22]: https://codecept.io/helpers/FileSystem
2167
2244
 
2168
- [18]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2245
+ [23]: https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get
2169
2246
 
2170
- [19]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2247
+ [24]: https://playwright.dev/docs/api/class-browsercontext#browser-context-route
2171
2248
 
2172
- [20]: https://playwright.dev/docs/network#handle-requests
2249
+ [25]: https://playwright.dev/docs/network#handle-requests
2173
2250
 
2174
- [21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2251
+ [26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp
2175
2252
 
2176
- [22]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2253
+ [27]: https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions
2177
2254
 
2178
- [23]: #fillfield
2255
+ [28]: #fillfield
2179
2256
 
2180
- [24]: https://github.com/GoogleChrome/puppeteer/issues/1313
2257
+ [29]: https://github.com/GoogleChrome/puppeteer/issues/1313
2181
2258
 
2182
- [25]: #click
2259
+ [30]: #click
2183
2260
 
2184
- [26]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2261
+ [31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
2185
2262
 
2186
- [27]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2263
+ [32]: https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck
2187
2264
 
2188
- [28]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2265
+ [33]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md
2189
2266
 
2190
- [29]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2267
+ [34]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
2191
2268
 
2192
- [30]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2269
+ [35]: https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md
2193
2270
 
2194
- [31]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2271
+ [36]: https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions
2195
2272
 
2196
- [32]: https://codecept.io/react
2273
+ [37]: https://codecept.io/react
2197
2274
 
2198
- [33]: https://playwright.dev/docs/api/class-browsercontext
2275
+ [38]: https://playwright.dev/docs/api/class-browsercontext
2199
2276
 
2200
- [34]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2277
+ [39]: https://playwright.dev/docs/api/class-page#page-set-default-timeout
2201
2278
 
2202
- [35]: https://playwright.dev/docs/trace-viewer
2279
+ [40]: https://playwright.dev/docs/trace-viewer
2203
2280
 
2204
- [36]: https://playwright.dev/docs/api/class-page#page-wait-for-navigation
2281
+ [41]: https://playwright.dev/docs/api/class-page#page-wait-for-navigation
2205
2282
 
2206
- [37]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2283
+ [42]: https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge
2207
2284
 
2208
- [38]: https://playwright.dev/docs/api/class-consolemessage#console-message-type
2285
+ [43]: https://playwright.dev/docs/api/class-consolemessage#console-message-type