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
@@ -458,7 +458,7 @@ declare namespace CodeceptJS {
458
458
  * Switch to the specified context.
459
459
  * @param context - the context to switch to
460
460
  */
461
- _switchToContext(context: any): void;
461
+ switchToContext(context: any): void;
462
462
  /**
463
463
  * Switches to web context.
464
464
  * If no context is provided switches to the first detected web context
@@ -765,7 +765,7 @@ declare namespace CodeceptJS {
765
765
  * @param value - text value to append.
766
766
  * @returns automatically synchronized promise through #recorder
767
767
  */
768
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
768
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
769
769
  /**
770
770
  * Selects a checkbox or radio button.
771
771
  * Element is located by label or name or CSS or XPath.
@@ -781,7 +781,7 @@ declare namespace CodeceptJS {
781
781
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
782
782
  * @returns automatically synchronized promise through #recorder
783
783
  */
784
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
784
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
785
785
  /**
786
786
  * Perform a click on a link or a button, given by a locator.
787
787
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -808,7 +808,7 @@ declare namespace CodeceptJS {
808
808
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
809
809
  * @returns automatically synchronized promise through #recorder
810
810
  */
811
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
811
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
812
812
  /**
813
813
  * Verifies that the specified checkbox is not checked.
814
814
  *
@@ -820,7 +820,7 @@ declare namespace CodeceptJS {
820
820
  * @param field - located by label|name|CSS|XPath|strict locator.
821
821
  * @returns automatically synchronized promise through #recorder
822
822
  */
823
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
823
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
824
824
  /**
825
825
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
826
826
  *
@@ -830,7 +830,7 @@ declare namespace CodeceptJS {
830
830
  * @param locator - located by CSS|XPath|Strict locator.
831
831
  * @returns automatically synchronized promise through #recorder
832
832
  */
833
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
833
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
834
834
  /**
835
835
  * Checks that value of input field or textarea doesn't equal to given value
836
836
  * Opposite to `seeInField`.
@@ -843,7 +843,7 @@ declare namespace CodeceptJS {
843
843
  * @param value - value to check.
844
844
  * @returns automatically synchronized promise through #recorder
845
845
  */
846
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
846
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
847
847
  /**
848
848
  * Opposite to `see`. Checks that a text is not present on a page.
849
849
  * Use context parameter to narrow down the search.
@@ -856,7 +856,7 @@ declare namespace CodeceptJS {
856
856
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
857
857
  * @returns automatically synchronized promise through #recorder
858
858
  */
859
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
859
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
860
860
  /**
861
861
  * Fills a text field or textarea, after clearing its value, with the given string.
862
862
  * Field is located by name, label, CSS, or XPath.
@@ -875,7 +875,7 @@ declare namespace CodeceptJS {
875
875
  * @param value - text value to fill.
876
876
  * @returns automatically synchronized promise through #recorder
877
877
  */
878
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
878
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
879
879
  /**
880
880
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
881
881
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -986,7 +986,7 @@ declare namespace CodeceptJS {
986
986
  *
987
987
  * Supported only for web testing
988
988
  */
989
- scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<void>;
989
+ scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): void;
990
990
  /**
991
991
  * Verifies that the specified checkbox is checked.
992
992
  *
@@ -998,7 +998,7 @@ declare namespace CodeceptJS {
998
998
  * @param field - located by label|name|CSS|XPath|strict locator.
999
999
  * @returns automatically synchronized promise through #recorder
1000
1000
  */
1001
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
1001
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
1002
1002
  /**
1003
1003
  * Checks that a given Element is visible
1004
1004
  * Element is located by CSS or XPath.
@@ -1009,7 +1009,7 @@ declare namespace CodeceptJS {
1009
1009
  * @param locator - located by CSS|XPath|strict locator.
1010
1010
  * @returns automatically synchronized promise through #recorder
1011
1011
  */
1012
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
1012
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
1013
1013
  /**
1014
1014
  * Checks that the given input field or textarea equals to given value.
1015
1015
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -1024,7 +1024,7 @@ declare namespace CodeceptJS {
1024
1024
  * @param value - value to check.
1025
1025
  * @returns automatically synchronized promise through #recorder
1026
1026
  */
1027
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
1027
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
1028
1028
  /**
1029
1029
  * Checks that a page contains a visible text.
1030
1030
  * Use context parameter to narrow down the search.
@@ -1038,7 +1038,7 @@ declare namespace CodeceptJS {
1038
1038
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1039
1039
  * @returns automatically synchronized promise through #recorder
1040
1040
  */
1041
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
1041
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
1042
1042
  /**
1043
1043
  * Selects an option in a drop-down select.
1044
1044
  * Field is searched by label | name | CSS | XPath.
@@ -1065,7 +1065,7 @@ declare namespace CodeceptJS {
1065
1065
  *
1066
1066
  * Supported only for web testing
1067
1067
  */
1068
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
1068
+ selectOption(select: LocatorOrString, option: string | any[]): void;
1069
1069
  /**
1070
1070
  * Waits for element to be present on page (by default waits for 1sec).
1071
1071
  * Element can be located by CSS or XPath.
@@ -1078,7 +1078,7 @@ declare namespace CodeceptJS {
1078
1078
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
1079
1079
  * @returns automatically synchronized promise through #recorder
1080
1080
  */
1081
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
1081
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1082
1082
  /**
1083
1083
  * Waits for an element to become visible on a page (by default waits for 1sec).
1084
1084
  * Element can be located by CSS or XPath.
@@ -1090,7 +1090,7 @@ declare namespace CodeceptJS {
1090
1090
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1091
1091
  * @returns automatically synchronized promise through #recorder
1092
1092
  */
1093
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
1093
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1094
1094
  /**
1095
1095
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
1096
1096
  * Element can be located by CSS or XPath.
@@ -1102,7 +1102,7 @@ declare namespace CodeceptJS {
1102
1102
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1103
1103
  * @returns automatically synchronized promise through #recorder
1104
1104
  */
1105
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
1105
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1106
1106
  /**
1107
1107
  * Waits for a text to appear (by default waits for 1sec).
1108
1108
  * Element can be located by CSS or XPath.
@@ -1117,7 +1117,7 @@ declare namespace CodeceptJS {
1117
1117
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
1118
1118
  * @returns automatically synchronized promise through #recorder
1119
1119
  */
1120
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
1120
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
1121
1121
  }
1122
1122
  /**
1123
1123
  * This helper allows performing assertions based on Chai.
@@ -1844,7 +1844,7 @@ declare namespace CodeceptJS {
1844
1844
  * @param headers - list of request headers can be passed
1845
1845
  * @returns automatically synchronized promise through #recorder
1846
1846
  */
1847
- amOnPage(url: string, headers: any): Promise<void>;
1847
+ amOnPage(url: string, headers: any): void;
1848
1848
  /**
1849
1849
  * Checks that title contains text.
1850
1850
  *
@@ -1854,7 +1854,7 @@ declare namespace CodeceptJS {
1854
1854
  * @param text - text value to check.
1855
1855
  * @returns automatically synchronized promise through #recorder
1856
1856
  */
1857
- seeInTitle(text: string): Promise<void>;
1857
+ seeInTitle(text: string): void;
1858
1858
  /**
1859
1859
  * Checks that title does not contain text.
1860
1860
  *
@@ -1864,7 +1864,7 @@ declare namespace CodeceptJS {
1864
1864
  * @param text - value to check.
1865
1865
  * @returns automatically synchronized promise through #recorder
1866
1866
  */
1867
- dontSeeInTitle(text: string): Promise<void>;
1867
+ dontSeeInTitle(text: string): void;
1868
1868
  /**
1869
1869
  * Retrieves a page title and returns it to test.
1870
1870
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -1895,13 +1895,13 @@ declare namespace CodeceptJS {
1895
1895
  * @param url - a fragment to check
1896
1896
  * @returns automatically synchronized promise through #recorder
1897
1897
  */
1898
- seeInCurrentUrl(url: string): Promise<void>;
1898
+ seeInCurrentUrl(url: string): void;
1899
1899
  /**
1900
1900
  * Checks that current url does not contain a provided fragment.
1901
1901
  * @param url - value to check.
1902
1902
  * @returns automatically synchronized promise through #recorder
1903
1903
  */
1904
- dontSeeInCurrentUrl(url: string): Promise<void>;
1904
+ dontSeeInCurrentUrl(url: string): void;
1905
1905
  /**
1906
1906
  * Checks that current url is equal to provided one.
1907
1907
  * If a relative url provided, a configured url will be prepended to it.
@@ -1914,7 +1914,7 @@ declare namespace CodeceptJS {
1914
1914
  * @param url - value to check.
1915
1915
  * @returns automatically synchronized promise through #recorder
1916
1916
  */
1917
- seeCurrentUrlEquals(url: string): Promise<void>;
1917
+ seeCurrentUrlEquals(url: string): void;
1918
1918
  /**
1919
1919
  * Checks that current url is not equal to provided one.
1920
1920
  * If a relative url provided, a configured url will be prepended to it.
@@ -1926,7 +1926,7 @@ declare namespace CodeceptJS {
1926
1926
  * @param url - value to check.
1927
1927
  * @returns automatically synchronized promise through #recorder
1928
1928
  */
1929
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
1929
+ dontSeeCurrentUrlEquals(url: string): void;
1930
1930
  /**
1931
1931
  * Checks that a page contains a visible text.
1932
1932
  * Use context parameter to narrow down the search.
@@ -1940,7 +1940,7 @@ declare namespace CodeceptJS {
1940
1940
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1941
1941
  * @returns automatically synchronized promise through #recorder
1942
1942
  */
1943
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
1943
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
1944
1944
  /**
1945
1945
  * Opposite to `see`. Checks that a text is not present on a page.
1946
1946
  * Use context parameter to narrow down the search.
@@ -1953,7 +1953,7 @@ declare namespace CodeceptJS {
1953
1953
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
1954
1954
  * @returns automatically synchronized promise through #recorder
1955
1955
  */
1956
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
1956
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
1957
1957
  /**
1958
1958
  * Checks that a given Element is visible
1959
1959
  * Element is located by CSS or XPath.
@@ -1964,7 +1964,7 @@ declare namespace CodeceptJS {
1964
1964
  * @param locator - located by CSS|XPath|strict locator.
1965
1965
  * @returns automatically synchronized promise through #recorder
1966
1966
  */
1967
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
1967
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
1968
1968
  /**
1969
1969
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
1970
1970
  *
@@ -1974,7 +1974,7 @@ declare namespace CodeceptJS {
1974
1974
  * @param locator - located by CSS|XPath|Strict locator.
1975
1975
  * @returns automatically synchronized promise through #recorder
1976
1976
  */
1977
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
1977
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
1978
1978
  /**
1979
1979
  * Checks that a given Element is present in the DOM
1980
1980
  * Element is located by CSS or XPath.
@@ -1985,7 +1985,7 @@ declare namespace CodeceptJS {
1985
1985
  * @param locator - element located by CSS|XPath|strict locator.
1986
1986
  * @returns automatically synchronized promise through #recorder
1987
1987
  */
1988
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
1988
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
1989
1989
  /**
1990
1990
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
1991
1991
  *
@@ -1995,7 +1995,7 @@ declare namespace CodeceptJS {
1995
1995
  * @param locator - located by CSS|XPath|Strict locator.
1996
1996
  * @returns automatically synchronized promise through #recorder
1997
1997
  */
1998
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
1998
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
1999
1999
  /**
2000
2000
  * Checks that the current page contains the given string in its raw source code.
2001
2001
  *
@@ -2005,7 +2005,7 @@ declare namespace CodeceptJS {
2005
2005
  * @param text - value to check.
2006
2006
  * @returns automatically synchronized promise through #recorder
2007
2007
  */
2008
- seeInSource(text: string): Promise<void>;
2008
+ seeInSource(text: string): void;
2009
2009
  /**
2010
2010
  * Checks that the current page does not contains the given string in its raw source code.
2011
2011
  *
@@ -2015,7 +2015,7 @@ declare namespace CodeceptJS {
2015
2015
  * @param value - to check.
2016
2016
  * @returns automatically synchronized promise through #recorder
2017
2017
  */
2018
- dontSeeInSource(value: string): Promise<void>;
2018
+ dontSeeInSource(value: string): void;
2019
2019
  /**
2020
2020
  * Asserts that an element appears a given number of times in the DOM.
2021
2021
  * Element is located by label or name or CSS or XPath.
@@ -2028,7 +2028,7 @@ declare namespace CodeceptJS {
2028
2028
  * @param num - number of elements.
2029
2029
  * @returns automatically synchronized promise through #recorder
2030
2030
  */
2031
- seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
2031
+ seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
2032
2032
  /**
2033
2033
  * Asserts that an element is visible a given number of times.
2034
2034
  * Element is located by CSS or XPath.
@@ -2040,7 +2040,7 @@ declare namespace CodeceptJS {
2040
2040
  * @param num - number of elements.
2041
2041
  * @returns automatically synchronized promise through #recorder
2042
2042
  */
2043
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
2043
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
2044
2044
  /**
2045
2045
  * Grab number of visible elements by locator.
2046
2046
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -2078,7 +2078,7 @@ declare namespace CodeceptJS {
2078
2078
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
2079
2079
  * @returns automatically synchronized promise through #recorder
2080
2080
  */
2081
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
2081
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
2082
2082
  /**
2083
2083
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
2084
2084
  * Context can be specified as second parameter to narrow search.
@@ -2093,7 +2093,7 @@ declare namespace CodeceptJS {
2093
2093
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
2094
2094
  * @returns automatically synchronized promise through #recorder
2095
2095
  */
2096
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
2096
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2097
2097
  /**
2098
2098
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
2099
2099
  *
@@ -2109,7 +2109,7 @@ declare namespace CodeceptJS {
2109
2109
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
2110
2110
  * @returns automatically synchronized promise through #recorder
2111
2111
  */
2112
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
2112
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2113
2113
  /**
2114
2114
  * Moves cursor to element matched by locator.
2115
2115
  * Extra shift can be set with offsetX and offsetY options.
@@ -2123,7 +2123,7 @@ declare namespace CodeceptJS {
2123
2123
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2124
2124
  * @returns automatically synchronized promise through #recorder
2125
2125
  */
2126
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
2126
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
2127
2127
  /**
2128
2128
  * Executes sync script on a page.
2129
2129
  * Pass arguments to function as additional parameters.
@@ -2192,7 +2192,7 @@ declare namespace CodeceptJS {
2192
2192
  * @param height - height in pixels.
2193
2193
  * @returns automatically synchronized promise through #recorder
2194
2194
  */
2195
- resizeWindow(width: number, height: number): Promise<void>;
2195
+ resizeWindow(width: number, height: number): void;
2196
2196
  /**
2197
2197
  * Selects a checkbox or radio button.
2198
2198
  * Element is located by label or name or CSS or XPath.
@@ -2208,7 +2208,7 @@ declare namespace CodeceptJS {
2208
2208
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2209
2209
  * @returns automatically synchronized promise through #recorder
2210
2210
  */
2211
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
2211
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2212
2212
  /**
2213
2213
  * Unselects a checkbox or radio button.
2214
2214
  * Element is located by label or name or CSS or XPath.
@@ -2224,7 +2224,7 @@ declare namespace CodeceptJS {
2224
2224
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2225
2225
  * @returns automatically synchronized promise through #recorder
2226
2226
  */
2227
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
2227
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2228
2228
  /**
2229
2229
  * Fills a text field or textarea, after clearing its value, with the given string.
2230
2230
  * Field is located by name, label, CSS, or XPath.
@@ -2243,7 +2243,7 @@ declare namespace CodeceptJS {
2243
2243
  * @param value - text value to fill.
2244
2244
  * @returns automatically synchronized promise through #recorder
2245
2245
  */
2246
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
2246
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2247
2247
  /**
2248
2248
  * Clears a `<textarea>` or text `<input>` element's value.
2249
2249
  *
@@ -2255,7 +2255,7 @@ declare namespace CodeceptJS {
2255
2255
  * @param editable - field located by label|name|CSS|XPath|strict locator.
2256
2256
  * @returns automatically synchronized promise through #recorder.
2257
2257
  */
2258
- clearField(editable: LocatorOrString): Promise<void>;
2258
+ clearField(editable: LocatorOrString): void;
2259
2259
  /**
2260
2260
  * Appends text to a input field or textarea.
2261
2261
  * Field is located by name, label, CSS or XPath
@@ -2269,7 +2269,7 @@ declare namespace CodeceptJS {
2269
2269
  * @param value - text value to append.
2270
2270
  * @returns automatically synchronized promise through #recorder
2271
2271
  */
2272
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
2272
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
2273
2273
  /**
2274
2274
  * Checks that the given input field or textarea equals to given value.
2275
2275
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -2284,7 +2284,7 @@ declare namespace CodeceptJS {
2284
2284
  * @param value - value to check.
2285
2285
  * @returns automatically synchronized promise through #recorder
2286
2286
  */
2287
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
2287
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2288
2288
  /**
2289
2289
  * Checks that value of input field or textarea doesn't equal to given value
2290
2290
  * Opposite to `seeInField`.
@@ -2297,7 +2297,7 @@ declare namespace CodeceptJS {
2297
2297
  * @param value - value to check.
2298
2298
  * @returns automatically synchronized promise through #recorder
2299
2299
  */
2300
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
2300
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2301
2301
  /**
2302
2302
  * Sends [input event](http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent) on a page.
2303
2303
  * Can submit special keys like 'Enter', 'Backspace', etc
@@ -2325,7 +2325,7 @@ declare namespace CodeceptJS {
2325
2325
  * @param field - located by label|name|CSS|XPath|strict locator.
2326
2326
  * @returns automatically synchronized promise through #recorder
2327
2327
  */
2328
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
2328
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
2329
2329
  /**
2330
2330
  * Verifies that the specified checkbox is not checked.
2331
2331
  *
@@ -2337,7 +2337,7 @@ declare namespace CodeceptJS {
2337
2337
  * @param field - located by label|name|CSS|XPath|strict locator.
2338
2338
  * @returns automatically synchronized promise through #recorder
2339
2339
  */
2340
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
2340
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
2341
2341
  /**
2342
2342
  * Attaches a file to element located by label, name, CSS or XPath
2343
2343
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -2354,7 +2354,7 @@ declare namespace CodeceptJS {
2354
2354
  *
2355
2355
  * 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))
2356
2356
  */
2357
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
2357
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
2358
2358
  /**
2359
2359
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
2360
2360
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -2485,7 +2485,7 @@ declare namespace CodeceptJS {
2485
2485
  * @param option - visible text or value of option.
2486
2486
  * @returns automatically synchronized promise through #recorder
2487
2487
  */
2488
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
2488
+ selectOption(select: LocatorOrString, option: string | any[]): void;
2489
2489
  /**
2490
2490
  * Sets cookie(s).
2491
2491
  *
@@ -2507,7 +2507,7 @@ declare namespace CodeceptJS {
2507
2507
  * Wrapper for `.cookies.set(cookie)`.
2508
2508
  * [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
2509
2509
  */
2510
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
2510
+ setCookie(cookie: Cookie | Cookie[]): void;
2511
2511
  /**
2512
2512
  * Checks that cookie with given name exists.
2513
2513
  *
@@ -2517,7 +2517,7 @@ declare namespace CodeceptJS {
2517
2517
  * @param name - cookie name.
2518
2518
  * @returns automatically synchronized promise through #recorder
2519
2519
  */
2520
- seeCookie(name: string): Promise<void>;
2520
+ seeCookie(name: string): void;
2521
2521
  /**
2522
2522
  * Checks that cookie with given name does not exist.
2523
2523
  *
@@ -2527,7 +2527,7 @@ declare namespace CodeceptJS {
2527
2527
  * @param name - cookie name.
2528
2528
  * @returns automatically synchronized promise through #recorder
2529
2529
  */
