codeceptjs 3.5.5 → 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 (151) hide show
  1. package/CHANGELOG.md +63 -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/FileSystem.js +1 -1
  7. package/docs/build/Nightmare.js +53 -56
  8. package/docs/build/Playwright.js +209 -135
  9. package/docs/build/Protractor.js +66 -69
  10. package/docs/build/Puppeteer.js +83 -83
  11. package/docs/build/TestCafe.js +56 -55
  12. package/docs/build/WebDriver.js +85 -86
  13. package/docs/changelog.md +63 -0
  14. package/docs/commands.md +12 -0
  15. package/docs/helpers/Appium.md +50 -32
  16. package/docs/helpers/Expect.md +275 -0
  17. package/docs/helpers/FileSystem.md +1 -1
  18. package/docs/helpers/Nightmare.md +141 -94
  19. package/docs/helpers/Playwright.md +281 -212
  20. package/docs/helpers/Protractor.md +229 -169
  21. package/docs/helpers/Puppeteer.md +257 -186
  22. package/docs/helpers/TestCafe.md +201 -149
  23. package/docs/helpers/WebDriver.md +253 -179
  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/codecept.js +3 -0
  117. package/lib/command/dryRun.js +2 -1
  118. package/lib/command/info.js +24 -0
  119. package/lib/command/run-workers.js +3 -2
  120. package/lib/command/run.js +3 -2
  121. package/lib/data/context.js +14 -6
  122. package/lib/helper/ApiDataFactory.js +2 -1
  123. package/lib/helper/Appium.js +7 -5
  124. package/lib/helper/Expect.js +422 -0
  125. package/lib/helper/FileSystem.js +1 -1
  126. package/lib/helper/Playwright.js +134 -64
  127. package/lib/helper/Puppeteer.js +6 -6
  128. package/lib/helper/WebDriver.js +4 -4
  129. package/lib/helper/scripts/highlightElement.js +1 -1
  130. package/lib/html.js +3 -3
  131. package/lib/interfaces/gherkin.js +21 -2
  132. package/lib/output.js +1 -1
  133. package/lib/pause.js +6 -5
  134. package/lib/plugin/autoLogin.js +35 -8
  135. package/lib/plugin/heal.js +40 -7
  136. package/lib/plugin/retryTo.js +0 -2
  137. package/lib/plugin/tryTo.js +0 -3
  138. package/lib/recorder.js +12 -5
  139. package/lib/session.js +1 -1
  140. package/package.json +24 -17
  141. package/translations/de-DE.js +5 -0
  142. package/translations/fr-FR.js +14 -1
  143. package/translations/it-IT.js +1 -0
  144. package/translations/ja-JP.js +5 -0
  145. package/translations/pl-PL.js +5 -0
  146. package/translations/pt-BR.js +1 -0
  147. package/translations/ru-RU.js +1 -0
  148. package/translations/zh-CN.js +5 -0
  149. package/translations/zh-TW.js +5 -0
  150. package/typings/promiseBasedTypes.d.ts +905 -863
  151. package/typings/types.d.ts +909 -850
