codeceptjs 3.5.8 → 3.5.9-beta.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 (124) hide show
  1. package/README.md +1 -1
  2. package/docs/build/Appium.js +24 -24
  3. package/docs/build/Nightmare.js +51 -52
  4. package/docs/build/Playwright.js +137 -76
  5. package/docs/build/Protractor.js +64 -65
  6. package/docs/build/Puppeteer.js +74 -75
  7. package/docs/build/TestCafe.js +54 -55
  8. package/docs/build/WebDriver.js +79 -80
  9. package/docs/changelog.md +1 -571
  10. package/docs/community-helpers.md +4 -8
  11. package/docs/examples.md +2 -8
  12. package/docs/helpers/Appium.md +19 -19
  13. package/docs/helpers/Nightmare.md +75 -77
  14. package/docs/helpers/Playwright.md +350 -314
  15. package/docs/helpers/Protractor.md +153 -155
  16. package/docs/helpers/Puppeteer.md +146 -148
  17. package/docs/helpers/TestCafe.md +124 -126
  18. package/docs/helpers/WebDriver.md +155 -157
  19. package/docs/internal-api.md +111 -0
  20. package/docs/plugins.md +4 -2
  21. package/docs/webapi/amOnPage.mustache +1 -1
  22. package/docs/webapi/appendField.mustache +1 -1
  23. package/docs/webapi/attachFile.mustache +1 -1
  24. package/docs/webapi/blur.mustache +1 -1
  25. package/docs/webapi/checkOption.mustache +1 -1
  26. package/docs/webapi/clearCookie.mustache +1 -2
  27. package/docs/webapi/clearField.mustache +1 -1
  28. package/docs/webapi/click.mustache +1 -1
  29. package/docs/webapi/clickLink.mustache +1 -1
  30. package/docs/webapi/closeCurrentTab.mustache +1 -1
  31. package/docs/webapi/closeOtherTabs.mustache +1 -1
  32. package/docs/webapi/dontSee.mustache +1 -1
  33. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  34. package/docs/webapi/dontSeeCookie.mustache +1 -1
  35. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  36. package/docs/webapi/dontSeeElement.mustache +1 -1
  37. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  38. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  39. package/docs/webapi/dontSeeInField.mustache +1 -1
  40. package/docs/webapi/dontSeeInSource.mustache +1 -1
  41. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  42. package/docs/webapi/doubleClick.mustache +1 -1
  43. package/docs/webapi/downloadFile.mustache +1 -1
  44. package/docs/webapi/dragAndDrop.mustache +1 -1
  45. package/docs/webapi/dragSlider.mustache +1 -1
  46. package/docs/webapi/fillField.mustache +1 -1
  47. package/docs/webapi/focus.mustache +1 -1
  48. package/docs/webapi/forceClick.mustache +1 -1
  49. package/docs/webapi/forceRightClick.mustache +1 -1
  50. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  51. package/docs/webapi/moveCursorTo.mustache +1 -1
  52. package/docs/webapi/openNewTab.mustache +1 -1
  53. package/docs/webapi/pressKey.mustache +1 -1
  54. package/docs/webapi/pressKeyDown.mustache +1 -1
  55. package/docs/webapi/pressKeyUp.mustache +1 -1
  56. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  57. package/docs/webapi/refreshPage.mustache +1 -1
  58. package/docs/webapi/resizeWindow.mustache +1 -1
  59. package/docs/webapi/rightClick.mustache +1 -1
  60. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  61. package/docs/webapi/saveScreenshot.mustache +1 -1
  62. package/docs/webapi/say.mustache +1 -1
  63. package/docs/webapi/scrollIntoView.mustache +1 -1
  64. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  65. package/docs/webapi/scrollPageToTop.mustache +1 -1
  66. package/docs/webapi/scrollTo.mustache +1 -1
  67. package/docs/webapi/see.mustache +1 -1
  68. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  69. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  70. package/docs/webapi/seeCookie.mustache +1 -1
  71. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  72. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  73. package/docs/webapi/seeElement.mustache +1 -1
  74. package/docs/webapi/seeElementInDOM.mustache +1 -1
  75. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  76. package/docs/webapi/seeInField.mustache +1 -1
  77. package/docs/webapi/seeInPopup.mustache +1 -1
  78. package/docs/webapi/seeInSource.mustache +1 -1
  79. package/docs/webapi/seeInTitle.mustache +1 -1
  80. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  81. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  82. package/docs/webapi/seeTextEquals.mustache +1 -1
  83. package/docs/webapi/seeTitleEquals.mustache +1 -1
  84. package/docs/webapi/selectOption.mustache +1 -1
  85. package/docs/webapi/setCookie.mustache +1 -1
  86. package/docs/webapi/setGeoLocation.mustache +1 -1
  87. package/docs/webapi/switchTo.mustache +1 -1
  88. package/docs/webapi/switchToNextTab.mustache +1 -1
  89. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  90. package/docs/webapi/type.mustache +1 -1
  91. package/docs/webapi/uncheckOption.mustache +1 -1
  92. package/docs/webapi/wait.mustache +1 -1
  93. package/docs/webapi/waitForClickable.mustache +1 -1
  94. package/docs/webapi/waitForDetached.mustache +1 -1
  95. package/docs/webapi/waitForElement.mustache +1 -1
  96. package/docs/webapi/waitForEnabled.mustache +1 -1
  97. package/docs/webapi/waitForFunction.mustache +1 -1
  98. package/docs/webapi/waitForInvisible.mustache +1 -1
  99. package/docs/webapi/waitForText.mustache +1 -1
  100. package/docs/webapi/waitForValue.mustache +1 -1
  101. package/docs/webapi/waitForVisible.mustache +1 -1
  102. package/docs/webapi/waitInUrl.mustache +1 -1
  103. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  104. package/docs/webapi/waitToHide.mustache +1 -1
  105. package/docs/webapi/waitUrlEquals.mustache +1 -1
  106. package/lib/command/run-multiple.js +1 -1
  107. package/lib/command/run-workers.js +30 -4
  108. package/lib/command/workers/runTests.js +23 -0
  109. package/lib/event.js +2 -0
  110. package/lib/helper/Appium.js +10 -10
  111. package/lib/helper/Playwright.js +78 -7
  112. package/lib/helper/Puppeteer.js +7 -3
  113. package/lib/helper/WebDriver.js +6 -2
  114. package/lib/interfaces/gherkin.js +8 -1
  115. package/lib/interfaces/scenarioConfig.js +1 -0
  116. package/lib/locator.js +2 -2
  117. package/lib/plugin/autoLogin.js +4 -2
  118. package/lib/plugin/retryFailedStep.js +5 -0
  119. package/lib/plugin/stepByStepReport.js +2 -2
  120. package/lib/ui.js +1 -0
  121. package/lib/workers.js +2 -0
  122. package/package.json +4 -4
  123. package/typings/promiseBasedTypes.d.ts +449 -1008
  124. package/typings/types.d.ts +452 -425