2530
- dontSeeCookie(name: string): Promise<void>;
2530
+ dontSeeCookie(name: string): void;
2531
2531
  /**
2532
2532
  * Gets a cookie object by name.
2533
2533
  * If none provided gets all cookies.
@@ -2552,12 +2552,11 @@ declare namespace CodeceptJS {
2552
2552
  *
2553
2553
  * ```js
2554
2554
  * I.clearCookie();
2555
- * I.clearCookie('test');
2555
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
2556
2556
  * ```
2557
2557
  * @param [cookie = null] - (optional, `null` by default) cookie name
2558
- * @returns automatically synchronized promise through #recorder
2559
2558
  */
2560
- clearCookie(cookie?: string): Promise<void>;
2559
+ clearCookie(cookie?: string): void;
2561
2560
  /**
2562
2561
  * Waits for a function to return true (waits for 1 sec by default).
2563
2562
  * Running in browser context.
@@ -2576,7 +2575,7 @@ declare namespace CodeceptJS {
2576
2575
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
2577
2576
  * @returns automatically synchronized promise through #recorder
2578
2577
  */
2579
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
2578
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
2580
2579
  /**
2581
2580
  * Pauses execution for a number of seconds.
2582
2581
  *
@@ -2586,7 +2585,7 @@ declare namespace CodeceptJS {
2586
2585
  * @param sec - number of second to wait.
2587
2586
  * @returns automatically synchronized promise through #recorder
2588
2587
  */
2589
- wait(sec: number): Promise<void>;
2588
+ wait(sec: number): void;
2590
2589
  /**
2591
2590
  * Waits for a text to appear (by default waits for 1sec).
2592
2591
  * Element can be located by CSS or XPath.
@@ -2601,7 +2600,7 @@ declare namespace CodeceptJS {
2601
2600
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
2602
2601
  * @returns automatically synchronized promise through #recorder
2603
2602
  */
2604
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
2603
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
2605
2604
  /**
2606
2605
  * Waits for an element to become visible on a page (by default waits for 1sec).
2607
2606
  * Element can be located by CSS or XPath.
@@ -2613,7 +2612,7 @@ declare namespace CodeceptJS {
2613
2612
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2614
2613
  * @returns automatically synchronized promise through #recorder
2615
2614
  */
2616
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
2615
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2617
2616
  /**
2618
2617
  * Waits for an element to hide (by default waits for 1sec).
2619
2618
  * Element can be located by CSS or XPath.
@@ -2625,7 +2624,7 @@ declare namespace CodeceptJS {
2625
2624
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2626
2625
  * @returns automatically synchronized promise through #recorder
2627
2626
  */
2628
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
2627
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2629
2628
  /**
2630
2629
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
2631
2630
  * Element can be located by CSS or XPath.
@@ -2637,7 +2636,7 @@ declare namespace CodeceptJS {
2637
2636
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2638
2637
  * @returns automatically synchronized promise through #recorder
2639
2638
  */
2640
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
2639
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2641
2640
  /**
2642
2641
  * Waits for element to be present on page (by default waits for 1sec).
2643
2642
  * Element can be located by CSS or XPath.
@@ -2650,7 +2649,7 @@ declare namespace CodeceptJS {
2650
2649
  * @param [sec] - (optional, `1` by default) time in seconds to wait
2651
2650
  * @returns automatically synchronized promise through #recorder
2652
2651
  */
2653
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
2652
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2654
2653
  /**
2655
2654
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
2656
2655
  * Element can be located by CSS or XPath.
@@ -2662,7 +2661,7 @@ declare namespace CodeceptJS {
2662
2661
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2663
2662
  * @returns automatically synchronized promise through #recorder
2664
2663
  */
2665
- waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
2664
+ waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2666
2665
  /**
2667
2666
  * Reload the current page.
2668
2667
  *
@@ -2671,7 +2670,7 @@ declare namespace CodeceptJS {
2671
2670
  * ```
2672
2671
  * @returns automatically synchronized promise through #recorder
2673
2672
  */
2674
- refreshPage(): Promise<void>;
2673
+ refreshPage(): void;
2675
2674
  /**
2676
2675
  * Reload the page
2677
2676
  */
@@ -2687,7 +2686,7 @@ declare namespace CodeceptJS {
2687
2686
  * @param fileName - file name to save.
2688
2687
  * @returns automatically synchronized promise through #recorder
2689
2688
  */
2690
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
2689
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
2691
2690
  /**
2692
2691
  * Grab the width, height, location of given locator.
2693
2692
  * Provide `width` or `height`as second param to get your desired prop.
@@ -2724,7 +2723,7 @@ declare namespace CodeceptJS {
2724
2723
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
2725
2724
  * @returns automatically synchronized promise through #recorder
2726
2725
  */
2727
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
2726
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
2728
2727
  /**
2729
2728
  * Scrolls to element matched by locator.
2730
2729
  * Extra shift can be set with offsetX and offsetY options.
@@ -2738,7 +2737,7 @@ declare namespace CodeceptJS {
2738
2737
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2739
2738
  * @returns automatically synchronized promise through #recorder
2740
2739
  */
2741
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
2740
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
2742
2741
  /**
2743
2742
  * Scroll page to the top.
2744
2743
  *
@@ -2747,7 +2746,7 @@ declare namespace CodeceptJS {
2747
2746
  * ```
2748
2747
  * @returns automatically synchronized promise through #recorder
2749
2748
  */
2750
- scrollPageToTop(): Promise<void>;
2749
+ scrollPageToTop(): void;
2751
2750
  /**
2752
2751
  * Scroll page to the bottom.
2753
2752
  *
@@ -2756,7 +2755,7 @@ declare namespace CodeceptJS {
2756
2755
  * ```
2757
2756
  * @returns automatically synchronized promise through #recorder
2758
2757
  */
2759
- scrollPageToBottom(): Promise<void>;
2758
+ scrollPageToBottom(): void;
2760
2759
  /**
2761
2760
  * Retrieves a page scroll position and returns it to test.
2762
2761
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -2849,6 +2848,7 @@ declare namespace CodeceptJS {
2849
2848
  * @property [ignoreHTTPSErrors] - Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
2850
2849
  * @property [bypassCSP] - bypass Content Security Policy or CSP
2851
2850
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
2851
+ * @property [recordHar] - record HAR and will be saved to `output/har`. See more of [HAR options](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har).
2852
2852
  */
2853
2853
  type PlaywrightConfig = {
2854
2854
  url?: string;
@@ -2885,6 +2885,7 @@ declare namespace CodeceptJS {
2885
2885
  ignoreHTTPSErrors?: boolean;
2886
2886
  bypassCSP?: boolean;
2887
2887
  highlightElement?: boolean;
2888
+ recordHar?: any;
2888
2889
  };
2889
2890
  /**
2890
2891
  * Uses [Playwright](https://github.com/microsoft/playwright) library to run tests inside:
@@ -2930,6 +2931,21 @@ declare namespace CodeceptJS {
2930
2931
  * * `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
2931
2932
  * * `keepTraceForPassedTests`: - save trace for passed tests
2932
2933
  *
2934
+ * #### HAR Recording Customization
2935
+ *
2936
+ * A HAR file is an HTTP Archive file that contains a record of all the network requests that are made when a page is loaded.
2937
+ * It contains information about the request and response headers, cookies, content, timings, and more. You can use HAR files to mock network requests in your tests.
2938
+ * HAR will be saved to `output/har`. More info could be found here https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har.
2939
+ *
2940
+ * ```
2941
+ * ...
2942
+ * recordHar: {
2943
+ * mode: 'minimal', // possible values: 'minimal'|'full'.
2944
+ * content: 'embed' // possible values: "omit"|"embed"|"attach".
2945
+ * }
2946
+ * ...
2947
+ * ```
2948
+ *
2933
2949
  * #### Example #1: Wait for 0 network connections.
2934
2950
  *
2935
2951
  * ```js
@@ -3149,7 +3165,7 @@ declare namespace CodeceptJS {
3149
3165
  * @param text - value to check.
3150
3166
  * @returns automatically synchronized promise through #recorder
3151
3167
  */
3152
- seeInPopup(text: string): Promise<void>;
3168
+ seeInPopup(text: string): void;
3153
3169
  /**
3154
3170
  * Set current page
3155
3171
  * @param page - page to set
@@ -3189,7 +3205,7 @@ declare namespace CodeceptJS {
3189
3205
  * @param url - url path or global url.
3190
3206
  * @returns automatically synchronized promise through #recorder
3191
3207
  */
3192
- amOnPage(url: string): Promise<void>;
3208
+ amOnPage(url: string): void;
3193
3209
  /**
3194
3210
  * Resize the current window to provided width and height.
3195
3211
  * First parameter can be set to `maximize`.
@@ -3210,7 +3226,7 @@ declare namespace CodeceptJS {
3210
3226
  * { setWindowSize } = require('@codeceptjs/configure');
3211
3227
  * ````
3212
3228
  */
3213
- resizeWindow(width: number, height: number): Promise<void>;
3229
+ resizeWindow(width: number, height: number): void;
3214
3230
  /**
3215
3231
  * Set headers for all next requests
3216
3232
  *
@@ -3235,7 +3251,7 @@ declare namespace CodeceptJS {
3235
3251
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
3236
3252
  * @returns automatically synchronized promise through #recorder
3237
3253
  */
3238
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
3254
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
3239
3255
  /**
3240
3256
  * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
3241
3257
  *
@@ -3250,7 +3266,7 @@ declare namespace CodeceptJS {
3250
3266
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
3251
3267
  * @returns automatically synchronized promise through #recorder
3252
3268
  */
3253
- focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
3269
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): void;
3254
3270
  /**
3255
3271
  * Remove focus from a text input, button, etc.
3256
3272
  * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
@@ -3270,7 +3286,7 @@ declare namespace CodeceptJS {
3270
3286
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
3271
3287
  * @returns automatically synchronized promise through #recorder
3272
3288
  */
3273
- blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
3289
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): void;
3274
3290
  /**
3275
3291
  * Return the checked status of given element.
3276
3292
  * @param locator - element located by CSS|XPath|strict locator.
@@ -3301,7 +3317,7 @@ declare namespace CodeceptJS {
3301
3317
  * > When no option is set, custom drag and drop would be used, to use the dragAndDrop API from Playwright, please set options, for example `force: true`
3302
3318
  * @returns automatically synchronized promise through #recorder
3303
3319
  */
3304
- dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): Promise<void>;
3320
+ dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): void;
3305
3321
  /**
3306
3322
  * Restart browser with a new context and a new page
3307
3323
  *
@@ -3324,7 +3340,23 @@ declare namespace CodeceptJS {
3324
3340
  * ```
3325
3341
  * @returns automatically synchronized promise through #recorder
3326
3342
  */
3327
- refreshPage(): Promise<void>;
3343
+ refreshPage(): void;
3344
+ /**
3345
+ * Replaying from HAR
3346
+ *
3347
+ * ```js
3348
+ * // Replay API requests from HAR.
3349
+ * // Either use a matching response from the HAR,
3350
+ * // or abort the request if nothing matches.
3351
+ * I.replayFromHar('./output/har/something.har', { url: "*\/**\/api/v1/fruits" });
3352
+ * I.amOnPage('https://demo.playwright.dev/api-mocking');
3353
+ * I.see('CodeceptJS');
3354
+ * ```
3355
+ * @param harFilePath - Path to recorded HAR file
3356
+ * @param [opts] - [Options for replaying from HAR](https://playwright.dev/docs/api/class-page#page-route-from-har)
3357
+ * @returns Promise<void>
3358
+ */
3359
+ replayFromHar(harFilePath: string, opts?: any): any;
3328
3360
  /**
3329
3361
  * Scroll page to the top.
3330
3362
  *
@@ -3333,7 +3365,7 @@ declare namespace CodeceptJS {
3333
3365
  * ```
3334
3366
  * @returns automatically synchronized promise through #recorder
3335
3367
  */
3336
- scrollPageToTop(): Promise<void>;
3368
+ scrollPageToTop(): void;
3337
3369
  /**
3338
3370
  * Scroll page to the bottom.
3339
3371
  *
@@ -3342,7 +3374,7 @@ declare namespace CodeceptJS {
3342
3374
  * ```
3343
3375
  * @returns automatically synchronized promise through #recorder
3344
3376
  */
3345
- scrollPageToBottom(): Promise<void>;
3377
+ scrollPageToBottom(): void;
3346
3378
  /**
3347
3379
  * Scrolls to element matched by locator.
3348
3380
  * Extra shift can be set with offsetX and offsetY options.
@@ -3356,7 +3388,7 @@ declare namespace CodeceptJS {
3356
3388
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
3357
3389
  * @returns automatically synchronized promise through #recorder
3358
3390
  */
3359
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
3391
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
3360
3392
  /**
3361
3393
  * Checks that title contains text.
3362
3394
  *
@@ -3366,7 +3398,7 @@ declare namespace CodeceptJS {
3366
3398
  * @param text - text value to check.
3367
3399
  * @returns automatically synchronized promise through #recorder
3368
3400
  */
3369
- seeInTitle(text: string): Promise<void>;
3401
+ seeInTitle(text: string): void;
3370
3402
  /**
3371
3403
  * Retrieves a page scroll position and returns it to test.
3372
3404
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -3386,7 +3418,7 @@ declare namespace CodeceptJS {
3386
3418
  * @param text - value to check.
3387
3419
  * @returns automatically synchronized promise through #recorder
3388
3420
  */
3389
- seeTitleEquals(text: string): Promise<void>;
3421
+ seeTitleEquals(text: string): void;
3390
3422
  /**
3391
3423
  * Checks that title does not contain text.
3392
3424
  *
@@ -3396,7 +3428,7 @@ declare namespace CodeceptJS {
3396
3428
  * @param text - value to check.
3397
3429
  * @returns automatically synchronized promise through #recorder
3398
3430
  */
3399
- dontSeeInTitle(text: string): Promise<void>;
3431
+ dontSeeInTitle(text: string): void;
3400
3432
  /**
3401
3433
  * Retrieves a page title and returns it to test.
3402
3434
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -3519,7 +3551,7 @@ declare namespace CodeceptJS {
3519
3551
  * @param locator - located by CSS|XPath|strict locator.
3520
3552
  * @returns automatically synchronized promise through #recorder
3521
3553
  */
3522
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
3554
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
3523
3555
  /**
3524
3556
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
3525
3557
  *
@@ -3529,7 +3561,7 @@ declare namespace CodeceptJS {
3529
3561
  * @param locator - located by CSS|XPath|Strict locator.
3530
3562
  * @returns automatically synchronized promise through #recorder
3531
3563
  */
3532
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
3564
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
3533
3565
  /**
3534
3566
  * Checks that a given Element is present in the DOM
3535
3567
  * Element is located by CSS or XPath.
@@ -3540,7 +3572,7 @@ declare namespace CodeceptJS {
3540
3572
  * @param locator - element located by CSS|XPath|strict locator.
3541
3573
  * @returns automatically synchronized promise through #recorder
3542
3574
  */
3543
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
3575
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
3544
3576
  /**
3545
3577
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
3546
3578
  *
@@ -3550,7 +3582,7 @@ declare namespace CodeceptJS {
3550
3582
  * @param locator - located by CSS|XPath|Strict locator.
3551
3583
  * @returns automatically synchronized promise through #recorder
3552
3584
  */
3553
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
3585
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
3554
3586
  /**
3555
3587
  * Handles a file download. A file name is required to save the file on disk.
3556
3588
  * Files are saved to "output" directory.
@@ -3604,7 +3636,7 @@ declare namespace CodeceptJS {
3604
3636
  * ```
3605
3637
  * @returns automatically synchronized promise through #recorder
3606
3638
  */
3607
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): Promise<void>;
3639
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): void;
3608
3640
  /**
3609
3641
  * Clicks link and waits for navigation (deprecated)
3610
3642
  */