@@ -406,7 +406,8 @@ class Nightmare extends Helper {
406
406
  * ```
407
407
  *
408
408
  * @param {string} url url path or global url.
409
- * @return {void} automatically synchronized promise with recorder #!
409
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
410
+ *
410
411
  * @param {?object} headers list of request headers can be passed
411
412
  *
412
413
  */
@@ -434,7 +435,7 @@ class Nightmare extends Helper {
434
435
  * ```
435
436
  *
436
437
  * @param {string} text text value to check.
437
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
438
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
438
439
  *
439
440
  */
440
441
  async seeInTitle(text) {
@@ -450,7 +451,7 @@ class Nightmare extends Helper {
450
451
  * ```
451
452
  *
452
453
  * @param {string} text value to check.
453
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
454
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
454
455
  *
455
456
  */
456
457
  async dontSeeInTitle(text) {
@@ -495,7 +496,7 @@ class Nightmare extends Helper {
495
496
  * ```
496
497
  *
497
498
  * @param {string} url a fragment to check
498
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
499
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
499
500
  *
500
501
  */
501
502
  async seeInCurrentUrl(url) {
@@ -507,7 +508,7 @@ class Nightmare extends Helper {
507
508
  * Checks that current url does not contain a provided fragment.
508
509
  *
509
510
  * @param {string} url value to check.
510
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
511
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
511
512
  *
512
513
  */
513
514
  async dontSeeInCurrentUrl(url) {
@@ -526,7 +527,7 @@ class Nightmare extends Helper {
526
527
  * ```
527
528
  *
528
529
  * @param {string} url value to check.
529
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
530
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
530
531
  *
531
532
  */
532
533
  async seeCurrentUrlEquals(url) {
@@ -544,7 +545,7 @@ class Nightmare extends Helper {
544
545
  * ```
545
546
  *
546
547
  * @param {string} url value to check.
547
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
548
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
548
549
  *
549
550
  */
550
551
  async dontSeeCurrentUrlEquals(url) {
@@ -563,7 +564,7 @@ class Nightmare extends Helper {
563
564
  * ```
564
565
  * @param {string} text expected on page.
565
566
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
566
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
567
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
567
568
  *
568
569
  */
569
570
  async see(text, context = null) {
@@ -581,7 +582,7 @@ class Nightmare extends Helper {
581
582
  *
582
583
  * @param {string} text which is not present.
583
584
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
584
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
585
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
585
586
  *
586
587
  */
587
588
  dontSee(text, context = null) {
@@ -596,7 +597,7 @@ class Nightmare extends Helper {
596
597
  * I.seeElement('#modal');
597
598
  * ```
598
599
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
599
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
600
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
600
601
  *
601
602
  */
602
603
  async seeElement(locator) {
@@ -615,7 +616,7 @@ class Nightmare extends Helper {
615
616
  * ```
616
617
  *
617
618
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
618
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
619
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
619
620
  *
620
621
  */
621
622
  async dontSeeElement(locator) {
@@ -635,7 +636,7 @@ class Nightmare extends Helper {
635
636
  * I.seeElementInDOM('#modal');
636
637
  * ```
637
638
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
638
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
639
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
639
640
  *
640
641
  */
641
642
  async seeElementInDOM(locator) {
@@ -652,7 +653,7 @@ class Nightmare extends Helper {
652
653
  * ```
653
654
  *
654
655
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
655
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
656
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
656
657
  *
657
658
  */
658
659
  async dontSeeElementInDOM(locator) {
@@ -668,7 +669,7 @@ class Nightmare extends Helper {
668
669
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
669
670
  * ```
670
671
  * @param {string} text value to check.
671
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
672
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
672
673
  *
673
674
  */
674
675
  async seeInSource(text) {
@@ -684,7 +685,7 @@ class Nightmare extends Helper {
684
685
  * ```
685
686
  *
686
687
  * @param {string} value to check.
687
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
688
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
688
689
  *
689
690
  */
690
691
  async dontSeeInSource(text) {
@@ -703,7 +704,7 @@ class Nightmare extends Helper {
703
704
  *
704
705
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
705
706
  * @param {number} num number of elements.
706
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
707
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
707
708
  *
708
709
  */
709
710
  async seeNumberOfElements(locator, num) {
@@ -721,7 +722,7 @@ class Nightmare extends Helper {
721
722
  *
722
723
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
723
724
  * @param {number} num number of elements.
724
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
725
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
725
726
  *
726
727
  */
727
728
  async seeNumberOfVisibleElements(locator, num) {
@@ -776,7 +777,7 @@ class Nightmare extends Helper {
776
777
  *
777
778
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
778
779
  * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
779
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
780
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
780
781
  *
781
782
  */
782
783
  async click(locator, context = null) {
@@ -799,7 +800,7 @@ class Nightmare extends Helper {
799
800
  *
800
801
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
801
802
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
802
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
803
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
803
804
  *
804
805
  */
805
806
  async doubleClick(locator, context = null) {
@@ -823,7 +824,7 @@ class Nightmare extends Helper {
823
824
  *
824
825
  * @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
825
826
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
826
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
827
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
827
828
  *
828
829
  */
829
830
  async rightClick(locator, context = null) {
@@ -845,7 +846,7 @@ class Nightmare extends Helper {
845
846
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
846
847
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
847
848
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
848
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
849
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
849
850
  *
850
851
  */
851
852
  async moveCursorTo(locator, offsetX = 0, offsetY = 0) {
@@ -884,8 +885,6 @@ class Nightmare extends Helper {
884
885
  * @param {...any} args to be passed to function.
885
886
  * @returns {Promise<any>} script return value
886
887
  *
887
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
888
- *
889
888
  *
890
889
  * Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
891
890
  */
@@ -920,8 +919,6 @@ class Nightmare extends Helper {
920
919
  * @param {...any} args to be passed to function.
921
920
  * @returns {Promise<any>} script return value
922
921
  *
923
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
924
- *
925
922
  *
926
923
  * Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
927
924
  * Unlike NightmareJS implementation calling `done` will return its first argument.
@@ -937,7 +934,7 @@ class Nightmare extends Helper {
937
934
  *
938
935
  * @param {number} width width in pixels or `maximize`.
939
936
  * @param {number} height height in pixels.
940
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
937
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
941
938
  *
942
939
  */
943
940
  async resizeWindow(width, height) {
@@ -960,7 +957,7 @@ class Nightmare extends Helper {
960
957
  * ```
961
958
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
962
959
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
963
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
960
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
964
961
  *
965
962
  */
966
963
  async checkOption(field, context = null) {
@@ -983,7 +980,7 @@ class Nightmare extends Helper {
983
980
  * ```
984
981
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
985
982
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
986
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
983
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
987
984
  *
988
985
  */
989
986
  async uncheckOption(field, context = null) {
@@ -1009,7 +1006,7 @@ class Nightmare extends Helper {
1009
1006
  * ```
1010
1007
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1011
1008
  * @param {CodeceptJS.StringOrSecret} value text value to fill.
1012
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1009
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1013
1010
  *
1014
1011
  */
1015
1012
  async fillField(field, value) {
@@ -1028,7 +1025,7 @@ class Nightmare extends Helper {
1028
1025
  * I.clearField('#email');
1029
1026
  * ```
1030
1027
  * @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
1031
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
1028
+ * @returns {Promise<void>} automatically synchronized promise through #recorder.
1032
1029
  *
1033
1030
  */
1034
1031
  async clearField(field) {
@@ -1046,7 +1043,7 @@ class Nightmare extends Helper {
1046
1043
  * ```
1047
1044
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
1048
1045
  * @param {string} value text value to append.
1049
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1046
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1050
1047
  *
1051
1048
  */
1052
1049
  async appendField(field, value) {
@@ -1068,7 +1065,7 @@ class Nightmare extends Helper {
1068
1065
  * ```
1069
1066
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1070
1067
  * @param {CodeceptJS.StringOrSecret} value value to check.
1071
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1068
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1072
1069
  *
1073
1070
  */
1074
1071
  async seeInField(field, value) {
@@ -1087,7 +1084,7 @@ class Nightmare extends Helper {
1087
1084
  *
1088
1085
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1089
1086
  * @param {CodeceptJS.StringOrSecret} value value to check.
1090
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1087
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1091
1088
  *
1092
1089
  */
1093
1090
  async dontSeeInField(field, value) {
@@ -1133,7 +1130,7 @@ class Nightmare extends Helper {
1133
1130
  * ```
1134
1131
  *
1135
1132
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1136
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1133
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1137
1134
  *
1138
1135
  */
1139
1136
  async seeCheckboxIsChecked(field) {
@@ -1150,7 +1147,7 @@ class Nightmare extends Helper {
1150
1147
  * ```
1151
1148
  *
1152
1149
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1153
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1150
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1154
1151
  *
1155
1152
  */
1156
1153
  async dontSeeCheckboxIsChecked(field) {
@@ -1169,7 +1166,7 @@ class Nightmare extends Helper {
1169
1166
  *
1170
1167
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
1171
1168
  * @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
1172
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1169
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1173
1170
  *
1174
1171
  *
1175
1172
  * Doesn't work if the Chromium DevTools panel is open (as Chromium allows only one attachment to the debugger at a time. [See more](https://github.com/rosshinkley/nightmare-upload#important-note-about-setting-file-upload-inputs))
@@ -1444,7 +1441,7 @@ class Nightmare extends Helper {
1444
1441
  * ```
1445
1442
  * @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
1446
1443
  * @param {string|Array<*>} option visible text or value of option.
1447
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1444
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1448
1445
  *
1449
1446
  */
1450
1447
  async selectOption(select, option) {
@@ -1502,7 +1499,7 @@ class Nightmare extends Helper {
1502
1499
  * ```
1503
1500
  *
1504
1501
  * @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
1505
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1502
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1506
1503
  *
1507
1504
  *
1508
1505
  * Wrapper for `.cookies.set(cookie)`.
@@ -1520,7 +1517,7 @@ class Nightmare extends Helper {
1520
1517
  * ```
1521
1518
  *
1522
1519
  * @param {string} name cookie name.
1523
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1520
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1524
1521
  *
1525
1522
  *
1526
1523
  */
@@ -1537,7 +1534,7 @@ class Nightmare extends Helper {
1537
1534
  * ```
1538
1535
  *
1539
1536
  * @param {string} name cookie name.
1540
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1537
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1541
1538
  *
1542
1539
  */
1543
1540
  async dontSeeCookie(name) {
@@ -1556,7 +1553,7 @@ class Nightmare extends Helper {
1556
1553
  * ```
1557
1554
  *
1558
1555
  * @param {?string} [name=null] cookie name.
1559
- * @returns {Promise<string>|Promise<string[]>} attribute value
1556
+ * @returns {any} attribute value
1560
1557
  *
1561
1558
  *
1562
1559
  * Cookie in JSON format. If name not passed returns all cookies for this domain.
@@ -1577,7 +1574,7 @@ class Nightmare extends Helper {
1577
1574
  * ```
1578
1575
  *
1579
1576
  * @param {?string} [cookie=null] (optional, `null` by default) cookie name
1580
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1577
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1581
1578
  *
1582
1579
  */
1583
1580
  async clearCookie(cookie) {
@@ -1604,7 +1601,7 @@ class Nightmare extends Helper {
1604
1601
  * @param {string|function} fn to be executed in browser context.
1605
1602
  * @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
1606
1603
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1607
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1604
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1608
1605
  *
1609
1606
  */
1610
1607
  async waitForFunction(fn, argsOrSec = null, sec = null) {
@@ -1628,7 +1625,7 @@ class Nightmare extends Helper {
1628
1625
  * ```
1629
1626
  *
1630
1627
  * @param {number} sec number of second to wait.
1631
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1628
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1632
1629
  *
1633
1630
  */
1634
1631
  async wait(sec) {
@@ -1650,7 +1647,7 @@ class Nightmare extends Helper {
1650
1647
  * @param {string }text to wait for.
1651
1648
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1652
1649
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
1653
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1650
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1654
1651
  *
1655
1652
  */
1656
1653
  async waitForText(text, sec, context = null) {
@@ -1680,7 +1677,7 @@ class Nightmare extends Helper {
1680
1677
  *
1681
1678
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1682
1679
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1683
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1680
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1684
1681
  *
1685
1682
  */
1686
1683
  waitForVisible(locator, sec) {
@@ -1708,7 +1705,7 @@ class Nightmare extends Helper {
1708
1705
  *
1709
1706
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1710
1707
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1711
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1708
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1712
1709
  *
1713
1710
  */
1714
1711
  async waitToHide(locator, sec = null) {
@@ -1725,7 +1722,7 @@ class Nightmare extends Helper {
1725
1722
  *
1726
1723
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1727
1724
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1728
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1725
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1729
1726
  *
1730
1727
  */
1731
1728
  waitForInvisible(locator, sec) {
@@ -1754,7 +1751,7 @@ class Nightmare extends Helper {
1754
1751
  *
1755
1752
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1756
1753
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1757
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1754
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1758
1755
  *
1759
1756
  */
1760
1757
  async waitForElement(locator, sec) {
@@ -1785,7 +1782,7 @@ class Nightmare extends Helper {
1785
1782
  *
1786
1783
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1787
1784
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1788
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1785
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1789
1786
  *
1790
1787
  */
1791
1788
  async waitForDetached(locator, sec) {
@@ -1806,7 +1803,7 @@ class Nightmare extends Helper {
1806
1803
  * ```js
1807
1804
  * I.refreshPage();
1808
1805
  * ```
1809
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1806
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1810
1807
  *
1811
1808
  */
1812
1809
  async refreshPage() {
@@ -1831,7 +1828,7 @@ class Nightmare extends Helper {
1831
1828
  *
1832
1829
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1833
1830
  * @param {string} fileName file name to save.
1834
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1831
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1835
1832
  *
1836
1833
  *
1837
1834
  */
@@ -1912,7 +1909,7 @@ class Nightmare extends Helper {
1912
1909
  *
1913
1910
  * @param {string} fileName file name to save.
1914
1911
  * @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
1915
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1912
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1916
1913
  *
1917
1914
  */
1918
1915
  async saveScreenshot(fileName, fullPage = this.options.fullPageScreenshots) {
@@ -1946,7 +1943,7 @@ class Nightmare extends Helper {
1946
1943
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
1947
1944
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
1948
1945
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
1949
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1946
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1950
1947
  *
1951
1948
  */
1952
1949
  async scrollTo(locator, offsetX = 0, offsetY = 0) {
@@ -1974,7 +1971,7 @@ class Nightmare extends Helper {
1974
1971
  * ```js
1975
1972
  * I.scrollPageToTop();
1976
1973
  * ```
1977
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1974
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1978
1975
  *
1979
1976
  */
1980
1977
  async scrollPageToTop() {
@@ -1987,7 +1984,7 @@ class Nightmare extends Helper {
1987
1984
  * ```js
1988
1985
  * I.scrollPageToBottom();
1989
1986
  * ```
1990
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1987
+ * @returns {Promise<void>} automatically synchronized promise through #recorder
1991
1988
  *
1992
1989
  */
1993
1990
  async scrollPageToBottom() {