package/README.md CHANGED
@@ -323,9 +323,9 @@ Thanks all to those who are and will have contributing to this awesome project!
323
323
  <a href="https://github.com/ngraf"><img src="https://avatars.githubusercontent.com/u/7094389?v=4" title="ngraf" width="80" height="80"></a>
324
324
  <a href="https://github.com/maojunxyz"><img src="https://avatars.githubusercontent.com/u/28778042?v=4" title="maojunxyz" width="80" height="80"></a>
325
325
  <a href="https://github.com/abhimanyupandian"><img src="https://avatars.githubusercontent.com/u/36107381?v=4" title="abhimanyupandian" width="80" height="80"></a>
326
+ <a href="https://github.com/hatufacci"><img src="https://avatars.githubusercontent.com/u/4963181?v=4" title="hatufacci" width="80" height="80"></a>
326
327
  <a href="https://github.com/martomo"><img src="https://avatars.githubusercontent.com/u/1850135?v=4" title="martomo" width="80" height="80"></a>
327
328
  <a href="https://github.com/denis-sokolov"><img src="https://avatars.githubusercontent.com/u/113721?v=4" title="denis-sokolov" width="80" height="80"></a>
328
- <a href="https://github.com/lennym"><img src="https://avatars.githubusercontent.com/u/117398?v=4" title="lennym" width="80" height="80"></a>
329
329
 
330
330
  [//]: contributor-faces
331
331
 
@@ -368,7 +368,7 @@ class Appium extends Webdriver {
368
368
  if (context.web) return this.switchToWeb(context.web);
369
369
  if (context.webview) return this.switchToWeb(context.webview);
370
370
  }
371
- return this._switchToContext(context);
371
+ return this.switchToContext(context);
372
372
  }
