codeceptjs 3.5.6 → 3.5.7-beta.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 (140) hide show
  1. package/CHANGELOG.md +2950 -0
  2. package/docs/bdd.md +11 -7
  3. package/docs/build/ApiDataFactory.js +2 -1
  4. package/docs/build/Appium.js +25 -23
  5. package/docs/build/Expect.js +422 -0
  6. package/docs/build/Nightmare.js +53 -56
  7. package/docs/build/Playwright.js +166 -103
  8. package/docs/build/Protractor.js +66 -69
  9. package/docs/build/Puppeteer.js +79 -79
  10. package/docs/build/TestCafe.js +56 -55
  11. package/docs/build/WebDriver.js +81 -82
  12. package/docs/changelog.md +388 -1
  13. package/docs/commands.md +12 -0
  14. package/docs/community-helpers.md +8 -4
  15. package/docs/examples.md +8 -2
  16. package/docs/helpers/Appium.md +50 -32
  17. package/docs/helpers/Expect.md +275 -0
  18. package/docs/helpers/Nightmare.md +141 -94
  19. package/docs/helpers/Playwright.md +280 -211
  20. package/docs/helpers/Protractor.md +229 -169
  21. package/docs/helpers/Puppeteer.md +256 -185
  22. package/docs/helpers/TestCafe.md +201 -149
  23. package/docs/helpers/WebDriver.md +252 -178
  24. package/docs/mobile.md +17 -21
  25. package/docs/plugins.md +35 -1
  26. package/docs/webapi/amOnPage.mustache +1 -1
  27. package/docs/webapi/appendField.mustache +1 -1
  28. package/docs/webapi/attachFile.mustache +1 -1
  29. package/docs/webapi/blur.mustache +1 -0
  30. package/docs/webapi/checkOption.mustache +1 -1
  31. package/docs/webapi/clearCookie.mustache +1 -1
  32. package/docs/webapi/clearField.mustache +1 -1
  33. package/docs/webapi/click.mustache +1 -1
  34. package/docs/webapi/clickLink.mustache +1 -1
  35. package/docs/webapi/closeCurrentTab.mustache +1 -1
  36. package/docs/webapi/closeOtherTabs.mustache +1 -1
  37. package/docs/webapi/dontSee.mustache +1 -1
  38. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  39. package/docs/webapi/dontSeeCookie.mustache +1 -1
  40. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  41. package/docs/webapi/dontSeeElement.mustache +1 -1
  42. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  43. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  44. package/docs/webapi/dontSeeInField.mustache +1 -1
  45. package/docs/webapi/dontSeeInSource.mustache +1 -1
  46. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  47. package/docs/webapi/doubleClick.mustache +1 -1
  48. package/docs/webapi/downloadFile.mustache +1 -1
  49. package/docs/webapi/dragAndDrop.mustache +1 -1
  50. package/docs/webapi/dragSlider.mustache +1 -1
  51. package/docs/webapi/executeAsyncScript.mustache +0 -2
  52. package/docs/webapi/executeScript.mustache +0 -2
  53. package/docs/webapi/fillField.mustache +1 -1
  54. package/docs/webapi/focus.mustache +1 -0
  55. package/docs/webapi/forceClick.mustache +1 -1
  56. package/docs/webapi/forceRightClick.mustache +1 -1
  57. package/docs/webapi/grabCookie.mustache +1 -1
  58. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  59. package/docs/webapi/moveCursorTo.mustache +1 -1
  60. package/docs/webapi/openNewTab.mustache +1 -1
  61. package/docs/webapi/pressKey.mustache +1 -1
  62. package/docs/webapi/pressKeyDown.mustache +1 -1
  63. package/docs/webapi/pressKeyUp.mustache +1 -1
  64. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  65. package/docs/webapi/refreshPage.mustache +1 -1
  66. package/docs/webapi/resizeWindow.mustache +1 -1
  67. package/docs/webapi/rightClick.mustache +1 -1
  68. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  69. package/docs/webapi/saveScreenshot.mustache +1 -1
  70. package/docs/webapi/say.mustache +1 -1
  71. package/docs/webapi/scrollIntoView.mustache +1 -1
  72. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  73. package/docs/webapi/scrollPageToTop.mustache +1 -1
  74. package/docs/webapi/scrollTo.mustache +1 -1
  75. package/docs/webapi/see.mustache +1 -1
  76. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  77. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  78. package/docs/webapi/seeCookie.mustache +1 -1
  79. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  80. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  81. package/docs/webapi/seeElement.mustache +1 -1
  82. package/docs/webapi/seeElementInDOM.mustache +1 -1
  83. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  84. package/docs/webapi/seeInField.mustache +1 -1
  85. package/docs/webapi/seeInPopup.mustache +1 -1
  86. package/docs/webapi/seeInSource.mustache +1 -1
  87. package/docs/webapi/seeInTitle.mustache +1 -1
  88. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  89. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  90. package/docs/webapi/seeTextEquals.mustache +1 -1
  91. package/docs/webapi/seeTitleEquals.mustache +1 -1
  92. package/docs/webapi/selectOption.mustache +1 -1
  93. package/docs/webapi/setCookie.mustache +1 -1
  94. package/docs/webapi/setGeoLocation.mustache +1 -1
  95. package/docs/webapi/switchTo.mustache +1 -1
  96. package/docs/webapi/switchToNextTab.mustache +1 -1
  97. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  98. package/docs/webapi/type.mustache +1 -1
  99. package/docs/webapi/uncheckOption.mustache +1 -1
  100. package/docs/webapi/wait.mustache +1 -1
  101. package/docs/webapi/waitForClickable.mustache +1 -1
  102. package/docs/webapi/waitForDetached.mustache +1 -1
  103. package/docs/webapi/waitForElement.mustache +1 -1
  104. package/docs/webapi/waitForEnabled.mustache +1 -1
  105. package/docs/webapi/waitForFunction.mustache +1 -1
  106. package/docs/webapi/waitForInvisible.mustache +1 -1
  107. package/docs/webapi/waitForText.mustache +1 -1
  108. package/docs/webapi/waitForValue.mustache +1 -1
  109. package/docs/webapi/waitForVisible.mustache +1 -1
  110. package/docs/webapi/waitInUrl.mustache +1 -1
  111. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  112. package/docs/webapi/waitToHide.mustache +1 -1
  113. package/docs/webapi/waitUrlEquals.mustache +1 -1
  114. package/lib/ai.js +12 -3
  115. package/lib/cli.js +3 -1
  116. package/lib/command/dryRun.js +2 -1
  117. package/lib/helper/ApiDataFactory.js +2 -1
  118. package/lib/helper/Appium.js +7 -5
  119. package/lib/helper/Expect.js +422 -0
  120. package/lib/helper/Playwright.js +91 -32
  121. package/lib/helper/Puppeteer.js +2 -2
  122. package/lib/html.js +3 -3
  123. package/lib/interfaces/gherkin.js +21 -2
  124. package/lib/output.js +1 -1
  125. package/lib/pause.js +6 -3
  126. package/lib/plugin/autoLogin.js +35 -3
  127. package/lib/plugin/heal.js +40 -7
  128. package/lib/recorder.js +12 -5
  129. package/package.json +15 -8
  130. package/translations/de-DE.js +5 -0
  131. package/translations/fr-FR.js +1 -0
  132. package/translations/it-IT.js +1 -0
  133. package/translations/ja-JP.js +5 -0
  134. package/translations/pl-PL.js +5 -0
  135. package/translations/pt-BR.js +1 -0
  136. package/translations/ru-RU.js +1 -0
  137. package/translations/zh-CN.js +5 -0
  138. package/translations/zh-TW.js +5 -0
  139. package/typings/promiseBasedTypes.d.ts +904 -862
  140. package/typings/types.d.ts +904 -845