@@ -3638,7 +3670,7 @@ declare namespace CodeceptJS {
3638
3670
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3639
3671
  * @returns automatically synchronized promise through #recorder
3640
3672
  */
3641
- forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
3673
+ forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3642
3674
  /**
3643
3675
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
3644
3676
  * Context can be specified as second parameter to narrow search.
@@ -3653,7 +3685,7 @@ declare namespace CodeceptJS {
3653
3685
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3654
3686
  * @returns automatically synchronized promise through #recorder
3655
3687
  */
3656
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
3688
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3657
3689
  /**
3658
3690
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
3659
3691
  *
@@ -3669,7 +3701,7 @@ declare namespace CodeceptJS {
3669
3701
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
3670
3702
  * @returns automatically synchronized promise through #recorder
3671
3703
  */
3672
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
3704
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3673
3705
  /**
3674
3706
  * Selects a checkbox or radio button.
3675
3707
  * Element is located by label or name or CSS or XPath.
@@ -3696,7 +3728,7 @@ declare namespace CodeceptJS {
3696
3728
  * ```
3697
3729
  * > ⚠️ To avoid flakiness, option `force: true` is set by default
3698
3730
  */
3699
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
3731
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3700
3732
  /**
3701
3733
  * Unselects a checkbox or radio button.
3702
3734
  * Element is located by label or name or CSS or XPath.
@@ -3723,7 +3755,7 @@ declare namespace CodeceptJS {
3723
3755
  * ```
3724
3756
  * > ⚠️ To avoid flakiness, option `force: true` is set by default
3725
3757
  */
3726
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
3758
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3727
3759
  /**
3728
3760
  * Verifies that the specified checkbox is checked.
3729
3761
  *
@@ -3735,7 +3767,7 @@ declare namespace CodeceptJS {
3735
3767
  * @param field - located by label|name|CSS|XPath|strict locator.
3736
3768
  * @returns automatically synchronized promise through #recorder
3737
3769
  */
3738
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
3770
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
3739
3771
  /**
3740
3772
  * Verifies that the specified checkbox is not checked.
3741
3773
  *
@@ -3747,7 +3779,7 @@ declare namespace CodeceptJS {
3747
3779
  * @param field - located by label|name|CSS|XPath|strict locator.
3748
3780
  * @returns automatically synchronized promise through #recorder
3749
3781
  */
3750
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
3782
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
3751
3783
  /**
3752
3784
  * Presses a key in the browser and leaves it in a down state.
3753
3785
  *
@@ -3761,7 +3793,7 @@ declare namespace CodeceptJS {
3761
3793
  * @param key - name of key to press down.
3762
3794
  * @returns automatically synchronized promise through #recorder
3763
3795
  */
3764
- pressKeyDown(key: string): Promise<void>;
3796
+ pressKeyDown(key: string): void;
3765
3797
  /**
3766
3798
  * Releases a key in the browser which was previously set to a down state.
3767
3799
  *
@@ -3775,7 +3807,7 @@ declare namespace CodeceptJS {
3775
3807
  * @param key - name of key to release.
3776
3808
  * @returns automatically synchronized promise through #recorder
3777
3809
  */
3778
- pressKeyUp(key: string): Promise<void>;
3810
+ pressKeyUp(key: string): void;
3779
3811
  /**
3780
3812
  * Presses a key in the browser (on a focused element).
3781
3813
  *
@@ -3840,7 +3872,7 @@ declare namespace CodeceptJS {
3840
3872
  *
3841
3873
  * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
3842
3874
  */
3843
- pressKey(key: string | string[]): Promise<void>;
3875
+ pressKey(key: string | string[]): void;
3844
3876
  /**
3845
3877
  * Types out the given text into an active field.
3846
3878
  * To slow down typing use a second parameter, to set interval between key presses.
@@ -3863,7 +3895,7 @@ declare namespace CodeceptJS {
3863
3895
  * @param [delay = null] - (optional) delay in ms between key presses
3864
3896
  * @returns automatically synchronized promise through #recorder
3865
3897
  */
3866
- type(key: string | string[], delay?: number): Promise<void>;
3898
+ type(key: string | string[], delay?: number): void;
3867
3899
  /**
3868
3900
  * Fills a text field or textarea, after clearing its value, with the given string.
3869
3901
  * Field is located by name, label, CSS, or XPath.
@@ -3882,7 +3914,7 @@ declare namespace CodeceptJS {
3882
3914
  * @param value - text value to fill.
3883
3915
  * @returns automatically synchronized promise through #recorder
3884
3916
  */
3885
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
3917
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3886
3918
  /**
3887
3919
  * Clears the text input element: `<input>`, `<textarea>` or `[contenteditable]` .
3888
3920
  *
@@ -3913,7 +3945,7 @@ declare namespace CodeceptJS {
3913
3945
  * @param value - text value to append.
3914
3946
  * @returns automatically synchronized promise through #recorder
3915
3947
  */
3916
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
3948
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
3917
3949
  /**
3918
3950
  * Checks that the given input field or textarea equals to given value.
3919
3951
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -3928,7 +3960,7 @@ declare namespace CodeceptJS {
3928
3960
  * @param value - value to check.
3929
3961
  * @returns automatically synchronized promise through #recorder
3930
3962
  */
3931
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
3963
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3932
3964
  /**
3933
3965
  * Checks that value of input field or textarea doesn't equal to given value
3934
3966
  * Opposite to `seeInField`.
@@ -3941,7 +3973,7 @@ declare namespace CodeceptJS {
3941
3973
  * @param value - value to check.
3942
3974
  * @returns automatically synchronized promise through #recorder
3943
3975
  */
3944
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
3976
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3945
3977
  /**
3946
3978
  * Attaches a file to element located by label, name, CSS or XPath
3947
3979
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -3955,7 +3987,7 @@ declare namespace CodeceptJS {
3955
3987
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
3956
3988
  * @returns automatically synchronized promise through #recorder
3957
3989
  */
3958
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
3990
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
3959
3991
  /**
3960
3992
  * Selects an option in a drop-down select.
3961
3993
  * Field is searched by label | name | CSS | XPath.
@@ -3979,7 +4011,7 @@ declare namespace CodeceptJS {
3979
4011
  * @param option - visible text or value of option.
3980
4012
  * @returns automatically synchronized promise through #recorder
3981
4013
  */
3982
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
4014
+ selectOption(select: LocatorOrString, option: string | any[]): void;
3983
4015
  /**
3984
4016
  * Grab number of visible elements by locator.
3985
4017
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -4000,13 +4032,13 @@ declare namespace CodeceptJS {
4000
4032
  * @param url - a fragment to check
4001
4033
  * @returns automatically synchronized promise through #recorder
4002
4034
  */
4003
- seeInCurrentUrl(url: string): Promise<void>;
4035
+ seeInCurrentUrl(url: string): void;
4004
4036
  /**
4005
4037
  * Checks that current url does not contain a provided fragment.
4006
4038
  * @param url - value to check.
4007
4039
  * @returns automatically synchronized promise through #recorder
4008
4040
  */
4009
- dontSeeInCurrentUrl(url: string): Promise<void>;
4041
+ dontSeeInCurrentUrl(url: string): void;
4010
4042
  /**
4011
4043
  * Checks that current url is equal to provided one.
4012
4044
  * If a relative url provided, a configured url will be prepended to it.
@@ -4019,7 +4051,7 @@ declare namespace CodeceptJS {
4019
4051
  * @param url - value to check.
4020
4052
  * @returns automatically synchronized promise through #recorder
4021
4053
  */
4022
- seeCurrentUrlEquals(url: string): Promise<void>;
4054
+ seeCurrentUrlEquals(url: string): void;
4023
4055
  /**
4024
4056
  * Checks that current url is not equal to provided one.
4025
4057
  * If a relative url provided, a configured url will be prepended to it.
@@ -4031,7 +4063,7 @@ declare namespace CodeceptJS {
4031
4063
  * @param url - value to check.
4032
4064
  * @returns automatically synchronized promise through #recorder
4033
4065
  */
4034
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
4066
+ dontSeeCurrentUrlEquals(url: string): void;
4035
4067
  /**
4036
4068
  * Checks that a page contains a visible text.
4037
4069
  * Use context parameter to narrow down the search.
@@ -4045,7 +4077,7 @@ declare namespace CodeceptJS {
4045
4077
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
4046
4078
  * @returns automatically synchronized promise through #recorder
4047
4079
  */
4048
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
4080
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
4049
4081
  /**
4050
4082
  * Checks that text is equal to provided one.
4051
4083
  *
@@ -4056,7 +4088,7 @@ declare namespace CodeceptJS {
4056
4088
  * @param [context = null] - element located by CSS|XPath|strict locator.
4057
4089
  * @returns automatically synchronized promise through #recorder
4058
4090
  */
4059
- seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
4091
+ seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
4060
4092
  /**
4061
4093
  * Opposite to `see`. Checks that a text is not present on a page.
4062
4094
  * Use context parameter to narrow down the search.
@@ -4069,7 +4101,7 @@ declare namespace CodeceptJS {
4069
4101
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
4070
4102
  * @returns automatically synchronized promise through #recorder
4071
4103
  */
4072
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
4104
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
4073
4105
  /**
4074
4106
  * Retrieves page source and returns it to test.
4075
4107
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -4111,7 +4143,7 @@ declare namespace CodeceptJS {
4111
4143
  * @param text - value to check.
4112
4144
  * @returns automatically synchronized promise through #recorder
4113
4145
  */
4114
- seeInSource(text: string): Promise<void>;
4146
+ seeInSource(text: string): void;
4115
4147
  /**
4116
4148
  * Checks that the current page does not contains the given string in its raw source code.
4117
4149
  *
@@ -4121,7 +4153,7 @@ declare namespace CodeceptJS {
4121
4153
  * @param value - to check.
4122
4154
  * @returns automatically synchronized promise through #recorder
4123
4155
  */
4124
- dontSeeInSource(value: string): Promise<void>;
4156
+ dontSeeInSource(value: string): void;
4125
4157
  /**
4126
4158
  * Asserts that an element appears a given number of times in the DOM.
4127
4159
  * Element is located by label or name or CSS or XPath.
@@ -4134,7 +4166,7 @@ declare namespace CodeceptJS {
4134
4166
  * @param num - number of elements.
4135
4167
  * @returns automatically synchronized promise through #recorder
4136
4168
  */
4137
- seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
4169
+ seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
4138
4170
  /**
4139
4171
  * Asserts that an element is visible a given number of times.
4140
4172
  * Element is located by CSS or XPath.
@@ -4146,7 +4178,7 @@ declare namespace CodeceptJS {
4146
4178
  * @param num - number of elements.
4147
4179
  * @returns automatically synchronized promise through #recorder
4148
4180
  */
4149
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
4181
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
4150
4182
  /**
4151
4183
  * Sets cookie(s).
4152
4184
  *
@@ -4164,7 +4196,7 @@ declare namespace CodeceptJS {
4164
4196
  * @param cookie - a cookie object or array of cookie objects.
4165
4197
  * @returns automatically synchronized promise through #recorder
4166
4198
  */
4167
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
4199
+ setCookie(cookie: Cookie | Cookie[]): void;
4168
4200
  /**
4169
4201
  * Checks that cookie with given name exists.
4170
4202
  *
@@ -4174,7 +4206,7 @@ declare namespace CodeceptJS {
4174
4206
  * @param name - cookie name.
4175
4207
  * @returns automatically synchronized promise through #recorder
4176
4208
  */
4177
- seeCookie(name: string): Promise<void>;
4209
+ seeCookie(name: string): void;
4178
4210
  /**
4179
4211
  * Checks that cookie with given name does not exist.
4180
4212
  *
@@ -4184,7 +4216,7 @@ declare namespace CodeceptJS {
4184
4216
  * @param name - cookie name.
4185
4217
  * @returns automatically synchronized promise through #recorder
4186
4218
  */
4187
- dontSeeCookie(name: string): Promise<void>;
4219
+ dontSeeCookie(name: string): void;
4188
4220
  /**
4189
4221
  * Gets a cookie object by name.
4190
4222
  * If none provided gets all cookies.
@@ -4207,12 +4239,11 @@ declare namespace CodeceptJS {
4207
4239
  *
4208
4240
  * ```js
4209
4241
  * I.clearCookie();
4210
- * I.clearCookie('test');
4242
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
4211
4243
  * ```
4212
4244
  * @param [cookie = null] - (optional, `null` by default) cookie name
4213
- * @returns automatically synchronized promise through #recorder
4214
4245
  */
4215
- clearCookie(cookie?: string): Promise<void>;
4246
+ clearCookie(cookie?: string): void;
4216
4247
  /**
4217
4248
  * Executes a script on the page:
4218
4249
  *
@@ -4344,7 +4375,7 @@ declare namespace CodeceptJS {
4344
4375
  * @param cssProperties - object with CSS properties and their values to check.
4345
4376
  * @returns automatically synchronized promise through #recorder
4346
4377
  */
4347
- seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<void>;
4378
+ seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
4348
4379
  /**
4349
4380
  * Checks that all elements with given locator have given attributes.
4350
4381
  *
@@ -4355,7 +4386,7 @@ declare namespace CodeceptJS {
4355
4386
  * @param attributes - attributes and their values to check.
4356
4387
  * @returns automatically synchronized promise through #recorder
4357
4388
  */
4358
- seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<void>;
4389
+ seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
4359
4390
  /**
4360
4391
  * Drag the scrubber of a slider to a given position
4361
4392
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -4368,7 +4399,7 @@ declare namespace CodeceptJS {
4368
4399
  * @param offsetX - position to drag.
4369
4400
  * @returns automatically synchronized promise through #recorder
4370
4401
  */
4371
- dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<void>;
4402
+ dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
4372
4403
  /**
4373
4404
  * Retrieves an attribute from an element located by CSS or XPath and returns it to test.
4374
4405
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -4405,7 +4436,7 @@ declare namespace CodeceptJS {
4405
4436
  * @param fileName - file name to save.
4406
4437
  * @returns automatically synchronized promise through #recorder
4407
4438
  */
4408
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
4439
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
4409
4440
  /**
4410
4441
  * Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
4411
4442
  * Filename is relative to output folder.
@@ -4419,7 +4450,7 @@ declare namespace CodeceptJS {
4419
4450
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
4420
4451
  * @returns automatically synchronized promise through #recorder
4421
4452
  */
4422
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
4453
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
4423
4454
  /**
4424
4455
  * Performs [api request](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get) using
4425
4456
  * the cookies from the current browser session.
@@ -4446,7 +4477,7 @@ declare namespace CodeceptJS {
4446
4477
  * @param sec - number of second to wait.
4447
4478
  * @returns automatically synchronized promise through #recorder
4448
4479
  */
4449
- wait(sec: number): Promise<void>;
4480
+ wait(sec: number): void;
4450
4481
  /**
4451
4482
  * Waits for element to become enabled (by default waits for 1sec).
4452
4483
  * Element can be located by CSS or XPath.
@@ -4454,7 +4485,7 @@ declare namespace CodeceptJS {
4454
4485
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
4455
4486
  * @returns automatically synchronized promise through #recorder
4456
4487
  */
4457
- waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4488
+ waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4458
4489
  /**
4459
4490
  * Waits for the specified value to be in value attribute.
4460
4491
  *
@@ -4466,7 +4497,7 @@ declare namespace CodeceptJS {
4466
4497
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4467
4498
  * @returns automatically synchronized promise through #recorder
4468
4499
  */
4469
- waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<void>;
4500
+ waitForValue(field: LocatorOrString, value: string, sec?: number): void;
4470
4501
  /**
4471
4502
  * Waits for a specified number of elements on the page.
4472
4503
  *
@@ -4478,7 +4509,7 @@ declare namespace CodeceptJS {
4478
4509
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4479
4510
  * @returns automatically synchronized promise through #recorder
4480
4511
  */
4481
- waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<void>;
4512
+ waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
4482
4513
  /**
4483
4514
  * Waits for element to be clickable (by default waits for 1sec).
4484
4515
  * Element can be located by CSS or XPath.
@@ -4491,7 +4522,7 @@ declare namespace CodeceptJS {
4491
4522
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4492
4523
  * @returns automatically synchronized promise through #recorder
4493
4524
  */
4494
- waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4525
+ waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4495
4526
  /**
4496
4527
  * Waits for element to be present on page (by default waits for 1sec).
4497
4528
  * Element can be located by CSS or XPath.
@@ -4504,7 +4535,7 @@ declare namespace CodeceptJS {
4504
4535
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4505
4536
  * @returns automatically synchronized promise through #recorder
4506
4537
  */
4507
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4538
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4508
4539
  /**
4509
4540
  * Waits for an element to become visible on a page (by default waits for 1sec).
4510
4541
  * Element can be located by CSS or XPath.
@@ -4519,7 +4550,7 @@ declare namespace CodeceptJS {
4519
4550
  *
4520
4551
  * This method accepts [React selectors](https://codecept.io/react).
4521
4552
  */
4522
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4553
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4523
4554
  /**
4524
4555
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
4525
4556
  * Element can be located by CSS or XPath.
@@ -4531,7 +4562,7 @@ declare namespace CodeceptJS {
4531
4562
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4532
4563
  * @returns automatically synchronized promise through #recorder
4533
4564
  */
4534
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4565
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4535
4566
  /**
4536
4567
  * Waits for an element to hide (by default waits for 1sec).
4537
4568
  * Element can be located by CSS or XPath.
@@ -4543,7 +4574,7 @@ declare namespace CodeceptJS {
4543
4574
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4544
4575
  * @returns automatically synchronized promise through #recorder
4545
4576
  */
4546
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4577
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4547
4578
  /**
4548
4579
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
4549
4580
  *
@@ -4554,7 +4585,7 @@ declare namespace CodeceptJS {
4554
4585
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4555
4586
  * @returns automatically synchronized promise through #recorder
4556
4587
  */
4557
- waitInUrl(urlPart: string, sec?: number): Promise<void>;
4588
+ waitInUrl(urlPart: string, sec?: number): void;
4558
4589
  /**
4559
4590
  * Waits for the entire URL to match the expected
4560
4591
  *
@@ -4566,7 +4597,7 @@ declare namespace CodeceptJS {
4566
4597
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4567
4598
  * @returns automatically synchronized promise through #recorder
4568
4599
  */
4569
- waitUrlEquals(urlPart: string, sec?: number): Promise<void>;
4600
+ waitUrlEquals(urlPart: string, sec?: number): void;
4570
4601
  /**
4571
4602
  * Waits for a text to appear (by default waits for 1sec).
4572
4603
  * Element can be located by CSS or XPath.
@@ -4581,7 +4612,7 @@ declare namespace CodeceptJS {
4581
4612
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
4582
4613
  * @returns automatically synchronized promise through #recorder
4583
4614
  */
4584
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
4615
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
4585
4616
  /**
4586
4617
  * Waits for a network request.
4587
4618
  *
@@ -4612,7 +4643,7 @@ declare namespace CodeceptJS {
4612
4643
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
4613
4644
  * @returns automatically synchronized promise through #recorder
4614
4645
  */
4615
- switchTo(locator?: CodeceptJS.LocatorOrString): Promise<void>;
4646
+ switchTo(locator?: CodeceptJS.LocatorOrString): void;
4616
4647
  /**
4617
4648
  * Waits for a function to return true (waits for 1 sec by default).
4618
4649
  * Running in browser context.
@@ -4631,7 +4662,7 @@ declare namespace CodeceptJS {
4631
4662
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
4632
4663
  * @returns automatically synchronized promise through #recorder
4633
4664
  */
4634
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
4665
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
4635
4666
  /**
4636
4667
  * Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
4637
4668
  *
@@ -4656,7 +4687,7 @@ declare namespace CodeceptJS {
4656
4687
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4657
4688
  * @returns automatically synchronized promise through #recorder
4658
4689
  */
4659
- waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
4690
+ waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4660
4691
  /**
4661
4692
  * Grab the data from performance timing using Navigation Timing API.
4662
4693
  * The returned data will contain following things in ms:
@@ -4679,7 +4710,7 @@ declare namespace CodeceptJS {
4679
4710
  * ```
4680
4711
  * @returns automatically synchronized promise through #recorder
4681
4712
  */
4682
- grabDataFromPerformanceTiming(): Promise<void>;
4713
+ grabDataFromPerformanceTiming(): void;
4683
4714
  /**
4684
4715
  * Grab the width, height, location of given locator.
4685
4716
  * Provide `width` or `height`as second param to get your desired prop.
@@ -5110,7 +5141,7 @@ declare namespace CodeceptJS {
5110
5141
  * @param url - url path or global url.
5111
5142
  * @returns automatically synchronized promise through #recorder
5112
5143
  */
5113
- amOnPage(url: string): Promise<void>;
5144
+ amOnPage(url: string): void;
5114
5145
  /**
5115
5146
  * Perform a click on a link or a button, given by a locator.
5116
5147
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -5137,7 +5168,7 @@ declare namespace CodeceptJS {
5137
5168
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
5138
5169
  * @returns automatically synchronized promise through #recorder
5139
5170
  */
5140
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
5171
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
5141
5172
  /**
5142
5173
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
5143
5174
  * Context can be specified as second parameter to narrow search.
@@ -5152,7 +5183,7 @@ declare namespace CodeceptJS {
5152
5183
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
5153
5184
  * @returns automatically synchronized promise through #recorder
5154
5185
  */
5155
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
5186
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
5156
5187
  /**
5157
5188
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
5158
5189
  *
@@ -5168,7 +5199,7 @@ declare namespace CodeceptJS {
5168
5199
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
5169
5200
  * @returns automatically synchronized promise through #recorder
5170
5201
  */
5171
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
5202
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
5172
5203
  /**
5173
5204
  * Moves cursor to element matched by locator.
5174
5205
  * Extra shift can be set with offsetX and offsetY options.
@@ -5182,7 +5213,7 @@ declare namespace CodeceptJS {
5182
5213
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
5183
5214
  * @returns automatically synchronized promise through #recorder
5184
5215
  */
5185
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
5216
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
5186
5217
  /**
5187
5218
  * Checks that a page contains a visible text.
5188
5219
  * Use context parameter to narrow down the search.
@@ -5196,7 +5227,7 @@ declare namespace CodeceptJS {
5196
5227
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
5197
5228
  * @returns automatically synchronized promise through #recorder
5198
5229
  */
5199
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
5230
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
5200
5231
  /**
5201
5232
  * Checks that text is equal to provided one.
5202
5233
  *
@@ -5207,7 +5238,7 @@ declare namespace CodeceptJS {
5207
5238
  * @param [context = null] - element located by CSS|XPath|strict locator.
5208
5239
  * @returns automatically synchronized promise through #recorder
5209
5240
  */
5210
- seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
5241
+ seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
5211
5242
  /**
5212
5243
  * Opposite to `see`. Checks that a text is not present on a page.
5213
5244
  * Use context parameter to narrow down the search.
@@ -5220,7 +5251,7 @@ declare namespace CodeceptJS {
5220
5251
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
5221
5252
  * @returns automatically synchronized promise through #recorder
5222
5253
  */
5223
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
5254
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
5224
5255
  /**
5225
5256
  * Get JS log from browser. Log buffer is reset after each request.
5226
5257
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -5266,7 +5297,7 @@ declare namespace CodeceptJS {
5266
5297
  * @param option - visible text or value of option.
5267
5298
  * @returns automatically synchronized promise through #recorder
5268
5299
  */
5269
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
5300
+ selectOption(select: LocatorOrString, option: string | any[]): void;
5270
5301
  /**
5271
5302
  * Fills a text field or textarea, after clearing its value, with the given string.
5272
5303
  * Field is located by name, label, CSS, or XPath.
@@ -5285,7 +5316,7 @@ declare namespace CodeceptJS {
5285
5316
  * @param value - text value to fill.
5286
5317
  * @returns automatically synchronized promise through #recorder
5287
5318
  */
5288
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
5319
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
5289
5320
  /**
5290
5321
  * Presses a key on a focused element.
5291
5322
  * Special keys like 'Enter', 'Control', [etc](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value)
@@ -5301,7 +5332,7 @@ declare namespace CodeceptJS {
5301
5332
  *
5302
5333
  * {{ keys }}
5303
5334
  */
5304
- pressKey(key: string | string[]): Promise<void>;
5335
+ pressKey(key: string | string[]): void;
5305
5336
  /**
5306
5337
  * Attaches a file to element located by label, name, CSS or XPath
5307
5338
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -5315,7 +5346,7 @@ declare namespace CodeceptJS {
5315
5346
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
5316
5347
  * @returns automatically synchronized promise through #recorder
5317
5348
  */
5318
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
5349
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
5319
5350
  /**
5320
5351
  * Checks that the given input field or textarea equals to given value.
5321
5352
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -5330,7 +5361,7 @@ declare namespace CodeceptJS {
5330
5361
  * @param value - value to check.
5331
5362
  * @returns automatically synchronized promise through #recorder
5332
5363
  */
5333
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
5364
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
5334
5365
  /**
5335
5366
  * Checks that value of input field or textarea doesn't equal to given value
5336
5367
  * Opposite to `seeInField`.
@@ -5343,7 +5374,7 @@ declare namespace CodeceptJS {
5343
5374
  * @param value - value to check.
5344
5375
  * @returns automatically synchronized promise through #recorder
5345
5376
  */
5346
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
5377
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
5347
5378
  /**
5348
5379
  * Appends text to a input field or textarea.
5349
5380
  * Field is located by name, label, CSS or XPath
@@ -5357,7 +5388,7 @@ declare namespace CodeceptJS {
5357
5388
  * @param value - text value to append.
5358
5389
  * @returns automatically synchronized promise through #recorder
5359
5390
  */
5360
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
5391
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
5361
5392
  /**
5362
5393
  * Clears a `<textarea>` or text `<input>` element's value.
5363
5394
  *
@@ -5369,7 +5400,7 @@ declare namespace CodeceptJS {
5369
5400
  * @param editable - field located by label|name|CSS|XPath|strict locator.
5370
5401
  * @returns automatically synchronized promise through #recorder.
5371
5402
  */
5372
- clearField(editable: LocatorOrString): Promise<void>;
5403
+ clearField(editable: LocatorOrString): void;
5373
5404
  /**
5374
5405
  * Selects a checkbox or radio button.
5375
5406
  * Element is located by label or name or CSS or XPath.
@@ -5385,7 +5416,7 @@ declare namespace CodeceptJS {
5385
5416
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
5386
5417
  * @returns automatically synchronized promise through #recorder
5387
5418
  */
5388
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
5419
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
5389
5420
  /**
5390
5421
  * Unselects a checkbox or radio button.
5391
5422
  * Element is located by label or name or CSS or XPath.
@@ -5401,7 +5432,7 @@ declare namespace CodeceptJS {
5401
5432
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
5402
5433
  * @returns automatically synchronized promise through #recorder
5403
5434
  */
5404
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
5435
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
5405
5436
  /**
5406
5437
  * Verifies that the specified checkbox is checked.
5407
5438
  *
@@ -5413,7 +5444,7 @@ declare namespace CodeceptJS {
5413
5444
  * @param field - located by label|name|CSS|XPath|strict locator.
5414
5445
  * @returns automatically synchronized promise through #recorder
5415
5446
  */
5416
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
5447
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
5417
5448
  /**
5418
5449
  * Verifies that the specified checkbox is not checked.
5419
5450
  *
@@ -5425,7 +5456,7 @@ declare namespace CodeceptJS {
5425
5456
  * @param field - located by label|name|CSS|XPath|strict locator.
5426
5457
  * @returns automatically synchronized promise through #recorder
5427
5458
  */
5428
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
5459
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
5429
5460
  /**
5430
5461
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
5431
5462
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -5554,7 +5585,7 @@ declare namespace CodeceptJS {
5554
5585
  * @param text - text value to check.
5555
5586
  * @returns automatically synchronized promise through #recorder
5556
5587
  */
5557
- seeInTitle(text: string): Promise<void>;
5588
+ seeInTitle(text: string): void;
5558
5589
  /**
5559
5590
  * Checks that title is equal to provided one.
5560
5591
  *
@@ -5564,7 +5595,7 @@ declare namespace CodeceptJS {
5564
5595
  * @param text - value to check.
5565
5596
  * @returns automatically synchronized promise through #recorder
5566
5597
  */
5567
- seeTitleEquals(text: string): Promise<void>;
5598
+ seeTitleEquals(text: string): void;
5568
5599
  /**
5569
5600
  * Checks that title does not contain text.
5570
5601
  *
@@ -5574,7 +5605,7 @@ declare namespace CodeceptJS {
5574
5605
  * @param text - value to check.
5575
5606
  * @returns automatically synchronized promise through #recorder
5576
5607
  */
5577
- dontSeeInTitle(text: string): Promise<void>;
5608
+ dontSeeInTitle(text: string): void;
5578
5609
  /**
5579
5610
  * Retrieves a page title and returns it to test.
5580
5611
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -5595,7 +5626,7 @@ declare namespace CodeceptJS {
5595
5626
  * @param locator - located by CSS|XPath|strict locator.
5596
5627
  * @returns automatically synchronized promise through #recorder
5597
5628
  */
5598
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
5629
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
5599
5630
  /**
5600
5631
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
5601
5632
  *
@@ -5605,7 +5636,7 @@ declare namespace CodeceptJS {
5605
5636
  * @param locator - located by CSS|XPath|Strict locator.
5606
5637
  * @returns automatically synchronized promise through #recorder
5607
5638
  */
5608
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
5639
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
5609
5640
  /**
5610
5641
  * Checks that a given Element is present in the DOM
5611
5642
  * Element is located by CSS or XPath.
@@ -5616,7 +5647,7 @@ declare namespace CodeceptJS {
5616
5647
  * @param locator - element located by CSS|XPath|strict locator.
5617
5648
  * @returns automatically synchronized promise through #recorder
5618
5649
  */
5619
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
5650
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
5620
5651
  /**
5621
5652
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
5622
5653
  *
@@ -5626,7 +5657,7 @@ declare namespace CodeceptJS {
5626
5657
  * @param locator - located by CSS|XPath|Strict locator.
5627
5658
  * @returns automatically synchronized promise through #recorder
5628
5659
  */
5629
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
5660
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
5630
5661
  /**
5631
5662
  * Checks that the current page contains the given string in its raw source code.
5632
5663
  *
@@ -5636,7 +5667,7 @@ declare namespace CodeceptJS {
5636
5667
  * @param text - value to check.
5637
5668
  * @returns automatically synchronized promise through #recorder
5638
5669
  */
5639
- seeInSource(text: string): Promise<void>;
5670
+ seeInSource(text: string): void;
5640
5671
  /**
5641
5672
  * Retrieves page source and returns it to test.
5642
5673
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -5656,7 +5687,7 @@ declare namespace CodeceptJS {
5656
5687
  * @param value - to check.
5657
5688
  * @returns automatically synchronized promise through #recorder
5658
5689
  */
5659
- dontSeeInSource(value: string): Promise<void>;
5690
+ dontSeeInSource(value: string): void;
5660
5691
  /**
5661
5692
  * Asserts that an element appears a given number of times in the DOM.
5662
5693
  * Element is located by label or name or CSS or XPath.
@@ -5669,7 +5700,7 @@ declare namespace CodeceptJS {
5669
5700
  * @param num - number of elements.
5670
5701
  * @returns automatically synchronized promise through #recorder
5671
5702
  */
5672
- seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
5703
+ seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
5673
5704
  /**
5674
5705
  * Asserts that an element is visible a given number of times.
5675
5706
  * Element is located by CSS or XPath.
@@ -5681,7 +5712,7 @@ declare namespace CodeceptJS {
5681
5712
  * @param num - number of elements.
5682
5713
  * @returns automatically synchronized promise through #recorder
5683
5714
  */
5684
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
5715
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
5685
5716
  /**
5686
5717
  * Grab number of visible elements by locator.
5687
5718
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -5703,7 +5734,7 @@ declare namespace CodeceptJS {
5703
5734
  * @param cssProperties - object with CSS properties and their values to check.
5704
5735
  * @returns automatically synchronized promise through #recorder
5705
5736
  */
5706
- seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<void>;
5737
+ seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
5707
5738
  /**
5708
5739
  * Checks that all elements with given locator have given attributes.
5709
5740
  *
@@ -5714,7 +5745,7 @@ declare namespace CodeceptJS {
5714
5745
  * @param attributes - attributes and their values to check.
5715
5746
  * @returns automatically synchronized promise through #recorder
5716
5747
  */
5717
- seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<void>;
5748
+ seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
5718
5749
  /**
5719
5750
  * Executes sync script on a page.
5720
5751
  * Pass arguments to function as additional parameters.
@@ -5778,13 +5809,13 @@ declare namespace CodeceptJS {
5778
5809
  * @param url - a fragment to check
5779
5810
  * @returns automatically synchronized promise through #recorder
5780
5811
  */
5781
- seeInCurrentUrl(url: string): Promise<void>;
5812
+ seeInCurrentUrl(url: string): void;
5782
5813
  /**
5783
5814
  * Checks that current url does not contain a provided fragment.
5784
5815
  * @param url - value to check.
5785
5816
  * @returns automatically synchronized promise through #recorder
5786
5817
  */
5787
- dontSeeInCurrentUrl(url: string): Promise<void>;
5818
+ dontSeeInCurrentUrl(url: string): void;
5788
5819
  /**
5789
5820
  * Checks that current url is equal to provided one.
5790
5821
  * If a relative url provided, a configured url will be prepended to it.
@@ -5797,7 +5828,7 @@ declare namespace CodeceptJS {
5797
5828
  * @param url - value to check.
5798
5829
  * @returns automatically synchronized promise through #recorder
5799
5830
  */
5800
- seeCurrentUrlEquals(url: string): Promise<void>;
5831
+ seeCurrentUrlEquals(url: string): void;
5801
5832
  /**
5802
5833
  * Checks that current url is not equal to provided one.
5803
5834
  * If a relative url provided, a configured url will be prepended to it.
@@ -5809,7 +5840,7 @@ declare namespace CodeceptJS {
5809
5840
  * @param url - value to check.
5810
5841
  * @returns automatically synchronized promise through #recorder
5811
5842
  */
5812
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
5843
+ dontSeeCurrentUrlEquals(url: string): void;
5813
5844
  /**
5814
5845
  * Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
5815
5846
  * Filename is relative to output folder.
@@ -5821,7 +5852,7 @@ declare namespace CodeceptJS {
5821
5852
  * @param fileName - file name to save.
5822
5853
  * @returns automatically synchronized promise through #recorder
5823
5854
  */
5824
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
5855
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
5825
5856
  /**
5826
5857
  * Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
5827
5858
  * Filename is relative to output folder.
@@ -5835,19 +5866,18 @@ declare namespace CodeceptJS {
5835
5866
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
5836
5867
  * @returns automatically synchronized promise through #recorder
5837
5868
  */
5838
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
5869
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
5839
5870
  /**
5840
5871
  * Clears a cookie by name,
5841
5872
  * if none provided clears all cookies.
5842
5873
  *
5843
5874
  * ```js
5844
5875
  * I.clearCookie();
5845
- * I.clearCookie('test');
5876
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
5846
5877
  * ```
5847
5878
  * @param [cookie = null] - (optional, `null` by default) cookie name
5848
- * @returns automatically synchronized promise through #recorder
5849
5879
  */
5850
- clearCookie(cookie?: string): Promise<void>;
5880
+ clearCookie(cookie?: string): void;
5851
5881
  /**
5852
5882
  * Checks that cookie with given name exists.
5853
5883
  *
@@ -5857,7 +5887,7 @@ declare namespace CodeceptJS {
5857
5887
  * @param name - cookie name.
5858
5888
  * @returns automatically synchronized promise through #recorder
5859
5889
  */
5860
- seeCookie(name: string): Promise<void>;
5890
+ seeCookie(name: string): void;
5861
5891
  /**
5862
5892
  * Checks that cookie with given name does not exist.
5863
5893
  *
@@ -5867,7 +5897,7 @@ declare namespace CodeceptJS {
5867
5897
  * @param name - cookie name.
5868
5898
  * @returns automatically synchronized promise through #recorder
5869
5899
  */
5870
- dontSeeCookie(name: string): Promise<void>;
5900
+ dontSeeCookie(name: string): void;
5871
5901
  /**
5872
5902
  * Gets a cookie object by name.
5873
5903
  * If none provided gets all cookies.
@@ -5904,7 +5934,7 @@ declare namespace CodeceptJS {
5904
5934
  * @param text - value to check.
5905
5935
  * @returns automatically synchronized promise through #recorder
5906
5936
  */
5907
- seeInPopup(text: string): Promise<void>;
5937
+ seeInPopup(text: string): void;
5908
5938
  /**
5909
5939
  * Grab the text within the popup. If no popup is visible then it will return null
5910
5940
  *
@@ -5920,7 +5950,7 @@ declare namespace CodeceptJS {
5920
5950
  * @param height - height in pixels.
5921
5951
  * @returns automatically synchronized promise through #recorder
5922
5952
  */
5923
- resizeWindow(width: number, height: number): Promise<void>;
5953
+ resizeWindow(width: number, height: number): void;
5924
5954
  /**
5925
5955
  * Drag an item to a destination element.
5926
5956
  *
@@ -5931,7 +5961,7 @@ declare namespace CodeceptJS {
5931
5961
  * @param destElement - located by CSS|XPath|strict locator.
5932
5962
  * @returns automatically synchronized promise through #recorder
5933
5963
  */
5934
- dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<void>;
5964
+ dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
5935
5965
  /**
5936
5966
  * Close all tabs except for the current one.
5937
5967
  *
@@ -5999,7 +6029,7 @@ declare namespace CodeceptJS {
5999
6029
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
6000
6030
  * @returns automatically synchronized promise through #recorder
6001
6031
  */
6002
- switchTo(locator?: CodeceptJS.LocatorOrString): Promise<void>;
6032
+ switchTo(locator?: CodeceptJS.LocatorOrString): void;
6003
6033
  /**
6004
6034
  * Pauses execution for a number of seconds.
6005
6035
  *
@@ -6009,7 +6039,7 @@ declare namespace CodeceptJS {
6009
6039
  * @param sec - number of second to wait.
6010
6040
  * @returns automatically synchronized promise through #recorder
6011
6041
  */
6012
- wait(sec: number): Promise<void>;
6042
+ wait(sec: number): void;
6013
6043
  /**
6014
6044
  * Waits for element to be present on page (by default waits for 1sec).
6015
6045
  * Element can be located by CSS or XPath.
@@ -6022,7 +6052,7 @@ declare namespace CodeceptJS {
6022
6052
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
6023
6053
  * @returns automatically synchronized promise through #recorder
6024
6054
  */
6025
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6055
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6026
6056
  /**
6027
6057
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
6028
6058
  * Element can be located by CSS or XPath.
@@ -6034,7 +6064,7 @@ declare namespace CodeceptJS {
6034
6064
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6035
6065
  * @returns automatically synchronized promise through #recorder
6036
6066
  */
6037
- waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6067
+ waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6038
6068
  /**
6039
6069
  * Waits for element to become clickable for number of seconds.
6040
6070
  *
@@ -6054,7 +6084,7 @@ declare namespace CodeceptJS {
6054
6084
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6055
6085
  * @returns automatically synchronized promise through #recorder
6056
6086
  */
6057
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6087
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6058
6088
  /**
6059
6089
  * Waits for an element to hide (by default waits for 1sec).
6060
6090
  * Element can be located by CSS or XPath.
@@ -6066,7 +6096,7 @@ declare namespace CodeceptJS {
6066
6096
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6067
6097
  * @returns automatically synchronized promise through #recorder
6068
6098
  */
6069
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6099
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6070
6100
  /**
6071
6101
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
6072
6102
  * Element can be located by CSS or XPath.
@@ -6078,7 +6108,7 @@ declare namespace CodeceptJS {
6078
6108
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6079
6109
  * @returns automatically synchronized promise through #recorder
6080
6110
  */
6081
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6111
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6082
6112
  /**
6083
6113
  * Waits for a specified number of elements on the page.
6084
6114
  *
@@ -6090,7 +6120,7 @@ declare namespace CodeceptJS {
6090
6120
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6091
6121
  * @returns automatically synchronized promise through #recorder
6092
6122
  */
6093
- waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<void>;
6123
+ waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
6094
6124
  /**
6095
6125
  * Waits for element to become enabled (by default waits for 1sec).
6096
6126
  * Element can be located by CSS or XPath.
@@ -6098,7 +6128,7 @@ declare namespace CodeceptJS {
6098
6128
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
6099
6129
  * @returns automatically synchronized promise through #recorder
6100
6130
  */
6101
- waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
6131
+ waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6102
6132
  /**
6103
6133
  * Waits for the specified value to be in value attribute.
6104
6134
  *
@@ -6110,7 +6140,7 @@ declare namespace CodeceptJS {
6110
6140
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6111
6141
  * @returns automatically synchronized promise through #recorder
6112
6142
  */
6113
- waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<void>;
6143
+ waitForValue(field: LocatorOrString, value: string, sec?: number): void;
6114
6144
  /**
6115
6145
  * Waits for a function to return true (waits for 1 sec by default).
6116
6146
  * Running in browser context.
@@ -6129,7 +6159,7 @@ declare namespace CodeceptJS {
6129
6159
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
6130
6160
  * @returns automatically synchronized promise through #recorder
6131
6161
  */
6132
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
6162
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
6133
6163
  /**
6134
6164
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
6135
6165
  *
@@ -6140,7 +6170,7 @@ declare namespace CodeceptJS {
6140
6170
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6141
6171
  * @returns automatically synchronized promise through #recorder
6142
6172
  */
6143
- waitInUrl(urlPart: string, sec?: number): Promise<void>;
6173
+ waitInUrl(urlPart: string, sec?: number): void;
6144
6174
  /**
6145
6175
  * Waits for the entire URL to match the expected
6146
6176
  *
@@ -6152,7 +6182,7 @@ declare namespace CodeceptJS {
6152
6182
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6153
6183
  * @returns automatically synchronized promise through #recorder
6154
6184
  */
6155
- waitUrlEquals(urlPart: string, sec?: number): Promise<void>;
6185
+ waitUrlEquals(urlPart: string, sec?: number): void;
6156
6186
  /**
6157
6187
  * Waits for a text to appear (by default waits for 1sec).
6158
6188
  * Element can be located by CSS or XPath.
@@ -6167,7 +6197,7 @@ declare namespace CodeceptJS {
6167
6197
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
6168
6198
  * @returns automatically synchronized promise through #recorder
6169
6199
  */
6170
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
6200
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
6171
6201
  /**
6172
6202
  * Moves to url
6173
6203
  */
@@ -6180,7 +6210,7 @@ declare namespace CodeceptJS {
6180
6210
  * ```
6181
6211
  * @returns automatically synchronized promise through #recorder
6182
6212
  */
6183
- refreshPage(): Promise<void>;
6213
+ refreshPage(): void;
6184
6214
  /**
6185
6215
  * Reloads page
6186
6216
  */
@@ -6198,7 +6228,7 @@ declare namespace CodeceptJS {
6198
6228
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
6199
6229
  * @returns automatically synchronized promise through #recorder
6200
6230
  */
6201
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
6231
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
6202
6232
  /**
6203
6233
  * Scroll page to the top.
6204
6234
  *
@@ -6207,7 +6237,7 @@ declare namespace CodeceptJS {
6207
6237
  * ```
6208
6238
  * @returns automatically synchronized promise through #recorder
6209
6239
  */
6210
- scrollPageToTop(): Promise<void>;
6240
+ scrollPageToTop(): void;
6211
6241
  /**
6212
6242
  * Scroll page to the bottom.
6213
6243
  *
@@ -6216,7 +6246,7 @@ declare namespace CodeceptJS {
6216
6246
  * ```
6217
6247
  * @returns automatically synchronized promise through #recorder
6218
6248
  */
6219
- scrollPageToBottom(): Promise<void>;
6249
+ scrollPageToBottom(): void;
6220
6250
  /**
6221
6251
  * Retrieves a page scroll position and returns it to test.
6222
6252
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -6263,7 +6293,7 @@ declare namespace CodeceptJS {
6263
6293
  * @param cookie - a cookie object or array of cookie objects.
6264
6294
  * @returns automatically synchronized promise through #recorder
6265
6295
  */
6266
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
6296
+ setCookie(cookie: Cookie | Cookie[]): void;
6267
6297
  }
6268
6298
  /**
6269
6299
  * ## Configuration
@@ -6509,7 +6539,7 @@ declare namespace CodeceptJS {
6509
6539
  * @param text - value to check.
6510
6540
  * @returns automatically synchronized promise through #recorder
6511
6541
  */
6512
- seeInPopup(text: string): Promise<void>;
6542
+ seeInPopup(text: string): void;
6513
6543
  /**
6514
6544
  * Set current page
6515
6545
  * @param page - page to set
@@ -6543,7 +6573,7 @@ declare namespace CodeceptJS {
6543
6573
  * @param url - url path or global url.
6544
6574
  * @returns automatically synchronized promise through #recorder
6545
6575
  */
6546
- amOnPage(url: string): Promise<void>;
6576
+ amOnPage(url: string): void;
6547
6577
  /**
6548
6578
  * Resize the current window to provided width and height.
6549
6579
  * First parameter can be set to `maximize`.
@@ -6556,7 +6586,7 @@ declare namespace CodeceptJS {
6556
6586
  * Puppeteer does not control the window of a browser so it can't adjust its real size.
6557
6587
  * It also can't maximize a window.
6558
6588
  */
6559
- resizeWindow(width: number, height: number): Promise<void>;
6589
+ resizeWindow(width: number, height: number): void;
6560
6590
  /**
6561
6591
  * Set headers for all next requests
6562
6592
  *
@@ -6583,7 +6613,7 @@ declare namespace CodeceptJS {
6583
6613
  *
6584
6614
  * {{ react }}
6585
6615
  */
6586
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
6616
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
6587
6617
  /**
6588
6618
  * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
6589
6619
  *
@@ -6598,7 +6628,7 @@ declare namespace CodeceptJS {
6598
6628
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
6599
6629
  * @returns automatically synchronized promise through #recorder
6600
6630
  */
6601
- focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
6631
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): void;
6602
6632
  /**
6603
6633
  * Remove focus from a text input, button, etc.
6604
6634
  * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
@@ -6618,7 +6648,7 @@ declare namespace CodeceptJS {
6618
6648
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
6619
6649
  * @returns automatically synchronized promise through #recorder
6620
6650
  */