373
373
 
374
374
  _withinEnd() {
@@ -834,7 +834,7 @@ class Appium extends Webdriver {
834
834
  *
835
835
  * @param {*} context the context to switch to
836
836
  */
837
- async _switchToContext(context) {
837
+ async switchToContext(context) {
838
838
  return this.browser.switchContext(context);
839
839
  }
840
840
 
@@ -858,11 +858,11 @@ class Appium extends Webdriver {
858
858
  this.isWeb = true;
859
859
  this.defaultContext = 'body';
860
860
 
861
- if (context) return this._switchToContext(context);
861
+ if (context) return this.switchToContext(context);
862
862
  const contexts = await this.grabAllContexts();
863
863
  this.debugSection('Contexts', contexts.toString());
864
864
  for (const idx in contexts) {
865
- if (contexts[idx].match(/^WEBVIEW/)) return this._switchToContext(contexts[idx]);
865
+ if (contexts[idx].match(/^WEBVIEW/)) return this.switchToContext(contexts[idx]);
866
866
  }
867
867
 
868
868
  throw new Error('No WEBVIEW could be guessed, please specify one in params');
@@ -885,8 +885,8 @@ class Appium extends Webdriver {
885
885
  this.isWeb = false;
886
886
  this.defaultContext = '//*';
887
887
 
888
- if (context) return this._switchToContext(context);
889
- return this._switchToContext('NATIVE_APP');
888
+ if (context) return this.switchToContext(context);
889
+ return this.switchToContext('NATIVE_APP');
890
890
  }
891
891
 
892
892
  /**
@@ -1442,7 +1442,7 @@ class Appium extends Webdriver {
1442
1442
  * ```
1443
1443
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
1444
1444
  * @param {string} value text value to append.
1445
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1445
+ * @returns {void} automatically synchronized promise through #recorder
1446
1446
  *
1447
1447
  *
1448
1448
  */
@@ -1464,7 +1464,7 @@ class Appium extends Webdriver {
1464
1464
  * ```
1465
1465
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
1466
1466
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
1467
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1467
+ * @returns {void} automatically synchronized promise through #recorder
1468
1468
  *
1469
1469
  *
1470
1470
  */
@@ -1498,7 +1498,7 @@ class Appium extends Webdriver {
1498
1498
  *
1499
1499
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1500
1500
  * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1501
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1501
+ * @returns {void} automatically synchronized promise through #recorder
1502
1502
  *
1503
1503
  *
1504
1504
  */
@@ -1517,7 +1517,7 @@ class Appium extends Webdriver {
1517
1517
  * ```
1518
1518
  *
1519
1519
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1520
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1520
+ * @returns {void} automatically synchronized promise through #recorder
1521
1521
  *
1522
1522
  *
1523
1523
  */
@@ -1534,7 +1534,7 @@ class Appium extends Webdriver {
1534
1534
  * ```
1535
1535
  *
1536
1536
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
1537
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1537
+ * @returns {void} automatically synchronized promise through #recorder
1538
1538
  *
1539
1539
  */
1540
1540
  async dontSeeElement(locator) {
@@ -1553,7 +1553,7 @@ class Appium extends Webdriver {
1553
1553
  *
1554
1554
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1555
1555
  * @param {CodeceptJS.StringOrSecret} value value to check.
1556
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1556
+ * @returns {void} automatically synchronized promise through #recorder
1557
1557
  *
1558
1558
  *
1559
1559
  */
@@ -1574,7 +1574,7 @@ class Appium extends Webdriver {
1574
1574
  *
1575
1575
  * @param {string} text which is not present.
1576
1576
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
1577
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1577
+ * @returns {void} automatically synchronized promise through #recorder
1578
1578
  *
1579
1579
  */
1580
1580
  async dontSee(text, context = null) {
@@ -1598,7 +1598,7 @@ class Appium extends Webdriver {
1598
1598
  * ```
1599
1599
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1600
1600
  * @param {CodeceptJS.StringOrSecret} value text value to fill.
1601
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1601
+ * @returns {void} automatically synchronized promise through #recorder
1602
1602
  *
1603
1603
  *
1604
1604
  */
@@ -1760,7 +1760,7 @@ class Appium extends Webdriver {
1760
1760
  *
1761
1761
  * @param {LocatorOrString} locator located by CSS|XPath|strict locator.
1762
1762
  * @param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
1763
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1763
+ * @returns {void} automatically synchronized promise through #recorder
1764
1764
  *
1765
1765
  *
1766
1766
  * Supported only for web testing
@@ -1779,7 +1779,7 @@ class Appium extends Webdriver {
1779
1779
  * ```
1780
1780
  *
1781
1781
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1782
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1782
+ * @returns {void} automatically synchronized promise through #recorder
1783
1783
  *
1784
1784
  *
1785
1785
  */
@@ -1796,7 +1796,7 @@ class Appium extends Webdriver {
1796
1796
  * I.seeElement('#modal');
1797
1797
  * ```
1798
1798
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
1799
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1799
+ * @returns {void} automatically synchronized promise through #recorder
1800
1800
  *
1801
1801
  *
1802
1802
  */
@@ -1817,7 +1817,7 @@ class Appium extends Webdriver {
1817
1817
  * ```
1818
1818
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1819
1819
  * @param {CodeceptJS.StringOrSecret} value value to check.
1820
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1820
+ * @returns {void} automatically synchronized promise through #recorder
1821
1821
  *
1822
1822
  *
1823
1823
  */
@@ -1838,7 +1838,7 @@ class Appium extends Webdriver {
1838
1838
  * ```
1839
1839
  * @param {string} text expected on page.
1840
1840
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1841
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1841
+ * @returns {void} automatically synchronized promise through #recorder
1842
1842
  *
1843
1843
  *
1844
1844
  */
@@ -1868,7 +1868,7 @@ class Appium extends Webdriver {
1868
1868
  * ```
1869
1869
  * @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
1870
1870
  * @param {string|Array<*>} option visible text or value of option.
1871
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1871
+ * @returns {void} automatically synchronized promise through #recorder
1872
1872
  *
1873
1873
  *
1874
1874
  * Supported only for web testing
@@ -1889,7 +1889,7 @@ class Appium extends Webdriver {
1889
1889
  *
1890
1890
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1891
1891
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1892
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1892
+ * @returns {void} automatically synchronized promise through #recorder
1893
1893
  *
1894
1894
  *
1895
1895
  */
@@ -1908,7 +1908,7 @@ class Appium extends Webdriver {
1908
1908
  *
1909
1909
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1910
1910
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1911
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1911
+ * @returns {void} automatically synchronized promise through #recorder
1912
1912
  *
1913
1913
  *
1914
1914
  */
@@ -1927,7 +1927,7 @@ class Appium extends Webdriver {
1927
1927
  *
1928
1928
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1929
1929
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1930
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1930
+ * @returns {void} automatically synchronized promise through #recorder
1931
1931
  *
1932
1932
  *
1933
1933
  */
@@ -1949,7 +1949,7 @@ class Appium extends Webdriver {
1949
1949
  * @param {string }text to wait for.
1950
1950
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1951
1951
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
1952
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1952
+ * @returns {void} automatically synchronized promise through #recorder
1953
1953
  *
1954
1954
  *
1955
1955
  */
@@ -406,7 +406,7 @@ class Nightmare extends Helper {
406
406
  * ```
407
407
  *
408
408
  * @param {string} url url path or global url.
409
- * @returns {Promise<void>} automatically synchronized promise through #recorder
409
+ * @returns {void} automatically synchronized promise through #recorder
410
410
  *
411
411
  * @param {?object} headers list of request headers can be passed
412
412
  *
@@ -435,7 +435,7 @@ class Nightmare extends Helper {
435
435
  * ```
436
436
  *
437
437
  * @param {string} text text value to check.
438
- * @returns {Promise<void>} automatically synchronized promise through #recorder
438
+ * @returns {void} automatically synchronized promise through #recorder
439
439
  *
440
440
  */
441
441
  async seeInTitle(text) {
@@ -451,7 +451,7 @@ class Nightmare extends Helper {
451
451
  * ```
452
452
  *
453
453
  * @param {string} text value to check.
454
- * @returns {Promise<void>} automatically synchronized promise through #recorder
454
+ * @returns {void} automatically synchronized promise through #recorder
455
455
  *
456
456
  */
457
457
  async dontSeeInTitle(text) {
@@ -496,7 +496,7 @@ class Nightmare extends Helper {
496
496
  * ```
497
497
  *
498
498
  * @param {string} url a fragment to check
499
- * @returns {Promise<void>} automatically synchronized promise through #recorder
499
+ * @returns {void} automatically synchronized promise through #recorder
500
500
  *
501
501
  */
502
502
  async seeInCurrentUrl(url) {
@@ -508,7 +508,7 @@ class Nightmare extends Helper {
508
508
  * Checks that current url does not contain a provided fragment.
509
509
  *
510
510
  * @param {string} url value to check.
511
- * @returns {Promise<void>} automatically synchronized promise through #recorder
511
+ * @returns {void} automatically synchronized promise through #recorder
512
512
  *
513
513
  */
514
514
  async dontSeeInCurrentUrl(url) {
@@ -527,7 +527,7 @@ class Nightmare extends Helper {
527
527
  * ```
528
528
  *
529
529
  * @param {string} url value to check.
530
- * @returns {Promise<void>} automatically synchronized promise through #recorder
530
+ * @returns {void} automatically synchronized promise through #recorder
531
531
  *
532
532
  */
533
533
  async seeCurrentUrlEquals(url) {
@@ -545,7 +545,7 @@ class Nightmare extends Helper {
545
545
  * ```
546
546
  *
547
547
  * @param {string} url value to check.
548
- * @returns {Promise<void>} automatically synchronized promise through #recorder
548
+ * @returns {void} automatically synchronized promise through #recorder
549
549
  *
550
550
  */
551
551
  async dontSeeCurrentUrlEquals(url) {
@@ -564,7 +564,7 @@ class Nightmare extends Helper {
564
564
  * ```
565
565
  * @param {string} text expected on page.
566
566
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
567
- * @returns {Promise<void>} automatically synchronized promise through #recorder
567
+ * @returns {void} automatically synchronized promise through #recorder
568
568
  *
569
569
  */
570
570
  async see(text, context = null) {
@@ -582,7 +582,7 @@ class Nightmare extends Helper {
582
582
  *
583
583
  * @param {string} text which is not present.
584
584
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
585
- * @returns {Promise<void>} automatically synchronized promise through #recorder
585
+ * @returns {void} automatically synchronized promise through #recorder
586
586
  *
587
587
  */
588
588
  dontSee(text, context = null) {
@@ -597,7 +597,7 @@ class Nightmare extends Helper {
597
597
  * I.seeElement('#modal');
598
598
  * ```
599
599
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
600
- * @returns {Promise<void>} automatically synchronized promise through #recorder
600
+ * @returns {void} automatically synchronized promise through #recorder
601
601
  *
602
602
  */
603
603
  async seeElement(locator) {
@@ -616,7 +616,7 @@ class Nightmare extends Helper {
616
616
  * ```
617
617
  *
618
618
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
619
- * @returns {Promise<void>} automatically synchronized promise through #recorder
619
+ * @returns {void} automatically synchronized promise through #recorder
620
620
  *
621
621
  */
622
622
  async dontSeeElement(locator) {
@@ -636,7 +636,7 @@ class Nightmare extends Helper {
636
636
  * I.seeElementInDOM('#modal');
637
637
  * ```
638
638
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
639
- * @returns {Promise<void>} automatically synchronized promise through #recorder
639
+ * @returns {void} automatically synchronized promise through #recorder
640
640
  *
641
641
  */
642
642
  async seeElementInDOM(locator) {
@@ -653,7 +653,7 @@ class Nightmare extends Helper {
653
653
  * ```
654
654
  *
655
655
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
656
- * @returns {Promise<void>} automatically synchronized promise through #recorder
656
+ * @returns {void} automatically synchronized promise through #recorder
657
657
  *
658
658
  */
659
659
  async dontSeeElementInDOM(locator) {
@@ -669,7 +669,7 @@ class Nightmare extends Helper {
669
669
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
670
670
  * ```
671
671
  * @param {string} text value to check.
672
- * @returns {Promise<void>} automatically synchronized promise through #recorder
672
+ * @returns {void} automatically synchronized promise through #recorder
673
673
  *
674
674
  */
675
675
  async seeInSource(text) {
@@ -685,7 +685,7 @@ class Nightmare extends Helper {
685
685
  * ```
686
686
  *
687
687
  * @param {string} value to check.
688
- * @returns {Promise<void>} automatically synchronized promise through #recorder
688
+ * @returns {void} automatically synchronized promise through #recorder
689
689
  *
690
690
  */
691
691
  async dontSeeInSource(text) {
@@ -704,7 +704,7 @@ class Nightmare extends Helper {
704
704
  *
705
705
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
706
706
  * @param {number} num number of elements.
707
- * @returns {Promise<void>} automatically synchronized promise through #recorder
707
+ * @returns {void} automatically synchronized promise through #recorder
708
708
  *
709
709
  */
710
710
  async seeNumberOfElements(locator, num) {
@@ -722,7 +722,7 @@ class Nightmare extends Helper {
722
722
  *
723
723
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
724
724
  * @param {number} num number of elements.
725
- * @returns {Promise<void>} automatically synchronized promise through #recorder
725
+ * @returns {void} automatically synchronized promise through #recorder
726
726
  *
727
727
  */
728
728
  async seeNumberOfVisibleElements(locator, num) {
@@ -777,7 +777,7 @@ class Nightmare extends Helper {
777
777
  *
778
778
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
779
779
  * @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
780
- * @returns {Promise<void>} automatically synchronized promise through #recorder
780
+ * @returns {void} automatically synchronized promise through #recorder
781
781
  *
782
782
  */
783
783
  async click(locator, context = null) {
@@ -800,7 +800,7 @@ class Nightmare extends Helper {
800
800
  *
801
801
  * @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
802
802
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
803
- * @returns {Promise<void>} automatically synchronized promise through #recorder
803
+ * @returns {void} automatically synchronized promise through #recorder
804
804
  *
805
805
  */
806
806
  async doubleClick(locator, context = null) {
@@ -824,7 +824,7 @@ class Nightmare extends Helper {
824
824
  *
825
825
  * @param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
826
826
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
827
- * @returns {Promise<void>} automatically synchronized promise through #recorder
827
+ * @returns {void} automatically synchronized promise through #recorder
828
828
  *
829
829
  */
830
830
  async rightClick(locator, context = null) {
@@ -846,7 +846,7 @@ class Nightmare extends Helper {
846
846
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
847
847
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
848
848
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
849
- * @returns {Promise<void>} automatically synchronized promise through #recorder
849
+ * @returns {void} automatically synchronized promise through #recorder
850
850
  *
851
851
  */
852
852
  async moveCursorTo(locator, offsetX = 0, offsetY = 0) {
@@ -934,7 +934,7 @@ class Nightmare extends Helper {
934
934
  *
935
935
  * @param {number} width width in pixels or `maximize`.
936
936
  * @param {number} height height in pixels.
937
- * @returns {Promise<void>} automatically synchronized promise through #recorder
937
+ * @returns {void} automatically synchronized promise through #recorder
938
938
  *
939
939
  */
940
940
  async resizeWindow(width, height) {
@@ -957,7 +957,7 @@ class Nightmare extends Helper {
957
957
  * ```
958
958
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
959
959
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
960
- * @returns {Promise<void>} automatically synchronized promise through #recorder
960
+ * @returns {void} automatically synchronized promise through #recorder
961
961
  *
962
962
  */
963
963
  async checkOption(field, context = null) {
@@ -980,7 +980,7 @@ class Nightmare extends Helper {
980
980
  * ```
981
981
  * @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
982
982
  * @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
983
- * @returns {Promise<void>} automatically synchronized promise through #recorder
983
+ * @returns {void} automatically synchronized promise through #recorder
984
984
  *
985
985
  */
986
986
  async uncheckOption(field, context = null) {
@@ -1006,7 +1006,7 @@ class Nightmare extends Helper {
1006
1006
  * ```
1007
1007
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1008
1008
  * @param {CodeceptJS.StringOrSecret} value text value to fill.
1009
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1009
+ * @returns {void} automatically synchronized promise through #recorder
1010
1010
  *
1011
1011
  */
1012
1012
  async fillField(field, value) {
@@ -1025,7 +1025,7 @@ class Nightmare extends Helper {
1025
1025
  * I.clearField('#email');
1026
1026
  * ```
1027
1027
  * @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
1028
- * @returns {Promise<void>} automatically synchronized promise through #recorder.
1028
+ * @returns {void} automatically synchronized promise through #recorder.
1029
1029
  *
1030
1030
  */
1031
1031
  async clearField(field) {
@@ -1043,7 +1043,7 @@ class Nightmare extends Helper {
1043
1043
  * ```
1044
1044
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
1045
1045
  * @param {string} value text value to append.
1046
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1046
+ * @returns {void} automatically synchronized promise through #recorder
1047
1047
  *
1048
1048
  */
1049
1049
  async appendField(field, value) {
@@ -1065,7 +1065,7 @@ class Nightmare extends Helper {
1065
1065
  * ```
1066
1066
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1067
1067
  * @param {CodeceptJS.StringOrSecret} value value to check.
1068
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1068
+ * @returns {void} automatically synchronized promise through #recorder
1069
1069
  *
1070
1070
  */
1071
1071
  async seeInField(field, value) {
@@ -1084,7 +1084,7 @@ class Nightmare extends Helper {
1084
1084
  *
1085
1085
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1086
1086
  * @param {CodeceptJS.StringOrSecret} value value to check.
1087
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1087
+ * @returns {void} automatically synchronized promise through #recorder
1088
1088
  *
1089
1089
  */
1090
1090
  async dontSeeInField(field, value) {
@@ -1130,7 +1130,7 @@ class Nightmare extends Helper {
1130
1130
  * ```
1131
1131
  *
1132
1132
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1133
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1133
+ * @returns {void} automatically synchronized promise through #recorder
1134
1134
  *
1135
1135
  */
1136
1136
  async seeCheckboxIsChecked(field) {
@@ -1147,7 +1147,7 @@ class Nightmare extends Helper {
1147
1147
  * ```
1148
1148
  *
1149
1149
  * @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
1150
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1150
+ * @returns {void} automatically synchronized promise through #recorder
1151
1151
  *
1152
1152
  */
1153
1153
  async dontSeeCheckboxIsChecked(field) {
@@ -1166,7 +1166,7 @@ class Nightmare extends Helper {
1166
1166
  *
1167
1167
  * @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
1168
1168
  * @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
1169
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1169
+ * @returns {void} automatically synchronized promise through #recorder
1170
1170
  *
1171
1171
  *
1172
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))
@@ -1441,7 +1441,7 @@ class Nightmare extends Helper {
1441
1441
  * ```
1442
1442
  * @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
1443
1443
  * @param {string|Array<*>} option visible text or value of option.
1444
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1444
+ * @returns {void} automatically synchronized promise through #recorder
1445
1445
  *
1446
1446
  */
1447
1447
  async selectOption(select, option) {
@@ -1499,7 +1499,7 @@ class Nightmare extends Helper {
1499
1499
  * ```
1500
1500
  *
1501
1501
  * @param {Cookie|Array<Cookie>} cookie a cookie object or array of cookie objects.
1502
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1502
+ * @returns {void} automatically synchronized promise through #recorder
1503
1503
  *
1504
1504
  *
1505
1505
  * Wrapper for `.cookies.set(cookie)`.
@@ -1517,7 +1517,7 @@ class Nightmare extends Helper {
1517
1517
  * ```
1518
1518
  *
1519
1519
  * @param {string} name cookie name.
1520
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1520
+ * @returns {void} automatically synchronized promise through #recorder
1521
1521
  *
1522
1522
  *
1523
1523
  */
@@ -1534,7 +1534,7 @@ class Nightmare extends Helper {
1534
1534
  * ```
1535
1535
  *
1536
1536
  * @param {string} name cookie name.
1537
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1537
+ * @returns {void} automatically synchronized promise through #recorder
1538
1538
  *
1539
1539
  */
1540
1540
  async dontSeeCookie(name) {
@@ -1570,11 +1570,10 @@ class Nightmare extends Helper {
1570
1570
  *
1571
1571
  * ```js
1572
1572
  * I.clearCookie();
1573
- * I.clearCookie('test');
1573
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
1574
1574
  * ```
1575
1575
  *
1576
1576
  * @param {?string} [cookie=null] (optional, `null` by default) cookie name
1577
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1578
1577
  *
1579
1578
  */
1580
1579
  async clearCookie(cookie) {
@@ -1601,7 +1600,7 @@ class Nightmare extends Helper {
1601
1600
  * @param {string|function} fn to be executed in browser context.
1602
1601
  * @param {any[]|number} [argsOrSec] (optional, `1` by default) arguments for function or seconds.
1603
1602
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1604
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1603
+ * @returns {void} automatically synchronized promise through #recorder
1605
1604
  *
1606
1605
  */
1607
1606
  async waitForFunction(fn, argsOrSec = null, sec = null) {
@@ -1625,7 +1624,7 @@ class Nightmare extends Helper {
1625
1624
  * ```
1626
1625
  *
1627
1626
  * @param {number} sec number of second to wait.
1628
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1627
+ * @returns {void} automatically synchronized promise through #recorder
1629
1628
  *
1630
1629
  */
1631
1630
  async wait(sec) {
@@ -1647,7 +1646,7 @@ class Nightmare extends Helper {
1647
1646
  * @param {string }text to wait for.
1648
1647
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1649
1648
  * @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
1650
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1649
+ * @returns {void} automatically synchronized promise through #recorder
1651
1650
  *
1652
1651
  */
1653
1652
  async waitForText(text, sec, context = null) {
@@ -1677,7 +1676,7 @@ class Nightmare extends Helper {
1677
1676
  *
1678
1677
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1679
1678
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1680
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1679
+ * @returns {void} automatically synchronized promise through #recorder
1681
1680
  *
1682
1681
  */
1683
1682
  waitForVisible(locator, sec) {
@@ -1705,7 +1704,7 @@ class Nightmare extends Helper {
1705
1704
  *
1706
1705
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1707
1706
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1708
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1707
+ * @returns {void} automatically synchronized promise through #recorder
1709
1708
  *
1710
1709
  */
1711
1710
  async waitToHide(locator, sec = null) {
@@ -1722,7 +1721,7 @@ class Nightmare extends Helper {
1722
1721
  *
1723
1722
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1724
1723
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1725
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1724
+ * @returns {void} automatically synchronized promise through #recorder
1726
1725
  *
1727
1726
  */
1728
1727
  waitForInvisible(locator, sec) {
@@ -1751,7 +1750,7 @@ class Nightmare extends Helper {
1751
1750
  *
1752
1751
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1753
1752
  * @param {number} [sec] (optional, `1` by default) time in seconds to wait
1754
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1753
+ * @returns {void} automatically synchronized promise through #recorder
1755
1754
  *
1756
1755
  */
1757
1756
  async waitForElement(locator, sec) {
@@ -1782,7 +1781,7 @@ class Nightmare extends Helper {
1782
1781
  *
1783
1782
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1784
1783
  * @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
1785
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1784
+ * @returns {void} automatically synchronized promise through #recorder
1786
1785
  *
1787
1786
  */
1788
1787
  async waitForDetached(locator, sec) {
@@ -1803,7 +1802,7 @@ class Nightmare extends Helper {
1803
1802
  * ```js
1804
1803
  * I.refreshPage();
1805
1804
  * ```
1806
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1805
+ * @returns {void} automatically synchronized promise through #recorder
1807
1806
  *
1808
1807
  */
1809
1808
  async refreshPage() {
@@ -1828,7 +1827,7 @@ class Nightmare extends Helper {
1828
1827
  *
1829
1828
  * @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
1830
1829
  * @param {string} fileName file name to save.
1831
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1830
+ * @returns {void} automatically synchronized promise through #recorder
1832
1831
  *
1833
1832
  *
1834
1833
  */
@@ -1909,7 +1908,7 @@ class Nightmare extends Helper {
1909
1908
  *
1910
1909
  * @param {string} fileName file name to save.
1911
1910
  * @param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
1912
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1911
+ * @returns {void} automatically synchronized promise through #recorder
1913
1912
  *
1914
1913
  */
1915
1914
  async saveScreenshot(fileName, fullPage = this.options.fullPageScreenshots) {
@@ -1943,7 +1942,7 @@ class Nightmare extends Helper {
1943
1942
  * @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
1944
1943
  * @param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
1945
1944
  * @param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
1946
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1945
+ * @returns {void} automatically synchronized promise through #recorder
1947
1946
  *
1948
1947
  */
1949
1948
  async scrollTo(locator, offsetX = 0, offsetY = 0) {
@@ -1971,7 +1970,7 @@ class Nightmare extends Helper {
1971
1970
  * ```js
1972
1971
  * I.scrollPageToTop();
1973
1972
  * ```
1974
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1973
+ * @returns {void} automatically synchronized promise through #recorder
1975
1974
  *
1976
1975
  */
1977
1976
  async scrollPageToTop() {
@@ -1984,7 +1983,7 @@ class Nightmare extends Helper {
1984
1983
  * ```js
1985
1984
  * I.scrollPageToBottom();
1986
1985
  * ```
1987
- * @returns {Promise<void>} automatically synchronized promise through #recorder
1986
+ * @returns {void} automatically synchronized promise through #recorder
1988
1987
  *
1989
1988
  */
1990
1989
  async scrollPageToBottom() {