@@ -455,7 +455,7 @@ class Puppeteer extends Helper {
455
455
  * I.seeInPopup('Popup text');
456
456
  * ```
457
457
  * @param {string} text value to check.
458
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
458
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
459
459
  *
460
460
  */
461
461
  async seeInPopup(text) {
@@ -651,7 +651,8 @@ class Puppeteer extends Helper {
651
651
  * ```
652
652
  *
653
653
  * @param {string} url url path or global url.
654
- * @return {void} automatically synchronized promise with recorder #!
654
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
655
+ *
655
656
  */
656
657
  async amOnPage(url) {
657
658
  if (!(/^\w+\:\/\//.test(url))) {
@@ -686,7 +687,7 @@ class Puppeteer extends Helper {
686
687
  *
687
688
  * @param {number} width width in pixels or `maximize`.
688
689
  * @param {number} height height in pixels.
689
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
690
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
690
691
  *
691
692
  *
692
693
  * Unlike other drivers Puppeteer changes the size of a viewport, not the window!
@@ -706,14 +707,14 @@ class Puppeteer extends Helper {
706
707
  * Set headers for all next requests
707
708
  *
708
709
  * ```js
709
- * I.haveRequestHeaders({
710
+ * I.setPuppeteerRequestHeaders({
710
711
  * 'X-Sent-By': 'CodeceptJS',
711
712
  * });
712
713
  * ```
713
714
  *
714
715
  * @param {object} customHeaders headers to set
715
716
  */
716
- async haveRequestHeaders(customHeaders) {
717
+ async setPuppeteerRequestHeaders(customHeaders) {
717
718
  if (!customHeaders) {
718
719
  throw new Error('Cannot send empty headers.');
719
720
  }
@@ -732,7 +733,7 @@ class Puppeteer extends Helper {
732
733
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
733
734
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
734
735
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
735
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
736
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
736
737
  *
737
738
  * {{ react }}
738
739
  */
@@ -759,6 +760,7 @@ class Puppeteer extends Helper {
759
760
  *
760
761
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
761
762
  * @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
763
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
762
764
  *
763
765
  *
764
766
  */
@@ -789,6 +791,7 @@ class Puppeteer extends Helper {
789
791
  *
790
792
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
791
793
  * @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
794
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
792
795
  *
793
796
  *
794
797
  */
@@ -809,7 +812,7 @@ class Puppeteer extends Helper {
809
812
  *
810
813
  * @param {LocatorOrString} srcElement located by CSS|XPath|strict locator.
811
814
  * @param {LocatorOrString} destElement located by CSS|XPath|strict locator.
812
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
815
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
813
816
  *
814
817
  */
815
818
  async dragAndDrop(srcElement, destElement) {
@@ -822,7 +825,7 @@ class Puppeteer extends Helper {
822
825
  * ```js
823
826
  * I.refreshPage();
824
827
  * ```
825
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
828
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
826
829
  *
827
830
  */
828
831
  async refreshPage() {
@@ -835,7 +838,7 @@ class Puppeteer extends Helper {
835
838
  * ```js
836
839
  * I.scrollPageToTop();
837
840
  * ```
838
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
841
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
839
842
  *
840
843
  */
841
844
  scrollPageToTop() {
@@ -850,7 +853,7 @@ class Puppeteer extends Helper {
850
853
  * ```js
851
854
  * I.scrollPageToBottom();
852
855
  * ```
853
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
856
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
854
857
  *
855
858
  */
856
859
  scrollPageToBottom() {
@@ -879,7 +882,7 @@ class Puppeteer extends Helper {
879
882
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
880
883
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
881
884
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
882
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
885
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
883
886
  *
884
887
  */
885
888
  async scrollTo(locator, offsetX = 0, offsetY = 0) {
@@ -910,7 +913,7 @@ class Puppeteer extends Helper {
910
913
  * ```
911
914
  *
912
915
  * @param {string} text text value to check.
913
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
916
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
914
917
  *
915
918
  */
916
919
  async seeInTitle(text) {
@@ -949,7 +952,7 @@ class Puppeteer extends Helper {
949
952
  * ```
950
953
  *
951
954
  * @param {string} text value to check.
952
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
955
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
953
956
  *
954
957
  */
955
958
  async seeTitleEquals(text) {
@@ -965,7 +968,7 @@ class Puppeteer extends Helper {
965
968
  * ```
966
969
  *
967
970
  * @param {string} text value to check.
968
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
971
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
969
972
  *
970
973
  */
971
974
  async dontSeeInTitle(text) {
@@ -1155,7 +1158,7 @@ class Puppeteer extends Helper {
1155
1158
  * I.seeElement('#modal');
1156
1159
  * ```
1157
1160
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
1158
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1161
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1159
1162
  *
1160
1163
  * {{ react }}
1161
1164
  */
@@ -1176,7 +1179,7 @@ class Puppeteer extends Helper {
1176
1179
  * ```
1177
1180
  *
1178
1181
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
1179
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1182
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1180
1183
  *
1181
1184
  * {{ react }}
1182
1185
  */
@@ -1197,7 +1200,7 @@ class Puppeteer extends Helper {
1197
1200
  * I.seeElementInDOM('#modal');
1198
1201
  * ```
1199
1202
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1200
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1203
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1201
1204
  *
1202
1205
  */
1203
1206
  async seeElementInDOM(locator) {
@@ -1213,7 +1216,7 @@ class Puppeteer extends Helper {
1213
1216
  * ```
1214
1217
  *
1215
1218
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
1216
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1219
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1217
1220
  *
1218
1221
  */
1219
1222
  async dontSeeElementInDOM(locator) {
@@ -1246,7 +1249,7 @@ class Puppeteer extends Helper {
1246
1249
  *
1247
1250
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1248
1251
  * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1249
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1252
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1250
1253
  *
1251
1254
  *
1252
1255
  * {{ react }}
@@ -1283,7 +1286,7 @@ class Puppeteer extends Helper {
1283
1286
  *
1284
1287
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1285
1288
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1286
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1289
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1287
1290
  *
1288
1291
  *
1289
1292
  * {{ react }}
@@ -1321,7 +1324,7 @@ class Puppeteer extends Helper {
1321
1324
  * ```
1322
1325
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator
1323
1326
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator
1324
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1327
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1325
1328
  *
1326
1329
  *
1327
1330
  * {{ react }}
@@ -1440,7 +1443,7 @@ class Puppeteer extends Helper {
1440
1443
  *
1441
1444
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1442
1445
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1443
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1446
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1444
1447
  *
1445
1448
  *
1446
1449
  * {{ react }}
@@ -1463,7 +1466,7 @@ class Puppeteer extends Helper {
1463
1466
  *
1464
1467
  * @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
1465
1468
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
1466
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1469
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1467
1470
  *
1468
1471
  *
1469
1472
  * {{ react }}
@@ -1485,7 +1488,7 @@ class Puppeteer extends Helper {
1485
1488
  * ```
1486
1489
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
1487
1490
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
1488
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1491
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1489
1492
  *
1490
1493
  */
1491
1494
  async checkOption(field, context = null) {
@@ -1512,7 +1515,7 @@ class Puppeteer extends Helper {
1512
1515
  * ```
1513
1516
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
1514
1517
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
1515
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1518
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1516
1519
  *
1517
1520
  */
1518
1521
  async uncheckOption(field, context = null) {
@@ -1536,7 +1539,7 @@ class Puppeteer extends Helper {
1536
1539
  * ```
1537
1540
  *
1538
1541
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1539
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1542
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1540
1543
  *
1541
1544
  */
1542
1545
  async seeCheckboxIsChecked(field) {
@@ -1553,7 +1556,7 @@ class Puppeteer extends Helper {
1553
1556
  * ```
1554
1557
  *
1555
1558
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1556
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1559
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1557
1560
  *
1558
1561
  */
1559
1562
  async dontSeeCheckboxIsChecked(field) {
@@ -1572,7 +1575,7 @@ class Puppeteer extends Helper {
1572
1575
  * ```
1573
1576
  *
1574
1577
  * @param {string} key name of key to press down.
1575
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1578
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1576
1579
  *
1577
1580
  */
1578
1581
  async pressKeyDown(key) {
@@ -1593,7 +1596,7 @@ class Puppeteer extends Helper {
1593
1596
  * ```
1594
1597
  *
1595
1598
  * @param {string} key name of key to release.
1596
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1599
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1597
1600
  *
1598
1601
  */
1599
1602
  async pressKeyUp(key) {
@@ -1662,7 +1665,7 @@ class Puppeteer extends Helper {
1662
1665
  * - `'Tab'`
1663
1666
  *
1664
1667
  * @param {string|string[]} key key or array of keys to press.
1665
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1668
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1666
1669
  *
1667
1670
  *
1668
1671
  * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
@@ -1713,7 +1716,7 @@ class Puppeteer extends Helper {
1713
1716
  *
1714
1717
  * @param {string|string[]} key or array of keys to type.
1715
1718
  * @param {?number} [delay=null] (optional) delay in ms between key presses
1716
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1719
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1717
1720
  *
1718
1721
  */
1719
1722
  async type(keys, delay = null) {
@@ -1744,7 +1747,7 @@ class Puppeteer extends Helper {
1744
1747
  * ```
1745
1748
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1746
1749
  * @param {CodeceptJS.StringOrSecret} value text value to fill.
1747
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1750
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1748
1751
  *
1749
1752
  * {{ react }}
1750
1753
  */
@@ -1775,7 +1778,7 @@ class Puppeteer extends Helper {
1775
1778
  * I.clearField('#email');
1776
1779
  * ```
1777
1780
  * @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
1778
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
1781
+ * @returns {Promise<void>} automatically synchronized promise through #recorder.
1779
1782
  *
1780
1783
  */
1781
1784
  async clearField(field) {
@@ -1793,7 +1796,7 @@ class Puppeteer extends Helper {
1793
1796
  * ```
1794
1797
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
1795
1798
  * @param {string} value text value to append.
1796
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1799
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1797
1800
  *
1798
1801
  *
1799
1802
  * {{ react }}
@@ -1819,7 +1822,7 @@ class Puppeteer extends Helper {
1819
1822
  * ```
1820
1823
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1821
1824
  * @param {CodeceptJS.StringOrSecret} value value to check.
1822
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1825
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1823
1826
  *
1824
1827
  */
1825
1828
  async seeInField(field, value) {
@@ -1838,7 +1841,7 @@ class Puppeteer extends Helper {
1838
1841
  *
1839
1842
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1840
1843
  * @param {CodeceptJS.StringOrSecret} value value to check.
1841
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1844
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1842
1845
  *
1843
1846
  */
1844
1847
  async dontSeeInField(field, value) {
@@ -1858,7 +1861,7 @@ class Puppeteer extends Helper {
1858
1861
  *
1859
1862
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
1860
1863
  * @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
1861
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1864
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1862
1865
  *
1863
1866
  *
1864
1867
  * > ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1](https://github.com/puppeteer/puppeteer/issues/5420), downgrade to 2.0.0 if you face it.
@@ -1896,7 +1899,7 @@ class Puppeteer extends Helper {
1896
1899
  * ```
1897
1900
  * @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
1898
1901
  * @param {string|Array<*>} option visible text or value of option.
1899
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1902
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1900
1903
  *
1901
1904
  */
1902
1905
  async selectOption(select, option) {
@@ -1958,7 +1961,7 @@ class Puppeteer extends Helper {
1958
1961
  * ```
1959
1962
  *
1960
1963
  * @param {string} url a fragment to check
1961
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1964
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1962
1965
  *
1963
1966
  */
1964
1967
  async seeInCurrentUrl(url) {
@@ -1969,7 +1972,7 @@ class Puppeteer extends Helper {
1969
1972
  * Checks that current url does not contain a provided fragment.
1970
1973
  *
1971
1974
  * @param {string} url value to check.
1972
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1975
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1973
1976
  *
1974
1977
  */
1975
1978
  async dontSeeInCurrentUrl(url) {
@@ -1987,7 +1990,7 @@ class Puppeteer extends Helper {
1987
1990
  * ```
1988
1991
  *
1989
1992
  * @param {string} url value to check.
1990
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1993
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1991
1994
  *
1992
1995
  */
1993
1996
  async seeCurrentUrlEquals(url) {
@@ -2004,7 +2007,7 @@ class Puppeteer extends Helper {
2004
2007
  * ```
2005
2008
  *
2006
2009
  * @param {string} url value to check.
2007
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2010
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2008
2011
  *
2009
2012
  */
2010
2013
  async dontSeeCurrentUrlEquals(url) {
@@ -2022,7 +2025,7 @@ class Puppeteer extends Helper {
2022
2025
  * ```
2023
2026
  * @param {string} text expected on page.
2024
2027
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
2025
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2028
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2026
2029
  *
2027
2030
  *
2028
2031
  * {{ react }}
@@ -2040,7 +2043,7 @@ class Puppeteer extends Helper {
2040
2043
  *
2041
2044
  * @param {string} text element value to check.
2042
2045
  * @param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
2043
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2046
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2044
2047
  *
2045
2048
  */
2046
2049
  async seeTextEquals(text, context = null) {
@@ -2058,7 +2061,7 @@ class Puppeteer extends Helper {
2058
2061
  *
2059
2062
  * @param {string} text which is not present.
2060
2063
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
2061
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2064
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2062
2065
  *
2063
2066
  *
2064
2067
  * {{ react }}
@@ -2118,7 +2121,7 @@ class Puppeteer extends Helper {
2118
2121
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
2119
2122
  * ```
2120
2123
  * @param {string} text value to check.
2121
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2124
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2122
2125
  *
2123
2126
  */
2124
2127
  async seeInSource(text) {
@@ -2134,7 +2137,7 @@ class Puppeteer extends Helper {
2134
2137
  * ```
2135
2138
  *
2136
2139
  * @param {string} value to check.
2137
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2140
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2138
2141
  *
2139
2142
  */
2140
2143
  async dontSeeInSource(text) {
@@ -2153,7 +2156,7 @@ class Puppeteer extends Helper {
2153
2156
  *
2154
2157
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2155
2158
  * @param {number} num number of elements.
2156
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2159
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2157
2160
  *
2158
2161
  *
2159
2162
  * {{ react }}
@@ -2173,7 +2176,7 @@ class Puppeteer extends Helper {
2173
2176
  *
2174
2177
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2175
2178
  * @param {number} num number of elements.
2176
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2179
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2177
2180
  *
2178
2181
  *
2179
2182
  * {{ react }}
@@ -2199,7 +2202,7 @@ class Puppeteer extends Helper {
2199
2202
  * ```
2200
2203
  *
2201
2204
  * @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
2202
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2205
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2203
2206
  *
2204
2207
  */
2205
2208
  async setCookie(cookie) {
@@ -2217,7 +2220,7 @@ class Puppeteer extends Helper {
2217
2220
  * ```
2218
2221
  *
2219
2222
  * @param {string} name cookie name.
2220
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2223
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2221
2224
  *
2222
2225
  *
2223
2226
  */
@@ -2234,7 +2237,7 @@ class Puppeteer extends Helper {
2234
2237
  * ```
2235
2238
  *
2236
2239
  * @param {string} name cookie name.
2237
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2240
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2238
2241
  *
2239
2242
  */
2240
2243
  async dontSeeCookie(name) {
@@ -2253,7 +2256,7 @@ class Puppeteer extends Helper {
2253
2256
  * ```
2254
2257
  *
2255
2258
  * @param {?string} [name=null] cookie name.
2256
- * @returns {Promise<string>|Promise<string[]>} attribute value
2259
+ * @returns {any} attribute value
2257
2260
  *
2258
2261
  *
2259
2262
  * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
@@ -2275,7 +2278,7 @@ class Puppeteer extends Helper {
2275
2278
  * ```
2276
2279
  *
2277
2280
  * @param {?string} [cookie=null] (optional, `null` by default) cookie name
2278
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2281
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2279
2282
  *
2280
2283
  */
2281
2284
  async clearCookie(name) {
@@ -2316,8 +2319,6 @@ class Puppeteer extends Helper {
2316
2319
  * @param {...any} args to be passed to function.
2317
2320
  * @returns {Promise<any>} script return value
2318
2321
  *
2319
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2320
- *
2321
2322
  *
2322
2323
  * If a function returns a Promise It will wait for it resolution.
2323
2324
  */
@@ -2355,8 +2356,6 @@ class Puppeteer extends Helper {
2355
2356
  * @param {...any} args to be passed to function.
2356
2357
  * @returns {Promise<any>} script return value
2357
2358
  *
2358
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2359
- *
2360
2359
  *
2361
2360
  * Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
2362
2361
  */
@@ -2560,7 +2559,7 @@ class Puppeteer extends Helper {
2560
2559
  *
2561
2560
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
2562
2561
  * @param {object} cssProperties object with CSS properties and their values to check.
2563
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2562
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2564
2563
  *
2565
2564
  * {{ react }}
2566
2565
  */
@@ -2608,7 +2607,7 @@ class Puppeteer extends Helper {
2608
2607
  *
2609
2608
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
2610
2609
  * @param {object} attributes attributes and their values to check.
2611
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2610
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2612
2611
  *
2613
2612
  * {{ react }}
2614
2613
  */
@@ -2650,7 +2649,7 @@ class Puppeteer extends Helper {
2650
2649
  *
2651
2650
  * @param {CodeceptJS.LocatorOrString} locator located by label|name|CSS|XPath|strict locator.
2652
2651
  * @param {number} offsetX position to drag.
2653
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2652
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2654
2653
  *
2655
2654
  * {{ react }}
2656
2655
  */
@@ -2729,7 +2728,7 @@ class Puppeteer extends Helper {
2729
2728
  *
2730
2729
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2731
2730
  * @param {string} fileName file name to save.
2732
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2731
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2733
2732
  *
2734
2733
  */
2735
2734
  async saveElementScreenshot(locator, fileName) {
@@ -2755,7 +2754,7 @@ class Puppeteer extends Helper {
2755
2754
  *
2756
2755
  * @param {string} fileName file name to save.
2757
2756
  * @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
2758
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2757
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2759
2758
  *
2760
2759
  */
2761
2760
  async saveScreenshot(fileName, fullPage) {
@@ -2800,7 +2799,7 @@ class Puppeteer extends Helper {
2800
2799
  * ```
2801
2800
  *
2802
2801
  * @param {number} sec number of second to wait.
2803
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2802
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2804
2803
  *
2805
2804
  */
2806
2805
  async wait(sec) {
@@ -2815,7 +2814,7 @@ class Puppeteer extends Helper {
2815
2814
  *
2816
2815
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2817
2816
  * @param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
2818
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2817
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2819
2818
  *
2820
2819
  */
2821
2820
  async waitForEnabled(locator, sec) {
@@ -2855,7 +2854,7 @@ class Puppeteer extends Helper {
2855
2854
  * @param {LocatorOrString} field input field.
2856
2855
  * @param {string }value expected value.
2857
2856
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
2858
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2857
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2859
2858
  *
2860
2859
  */
2861
2860
  async waitForValue(field, value, sec) {
@@ -2896,7 +2895,7 @@ class Puppeteer extends Helper {
2896
2895
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2897
2896
  * @param {number} num number of elements.
2898
2897
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
2899
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2898
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2900
2899
  *
2901
2900
  * {{ react }}
2902
2901
  */
@@ -2938,7 +2937,7 @@ class Puppeteer extends Helper {
2938
2937
  *
2939
2938
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2940
2939
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
2941
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2940
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2942
2941
  *
2943
2942
  */
2944
2943
  async waitForClickable(locator, waitTimeout) {
@@ -2965,7 +2964,7 @@ class Puppeteer extends Helper {
2965
2964
  *
2966
2965
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2967
2966
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
2968
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2967
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2969
2968
  *
2970
2969
  * {{ react }}
2971
2970
  */
@@ -2995,7 +2994,7 @@ class Puppeteer extends Helper {
2995
2994
  *
2996
2995
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
2997
2996
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
2998
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2997
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
2999
2998
  *
3000
2999
  *
3001
3000
  * This method accepts [React selectors](https://codecept.io/react).
@@ -3026,7 +3025,7 @@ class Puppeteer extends Helper {
3026
3025
  *
3027
3026
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
3028
3027
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3029
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3028
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3030
3029
  *
3031
3030
  */
3032
3031
  async waitForInvisible(locator, sec) {
@@ -3055,7 +3054,7 @@ class Puppeteer extends Helper {
3055
3054
  *
3056
3055
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
3057
3056
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3058
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3057
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3059
3058
  *
3060
3059
  */
3061
3060
  async waitToHide(locator, sec) {
@@ -3089,7 +3088,7 @@ class Puppeteer extends Helper {
3089
3088
  *
3090
3089
  * @param {string} urlPart value to check.
3091
3090
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3092
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3091
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3093
3092
  *
3094
3093
  */
3095
3094
  async waitInUrl(urlPart, sec = null) {
@@ -3118,7 +3117,7 @@ class Puppeteer extends Helper {
3118
3117
  *
3119
3118
  * @param {string} urlPart value to check.
3120
3119
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3121
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3120
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3122
3121
  *
3123
3122
  */
3124
3123
  async waitUrlEquals(urlPart, sec = null) {
@@ -3155,7 +3154,7 @@ class Puppeteer extends Helper {
3155
3154
  * @param {string }text to wait for.
3156
3155
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3157
3156
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
3158
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3157
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3159
3158
  *
3160
3159
  */
3161
3160
  async waitForText(text, sec = null, context = null) {
@@ -3232,7 +3231,7 @@ class Puppeteer extends Helper {
3232
3231
  * ```
3233
3232
  *
3234
3233
  * @param {?CodeceptJS.LocatorOrString} [locator=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
3235
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3234
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3236
3235
  *
3237
3236
  */
3238
3237
  async switchTo(locator) {
@@ -3287,7 +3286,7 @@ class Puppeteer extends Helper {
3287
3286
  * @param {string|function} fn to be executed in browser context.
3288
3287
  * @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
3289
3288
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
3290
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3289
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3291
3290
  *
3292
3291
  */
3293
3292
  async waitForFunction(fn, argsOrSec = null, sec = null) {
@@ -3337,7 +3336,7 @@ class Puppeteer extends Helper {
3337
3336
  *
3338
3337
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
3339
3338
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
3340
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3339
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3341
3340
  *
3342
3341
  */
3343
3342
  async waitForDetached(locator, sec) {
@@ -3387,7 +3386,8 @@ class Puppeteer extends Helper {
3387
3386
  * loadEventEnd: 241
3388
3387
  * }
3389
3388
  * ```
3390
- * @return {Promise<any>} automatically synchronized promise through #recorder
3389
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
3390
+ *
3391
3391
  */
3392
3392
  async grabDataFromPerformanceTiming() {
3393
3393
  return perfTiming;