6621
- blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
6651
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): void;
6622
6652
  /**
6623
6653
  * Drag an item to a destination element.
6624
6654
  *
@@ -6629,7 +6659,7 @@ declare namespace CodeceptJS {
6629
6659
  * @param destElement - located by CSS|XPath|strict locator.
6630
6660
  * @returns automatically synchronized promise through #recorder
6631
6661
  */
6632
- dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<void>;
6662
+ dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
6633
6663
  /**
6634
6664
  * Reload the current page.
6635
6665
  *
@@ -6638,7 +6668,7 @@ declare namespace CodeceptJS {
6638
6668
  * ```
6639
6669
  * @returns automatically synchronized promise through #recorder
6640
6670
  */
6641
- refreshPage(): Promise<void>;
6671
+ refreshPage(): void;
6642
6672
  /**
6643
6673
  * Scroll page to the top.
6644
6674
  *
@@ -6647,7 +6677,7 @@ declare namespace CodeceptJS {
6647
6677
  * ```
6648
6678
  * @returns automatically synchronized promise through #recorder
6649
6679
  */
6650
- scrollPageToTop(): Promise<void>;
6680
+ scrollPageToTop(): void;
6651
6681
  /**
6652
6682
  * Scroll page to the bottom.
6653
6683
  *
@@ -6656,7 +6686,7 @@ declare namespace CodeceptJS {
6656
6686
  * ```
6657
6687
  * @returns automatically synchronized promise through #recorder
6658
6688
  */
