codeceptjs 3.3.1 → 3.3.2

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 (108) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -25
  3. package/docs/build/Appium.js +18 -28
  4. package/docs/build/Nightmare.js +53 -53
  5. package/docs/build/Playwright.js +74 -99
  6. package/docs/build/Protractor.js +66 -66
  7. package/docs/build/Puppeteer.js +74 -74
  8. package/docs/build/REST.js +2 -2
  9. package/docs/build/TestCafe.js +53 -53
  10. package/docs/build/WebDriver.js +79 -81
  11. package/docs/changelog.md +7 -0
  12. package/docs/helpers/Appium.md +212 -268
  13. package/docs/helpers/Nightmare.md +92 -141
  14. package/docs/helpers/Playwright.md +266 -383
  15. package/docs/helpers/Puppeteer.md +171 -231
  16. package/docs/helpers/TestCafe.md +125 -174
  17. package/docs/helpers/WebDriver.md +184 -247
  18. package/docs/webapi/amOnPage.mustache +1 -1
  19. package/docs/webapi/appendField.mustache +1 -1
  20. package/docs/webapi/attachFile.mustache +1 -1
  21. package/docs/webapi/checkOption.mustache +1 -1
  22. package/docs/webapi/clearCookie.mustache +1 -1
  23. package/docs/webapi/clearField.mustache +1 -1
  24. package/docs/webapi/click.mustache +1 -1
  25. package/docs/webapi/clickLink.mustache +1 -1
  26. package/docs/webapi/closeCurrentTab.mustache +1 -1
  27. package/docs/webapi/closeOtherTabs.mustache +1 -1
  28. package/docs/webapi/dontSee.mustache +1 -1
  29. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  30. package/docs/webapi/dontSeeCookie.mustache +1 -1
  31. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  32. package/docs/webapi/dontSeeElement.mustache +1 -1
  33. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  34. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  35. package/docs/webapi/dontSeeInField.mustache +1 -1
  36. package/docs/webapi/dontSeeInSource.mustache +1 -1
  37. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  38. package/docs/webapi/doubleClick.mustache +1 -1
  39. package/docs/webapi/downloadFile.mustache +1 -1
  40. package/docs/webapi/dragAndDrop.mustache +1 -1
  41. package/docs/webapi/dragSlider.mustache +1 -1
  42. package/docs/webapi/executeAsyncScript.mustache +1 -1
  43. package/docs/webapi/executeScript.mustache +1 -1
  44. package/docs/webapi/fillField.mustache +1 -1
  45. package/docs/webapi/forceClick.mustache +1 -1
  46. package/docs/webapi/forceRightClick.mustache +1 -1
  47. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  48. package/docs/webapi/moveCursorTo.mustache +1 -1
  49. package/docs/webapi/openNewTab.mustache +1 -1
  50. package/docs/webapi/pressKey.mustache +1 -1
  51. package/docs/webapi/pressKeyDown.mustache +1 -1
  52. package/docs/webapi/pressKeyUp.mustache +1 -1
  53. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  54. package/docs/webapi/refreshPage.mustache +1 -1
  55. package/docs/webapi/resizeWindow.mustache +1 -1
  56. package/docs/webapi/rightClick.mustache +1 -1
  57. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  58. package/docs/webapi/saveScreenshot.mustache +1 -1
  59. package/docs/webapi/say.mustache +1 -1
  60. package/docs/webapi/scrollIntoView.mustache +1 -1
  61. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  62. package/docs/webapi/scrollPageToTop.mustache +1 -1
  63. package/docs/webapi/scrollTo.mustache +1 -1
  64. package/docs/webapi/see.mustache +1 -1
  65. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  66. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  67. package/docs/webapi/seeCookie.mustache +1 -1
  68. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  69. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  70. package/docs/webapi/seeElement.mustache +1 -1
  71. package/docs/webapi/seeElementInDOM.mustache +1 -1
  72. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  73. package/docs/webapi/seeInField.mustache +1 -1
  74. package/docs/webapi/seeInPopup.mustache +1 -1
  75. package/docs/webapi/seeInSource.mustache +1 -1
  76. package/docs/webapi/seeInTitle.mustache +1 -1
  77. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  78. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  79. package/docs/webapi/seeTextEquals.mustache +1 -1
  80. package/docs/webapi/seeTitleEquals.mustache +1 -1
  81. package/docs/webapi/selectOption.mustache +1 -1
  82. package/docs/webapi/setCookie.mustache +1 -1
  83. package/docs/webapi/setGeoLocation.mustache +1 -1
  84. package/docs/webapi/switchTo.mustache +1 -1
  85. package/docs/webapi/switchToNextTab.mustache +1 -1
  86. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  87. package/docs/webapi/type.mustache +1 -1
  88. package/docs/webapi/uncheckOption.mustache +1 -1
  89. package/docs/webapi/wait.mustache +1 -1
  90. package/docs/webapi/waitForClickable.mustache +1 -1
  91. package/docs/webapi/waitForDetached.mustache +1 -1
  92. package/docs/webapi/waitForElement.mustache +1 -1
  93. package/docs/webapi/waitForEnabled.mustache +1 -1
  94. package/docs/webapi/waitForFunction.mustache +1 -1
  95. package/docs/webapi/waitForInvisible.mustache +1 -1
  96. package/docs/webapi/waitForText.mustache +1 -1
  97. package/docs/webapi/waitForValue.mustache +1 -1
  98. package/docs/webapi/waitForVisible.mustache +1 -1
  99. package/docs/webapi/waitInUrl.mustache +1 -1
  100. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  101. package/docs/webapi/waitToHide.mustache +1 -1
  102. package/docs/webapi/waitUrlEquals.mustache +1 -1
  103. package/lib/helper/Appium.js +0 -10
  104. package/lib/helper/Playwright.js +3 -28
  105. package/lib/helper/REST.js +2 -2
  106. package/lib/helper/WebDriver.js +0 -2
  107. package/package.json +1 -1
  108. package/typings/types.d.ts +988 -517