6659
- scrollPageToBottom(): Promise<void>;
6689
+ scrollPageToBottom(): void;
6660
6690
  /**
6661
6691
  * Scrolls to element matched by locator.
6662
6692
  * Extra shift can be set with offsetX and offsetY options.
@@ -6670,7 +6700,7 @@ declare namespace CodeceptJS {
6670
6700
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
6671
6701
  * @returns automatically synchronized promise through #recorder
6672
6702
  */
6673
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
6703
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
6674
6704
  /**
6675
6705
  * Checks that title contains text.
6676
6706
  *
@@ -6680,7 +6710,7 @@ declare namespace CodeceptJS {
6680
6710
  * @param text - text value to check.
6681
6711
  * @returns automatically synchronized promise through #recorder
6682
6712
  */
6683
- seeInTitle(text: string): Promise<void>;
6713
+ seeInTitle(text: string): void;
6684
6714
  /**
6685
6715
  * Retrieves a page scroll position and returns it to test.
6686
6716
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -6700,7 +6730,7 @@ declare namespace CodeceptJS {
6700
6730
  * @param text - value to check.
6701
6731
  * @returns automatically synchronized promise through #recorder
6702
6732
  */
6703
- seeTitleEquals(text: string): Promise<void>;
6733
+ seeTitleEquals(text: string): void;
6704
6734
  /**
6705
6735
  * Checks that title does not contain text.
6706
6736
  *
@@ -6710,7 +6740,7 @@ declare namespace CodeceptJS {
6710
6740
  * @param text - value to check.
6711
6741
  * @returns automatically synchronized promise through #recorder
6712
6742
  */
6713
- dontSeeInTitle(text: string): Promise<void>;
6743
+ dontSeeInTitle(text: string): void;
6714
6744
  /**
6715
6745
  * Retrieves a page title and returns it to test.
6716
6746
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -6821,7 +6851,7 @@ declare namespace CodeceptJS {
6821
6851
  *
6822
6852
  * {{ react }}
6823
6853
  */
6824
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
6854
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
6825
6855
  /**
6826
6856
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
6827
6857
  *
@@ -6833,7 +6863,7 @@ declare namespace CodeceptJS {
6833
6863
  *
6834
6864
  * {{ react }}
6835
6865
  */
6836
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
6866
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
6837
6867
  /**
6838
6868
  * Checks that a given Element is present in the DOM
6839
6869
  * Element is located by CSS or XPath.
@@ -6844,7 +6874,7 @@ declare namespace CodeceptJS {
6844
6874
  * @param locator - element located by CSS|XPath|strict locator.
6845
6875
  * @returns automatically synchronized promise through #recorder
6846
6876
  */
6847
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
6877
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
6848
6878
  /**
6849
6879
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
6850
6880
  *
@@ -6854,7 +6884,7 @@ declare namespace CodeceptJS {
6854
6884
  * @param locator - located by CSS|XPath|Strict locator.
6855
6885
  * @returns automatically synchronized promise through #recorder
6856
6886
  */
6857
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
6887
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
6858
6888
  /**
6859
6889
  * Perform a click on a link or a button, given by a locator.
6860
6890
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -6884,7 +6914,7 @@ declare namespace CodeceptJS {
6884
6914
  *
6885
6915
  * {{ react }}
6886
6916
  */
6887
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
6917
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
6888
6918
  /**
6889
6919
  * Perform an emulated click on a link or a button, given by a locator.
6890
6920
  * Unlike normal click instead of sending native event, emulates a click with JavaScript.
@@ -6917,7 +6947,7 @@ declare namespace CodeceptJS {
6917
6947
  *
6918
6948
  * {{ react }}
6919
6949
  */
6920
- forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
6950
+ forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6921
6951
  /**
6922
6952
  * Performs a click on a link and waits for navigation before moving on.
6923
6953
  *
@@ -6931,7 +6961,7 @@ declare namespace CodeceptJS {
6931
6961
  *
6932
6962
  * {{ react }}
6933
6963
  */
6934
- clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
6964
+ clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6935
6965
  /**
6936
6966
  * Sets a directory to where save files. Allows to test file downloads.
6937
6967
  * Should be used with [FileSystem helper](https://codecept.io/helpers/FileSystem) to check that file were downloaded correctly.
@@ -6972,7 +7002,7 @@ declare namespace CodeceptJS {
6972
7002
  *
6973
7003
  * {{ react }}
6974
7004
  */
6975
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
7005
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6976
7006
  /**
6977
7007
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
6978
7008
  *
@@ -6991,7 +7021,7 @@ declare namespace CodeceptJS {
6991
7021
  *
6992
7022
  * {{ react }}
6993
7023
  */
6994
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
7024
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6995
7025
  /**
6996
7026
  * Selects a checkbox or radio button.
6997
7027
  * Element is located by label or name or CSS or XPath.
@@ -7007,7 +7037,7 @@ declare namespace CodeceptJS {
7007
7037
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
7008
7038
  * @returns automatically synchronized promise through #recorder
7009
7039
  */
7010
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
7040
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7011
7041
  /**
7012
7042
  * Unselects a checkbox or radio button.
7013
7043
  * Element is located by label or name or CSS or XPath.
@@ -7023,7 +7053,7 @@ declare namespace CodeceptJS {
7023
7053
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
7024
7054
  * @returns automatically synchronized promise through #recorder
7025
7055
  */
7026
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
7056
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7027
7057
  /**
7028
7058
  * Verifies that the specified checkbox is checked.
7029
7059
  *
@@ -7035,7 +7065,7 @@ declare namespace CodeceptJS {
7035
7065
  * @param field - located by label|name|CSS|XPath|strict locator.
7036
7066
  * @returns automatically synchronized promise through #recorder
7037
7067
  */
7038
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
7068
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
7039
7069
  /**
7040
7070
  * Verifies that the specified checkbox is not checked.
7041
7071
  *
@@ -7047,7 +7077,7 @@ declare namespace CodeceptJS {
7047
7077
  * @param field - located by label|name|CSS|XPath|strict locator.
7048
7078
  * @returns automatically synchronized promise through #recorder
7049
7079
  */
7050
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
7080
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
7051
7081
  /**
7052
7082
  * Presses a key in the browser and leaves it in a down state.
7053
7083
  *
@@ -7061,7 +7091,7 @@ declare namespace CodeceptJS {
7061
7091
  * @param key - name of key to press down.
7062
7092
  * @returns automatically synchronized promise through #recorder
7063
7093
  */
7064
- pressKeyDown(key: string): Promise<void>;
7094
+ pressKeyDown(key: string): void;
7065
7095
  /**
7066
7096
  * Releases a key in the browser which was previously set to a down state.
7067
7097
  *
@@ -7075,7 +7105,7 @@ declare namespace CodeceptJS {
7075
7105
  * @param key - name of key to release.
7076
7106
  * @returns automatically synchronized promise through #recorder
7077
7107
  */
7078
- pressKeyUp(key: string): Promise<void>;
7108
+ pressKeyUp(key: string): void;
7079
7109
  /**
7080
7110
  * Presses a key in the browser (on a focused element).
7081
7111
  *
@@ -7140,7 +7170,7 @@ declare namespace CodeceptJS {
7140
7170
  *
7141
7171
  * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
7142
7172
  */
7143
- pressKey(key: string | string[]): Promise<void>;
7173
+ pressKey(key: string | string[]): void;
7144
7174
  /**
7145
7175
  * Types out the given text into an active field.
7146
7176
  * To slow down typing use a second parameter, to set interval between key presses.
@@ -7163,7 +7193,7 @@ declare namespace CodeceptJS {
7163
7193
  * @param [delay = null] - (optional) delay in ms between key presses
7164
7194
  * @returns automatically synchronized promise through #recorder
7165
7195
  */
7166
- type(key: string | string[], delay?: number): Promise<void>;
7196
+ type(key: string | string[], delay?: number): void;
7167
7197
  /**
7168
7198
  * Fills a text field or textarea, after clearing its value, with the given string.
7169
7199
  * Field is located by name, label, CSS, or XPath.
@@ -7184,7 +7214,7 @@ declare namespace CodeceptJS {
7184
7214
  *
7185
7215
  * {{ react }}
7186
7216
  */
7187
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
7217
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7188
7218
  /**
7189
7219
  * Clears a `<textarea>` or text `<input>` element's value.
7190
7220
  *
@@ -7196,7 +7226,7 @@ declare namespace CodeceptJS {
7196
7226
  * @param editable - field located by label|name|CSS|XPath|strict locator.
7197
7227
  * @returns automatically synchronized promise through #recorder.
7198
7228
  */
7199
- clearField(editable: LocatorOrString): Promise<void>;
7229
+ clearField(editable: LocatorOrString): void;
7200
7230
  /**
7201
7231
  * Appends text to a input field or textarea.
7202
7232
  * Field is located by name, label, CSS or XPath
@@ -7213,7 +7243,7 @@ declare namespace CodeceptJS {
7213
7243
  *
7214
7244
  * {{ react }}
7215
7245
  */
7216
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
7246
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
7217
7247
  /**
7218
7248
  * Checks that the given input field or textarea equals to given value.
7219
7249
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -7228,7 +7258,7 @@ declare namespace CodeceptJS {
7228
7258
  * @param value - value to check.
7229
7259
  * @returns automatically synchronized promise through #recorder
7230
7260
  */
7231
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
7261
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7232
7262
  /**
7233
7263
  * Checks that value of input field or textarea doesn't equal to given value
7234
7264
  * Opposite to `seeInField`.
@@ -7241,7 +7271,7 @@ declare namespace CodeceptJS {
7241
7271
  * @param value - value to check.
7242
7272
  * @returns automatically synchronized promise through #recorder
7243
7273
  */
7244
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
7274
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7245
7275
  /**
7246
7276
  * Attaches a file to element located by label, name, CSS or XPath
7247
7277
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -7258,7 +7288,7 @@ declare namespace CodeceptJS {
7258
7288
  *
7259
7289
  * > ⚠ There is an [issue with file upload in Puppeteer 2.1.0 & 2.1.1](https://github.com/puppeteer/puppeteer/issues/5420), downgrade to 2.0.0 if you face it.
7260
7290
  */
7261
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
7291
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
7262
7292
  /**
7263
7293
  * Selects an option in a drop-down select.
7264
7294
  * Field is searched by label | name | CSS | XPath.
@@ -7282,7 +7312,7 @@ declare namespace CodeceptJS {
7282
7312
  * @param option - visible text or value of option.
7283
7313
  * @returns automatically synchronized promise through #recorder
7284
7314
  */
7285
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
7315
+ selectOption(select: LocatorOrString, option: string | any[]): void;
7286
7316
  /**
7287
7317
  * Grab number of visible elements by locator.
7288
7318
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -7304,13 +7334,13 @@ declare namespace CodeceptJS {
7304
7334
  * @param url - a fragment to check
7305
7335
  * @returns automatically synchronized promise through #recorder
7306
7336
  */
7307
- seeInCurrentUrl(url: string): Promise<void>;
7337
+ seeInCurrentUrl(url: string): void;
7308
7338
  /**
7309
7339
  * Checks that current url does not contain a provided fragment.
7310
7340
  * @param url - value to check.
7311
7341
  * @returns automatically synchronized promise through #recorder
7312
7342
  */
7313
- dontSeeInCurrentUrl(url: string): Promise<void>;
7343
+ dontSeeInCurrentUrl(url: string): void;
7314
7344
  /**
7315
7345
  * Checks that current url is equal to provided one.
7316
7346
  * If a relative url provided, a configured url will be prepended to it.
@@ -7323,7 +7353,7 @@ declare namespace CodeceptJS {
7323
7353
  * @param url - value to check.
7324
7354
  * @returns automatically synchronized promise through #recorder
7325
7355
  */
7326
- seeCurrentUrlEquals(url: string): Promise<void>;
7356
+ seeCurrentUrlEquals(url: string): void;
7327
7357
  /**
7328
7358
  * Checks that current url is not equal to provided one.
7329
7359
  * If a relative url provided, a configured url will be prepended to it.
@@ -7335,7 +7365,7 @@ declare namespace CodeceptJS {
7335
7365
  * @param url - value to check.
7336
7366
  * @returns automatically synchronized promise through #recorder
7337
7367
  */
7338
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
7368
+ dontSeeCurrentUrlEquals(url: string): void;
7339
7369
  /**
7340
7370
  * Checks that a page contains a visible text.
7341
7371
  * Use context parameter to narrow down the search.
@@ -7352,7 +7382,7 @@ declare namespace CodeceptJS {
7352
7382
  *
7353
7383
  * {{ react }}
7354
7384
  */
7355
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
7385
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
7356
7386
  /**
7357
7387
  * Checks that text is equal to provided one.
7358
7388
  *
@@ -7363,7 +7393,7 @@ declare namespace CodeceptJS {
7363
7393
  * @param [context = null] - element located by CSS|XPath|strict locator.
7364
7394
  * @returns automatically synchronized promise through #recorder
7365
7395
  */
7366
- seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
7396
+ seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
7367
7397
  /**
7368
7398
  * Opposite to `see`. Checks that a text is not present on a page.
7369
7399
  * Use context parameter to narrow down the search.
@@ -7379,7 +7409,7 @@ declare namespace CodeceptJS {
7379
7409
  *
7380
7410
  * {{ react }}
7381
7411
  */
7382
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
7412
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
7383
7413
  /**
7384
7414
  * Retrieves page source and returns it to test.
7385
7415
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -7419,7 +7449,7 @@ declare namespace CodeceptJS {
7419
7449
  * @param text - value to check.
7420
7450
  * @returns automatically synchronized promise through #recorder
7421
7451
  */
7422
- seeInSource(text: string): Promise<void>;
7452
+ seeInSource(text: string): void;
7423
7453
  /**
7424
7454
  * Checks that the current page does not contains the given string in its raw source code.
7425
7455
  *
@@ -7429,7 +7459,7 @@ declare namespace CodeceptJS {
7429
7459
  * @param value - to check.
7430
7460
  * @returns automatically synchronized promise through #recorder
7431
7461
  */
7432
- dontSeeInSource(value: string): Promise<void>;
7462
+ dontSeeInSource(value: string): void;
7433
7463
  /**
7434
7464
  * Asserts that an element appears a given number of times in the DOM.
7435
7465
  * Element is located by label or name or CSS or XPath.
@@ -7445,7 +7475,7 @@ declare namespace CodeceptJS {
7445
7475
  *
7446
7476
  * {{ react }}
7447
7477
  */
7448
- seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
7478
+ seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
7449
7479
  /**
7450
7480
  * Asserts that an element is visible a given number of times.
7451
7481
  * Element is located by CSS or XPath.
@@ -7460,7 +7490,7 @@ declare namespace CodeceptJS {
7460
7490
  *
7461
7491
  * {{ react }}
7462
7492
  */
7463
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
7493
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
7464
7494
  /**
7465
7495
  * Sets cookie(s).
7466
7496
  *
@@ -7478,7 +7508,7 @@ declare namespace CodeceptJS {
7478
7508
  * @param cookie - a cookie object or array of cookie objects.
7479
7509
  * @returns automatically synchronized promise through #recorder
7480
7510
  */
7481
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
7511
+ setCookie(cookie: Cookie | Cookie[]): void;
7482
7512
  /**
7483
7513
  * Checks that cookie with given name exists.
7484
7514
  *
@@ -7488,7 +7518,7 @@ declare namespace CodeceptJS {
7488
7518
  * @param name - cookie name.
7489
7519
  * @returns automatically synchronized promise through #recorder
7490
7520
  */
7491
- seeCookie(name: string): Promise<void>;
7521
+ seeCookie(name: string): void;
7492
7522
  /**
7493
7523
  * Checks that cookie with given name does not exist.
7494
7524
  *
@@ -7498,7 +7528,7 @@ declare namespace CodeceptJS {
7498
7528
  * @param name - cookie name.
7499
7529
  * @returns automatically synchronized promise through #recorder
7500
7530
  */
7501
- dontSeeCookie(name: string): Promise<void>;
7531
+ dontSeeCookie(name: string): void;
7502
7532
  /**
7503
7533
  * Gets a cookie object by name.
7504
7534
  * If none provided gets all cookies.
@@ -7521,12 +7551,11 @@ declare namespace CodeceptJS {
7521
7551
  *
7522
7552
  * ```js
7523
7553
  * I.clearCookie();
7524
- * I.clearCookie('test');
7554
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
7525
7555
  * ```
7526
7556
  * @param [cookie = null] - (optional, `null` by default) cookie name
7527
- * @returns automatically synchronized promise through #recorder
7528
7557
  */
7529
- clearCookie(cookie?: string): Promise<void>;
7558
+ clearCookie(cookie?: string): void;
7530
7559
  /**
7531
7560
  * Executes sync script on a page.
7532
7561
  * Pass arguments to function as additional parameters.
@@ -7701,7 +7730,7 @@ declare namespace CodeceptJS {
7701
7730
  *
7702
7731
  * {{ react }}
7703
7732
  */
7704
- seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<void>;
7733
+ seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
7705
7734
  /**
7706
7735
  * Checks that all elements with given locator have given attributes.
7707
7736
  *
@@ -7714,7 +7743,7 @@ declare namespace CodeceptJS {
7714
7743
  *
7715
7744
  * {{ react }}
7716
7745
  */
7717
- seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<void>;
7746
+ seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
7718
7747
  /**
7719
7748
  * Drag the scrubber of a slider to a given position
7720
7749
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -7729,7 +7758,7 @@ declare namespace CodeceptJS {
7729
7758
  *
7730
7759
  * {{ react }}
7731
7760
  */
7732
- dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<void>;
7761
+ dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
7733
7762
  /**
7734
7763
  * Retrieves an array of attributes from elements located by CSS or XPath and returns it to test.
7735
7764
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -7770,7 +7799,7 @@ declare namespace CodeceptJS {
7770
7799
  * @param fileName - file name to save.
7771
7800
  * @returns automatically synchronized promise through #recorder
7772
7801
  */
7773
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
7802
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
7774
7803
  /**
7775
7804
  * Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
7776
7805
  * Filename is relative to output folder.
@@ -7784,7 +7813,7 @@ declare namespace CodeceptJS {
7784
7813
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
7785
7814
  * @returns automatically synchronized promise through #recorder
7786
7815
  */
7787
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
7816
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
7788
7817
  /**
7789
7818
  * Pauses execution for a number of seconds.
7790
7819
  *
@@ -7794,7 +7823,7 @@ declare namespace CodeceptJS {
7794
7823
  * @param sec - number of second to wait.
7795
7824
  * @returns automatically synchronized promise through #recorder
7796
7825
  */
7797
- wait(sec: number): Promise<void>;
7826
+ wait(sec: number): void;
7798
7827
  /**
7799
7828
  * Waits for element to become enabled (by default waits for 1sec).
7800
7829
  * Element can be located by CSS or XPath.
@@ -7802,7 +7831,7 @@ declare namespace CodeceptJS {
7802
7831
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
7803
7832
  * @returns automatically synchronized promise through #recorder
7804
7833
  */
7805
- waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7834
+ waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7806
7835
  /**
7807
7836
  * Waits for the specified value to be in value attribute.
7808
7837
  *
@@ -7814,7 +7843,7 @@ declare namespace CodeceptJS {
7814
7843
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7815
7844
  * @returns automatically synchronized promise through #recorder
7816
7845
  */
7817
- waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<void>;
7846
+ waitForValue(field: LocatorOrString, value: string, sec?: number): void;
7818
7847
  /**
7819
7848
  * Waits for a specified number of elements on the page.
7820
7849
  *
@@ -7828,7 +7857,7 @@ declare namespace CodeceptJS {
7828
7857
  *
7829
7858
  * {{ react }}
7830
7859
  */
7831
- waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<void>;
7860
+ waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
7832
7861
  /**
7833
7862
  * Waits for element to be clickable (by default waits for 1sec).
7834
7863
  * Element can be located by CSS or XPath.
@@ -7841,7 +7870,7 @@ declare namespace CodeceptJS {
7841
7870
  * @param [sec] - (optional, `1` by default) time in seconds to wait
7842
7871
  * @returns automatically synchronized promise through #recorder
7843
7872
  */
7844
- waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7873
+ waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7845
7874
  /**
7846
7875
  * Waits for element to be present on page (by default waits for 1sec).
7847
7876
  * Element can be located by CSS or XPath.
@@ -7856,7 +7885,7 @@ declare namespace CodeceptJS {
7856
7885
  *
7857
7886
  * {{ react }}
7858
7887
  */
7859
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7888
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7860
7889
  /**
7861
7890
  * Waits for an element to become visible on a page (by default waits for 1sec).
7862
7891
  * Element can be located by CSS or XPath.
@@ -7871,7 +7900,7 @@ declare namespace CodeceptJS {
7871
7900
  *
7872
7901
  * This method accepts [React selectors](https://codecept.io/react).
7873
7902
  */
7874
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7903
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7875
7904
  /**
7876
7905
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
7877
7906
  * Element can be located by CSS or XPath.
@@ -7883,7 +7912,7 @@ declare namespace CodeceptJS {
7883
7912
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7884
7913
  * @returns automatically synchronized promise through #recorder
7885
7914
  */
7886
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7915
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7887
7916
  /**
7888
7917
  * Waits for an element to hide (by default waits for 1sec).
7889
7918
  * Element can be located by CSS or XPath.
@@ -7895,7 +7924,7 @@ declare namespace CodeceptJS {
7895
7924
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7896
7925
  * @returns automatically synchronized promise through #recorder
7897
7926
  */
7898
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
7927
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7899
7928
  /**
7900
7929
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
7901
7930
  *
@@ -7906,7 +7935,7 @@ declare namespace CodeceptJS {
7906
7935
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7907
7936
  * @returns automatically synchronized promise through #recorder
7908
7937
  */
7909
- waitInUrl(urlPart: string, sec?: number): Promise<void>;
7938
+ waitInUrl(urlPart: string, sec?: number): void;
7910
7939
  /**
7911
7940
  * Waits for the entire URL to match the expected
7912
7941
  *
@@ -7918,7 +7947,7 @@ declare namespace CodeceptJS {
7918
7947
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7919
7948
  * @returns automatically synchronized promise through #recorder
7920
7949
  */
7921
- waitUrlEquals(urlPart: string, sec?: number): Promise<void>;
7950
+ waitUrlEquals(urlPart: string, sec?: number): void;
7922
7951
  /**
7923
7952
  * Waits for a text to appear (by default waits for 1sec).
7924
7953
  * Element can be located by CSS or XPath.
@@ -7933,7 +7962,7 @@ declare namespace CodeceptJS {
7933
7962
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
7934
7963
  * @returns automatically synchronized promise through #recorder
7935
7964
  */
7936
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
7965
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
7937
7966
  /**
7938
7967
  * Waits for a network request.
7939
7968
  *
@@ -7964,7 +7993,7 @@ declare namespace CodeceptJS {
7964
7993
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
7965
7994
  * @returns automatically synchronized promise through #recorder
7966
7995
  */
7967
- switchTo(locator?: CodeceptJS.LocatorOrString): Promise<void>;
7996
+ switchTo(locator?: CodeceptJS.LocatorOrString): void;
7968
7997
  /**
7969
7998
  * Waits for a function to return true (waits for 1 sec by default).
7970
7999
  * Running in browser context.
@@ -7983,7 +8012,7 @@ declare namespace CodeceptJS {
7983
8012
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
7984
8013
  * @returns automatically synchronized promise through #recorder
7985
8014
  */
7986
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
8015
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
7987
8016
  /**
7988
8017
  * Waits for navigation to finish. By default takes configured `waitForNavigation` option.
7989
8018
  *
@@ -8001,7 +8030,7 @@ declare namespace CodeceptJS {
8001
8030
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8002
8031
  * @returns automatically synchronized promise through #recorder
8003
8032
  */
8004
- waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
8033
+ waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
8005
8034
  /**
8006
8035
  * Grab the data from performance timing using Navigation Timing API.
8007
8036
  * The returned data will contain following things in ms:
@@ -8024,7 +8053,7 @@ declare namespace CodeceptJS {
8024
8053
  * ```
8025
8054
  * @returns automatically synchronized promise through #recorder
8026
8055
  */
8027
- grabDataFromPerformanceTiming(): Promise<void>;
8056
+ grabDataFromPerformanceTiming(): void;
8028
8057
  /**
8029
8058
  * Grab the width, height, location of given locator.
8030
8059
  * Provide `width` or `height`as second param to get your desired prop.
@@ -8313,7 +8342,7 @@ declare namespace CodeceptJS {
8313
8342
  * @param url - url path or global url.
8314
8343
  * @returns automatically synchronized promise through #recorder
8315
8344
  */
8316
- amOnPage(url: string): Promise<void>;
8345
+ amOnPage(url: string): void;
8317
8346
  /**
8318
8347
  * Resize the current window to provided width and height.
8319
8348
  * First parameter can be set to `maximize`.
@@ -8321,7 +8350,7 @@ declare namespace CodeceptJS {
8321
8350
  * @param height - height in pixels.
8322
8351
  * @returns automatically synchronized promise through #recorder
8323
8352
  */
8324
- resizeWindow(width: number, height: number): Promise<void>;
8353
+ resizeWindow(width: number, height: number): void;
8325
8354
  /**
8326
8355
  * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
8327
8356
  *
@@ -8336,7 +8365,7 @@ declare namespace CodeceptJS {
8336
8365
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
8337
8366
  * @returns automatically synchronized promise through #recorder
8338
8367
  */
8339
- focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
8368
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): void;
8340
8369
  /**
8341
8370
  * Remove focus from a text input, button, etc.
8342
8371
  * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
@@ -8356,7 +8385,7 @@ declare namespace CodeceptJS {
8356
8385
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
8357
8386
  * @returns automatically synchronized promise through #recorder
8358
8387
  */
8359
- blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
8388
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): void;
8360
8389
  /**
8361
8390
  * Perform a click on a link or a button, given by a locator.
8362
8391
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -8383,7 +8412,7 @@ declare namespace CodeceptJS {
8383
8412
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
8384
8413
  * @returns automatically synchronized promise through #recorder
8385
8414
  */
8386
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
8415
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
8387
8416
  /**
8388
8417
  * Reload the current page.
8389
8418
  *
@@ -8392,7 +8421,7 @@ declare namespace CodeceptJS {
8392
8421
  * ```
8393
8422
  * @returns automatically synchronized promise through #recorder
8394
8423
  */
8395
- refreshPage(): Promise<void>;
8424
+ refreshPage(): void;
8396
8425
  /**
8397
8426
  * Waits for an element to become visible on a page (by default waits for 1sec).
8398
8427
  * Element can be located by CSS or XPath.
@@ -8404,7 +8433,7 @@ declare namespace CodeceptJS {
8404
8433
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8405
8434
  * @returns automatically synchronized promise through #recorder
8406
8435
  */
8407
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
8436
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
8408
8437
  /**
8409
8438
  * Fills a text field or textarea, after clearing its value, with the given string.
8410
8439
  * Field is located by name, label, CSS, or XPath.
@@ -8423,7 +8452,7 @@ declare namespace CodeceptJS {
8423
8452
  * @param value - text value to fill.
8424
8453
  * @returns automatically synchronized promise through #recorder
8425
8454
  */
8426
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
8455
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
8427
8456
  /**
8428
8457
  * Clears a `<textarea>` or text `<input>` element's value.
8429
8458
  *
@@ -8435,7 +8464,7 @@ declare namespace CodeceptJS {
8435
8464
  * @param editable - field located by label|name|CSS|XPath|strict locator.
8436
8465
  * @returns automatically synchronized promise through #recorder.
8437
8466
  */
8438
- clearField(editable: LocatorOrString): Promise<void>;
8467
+ clearField(editable: LocatorOrString): void;
8439
8468
  /**
8440
8469
  * Appends text to a input field or textarea.
8441
8470
  * Field is located by name, label, CSS or XPath
@@ -8449,7 +8478,7 @@ declare namespace CodeceptJS {
8449
8478
  * @param value - text value to append.
8450
8479
  * @returns automatically synchronized promise through #recorder
8451
8480
  */
8452
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
8481
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
8453
8482
  /**
8454
8483
  * Attaches a file to element located by label, name, CSS or XPath
8455
8484
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -8463,7 +8492,7 @@ declare namespace CodeceptJS {
8463
8492
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
8464
8493
  * @returns automatically synchronized promise through #recorder
8465
8494
  */
8466
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
8495
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
8467
8496
  /**
8468
8497
  * Presses a key on a focused element.
8469
8498
  * Special keys like 'Enter', 'Control', [etc](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value)
@@ -8480,7 +8509,7 @@ declare namespace CodeceptJS {
8480
8509
  *
8481
8510
  * {{ keys }}
8482
8511
  */
8483
- pressKey(key: string | string[]): Promise<void>;
8512
+ pressKey(key: string | string[]): void;
8484
8513
  /**
8485
8514
  * Moves cursor to element matched by locator.
8486
8515
  * Extra shift can be set with offsetX and offsetY options.
@@ -8494,7 +8523,7 @@ declare namespace CodeceptJS {
8494
8523
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
8495
8524
  * @returns automatically synchronized promise through #recorder
8496
8525
  */
8497
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
8526
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
8498
8527
  /**
8499
8528
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
8500
8529
  * Context can be specified as second parameter to narrow search.
@@ -8509,7 +8538,7 @@ declare namespace CodeceptJS {
8509
8538
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
8510
8539
  * @returns automatically synchronized promise through #recorder
8511
8540
  */
8512
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
8541
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
8513
8542
  /**
8514
8543
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
8515
8544
  *
@@ -8525,7 +8554,7 @@ declare namespace CodeceptJS {
8525
8554
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
8526
8555
  * @returns automatically synchronized promise through #recorder
8527
8556
  */
8528
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
8557
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
8529
8558
  /**
8530
8559
  * Selects a checkbox or radio button.
8531
8560
  * Element is located by label or name or CSS or XPath.
@@ -8541,7 +8570,7 @@ declare namespace CodeceptJS {
8541
8570
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
8542
8571
  * @returns automatically synchronized promise through #recorder
8543
8572
  */
8544
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
8573
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
8545
8574
  /**
8546
8575
  * Unselects a checkbox or radio button.
8547
8576
  * Element is located by label or name or CSS or XPath.
@@ -8557,7 +8586,7 @@ declare namespace CodeceptJS {
8557
8586
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
8558
8587
  * @returns automatically synchronized promise through #recorder
8559
8588
  */
8560
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
8589
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
8561
8590
  /**
8562
8591
  * Verifies that the specified checkbox is checked.
8563
8592
  *
@@ -8569,7 +8598,7 @@ declare namespace CodeceptJS {
8569
8598
  * @param field - located by label|name|CSS|XPath|strict locator.
8570
8599
  * @returns automatically synchronized promise through #recorder
8571
8600
  */
8572
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
8601
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
8573
8602
  /**
8574
8603
  * Verifies that the specified checkbox is not checked.
8575
8604
  *
@@ -8581,7 +8610,7 @@ declare namespace CodeceptJS {
8581
8610
  * @param field - located by label|name|CSS|XPath|strict locator.
8582
8611
  * @returns automatically synchronized promise through #recorder
8583
8612
  */
8584
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
8613
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
8585
8614
  /**
8586
8615
  * Selects an option in a drop-down select.
8587
8616
  * Field is searched by label | name | CSS | XPath.
@@ -8605,7 +8634,7 @@ declare namespace CodeceptJS {
8605
8634
  * @param option - visible text or value of option.
8606
8635
  * @returns automatically synchronized promise through #recorder
8607
8636
  */
8608
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
8637
+ selectOption(select: LocatorOrString, option: string | any[]): void;
8609
8638
  /**
8610
8639
  * Checks that current url contains a provided fragment.
8611
8640
  *
@@ -8615,13 +8644,13 @@ declare namespace CodeceptJS {
8615
8644
  * @param url - a fragment to check
8616
8645
  * @returns automatically synchronized promise through #recorder
8617
8646
  */
8618
- seeInCurrentUrl(url: string): Promise<void>;
8647
+ seeInCurrentUrl(url: string): void;
8619
8648
  /**
8620
8649
  * Checks that current url does not contain a provided fragment.
8621
8650
  * @param url - value to check.
8622
8651
  * @returns automatically synchronized promise through #recorder
8623
8652
  */
8624
- dontSeeInCurrentUrl(url: string): Promise<void>;
8653
+ dontSeeInCurrentUrl(url: string): void;
8625
8654
  /**
8626
8655
  * Checks that current url is equal to provided one.
8627
8656
  * If a relative url provided, a configured url will be prepended to it.
@@ -8634,7 +8663,7 @@ declare namespace CodeceptJS {
8634
8663
  * @param url - value to check.
8635
8664
  * @returns automatically synchronized promise through #recorder
8636
8665
  */
8637
- seeCurrentUrlEquals(url: string): Promise<void>;
8666
+ seeCurrentUrlEquals(url: string): void;
8638
8667
  /**
8639
8668
  * Checks that current url is not equal to provided one.
8640
8669
  * If a relative url provided, a configured url will be prepended to it.
@@ -8646,7 +8675,7 @@ declare namespace CodeceptJS {
8646
8675
  * @param url - value to check.
8647
8676
  * @returns automatically synchronized promise through #recorder
8648
8677
  */
8649
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
8678
+ dontSeeCurrentUrlEquals(url: string): void;
8650
8679
  /**
8651
8680
  * Checks that a page contains a visible text.
8652
8681
  * Use context parameter to narrow down the search.
@@ -8660,7 +8689,7 @@ declare namespace CodeceptJS {
8660
8689
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
8661
8690
  * @returns automatically synchronized promise through #recorder
8662
8691
  */
8663
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
8692
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
8664
8693
  /**
8665
8694
  * Opposite to `see`. Checks that a text is not present on a page.
8666
8695
  * Use context parameter to narrow down the search.
@@ -8673,7 +8702,7 @@ declare namespace CodeceptJS {
8673
8702
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
8674
8703
  * @returns automatically synchronized promise through #recorder
8675
8704
  */
8676
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
8705
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
8677
8706
  /**
8678
8707
  * Checks that a given Element is visible
8679
8708
  * Element is located by CSS or XPath.
@@ -8684,7 +8713,7 @@ declare namespace CodeceptJS {
8684
8713
  * @param locator - located by CSS|XPath|strict locator.
8685
8714
  * @returns automatically synchronized promise through #recorder
8686
8715
  */
8687
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
8716
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
8688
8717
  /**
8689
8718
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
8690
8719
  *
@@ -8694,7 +8723,7 @@ declare namespace CodeceptJS {
8694
8723
  * @param locator - located by CSS|XPath|Strict locator.
8695
8724
  * @returns automatically synchronized promise through #recorder
8696
8725
  */
8697
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
8726
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
8698
8727
  /**
8699
8728
  * Checks that a given Element is present in the DOM
8700
8729
  * Element is located by CSS or XPath.
@@ -8705,7 +8734,7 @@ declare namespace CodeceptJS {
8705
8734
  * @param locator - element located by CSS|XPath|strict locator.
8706
8735
  * @returns automatically synchronized promise through #recorder
8707
8736
  */
8708
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
8737
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
8709
8738
  /**
8710
8739
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
8711
8740
  *
@@ -8715,7 +8744,7 @@ declare namespace CodeceptJS {
8715
8744
  * @param locator - located by CSS|XPath|Strict locator.
8716
8745
  * @returns automatically synchronized promise through #recorder
8717
8746
  */
8718
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
8747
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
8719
8748
  /**
8720
8749
  * Asserts that an element is visible a given number of times.
8721
8750
  * Element is located by CSS or XPath.
@@ -8727,7 +8756,7 @@ declare namespace CodeceptJS {
8727
8756
  * @param num - number of elements.
8728
8757
  * @returns automatically synchronized promise through #recorder
8729
8758
  */