@@ -406,7 +406,7 @@ class Nightmare extends Helper {
406
406
  * ```
407
407
  *
408
408
  * @param {string} url url path or global url.
409
- * @return {Promise<any>}
409
+ * @return {void} automatically synchronized promise with recorder #!
410
410
  * @param {?object} headers list of request headers can be passed
411
411
  *
412
412
  */
@@ -434,7 +434,7 @@ class Nightmare extends Helper {
434
434
  * ```
435
435
  *
436
436
  * @param {string} text text value to check.
437
- * @return {Promise<any>}
437
+ * [!] returns a _promise_ which is synchronized internally by recorder
438
438
  */
439
439
  async seeInTitle(text) {
440
440
  const title = await this.browser.title();
@@ -449,7 +449,7 @@ class Nightmare extends Helper {
449
449
  * ```
450
450
  *
451
451
  * @param {string} text value to check.
452
- * @return {Promise<any>}
452
+ * [!] returns a _promise_ which is synchronized internally by recorder
453
453
  */
454
454
  async dontSeeInTitle(text) {
455
455
  const title = await this.browser.title();
@@ -493,7 +493,7 @@ class Nightmare extends Helper {
493
493
  * ```
494
494
  *
495
495
  * @param {string} url a fragment to check
496
- * @return {Promise<any>}
496
+ * [!] returns a _promise_ which is synchronized internally by recorder
497
497
  */
498
498
  async seeInCurrentUrl(url) {
499
499
  const currentUrl = await this.browser.url();
@@ -504,7 +504,7 @@ class Nightmare extends Helper {
504
504
  * Checks that current url does not contain a provided fragment.
505
505
  *
506
506
  * @param {string} url value to check.
507
- * @return {Promise<any>}
507
+ * [!] returns a _promise_ which is synchronized internally by recorder
508
508
  */
509
509
  async dontSeeInCurrentUrl(url) {
510
510
  const currentUrl = await this.browser.url();
@@ -522,7 +522,7 @@ class Nightmare extends Helper {
522
522
  * ```
523
523
  *
524
524
  * @param {string} url value to check.
525
- * @return {Promise<any>}
525
+ * [!] returns a _promise_ which is synchronized internally by recorder
526
526
  */
527
527
  async seeCurrentUrlEquals(url) {
528
528
  const currentUrl = await this.browser.url();
@@ -539,7 +539,7 @@ class Nightmare extends Helper {
539
539
  * ```
540
540
  *
541
541
  * @param {string} url value to check.
542
- * @return {Promise<any>}
542
+ * [!] returns a _promise_ which is synchronized internally by recorder
543
543
  */
544
544
  async dontSeeCurrentUrlEquals(url) {
545
545
  const currentUrl = await this.browser.url();
@@ -557,7 +557,7 @@ class Nightmare extends Helper {
557
557
  * ```
558
558
  * @param {string} text expected on page.
559
559
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
560
- * @return {Promise<any>}
560
+ * [!] returns a _promise_ which is synchronized internally by recorder
561
561
  */
562
562
  async see(text, context = null) {
563
563
  return proceedSee.call(this, 'assert', text, context);
@@ -574,7 +574,7 @@ class Nightmare extends Helper {
574
574
  *
575
575
  * @param {string} text which is not present.
576
576
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
577
- * @return {Promise<any>}
577
+ * [!] returns a _promise_ which is synchronized internally by recorder
578
578
  */
579
579
  dontSee(text, context = null) {
580
580
  return proceedSee.call(this, 'negate', text, context);
@@ -588,7 +588,7 @@ class Nightmare extends Helper {
588
588
  * I.seeElement('#modal');
589
589
  * ```
590
590
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
591
- * @return {Promise<any>}
591
+ * [!] returns a _promise_ which is synchronized internally by recorder
592
592
  */
593
593
  async seeElement(locator) {
594
594
  locator = new Locator(locator, 'css');
@@ -606,7 +606,7 @@ class Nightmare extends Helper {
606
606
  * ```
607
607
  *
608
608
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
609
- * @return {Promise<any>}
609
+ * [!] returns a _promise_ which is synchronized internally by recorder
610
610
  */
611
611
  async dontSeeElement(locator) {
612
612
  locator = new Locator(locator, 'css');
@@ -625,7 +625,7 @@ class Nightmare extends Helper {
625
625
  * I.seeElementInDOM('#modal');
626
626
  * ```
627
627
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
628
- * @return {Promise<any>}
628
+ * [!] returns a _promise_ which is synchronized internally by recorder
629
629
  */
630
630
  async seeElementInDOM(locator) {
631
631
  locator = new Locator(locator, 'css');
@@ -641,7 +641,7 @@ class Nightmare extends Helper {
641
641
  * ```
642
642
  *
643
643
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
644
- * @return {Promise<any>}
644
+ * [!] returns a _promise_ which is synchronized internally by recorder
645
645
  */
646
646
  async dontSeeElementInDOM(locator) {
647
647
  locator = new Locator(locator, 'css');
@@ -656,7 +656,7 @@ class Nightmare extends Helper {
656
656
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
657
657
  * ```
658
658
  * @param {string} text value to check.
659
- * @return {Promise<any>}
659
+ * [!] returns a _promise_ which is synchronized internally by recorder
660
660
  */
661
661
  async seeInSource(text) {
662
662
  const source = await this.browser.evaluate(() => document.documentElement.outerHTML);
@@ -671,7 +671,7 @@ class Nightmare extends Helper {
671
671
  * ```
672
672
  *
673
673
  * @param {string} value to check.
674
- * @return {Promise<any>}
674
+ * [!] returns a _promise_ which is synchronized internally by recorder
675
675
  */
676
676
  async dontSeeInSource(text) {
677
677
  const source = await this.browser.evaluate(() => document.documentElement.outerHTML);
@@ -689,7 +689,7 @@ class Nightmare extends Helper {
689
689
  *
690
690
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
691
691
  * @param {number} num number of elements.
692
- * @return {Promise<any>}
692
+ * [!] returns a _promise_ which is synchronized internally by recorder
693
693
  */
694
694
  async seeNumberOfElements(locator, num) {
695
695
  const elements = await this._locate(locator);
@@ -706,7 +706,7 @@ class Nightmare extends Helper {
706
706
  *
707
707
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
708
708
  * @param {number} num number of elements.
709
- * @return {Promise<any>}
709
+ * [!] returns a _promise_ which is synchronized internally by recorder
710
710
  */
711
711
  async seeNumberOfVisibleElements(locator, num) {
712
712
  const res = await this.grabNumberOfVisibleElements(locator);
@@ -760,7 +760,7 @@ class Nightmare extends Helper {
760
760
  *
761
761
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
762
762
  * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
763
- * @return {Promise<any>}
763
+ * [!] returns a _promise_ which is synchronized internally by recorder
764
764
  *
765
765
  */
766
766
  async click(locator, context = null) {
@@ -783,7 +783,7 @@ class Nightmare extends Helper {
783
783
  *
784
784
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
785
785
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
786
- * @return {Promise<any>}
786
+ * [!] returns a _promise_ which is synchronized internally by recorder
787
787
  */
788
788
  async doubleClick(locator, context = null) {
789
789
  const el = await findClickable.call(this, locator, context);
@@ -806,7 +806,7 @@ class Nightmare extends Helper {
806
806
  *
807
807
  * @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
808
808
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
809
- * @return {Promise<any>}
809
+ * [!] returns a _promise_ which is synchronized internally by recorder
810
810
  */
811
811
  async rightClick(locator, context = null) {
812
812
  const el = await findClickable.call(this, locator, context);
@@ -827,7 +827,7 @@ class Nightmare extends Helper {
827
827
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
828
828
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
829
829
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
830
- * @return {Promise<any>}
830
+ * [!] returns a _promise_ which is synchronized internally by recorder
831
831
  */
832
832
  async moveCursorTo(locator, offsetX = 0, offsetY = 0) {
833
833
  locator = new Locator(locator, 'css');
@@ -863,7 +863,7 @@ class Nightmare extends Helper {
863
863
  *
864
864
  * @param {string|function} fn function to be executed in browser context.
865
865
  * @param {...any} args to be passed to function.
866
- * @return {Promise<any>}
866
+ * [!] returns a _promise_ which is synchronized internally by recorder
867
867
  *
868
868
  *
869
869
  * Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
@@ -897,7 +897,7 @@ class Nightmare extends Helper {
897
897
  *
898
898
  * @param {string|function} fn function to be executed in browser context.
899
899
  * @param {...any} args to be passed to function.
900
- * @return {Promise<any>}
900
+ * [!] returns a _promise_ which is synchronized internally by recorder
901
901
  *
902
902
  *
903
903
  * Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
@@ -914,7 +914,7 @@ class Nightmare extends Helper {
914
914
  *
915
915
  * @param {number} width width in pixels or `maximize`.
916
916
  * @param {number} height height in pixels.
917
- * @return {Promise<any>}
917
+ * [!] returns a _promise_ which is synchronized internally by recorder
918
918
  */
919
919
  async resizeWindow(width, height) {
920
920
  if (width === 'maximize') {
@@ -936,7 +936,7 @@ class Nightmare extends Helper {
936
936
  * ```
937
937
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
938
938
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
939
- * @return {Promise<any>}
939
+ * [!] returns a _promise_ which is synchronized internally by recorder
940
940
  */
941
941
  async checkOption(field, context = null) {
942
942
  const els = await findCheckable.call(this, field, context);
@@ -958,7 +958,7 @@ class Nightmare extends Helper {
958
958
  * ```
959
959
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
960
960
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
961
- * @return {Promise<any>}
961
+ * [!] returns a _promise_ which is synchronized internally by recorder
962
962
  */
963
963
  async uncheckOption(field, context = null) {
964
964
  const els = await findCheckable.call(this, field, context);
@@ -983,7 +983,7 @@ class Nightmare extends Helper {
983
983
  * ```
984
984
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
985
985
  * @param {CodeceptJS.StringOrSecret} value text value to fill.
986
- * @return {Promise<any>}
986
+ * [!] returns a _promise_ which is synchronized internally by recorder
987
987
  */
988
988
  async fillField(field, value) {
989
989
  const el = await findField.call(this, field);
@@ -1001,7 +1001,7 @@ class Nightmare extends Helper {
1001
1001
  * I.clearField('#email');
1002
1002
  * ```
1003
1003
  * @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
1004
- * @return {Promise<any>}
1004
+ * [!] returns a _promise_ which is synchronized internally by recorder
1005
1005
  */
1006
1006
  async clearField(field) {
1007
1007
  return this.fillField(field, '');
@@ -1016,7 +1016,7 @@ class Nightmare extends Helper {
1016
1016
  * ```
1017
1017
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
1018
1018
  * @param {string} value text value to append.
1019
- * @return {Promise<any>}
1019
+ * [!] returns a _promise_ which is synchronized internally by recorder
1020
1020
  */
1021
1021
  async appendField(field, value) {
1022
1022
  const el = await findField.call(this, field);
@@ -1037,7 +1037,7 @@ class Nightmare extends Helper {
1037
1037
  * ```
1038
1038
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1039
1039
  * @param {string} value value to check.
1040
- * @return {Promise<any>}
1040
+ * [!] returns a _promise_ which is synchronized internally by recorder
1041
1041
  */
1042
1042
  async seeInField(field, value) {
1043
1043
  return proceedSeeInField.call(this, 'assert', field, value);
@@ -1054,7 +1054,7 @@ class Nightmare extends Helper {
1054
1054
  *
1055
1055
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1056
1056
  * @param {string} value value to check.
1057
- * @return {Promise<any>}
1057
+ * [!] returns a _promise_ which is synchronized internally by recorder
1058
1058
  */
1059
1059
  async dontSeeInField(field, value) {
1060
1060
  return proceedSeeInField.call(this, 'negate', field, value);
@@ -1098,7 +1098,7 @@ class Nightmare extends Helper {
1098
1098
  * ```
1099
1099
  *
1100
1100
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1101
- * @return {Promise<any>}
1101
+ * [!] returns a _promise_ which is synchronized internally by recorder
1102
1102
  */
1103
1103
  async seeCheckboxIsChecked(field) {
1104
1104
  return proceedIsChecked.call(this, 'assert', field);
@@ -1114,7 +1114,7 @@ class Nightmare extends Helper {
1114
1114
  * ```
1115
1115
  *
1116
1116
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1117
- * @return {Promise<any>}
1117
+ * [!] returns a _promise_ which is synchronized internally by recorder
1118
1118
  */
1119
1119
  async dontSeeCheckboxIsChecked(field) {
1120
1120
  return proceedIsChecked.call(this, 'negate', field);
@@ -1132,7 +1132,7 @@ class Nightmare extends Helper {
1132
1132
  *
1133
1133
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
1134
1134
  * @param {string} pathToFile local file path relative to codecept.json config file.
1135
- * @return {Promise<any>}
1135
+ * [!] returns a _promise_ which is synchronized internally by recorder
1136
1136
  *
1137
1137
  * 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))
1138
1138
  */
@@ -1406,7 +1406,7 @@ class Nightmare extends Helper {
1406
1406
  * ```
1407
1407
  * @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
1408
1408
  * @param {string|Array<*>} option visible text or value of option.
1409
- * @return {Promise<any>}
1409
+ * [!] returns a _promise_ which is synchronized internally by recorder
1410
1410
  */
1411
1411
  async selectOption(select, option) {
1412
1412
  const fetchAndCheckOption = function (el, locator) {
@@ -1463,7 +1463,7 @@ class Nightmare extends Helper {
1463
1463
  * ```
1464
1464
  *
1465
1465
  * @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
1466
- * @return {Promise<any>}
1466
+ * [!] returns a _promise_ which is synchronized internally by recorder
1467
1467
  *
1468
1468
  * Wrapper for `.cookies.set(cookie)`.
1469
1469
  * [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
@@ -1480,7 +1480,7 @@ class Nightmare extends Helper {
1480
1480
  * ```
1481
1481
  *
1482
1482
  * @param {string} name cookie name.
1483
- * @return {Promise<any>}
1483
+ * [!] returns a _promise_ which is synchronized internally by recorder
1484
1484
  *
1485
1485
  */
1486
1486
  async seeCookie(name) {
@@ -1496,7 +1496,7 @@ class Nightmare extends Helper {
1496
1496
  * ```
1497
1497
  *
1498
1498
  * @param {string} name cookie name.
1499
- * @return {Promise<any>}
1499
+ * [!] returns a _promise_ which is synchronized internally by recorder
1500
1500
  */
1501
1501
  async dontSeeCookie(name) {
1502
1502
  const res = await this.browser.cookies.get(name);
@@ -1535,7 +1535,7 @@ class Nightmare extends Helper {
1535
1535
  * ```
1536
1536
  *
1537
1537
  * @param {?string} [cookie=null] (optional, `null` by default) cookie name
1538
- * @return {Promise<any>}
1538
+ * [!] returns a _promise_ which is synchronized internally by recorder
1539
1539
  */
1540
1540
  async clearCookie(cookie) {
1541
1541
  if (!cookie) {
@@ -1561,7 +1561,7 @@ class Nightmare extends Helper {
1561
1561
  * @param {string|function} fn to be executed in browser context.
1562
1562
  * @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
1563
1563
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1564
- * @return {Promise<any>}
1564
+ * [!] returns a _promise_ which is synchronized internally by recorder
1565
1565
  */
1566
1566
  async waitForFunction(fn, argsOrSec = null, sec = null) {
1567
1567
  let args = [];
@@ -1584,7 +1584,7 @@ class Nightmare extends Helper {
1584
1584
  * ```
1585
1585
  *
1586
1586
  * @param {number} sec number of second to wait.
1587
- * @return {Promise<any>}
1587
+ * [!] returns a _promise_ which is synchronized internally by recorder
1588
1588
  */
1589
1589
  async wait(sec) {
1590
1590
  return new Promise(((done) => {
@@ -1605,7 +1605,7 @@ class Nightmare extends Helper {
1605
1605
  * @param {string }text to wait for.
1606
1606
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1607
1607
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
1608
- * @return {Promise<any>}
1608
+ * [!] returns a _promise_ which is synchronized internally by recorder
1609
1609
  */
1610
1610
  async waitForText(text, sec, context = null) {
1611
1611
  if (!context) {
@@ -1634,7 +1634,7 @@ class Nightmare extends Helper {
1634
1634
  *
1635
1635
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1636
1636
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1637
- * @return {Promise<any>}
1637
+ * [!] returns a _promise_ which is synchronized internally by recorder
1638
1638
  */
1639
1639
  waitForVisible(locator, sec) {
1640
1640
  this.browser.options.waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
@@ -1661,7 +1661,7 @@ class Nightmare extends Helper {
1661
1661
  *
1662
1662
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1663
1663
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1664
- * @return {Promise<any>}
1664
+ * [!] returns a _promise_ which is synchronized internally by recorder
1665
1665
  */
1666
1666
  async waitToHide(locator, sec = null) {
1667
1667
  return this.waitForInvisible(locator, sec);
@@ -1677,7 +1677,7 @@ class Nightmare extends Helper {
1677
1677
  *
1678
1678
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1679
1679
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1680
- * @return {Promise<any>}
1680
+ * [!] returns a _promise_ which is synchronized internally by recorder
1681
1681
  */
1682
1682
  waitForInvisible(locator, sec) {
1683
1683
  this.browser.options.waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
@@ -1705,7 +1705,7 @@ class Nightmare extends Helper {
1705
1705
  *
1706
1706
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1707
1707
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1708
- * @return {Promise<any>}
1708
+ * [!] returns a _promise_ which is synchronized internally by recorder
1709
1709
  */
1710
1710
  async waitForElement(locator, sec) {
1711
1711
  this.browser.options.waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
@@ -1735,7 +1735,7 @@ class Nightmare extends Helper {
1735
1735
  *
1736
1736
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1737
1737
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1738
- * @return {Promise<any>}
1738
+ * [!] returns a _promise_ which is synchronized internally by recorder
1739
1739
  */
1740
1740
  async waitForDetached(locator, sec) {
1741
1741
  this.browser.options.waitTimeout = sec ? sec * 1000 : this.options.waitForTimeout;
@@ -1755,7 +1755,7 @@ class Nightmare extends Helper {
1755
1755
  * ```js
1756
1756
  * I.refreshPage();
1757
1757
  * ```
1758
- * @return {Promise<any>}
1758
+ * [!] returns a _promise_ which is synchronized internally by recorder
1759
1759
  */
1760
1760
  async refreshPage() {
1761
1761
  return this.browser.refresh();
@@ -1779,7 +1779,7 @@ class Nightmare extends Helper {
1779
1779
  *
1780
1780
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1781
1781
  * @param {string} fileName file name to save.
1782
- * @return {Promise<any>}
1782
+ * [!] returns a _promise_ which is synchronized internally by recorder
1783
1783
  *
1784
1784
  */
1785
1785
  async saveElementScreenshot(locator, fileName) {
@@ -1859,7 +1859,7 @@ class Nightmare extends Helper {
1859
1859
  *
1860
1860
  * @param {string} fileName file name to save.
1861
1861
  * @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
1862
- * @return {Promise<any>}
1862
+ * [!] returns a _promise_ which is synchronized internally by recorder
1863
1863
  */
1864
1864
  async saveScreenshot(fileName, fullPage = this.options.fullPageScreenshots) {
1865
1865
  const outputFile = screenshotOutputFolder(fileName);
@@ -1892,7 +1892,7 @@ class Nightmare extends Helper {
1892
1892
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
1893
1893
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
1894
1894
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
1895
- * @return {Promise<any>}
1895
+ * [!] returns a _promise_ which is synchronized internally by recorder
1896
1896
  */
1897
1897
  async scrollTo(locator, offsetX = 0, offsetY = 0) {
1898
1898
  if (typeof locator === 'number' && typeof offsetX === 'number') {
@@ -1919,7 +1919,7 @@ class Nightmare extends Helper {
1919
1919
  * ```js
1920
1920
  * I.scrollPageToTop();
1921
1921
  * ```
1922
- * @return {Promise<any>}
1922
+ * [!] returns a _promise_ which is synchronized internally by recorder
1923
1923
  */
1924
1924
  async scrollPageToTop() {
1925
1925
  return this.executeScript(() => window.scrollTo(0, 0));
@@ -1931,7 +1931,7 @@ class Nightmare extends Helper {
1931
1931
  * ```js
1932
1932
  * I.scrollPageToBottom();
1933
1933
  * ```
1934
- * @return {Promise<any>}
1934
+ * [!] returns a _promise_ which is synchronized internally by recorder
1935
1935
  */
1936
1936
  async scrollPageToBottom() {
1937
1937
  /* eslint-disable prefer-arrow-callback, comma-dangle */