8730
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
8759
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
8731
8760
  /**
8732
8761
  * Grab number of visible elements by locator.
8733
8762
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -8753,7 +8782,7 @@ declare namespace CodeceptJS {
8753
8782
  * @param value - value to check.
8754
8783
  * @returns automatically synchronized promise through #recorder
8755
8784
  */
8756
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
8785
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
8757
8786
  /**
8758
8787
  * Checks that value of input field or textarea doesn't equal to given value
8759
8788
  * Opposite to `seeInField`.
@@ -8766,7 +8795,7 @@ declare namespace CodeceptJS {
8766
8795
  * @param value - value to check.
8767
8796
  * @returns automatically synchronized promise through #recorder
8768
8797
  */
8769
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
8798
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
8770
8799
  /**
8771
8800
  * Checks that text is equal to provided one.
8772
8801
  *
@@ -8784,7 +8813,7 @@ declare namespace CodeceptJS {
8784
8813
  * @param text - value to check.
8785
8814
  * @returns automatically synchronized promise through #recorder
8786
8815
  */
8787
- seeInSource(text: string): Promise<void>;
8816
+ seeInSource(text: string): void;
8788
8817
  /**
8789
8818
  * Checks that the current page does not contains the given string in its raw source code.
8790
8819
  *
@@ -8794,7 +8823,7 @@ declare namespace CodeceptJS {
8794
8823
  * @param value - to check.
8795
8824
  * @returns automatically synchronized promise through #recorder
8796
8825
  */
8797
- dontSeeInSource(value: string): Promise<void>;
8826
+ dontSeeInSource(value: string): void;
8798
8827
  /**
8799
8828
  * Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
8800
8829
  * Filename is relative to output folder.
@@ -8806,7 +8835,7 @@ declare namespace CodeceptJS {
8806
8835
  * @param fileName - file name to save.
8807
8836
  * @returns automatically synchronized promise through #recorder
8808
8837
  */
8809
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
8838
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
8810
8839
  /**
8811
8840
  * Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
8812
8841
  * Filename is relative to output folder.
@@ -8820,7 +8849,7 @@ declare namespace CodeceptJS {
8820
8849
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
8821
8850
  * @returns automatically synchronized promise through #recorder
8822
8851
  */
8823
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
8852
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
8824
8853
  /**
8825
8854
  * Pauses execution for a number of seconds.
8826
8855
  *
@@ -8830,7 +8859,7 @@ declare namespace CodeceptJS {
8830
8859
  * @param sec - number of second to wait.
8831
8860
  * @returns automatically synchronized promise through #recorder
8832
8861
  */
8833
- wait(sec: number): Promise<void>;
8862
+ wait(sec: number): void;
8834
8863
  /**
8835
8864
  * Executes sync script on a page.
8836
8865
  * Pass arguments to function as additional parameters.
@@ -8982,7 +9011,7 @@ declare namespace CodeceptJS {
8982
9011
  * ```
8983
9012
  * @returns automatically synchronized promise through #recorder
8984
9013
  */
8985
- scrollPageToTop(): Promise<void>;
9014
+ scrollPageToTop(): void;
8986
9015
  /**
8987
9016
  * Scroll page to the bottom.
8988
9017
  *
@@ -8991,7 +9020,7 @@ declare namespace CodeceptJS {
8991
9020
  * ```
8992
9021
  * @returns automatically synchronized promise through #recorder
8993
9022
  */
8994
- scrollPageToBottom(): Promise<void>;
9023
+ scrollPageToBottom(): void;
8995
9024
  /**
8996
9025
  * Scrolls to element matched by locator.
8997
9026
  * Extra shift can be set with offsetX and offsetY options.
@@ -9005,7 +9034,7 @@ declare namespace CodeceptJS {
9005
9034
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
9006
9035
  * @returns automatically synchronized promise through #recorder
9007
9036
  */
9008
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
9037
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
9009
9038
  /**
9010
9039
  * Switches frame or in case of null locator reverts to parent.
9011
9040
  *
@@ -9016,7 +9045,7 @@ declare namespace CodeceptJS {
9016
9045
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
9017
9046
  * @returns automatically synchronized promise through #recorder
9018
9047
  */
9019
- switchTo(locator?: CodeceptJS.LocatorOrString): Promise<void>;
9048
+ switchTo(locator?: CodeceptJS.LocatorOrString): void;
9020
9049
  /**
9021
9050
  * Sets cookie(s).
9022
9051
  *
@@ -9034,7 +9063,7 @@ declare namespace CodeceptJS {
9034
9063
  * @param cookie - a cookie object or array of cookie objects.
9035
9064
  * @returns automatically synchronized promise through #recorder
9036
9065
  */
9037
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
9066
+ setCookie(cookie: Cookie | Cookie[]): void;
9038
9067
  /**
9039
9068
  * Checks that cookie with given name exists.
9040
9069
  *
@@ -9044,7 +9073,7 @@ declare namespace CodeceptJS {
9044
9073
  * @param name - cookie name.
9045
9074
  * @returns automatically synchronized promise through #recorder
9046
9075
  */
9047
- seeCookie(name: string): Promise<void>;
9076
+ seeCookie(name: string): void;
9048
9077
  /**
9049
9078
  * Checks that cookie with given name does not exist.
9050
9079
  *
@@ -9054,7 +9083,7 @@ declare namespace CodeceptJS {
9054
9083
  * @param name - cookie name.
9055
9084
  * @returns automatically synchronized promise through #recorder
9056
9085
  */
9057
- dontSeeCookie(name: string): Promise<void>;
9086
+ dontSeeCookie(name: string): void;
9058
9087
  /**
9059
9088
  * Gets a cookie object by name.
9060
9089
  * If none provided gets all cookies.
@@ -9077,12 +9106,11 @@ declare namespace CodeceptJS {
9077
9106
  *
9078
9107
  * ```js
9079
9108
  * I.clearCookie();
9080
- * I.clearCookie('test');
9109
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
9081
9110
  * ```
9082
9111
  * @param [cookie = null] - (optional, `null` by default) cookie name
9083
- * @returns automatically synchronized promise through #recorder
9084
9112
  */
9085
- clearCookie(cookie?: string): Promise<void>;
9113
+ clearCookie(cookie?: string): void;
9086
9114
  /**
9087
9115
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
9088
9116
  *
@@ -9093,7 +9121,7 @@ declare namespace CodeceptJS {
9093
9121
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9094
9122
  * @returns automatically synchronized promise through #recorder
9095
9123
  */
9096
- waitInUrl(urlPart: string, sec?: number): Promise<void>;
9124
+ waitInUrl(urlPart: string, sec?: number): void;
9097
9125
  /**
9098
9126
  * Waits for the entire URL to match the expected
9099
9127
  *
@@ -9105,7 +9133,7 @@ declare namespace CodeceptJS {
9105
9133
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9106
9134
  * @returns automatically synchronized promise through #recorder
9107
9135
  */
9108
- waitUrlEquals(urlPart: string, sec?: number): Promise<void>;
9136
+ waitUrlEquals(urlPart: string, sec?: number): void;
9109
9137
  /**
9110
9138
  * Waits for a function to return true (waits for 1 sec by default).
9111
9139
  * Running in browser context.
@@ -9124,7 +9152,7 @@ declare namespace CodeceptJS {
9124
9152
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
9125
9153
  * @returns automatically synchronized promise through #recorder
9126
9154
  */
9127
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
9155
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
9128
9156
  /**
9129
9157
  * Waits for a specified number of elements on the page.
9130
9158
  *
@@ -9136,7 +9164,7 @@ declare namespace CodeceptJS {
9136
9164
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9137
9165
  * @returns automatically synchronized promise through #recorder
9138
9166
  */
9139
- waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<void>;
9167
+ waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
9140
9168
  /**
9141
9169
  * Waits for element to be present on page (by default waits for 1sec).
9142
9170
  * Element can be located by CSS or XPath.
@@ -9149,7 +9177,7 @@ declare namespace CodeceptJS {
9149
9177
  * @param [sec] - (optional, `1` by default) time in seconds to wait
9150
9178
  * @returns automatically synchronized promise through #recorder
9151
9179
  */
9152
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
9180
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9153
9181
  /**
9154
9182
  * Waits for an element to hide (by default waits for 1sec).
9155
9183
  * Element can be located by CSS or XPath.
@@ -9161,7 +9189,7 @@ declare namespace CodeceptJS {
9161
9189
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9162
9190
  * @returns automatically synchronized promise through #recorder
9163
9191
  */
9164
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
9192
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9165
9193
  /**
9166
9194
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
9167
9195
  * Element can be located by CSS or XPath.
@@ -9173,7 +9201,7 @@ declare namespace CodeceptJS {
9173
9201
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9174
9202
  * @returns automatically synchronized promise through #recorder
9175
9203
  */
9176
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
9204
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9177
9205
  /**
9178
9206
  * Waits for a text to appear (by default waits for 1sec).
9179
9207
  * Element can be located by CSS or XPath.
@@ -9188,7 +9216,7 @@ declare namespace CodeceptJS {
9188
9216
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
9189
9217
  * @returns automatically synchronized promise through #recorder
9190
9218
  */
9191
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
9219
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
9192
9220
  }
9193
9221
  /**
9194
9222
  * ## Configuration
@@ -9649,7 +9677,7 @@ declare namespace CodeceptJS {
9649
9677
  * @param url - url path or global url.
9650
9678
  * @returns automatically synchronized promise through #recorder
9651
9679
  */
9652
- amOnPage(url: string): Promise<void>;
9680
+ amOnPage(url: string): void;
9653
9681
  /**
9654
9682
  * Perform a click on a link or a button, given by a locator.
9655
9683
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -9679,7 +9707,7 @@ declare namespace CodeceptJS {
9679
9707
  *
9680
9708
  * {{ react }}
9681
9709
  */
9682
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<void>;
9710
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
9683
9711
  /**
9684
9712
  * Perform an emulated click on a link or a button, given by a locator.
9685
9713
  * Unlike normal click instead of sending native event, emulates a click with JavaScript.
@@ -9712,7 +9740,7 @@ declare namespace CodeceptJS {
9712
9740
  *
9713
9741
  * {{ react }}
9714
9742
  */
9715
- forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9743
+ forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9716
9744
  /**
9717
9745
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
9718
9746
  * Context can be specified as second parameter to narrow search.
@@ -9730,7 +9758,7 @@ declare namespace CodeceptJS {
9730
9758
  *
9731
9759
  * {{ react }}
9732
9760
  */
9733
- doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9761
+ doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9734
9762
  /**
9735
9763
  * Performs right click on a clickable element matched by semantic locator, CSS or XPath.
9736
9764
  *
@@ -9749,7 +9777,7 @@ declare namespace CodeceptJS {
9749
9777
  *
9750
9778
  * {{ react }}
9751
9779
  */
9752
- rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9780
+ rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9753
9781
  /**
9754
9782
  * Emulates right click on an element.
9755
9783
  * Unlike normal click instead of sending native event, emulates a click with JavaScript.
@@ -9772,7 +9800,7 @@ declare namespace CodeceptJS {
9772
9800
  *
9773
9801
  * {{ react }}
9774
9802
  */
9775
- forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9803
+ forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9776
9804
  /**
9777
9805
  * Fills a text field or textarea, after clearing its value, with the given string.
9778
9806
  * Field is located by name, label, CSS, or XPath.
@@ -9794,7 +9822,7 @@ declare namespace CodeceptJS {
9794
9822
  * {{ react }}
9795
9823
  * {{ custom }}
9796
9824
  */
9797
- fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
9825
+ fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
9798
9826
  /**
9799
9827
  * Appends text to a input field or textarea.
9800
9828
  * Field is located by name, label, CSS or XPath
@@ -9810,7 +9838,7 @@ declare namespace CodeceptJS {
9810
9838
  *
9811
9839
  * {{ react }}
9812
9840
  */
9813
- appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<void>;
9841
+ appendField(field: CodeceptJS.LocatorOrString, value: string): void;
9814
9842
  /**
9815
9843
  * Clears a `<textarea>` or text `<input>` element's value.
9816
9844
  *
@@ -9822,7 +9850,7 @@ declare namespace CodeceptJS {
9822
9850
  * @param editable - field located by label|name|CSS|XPath|strict locator.
9823
9851
  * @returns automatically synchronized promise through #recorder.
9824
9852
  */
9825
- clearField(editable: LocatorOrString): Promise<void>;
9853
+ clearField(editable: LocatorOrString): void;
9826
9854
  /**
9827
9855
  * Selects an option in a drop-down select.
9828
9856
  * Field is searched by label | name | CSS | XPath.
@@ -9846,7 +9874,7 @@ declare namespace CodeceptJS {
9846
9874
  * @param option - visible text or value of option.
9847
9875
  * @returns automatically synchronized promise through #recorder
9848
9876
  */
9849
- selectOption(select: LocatorOrString, option: string | any[]): Promise<void>;
9877
+ selectOption(select: LocatorOrString, option: string | any[]): void;
9850
9878
  /**
9851
9879
  * Attaches a file to element located by label, name, CSS or XPath
9852
9880
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -9862,7 +9890,7 @@ declare namespace CodeceptJS {
9862
9890
  *
9863
9891
  * Appium: not tested
9864
9892
  */
9865
- attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<void>;
9893
+ attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
9866
9894
  /**
9867
9895
  * Selects a checkbox or radio button.
9868
9896
  * Element is located by label or name or CSS or XPath.
@@ -9880,7 +9908,7 @@ declare namespace CodeceptJS {
9880
9908
  *
9881
9909
  * Appium: not tested
9882
9910
  */
9883
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9911
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9884
9912
  /**
9885
9913
  * Unselects a checkbox or radio button.
9886
9914
  * Element is located by label or name or CSS or XPath.
@@ -9898,7 +9926,7 @@ declare namespace CodeceptJS {
9898
9926
  *
9899
9927
  * Appium: not tested
9900
9928
  */
9901
- uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<void>;
9929
+ uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9902
9930
  /**
9903
9931
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
9904
9932
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -10027,7 +10055,7 @@ declare namespace CodeceptJS {
10027
10055
  * @param text - text value to check.
10028
10056
  * @returns automatically synchronized promise through #recorder
10029
10057
  */
10030
- seeInTitle(text: string): Promise<void>;
10058
+ seeInTitle(text: string): void;
10031
10059
  /**
10032
10060
  * Checks that title is equal to provided one.
10033
10061
  *
@@ -10037,7 +10065,7 @@ declare namespace CodeceptJS {
10037
10065
  * @param text - value to check.
10038
10066
  * @returns automatically synchronized promise through #recorder
10039
10067
  */
10040
- seeTitleEquals(text: string): Promise<void>;
10068
+ seeTitleEquals(text: string): void;
10041
10069
  /**
10042
10070
  * Checks that title does not contain text.
10043
10071
  *
@@ -10047,7 +10075,7 @@ declare namespace CodeceptJS {
10047
10075
  * @param text - value to check.
10048
10076
  * @returns automatically synchronized promise through #recorder
10049
10077
  */
10050
- dontSeeInTitle(text: string): Promise<void>;
10078
+ dontSeeInTitle(text: string): void;
10051
10079
  /**
10052
10080
  * Retrieves a page title and returns it to test.
10053
10081
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -10074,7 +10102,7 @@ declare namespace CodeceptJS {
10074
10102
  *
10075
10103
  * {{ react }}
10076
10104
  */
10077
- see(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
10105
+ see(text: string, context?: CodeceptJS.LocatorOrString): void;
10078
10106
  /**
10079
10107
  * Checks that text is equal to provided one.
10080
10108
  *
@@ -10085,7 +10113,7 @@ declare namespace CodeceptJS {
10085
10113
  * @param [context = null] - element located by CSS|XPath|strict locator.
10086
10114
  * @returns automatically synchronized promise through #recorder
10087
10115
  */
10088
- seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
10116
+ seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
10089
10117
  /**
10090
10118
  * Opposite to `see`. Checks that a text is not present on a page.
10091
10119
  * Use context parameter to narrow down the search.
@@ -10101,7 +10129,7 @@ declare namespace CodeceptJS {
10101
10129
  *
10102
10130
  * {{ react }}
10103
10131
  */
10104
- dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<void>;
10132
+ dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
10105
10133
  /**
10106
10134
  * Checks that the given input field or textarea equals to given value.
10107
10135
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -10116,7 +10144,7 @@ declare namespace CodeceptJS {
10116
10144
  * @param value - value to check.
10117
10145
  * @returns automatically synchronized promise through #recorder
10118
10146
  */
10119
- seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
10147
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
10120
10148
  /**
10121
10149
  * Checks that value of input field or textarea doesn't equal to given value
10122
10150
  * Opposite to `seeInField`.
@@ -10129,7 +10157,7 @@ declare namespace CodeceptJS {
10129
10157
  * @param value - value to check.
10130
10158
  * @returns automatically synchronized promise through #recorder
10131
10159
  */
10132
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<void>;
10160
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
10133
10161
  /**
10134
10162
  * Verifies that the specified checkbox is checked.
10135
10163
  *
@@ -10143,7 +10171,7 @@ declare namespace CodeceptJS {
10143
10171
  *
10144
10172
  * Appium: not tested
10145
10173
  */
10146
- seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
10174
+ seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
10147
10175
  /**
10148
10176
  * Verifies that the specified checkbox is not checked.
10149
10177
  *
@@ -10157,7 +10185,7 @@ declare namespace CodeceptJS {
10157
10185
  *
10158
10186
  * Appium: not tested
10159
10187
  */
10160
- dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<void>;
10188
+ dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
10161
10189
  /**
10162
10190
  * Checks that a given Element is visible
10163
10191
  * Element is located by CSS or XPath.
@@ -10170,7 +10198,7 @@ declare namespace CodeceptJS {
10170
10198
  *
10171
10199
  * {{ react }}
10172
10200
  */
10173
- seeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
10201
+ seeElement(locator: CodeceptJS.LocatorOrString): void;
10174
10202
  /**
10175
10203
  * Opposite to `seeElement`. Checks that element is not visible (or in DOM)
10176
10204
  *
@@ -10182,7 +10210,7 @@ declare namespace CodeceptJS {
10182
10210
  *
10183
10211
  * {{ react }}
10184
10212
  */
10185
- dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<void>;
10213
+ dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
10186
10214
  /**
10187
10215
  * Checks that a given Element is present in the DOM
10188
10216
  * Element is located by CSS or XPath.
@@ -10193,7 +10221,7 @@ declare namespace CodeceptJS {
10193
10221
  * @param locator - element located by CSS|XPath|strict locator.
10194
10222
  * @returns automatically synchronized promise through #recorder
10195
10223
  */
10196
- seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
10224
+ seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
10197
10225
  /**
10198
10226
  * Opposite to `seeElementInDOM`. Checks that element is not on page.
10199
10227
  *
@@ -10203,7 +10231,7 @@ declare namespace CodeceptJS {
10203
10231
  * @param locator - located by CSS|XPath|Strict locator.
10204
10232
  * @returns automatically synchronized promise through #recorder
10205
10233
  */
10206
- dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<void>;
10234
+ dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
10207
10235
  /**
10208
10236
  * Checks that the current page contains the given string in its raw source code.
10209
10237
  *
@@ -10213,7 +10241,7 @@ declare namespace CodeceptJS {
10213
10241
  * @param text - value to check.
10214
10242
  * @returns automatically synchronized promise through #recorder
10215
10243
  */
10216
- seeInSource(text: string): Promise<void>;
10244
+ seeInSource(text: string): void;
10217
10245
  /**
10218
10246
  * Retrieves page source and returns it to test.
10219
10247
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -10255,7 +10283,7 @@ declare namespace CodeceptJS {
10255
10283
  * @param value - to check.
10256
10284
  * @returns automatically synchronized promise through #recorder
10257
10285
  */
10258
- dontSeeInSource(value: string): Promise<void>;
10286
+ dontSeeInSource(value: string): void;
10259
10287
  /**
10260
10288
  * Asserts that an element appears a given number of times in the DOM.
10261
10289
  * Element is located by label or name or CSS or XPath.
@@ -10270,7 +10298,7 @@ declare namespace CodeceptJS {
10270
10298
  *
10271
10299
  * {{ react }}
10272
10300
  */
10273
- seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
10301
+ seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
10274
10302
  /**
10275
10303
  * Asserts that an element is visible a given number of times.
10276
10304
  * Element is located by CSS or XPath.
@@ -10284,7 +10312,7 @@ declare namespace CodeceptJS {
10284
10312
  *
10285
10313
  * {{ react }}
10286
10314
  */
10287
- seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<void>;
10315
+ seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
10288
10316
  /**
10289
10317
  * Checks that all elements with given locator have given CSS properties.
10290
10318
  *
@@ -10295,7 +10323,7 @@ declare namespace CodeceptJS {
10295
10323
  * @param cssProperties - object with CSS properties and their values to check.
10296
10324
  * @returns automatically synchronized promise through #recorder
10297
10325
  */
10298
- seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<void>;
10326
+ seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
10299
10327
  /**
10300
10328
  * Checks that all elements with given locator have given attributes.
10301
10329
  *
@@ -10306,7 +10334,7 @@ declare namespace CodeceptJS {
10306
10334
  * @param attributes - attributes and their values to check.
10307
10335
  * @returns automatically synchronized promise through #recorder
10308
10336
  */
10309
- seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<void>;
10337
+ seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
10310
10338
  /**
10311
10339
  * Grab number of visible elements by locator.
10312
10340
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -10327,13 +10355,13 @@ declare namespace CodeceptJS {
10327
10355
  * @param url - a fragment to check
10328
10356
  * @returns automatically synchronized promise through #recorder
10329
10357
  */
10330
- seeInCurrentUrl(url: string): Promise<void>;
10358
+ seeInCurrentUrl(url: string): void;
10331
10359
  /**
10332
10360
  * Checks that current url does not contain a provided fragment.
10333
10361
  * @param url - value to check.
10334
10362
  * @returns automatically synchronized promise through #recorder
10335
10363
  */
10336
- dontSeeInCurrentUrl(url: string): Promise<void>;
10364
+ dontSeeInCurrentUrl(url: string): void;
10337
10365
  /**
10338
10366
  * Checks that current url is equal to provided one.
10339
10367
  * If a relative url provided, a configured url will be prepended to it.
@@ -10346,7 +10374,7 @@ declare namespace CodeceptJS {
10346
10374
  * @param url - value to check.
10347
10375
  * @returns automatically synchronized promise through #recorder
10348
10376
  */
10349
- seeCurrentUrlEquals(url: string): Promise<void>;
10377
+ seeCurrentUrlEquals(url: string): void;
10350
10378
  /**
10351
10379
  * Checks that current url is not equal to provided one.
10352
10380
  * If a relative url provided, a configured url will be prepended to it.
@@ -10358,7 +10386,7 @@ declare namespace CodeceptJS {
10358
10386
  * @param url - value to check.
10359
10387
  * @returns automatically synchronized promise through #recorder
10360
10388
  */
10361
- dontSeeCurrentUrlEquals(url: string): Promise<void>;
10389
+ dontSeeCurrentUrlEquals(url: string): void;
10362
10390
  /**
10363
10391
  * Executes sync script on a page.
10364
10392
  * Pass arguments to function as additional parameters.
@@ -10429,7 +10457,7 @@ declare namespace CodeceptJS {
10429
10457
  * @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
10430
10458
  * @returns automatically synchronized promise through #recorder
10431
10459
  */
10432
- scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<void>;
10460
+ scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): void;
10433
10461
  /**
10434
10462
  * Scrolls to element matched by locator.
10435
10463
  * Extra shift can be set with offsetX and offsetY options.
@@ -10443,7 +10471,7 @@ declare namespace CodeceptJS {
10443
10471
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
10444
10472
  * @returns automatically synchronized promise through #recorder
10445
10473
  */
10446
- scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
10474
+ scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
10447
10475
  /**
10448
10476
  * Moves cursor to element matched by locator.
10449
10477
  * Extra shift can be set with offsetX and offsetY options.
@@ -10457,7 +10485,7 @@ declare namespace CodeceptJS {
10457
10485
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
10458
10486
  * @returns automatically synchronized promise through #recorder
10459
10487
  */
10460
- moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<void>;
10488
+ moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
10461
10489
  /**
10462
10490
  * Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
10463
10491
  * Filename is relative to output folder.
@@ -10469,7 +10497,7 @@ declare namespace CodeceptJS {
10469
10497
  * @param fileName - file name to save.
10470
10498
  * @returns automatically synchronized promise through #recorder
10471
10499
  */
10472
- saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<void>;
10500
+ saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
10473
10501
  /**
10474
10502
  * Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
10475
10503
  * Filename is relative to output folder.
@@ -10483,7 +10511,7 @@ declare namespace CodeceptJS {
10483
10511
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
10484
10512
  * @returns automatically synchronized promise through #recorder
10485
10513
  */
10486
- saveScreenshot(fileName: string, fullPage?: boolean): Promise<void>;
10514
+ saveScreenshot(fileName: string, fullPage?: boolean): void;
10487
10515
  /**
10488
10516
  * Sets cookie(s).
10489
10517
  *
@@ -10506,19 +10534,18 @@ declare namespace CodeceptJS {
10506
10534
  * Uses Selenium's JSON [cookie
10507
10535
  * format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
10508
10536
  */
10509
- setCookie(cookie: Cookie | Cookie[]): Promise<void>;
10537
+ setCookie(cookie: Cookie | Cookie[]): void;
10510
10538
  /**
10511
10539
  * Clears a cookie by name,
10512
10540
  * if none provided clears all cookies.
10513
10541
  *
10514
10542
  * ```js
10515
10543
  * I.clearCookie();
10516
- * I.clearCookie('test');
10544
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
10517
10545
  * ```
10518
10546
  * @param [cookie = null] - (optional, `null` by default) cookie name
10519
- * @returns automatically synchronized promise through #recorder
10520
10547
  */
10521
- clearCookie(cookie?: string): Promise<void>;
10548
+ clearCookie(cookie?: string): void;
10522
10549
  /**
10523
10550
  * Checks that cookie with given name exists.
10524
10551
  *
@@ -10528,7 +10555,7 @@ declare namespace CodeceptJS {
10528
10555
  * @param name - cookie name.
10529
10556
  * @returns automatically synchronized promise through #recorder
10530
10557
  */
10531
- seeCookie(name: string): Promise<void>;
10558
+ seeCookie(name: string): void;
10532
10559
  /**
10533
10560
  * Checks that cookie with given name does not exist.
10534
10561
  *
@@ -10538,7 +10565,7 @@ declare namespace CodeceptJS {
10538
10565
  * @param name - cookie name.
10539
10566
  * @returns automatically synchronized promise through #recorder
10540
10567
  */
10541
- dontSeeCookie(name: string): Promise<void>;
10568
+ dontSeeCookie(name: string): void;
10542
10569
  /**
10543
10570
  * Gets a cookie object by name.
10544
10571
  * If none provided gets all cookies.
@@ -10588,7 +10615,7 @@ declare namespace CodeceptJS {
10588
10615
  * @param key - name of key to press down.
10589
10616
  * @returns automatically synchronized promise through #recorder
10590
10617
  */
10591
- pressKeyDown(key: string): Promise<void>;
10618
+ pressKeyDown(key: string): void;
10592
10619
  /**
10593
10620
  * Releases a key in the browser which was previously set to a down state.
10594
10621
  *
@@ -10602,7 +10629,7 @@ declare namespace CodeceptJS {
10602
10629
  * @param key - name of key to release.
10603
10630
  * @returns automatically synchronized promise through #recorder
10604
10631
  */
10605
- pressKeyUp(key: string): Promise<void>;
10632
+ pressKeyUp(key: string): void;
10606
10633
  /**
10607
10634
  * Presses a key in the browser (on a focused element).
10608
10635
  *
@@ -10667,7 +10694,7 @@ declare namespace CodeceptJS {
10667
10694
  *
10668
10695
  * _Note:_ In case a text field or textarea is focused be aware that some browsers do not respect active modifier when combining modifier keys with other keys.
10669
10696
  */
10670
- pressKey(key: string | string[]): Promise<void>;
10697
+ pressKey(key: string | string[]): void;
10671
10698
  /**
10672
10699
  * Types out the given text into an active field.
10673
10700
  * To slow down typing use a second parameter, to set interval between key presses.
@@ -10690,7 +10717,7 @@ declare namespace CodeceptJS {
10690
10717
  * @param [delay = null] - (optional) delay in ms between key presses
10691
10718
  * @returns automatically synchronized promise through #recorder
10692
10719
  */
10693
- type(key: string | string[], delay?: number): Promise<void>;
10720
+ type(key: string | string[], delay?: number): void;
10694
10721
  /**
10695
10722
  * Resize the current window to provided width and height.
10696
10723
  * First parameter can be set to `maximize`.
@@ -10700,7 +10727,7 @@ declare namespace CodeceptJS {
10700
10727
  *
10701
10728
  * Appium: not tested in web, in apps doesn't work
10702
10729
  */
10703
- resizeWindow(width: number, height: number): Promise<void>;
10730
+ resizeWindow(width: number, height: number): void;
10704
10731
  /**
10705
10732
  * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
10706
10733
  *
@@ -10715,7 +10742,7 @@ declare namespace CodeceptJS {
10715
10742
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
10716
10743
  * @returns automatically synchronized promise through #recorder
10717
10744
  */
10718
- focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
10745
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): void;
10719
10746
  /**
10720
10747
  * Remove focus from a text input, button, etc.
10721
10748
  * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
@@ -10735,7 +10762,7 @@ declare namespace CodeceptJS {
10735
10762
  * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
10736
10763
  * @returns automatically synchronized promise through #recorder
10737
10764
  */
10738
- blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<void>;
10765
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): void;
10739
10766
  /**
10740
10767
  * Drag an item to a destination element.
10741
10768
  *
@@ -10748,7 +10775,7 @@ declare namespace CodeceptJS {
10748
10775
  *
10749
10776
  * Appium: not tested
10750
10777
  */
10751
- dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<void>;
10778
+ dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
10752
10779
  /**
10753
10780
  * Drag the scrubber of a slider to a given position
10754
10781
  * For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
@@ -10761,7 +10788,7 @@ declare namespace CodeceptJS {
10761
10788
  * @param offsetX - position to drag.
10762
10789
  * @returns automatically synchronized promise through #recorder
10763
10790
  */
10764
- dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<void>;
10791
+ dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
10765
10792
  /**
10766
10793
  * Get all Window Handles.
10767
10794
  * Useful for referencing a specific handle when calling `I.switchToWindow(handle)`
@@ -10803,7 +10830,7 @@ declare namespace CodeceptJS {
10803
10830
  * ```
10804
10831
  * @returns automatically synchronized promise through #recorder
10805
10832
  */
10806
- closeOtherTabs(): Promise<void>;
10833
+ closeOtherTabs(): void;
10807
10834
  /**
10808
10835
  * Pauses execution for a number of seconds.
10809
10836
  *
@@ -10813,7 +10840,7 @@ declare namespace CodeceptJS {
10813
10840
  * @param sec - number of second to wait.
10814
10841
  * @returns automatically synchronized promise through #recorder
10815
10842
  */
10816
- wait(sec: number): Promise<void>;
10843
+ wait(sec: number): void;
10817
10844
  /**
10818
10845
  * Waits for element to become enabled (by default waits for 1sec).
10819
10846
  * Element can be located by CSS or XPath.
@@ -10821,7 +10848,7 @@ declare namespace CodeceptJS {
10821
10848
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
10822
10849
  * @returns automatically synchronized promise through #recorder
10823
10850
  */
10824
- waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10851
+ waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10825
10852
  /**
10826
10853
  * Waits for element to be present on page (by default waits for 1sec).
10827
10854
  * Element can be located by CSS or XPath.
@@ -10834,7 +10861,7 @@ declare namespace CodeceptJS {
10834
10861
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10835
10862
  * @returns automatically synchronized promise through #recorder
10836
10863
  */
10837
- waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10864
+ waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10838
10865
  /**
10839
10866
  * Waits for element to be clickable (by default waits for 1sec).
10840
10867
  * Element can be located by CSS or XPath.
@@ -10847,7 +10874,7 @@ declare namespace CodeceptJS {
10847
10874
  * @param [sec] - (optional, `1` by default) time in seconds to wait
10848
10875
  * @returns automatically synchronized promise through #recorder
10849
10876
  */
10850
- waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10877
+ waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10851
10878
  /**
10852
10879
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
10853
10880
  *
@@ -10858,7 +10885,7 @@ declare namespace CodeceptJS {
10858
10885
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10859
10886
  * @returns automatically synchronized promise through #recorder
10860
10887
  */
10861
- waitInUrl(urlPart: string, sec?: number): Promise<void>;
10888
+ waitInUrl(urlPart: string, sec?: number): void;
10862
10889
  /**
10863
10890
  * Waits for the entire URL to match the expected
10864
10891
  *
@@ -10870,7 +10897,7 @@ declare namespace CodeceptJS {
10870
10897
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10871
10898
  * @returns automatically synchronized promise through #recorder
10872
10899
  */
10873
- waitUrlEquals(urlPart: string, sec?: number): Promise<void>;
10900
+ waitUrlEquals(urlPart: string, sec?: number): void;
10874
10901
  /**
10875
10902
  * Waits for a text to appear (by default waits for 1sec).
10876
10903
  * Element can be located by CSS or XPath.
@@ -10885,7 +10912,7 @@ declare namespace CodeceptJS {
10885
10912
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
10886
10913
  * @returns automatically synchronized promise through #recorder
10887
10914
  */
10888
- waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<void>;
10915
+ waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
10889
10916
  /**
10890
10917
  * Waits for the specified value to be in value attribute.
10891
10918
  *
@@ -10897,7 +10924,7 @@ declare namespace CodeceptJS {
10897
10924
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10898
10925
  * @returns automatically synchronized promise through #recorder
10899
10926
  */
10900
- waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<void>;
10927
+ waitForValue(field: LocatorOrString, value: string, sec?: number): void;
10901
10928
  /**
10902
10929
  * Waits for an element to become visible on a page (by default waits for 1sec).
10903
10930
  * Element can be located by CSS or XPath.
@@ -10909,7 +10936,7 @@ declare namespace CodeceptJS {
10909
10936
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10910
10937
  * @returns automatically synchronized promise through #recorder
10911
10938
  */
10912
- waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10939
+ waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10913
10940
  /**
10914
10941
  * Waits for a specified number of elements on the page.
10915
10942
  *
@@ -10921,7 +10948,7 @@ declare namespace CodeceptJS {
10921
10948
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10922
10949
  * @returns automatically synchronized promise through #recorder
10923
10950
  */
10924
- waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<void>;
10951
+ waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
10925
10952
  /**
10926
10953
  * Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
10927
10954
  * Element can be located by CSS or XPath.
@@ -10933,7 +10960,7 @@ declare namespace CodeceptJS {
10933
10960
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10934
10961
  * @returns automatically synchronized promise through #recorder
10935
10962
  */
10936
- waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10963
+ waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10937
10964
  /**
10938
10965
  * Waits for an element to hide (by default waits for 1sec).
10939
10966
  * Element can be located by CSS or XPath.
@@ -10945,7 +10972,7 @@ declare namespace CodeceptJS {
10945
10972
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10946
10973
  * @returns automatically synchronized promise through #recorder
10947
10974
  */
10948
- waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10975
+ waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10949
10976
  /**
10950
10977
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
10951
10978
  * Element can be located by CSS or XPath.
@@ -10957,7 +10984,7 @@ declare namespace CodeceptJS {
10957
10984
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10958
10985
  * @returns automatically synchronized promise through #recorder
10959
10986
  */
10960
- waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<void>;
10987
+ waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
10961
10988
  /**
10962
10989
  * Waits for a function to return true (waits for 1 sec by default).
10963
10990
  * Running in browser context.
@@ -10976,7 +11003,7 @@ declare namespace CodeceptJS {
10976
11003
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10977
11004
  * @returns automatically synchronized promise through #recorder
10978
11005
  */
10979
- waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<void>;
11006
+ waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
10980
11007
  /**
10981
11008
  * Switches frame or in case of null locator reverts to parent.
10982
11009
  *
@@ -10987,7 +11014,7 @@ declare namespace CodeceptJS {
10987
11014
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
10988
11015
  * @returns automatically synchronized promise through #recorder
10989
11016
  */
10990
- switchTo(locator?: CodeceptJS.LocatorOrString): Promise<void>;
11017
+ switchTo(locator?: CodeceptJS.LocatorOrString): void;
10991
11018
  /**
10992
11019
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
10993
11020
  *
@@ -10999,7 +11026,7 @@ declare namespace CodeceptJS {
10999
11026
  * @param [sec = null] - (optional) time in seconds to wait.
11000
11027
  * @returns automatically synchronized promise through #recorder
11001
11028
  */
11002
- switchToNextTab(num?: number, sec?: number | null): Promise<void>;
11029
+ switchToNextTab(num?: number, sec?: number | null): void;
11003
11030
  /**
11004
11031
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
11005
11032
  *
@@ -11011,7 +11038,7 @@ declare namespace CodeceptJS {
11011
11038
  * @param [sec = null] - (optional) time in seconds to wait.
11012
11039
  * @returns automatically synchronized promise through #recorder
11013
11040
  */
11014
- switchToPreviousTab(num?: number, sec?: number): Promise<void>;
11041
+ switchToPreviousTab(num?: number, sec?: number): void;
11015
11042
  /**
11016
11043
  * Close current tab.
11017
11044
  *
@@ -11020,7 +11047,7 @@ declare namespace CodeceptJS {
11020
11047
  * ```
11021
11048
  * @returns automatically synchronized promise through #recorder
11022
11049
  */
11023
- closeCurrentTab(): Promise<void>;
11050
+ closeCurrentTab(): void;
11024
11051
  /**
11025
11052
  * Open new tab and switch to it.
11026
11053
  *
@@ -11029,7 +11056,7 @@ declare namespace CodeceptJS {
11029
11056
  * ```
11030
11057
  * @returns automatically synchronized promise through #recorder
11031
11058
  */
11032
- openNewTab(): Promise<void>;
11059
+ openNewTab(): void;
11033
11060
  /**
11034
11061
  * Grab number of open tabs.
11035
11062
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -11048,7 +11075,7 @@ declare namespace CodeceptJS {
11048
11075
  * ```
11049
11076
  * @returns automatically synchronized promise through #recorder
11050
11077
  */
11051
- refreshPage(): Promise<void>;
11078
+ refreshPage(): void;
11052
11079
  /**
11053
11080
  * Scroll page to the top.
11054
11081
  *
@@ -11057,7 +11084,7 @@ declare namespace CodeceptJS {
11057
11084
  * ```
11058
11085
  * @returns automatically synchronized promise through #recorder
11059
11086
  */
11060
- scrollPageToTop(): Promise<void>;
11087
+ scrollPageToTop(): void;
11061
11088
  /**
11062
11089
  * Scroll page to the bottom.
11063
11090
  *
@@ -11066,7 +11093,7 @@ declare namespace CodeceptJS {
11066
11093
  * ```
11067
11094
  * @returns automatically synchronized promise through #recorder
11068
11095
  */
11069
- scrollPageToBottom(): Promise<void>;
11096
+ scrollPageToBottom(): void;
11070
11097
  /**
11071
11098
  * Retrieves a page scroll position and returns it to test.
11072
11099
  * Resumes test execution, so **should be used inside an async function with `await`** operator.
@@ -11090,7 +11117,7 @@ declare namespace CodeceptJS {
11090
11117
  * @param [altitude = null] - (optional, null by default) to set
11091
11118
  * @returns automatically synchronized promise through #recorder
11092
11119
  */
11093
- setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<void>;
11120
+ setGeoLocation(latitude: number, longitude: number, altitude?: number): void;
11094
11121
  /**
11095
11122
  * Return the current geo location
11096
11123
  * Resumes test execution, so **should be used inside async function with `await`** operator.