codeceptjs 3.5.0 → 3.5.1-2.beta.7

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 (273) hide show
  1. package/README.md +24 -25
  2. package/lib/actor.js +6 -3
  3. package/lib/ai.js +12 -3
  4. package/lib/cli.js +12 -2
  5. package/lib/codecept.js +4 -0
  6. package/lib/colorUtils.js +10 -0
  7. package/lib/command/definitions.js +2 -7
  8. package/lib/command/dryRun.js +2 -1
  9. package/lib/command/info.js +24 -0
  10. package/lib/command/init.js +51 -5
  11. package/lib/command/run-multiple/collection.js +17 -5
  12. package/lib/command/run-multiple.js +4 -2
  13. package/lib/command/run-workers.js +66 -4
  14. package/lib/command/run.js +7 -0
  15. package/lib/command/workers/runTests.js +39 -0
  16. package/lib/data/context.js +14 -6
  17. package/lib/event.js +4 -0
  18. package/lib/helper/ApiDataFactory.js +2 -1
  19. package/lib/helper/Appium.js +73 -24
  20. package/lib/helper/Expect.js +422 -0
  21. package/lib/helper/FileSystem.js +1 -1
  22. package/lib/helper/GraphQL.js +25 -0
  23. package/lib/helper/Nightmare.js +9 -4
  24. package/lib/helper/OpenAI.js +14 -10
  25. package/lib/helper/Playwright.js +1205 -288
  26. package/lib/helper/Protractor.js +11 -6
  27. package/lib/helper/Puppeteer.js +173 -61
  28. package/lib/helper/TestCafe.js +44 -9
  29. package/lib/helper/WebDriver.js +231 -82
  30. package/lib/helper/errors/ElementNotFound.js +2 -1
  31. package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
  32. package/lib/helper/scripts/blurElement.js +17 -0
  33. package/lib/helper/scripts/focusElement.js +17 -0
  34. package/lib/helper/scripts/highlightElement.js +2 -2
  35. package/lib/html.js +3 -3
  36. package/lib/interfaces/bdd.js +1 -1
  37. package/lib/interfaces/gherkin.js +37 -3
  38. package/lib/interfaces/scenarioConfig.js +1 -0
  39. package/lib/locator.js +17 -4
  40. package/lib/mochaFactory.js +2 -1
  41. package/lib/output.js +1 -1
  42. package/lib/pause.js +12 -9
  43. package/lib/plugin/autoLogin.js +45 -10
  44. package/lib/plugin/heal.js +47 -17
  45. package/lib/plugin/retryFailedStep.js +10 -1
  46. package/lib/plugin/retryTo.js +2 -4
  47. package/lib/plugin/selenoid.js +6 -1
  48. package/lib/plugin/standardActingHelpers.js +0 -2
  49. package/lib/plugin/stepByStepReport.js +2 -2
  50. package/lib/plugin/tryTo.js +5 -7
  51. package/lib/plugin/wdio.js +0 -1
  52. package/lib/recorder.js +20 -9
  53. package/lib/session.js +1 -1
  54. package/lib/step.js +30 -11
  55. package/lib/ui.js +1 -0
  56. package/lib/utils.js +18 -1
  57. package/lib/workers.js +28 -3
  58. package/package.json +108 -98
  59. package/translations/de-DE.js +5 -0
  60. package/translations/fr-FR.js +14 -1
  61. package/translations/it-IT.js +1 -0
  62. package/translations/ja-JP.js +5 -0
  63. package/translations/pl-PL.js +5 -0
  64. package/translations/pt-BR.js +1 -0
  65. package/translations/ru-RU.js +1 -0
  66. package/translations/zh-CN.js +5 -0
  67. package/translations/zh-TW.js +5 -0
  68. package/typings/index.d.ts +8 -6
  69. package/typings/promiseBasedTypes.d.ts +784 -822
  70. package/typings/types.d.ts +1214 -727
  71. package/CHANGELOG.md +0 -2492
  72. package/docs/advanced.md +0 -351
  73. package/docs/ai.md +0 -246
  74. package/docs/api.md +0 -323
  75. package/docs/basics.md +0 -980
  76. package/docs/bdd.md +0 -535
  77. package/docs/best.md +0 -237
  78. package/docs/books.md +0 -37
  79. package/docs/bootstrap.md +0 -135
  80. package/docs/build/ApiDataFactory.js +0 -409
  81. package/docs/build/Appium.js +0 -1978
  82. package/docs/build/FileSystem.js +0 -228
  83. package/docs/build/GraphQL.js +0 -204
  84. package/docs/build/GraphQLDataFactory.js +0 -309
  85. package/docs/build/JSONResponse.js +0 -338
  86. package/docs/build/Mochawesome.js +0 -71
  87. package/docs/build/Nightmare.js +0 -2147
  88. package/docs/build/OpenAI.js +0 -122
  89. package/docs/build/Playwright.js +0 -4134
  90. package/docs/build/Polly.js +0 -42
  91. package/docs/build/Protractor.js +0 -2701
  92. package/docs/build/Puppeteer.js +0 -3743
  93. package/docs/build/REST.js +0 -344
  94. package/docs/build/SeleniumWebdriver.js +0 -76
  95. package/docs/build/TestCafe.js +0 -2059
  96. package/docs/build/WebDriver.js +0 -4042
  97. package/docs/changelog.md +0 -2501
  98. package/docs/commands.md +0 -254
  99. package/docs/community-helpers.md +0 -58
  100. package/docs/configuration.md +0 -157
  101. package/docs/continuous-integration.md +0 -22
  102. package/docs/custom-helpers.md +0 -306
  103. package/docs/data.md +0 -375
  104. package/docs/detox.md +0 -235
  105. package/docs/docker.md +0 -137
  106. package/docs/email.md +0 -183
  107. package/docs/examples.md +0 -149
  108. package/docs/helpers/ApiDataFactory.md +0 -266
  109. package/docs/helpers/Appium.md +0 -1317
  110. package/docs/helpers/Detox.md +0 -586
  111. package/docs/helpers/FileSystem.md +0 -152
  112. package/docs/helpers/GraphQL.md +0 -130
  113. package/docs/helpers/GraphQLDataFactory.md +0 -226
  114. package/docs/helpers/JSONResponse.md +0 -254
  115. package/docs/helpers/Mochawesome.md +0 -8
  116. package/docs/helpers/MockRequest.md +0 -377
  117. package/docs/helpers/Nightmare.md +0 -1258
  118. package/docs/helpers/OpenAI.md +0 -70
  119. package/docs/helpers/Playwright.md +0 -2250
  120. package/docs/helpers/Polly.md +0 -44
  121. package/docs/helpers/Puppeteer-firefox.md +0 -86
  122. package/docs/helpers/Puppeteer.md +0 -2147
  123. package/docs/helpers/REST.md +0 -218
  124. package/docs/helpers/TestCafe.md +0 -1224
  125. package/docs/helpers/WebDriver.md +0 -2325
  126. package/docs/hooks.md +0 -340
  127. package/docs/index.md +0 -111
  128. package/docs/installation.md +0 -75
  129. package/docs/internal-api.md +0 -265
  130. package/docs/locators.md +0 -331
  131. package/docs/mobile-react-native-locators.md +0 -67
  132. package/docs/mobile.md +0 -344
  133. package/docs/nightmare.md +0 -223
  134. package/docs/pageobjects.md +0 -291
  135. package/docs/parallel.md +0 -288
  136. package/docs/playwright.md +0 -609
  137. package/docs/plugins.md +0 -1225
  138. package/docs/puppeteer.md +0 -316
  139. package/docs/quickstart.md +0 -163
  140. package/docs/react.md +0 -69
  141. package/docs/reports.md +0 -392
  142. package/docs/secrets.md +0 -36
  143. package/docs/shadow.md +0 -68
  144. package/docs/shared/keys.mustache +0 -31
  145. package/docs/shared/react.mustache +0 -1
  146. package/docs/testcafe.md +0 -174
  147. package/docs/translation.md +0 -247
  148. package/docs/tutorial.md +0 -271
  149. package/docs/typescript.md +0 -180
  150. package/docs/ui.md +0 -59
  151. package/docs/videos.md +0 -28
  152. package/docs/visual.md +0 -202
  153. package/docs/vue.md +0 -121
  154. package/docs/webapi/amOnPage.mustache +0 -11
  155. package/docs/webapi/appendField.mustache +0 -11
  156. package/docs/webapi/attachFile.mustache +0 -12
  157. package/docs/webapi/checkOption.mustache +0 -13
  158. package/docs/webapi/clearCookie.mustache +0 -10
  159. package/docs/webapi/clearField.mustache +0 -9
  160. package/docs/webapi/click.mustache +0 -25
  161. package/docs/webapi/clickLink.mustache +0 -8
  162. package/docs/webapi/closeCurrentTab.mustache +0 -7
  163. package/docs/webapi/closeOtherTabs.mustache +0 -8
  164. package/docs/webapi/dontSee.mustache +0 -11
  165. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +0 -10
  166. package/docs/webapi/dontSeeCookie.mustache +0 -8
  167. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +0 -10
  168. package/docs/webapi/dontSeeElement.mustache +0 -8
  169. package/docs/webapi/dontSeeElementInDOM.mustache +0 -8
  170. package/docs/webapi/dontSeeInCurrentUrl.mustache +0 -4
  171. package/docs/webapi/dontSeeInField.mustache +0 -11
  172. package/docs/webapi/dontSeeInSource.mustache +0 -8
  173. package/docs/webapi/dontSeeInTitle.mustache +0 -8
  174. package/docs/webapi/doubleClick.mustache +0 -13
  175. package/docs/webapi/downloadFile.mustache +0 -12
  176. package/docs/webapi/dragAndDrop.mustache +0 -9
  177. package/docs/webapi/dragSlider.mustache +0 -11
  178. package/docs/webapi/executeAsyncScript.mustache +0 -24
  179. package/docs/webapi/executeScript.mustache +0 -26
  180. package/docs/webapi/fillField.mustache +0 -16
  181. package/docs/webapi/forceClick.mustache +0 -28
  182. package/docs/webapi/forceRightClick.mustache +0 -18
  183. package/docs/webapi/grabAllWindowHandles.mustache +0 -7
  184. package/docs/webapi/grabAttributeFrom.mustache +0 -10
  185. package/docs/webapi/grabAttributeFromAll.mustache +0 -9
  186. package/docs/webapi/grabBrowserLogs.mustache +0 -9
  187. package/docs/webapi/grabCookie.mustache +0 -11
  188. package/docs/webapi/grabCssPropertyFrom.mustache +0 -11
  189. package/docs/webapi/grabCssPropertyFromAll.mustache +0 -10
  190. package/docs/webapi/grabCurrentUrl.mustache +0 -9
  191. package/docs/webapi/grabCurrentWindowHandle.mustache +0 -6
  192. package/docs/webapi/grabDataFromPerformanceTiming.mustache +0 -20
  193. package/docs/webapi/grabElementBoundingRect.mustache +0 -20
  194. package/docs/webapi/grabGeoLocation.mustache +0 -8
  195. package/docs/webapi/grabHTMLFrom.mustache +0 -10
  196. package/docs/webapi/grabHTMLFromAll.mustache +0 -9
  197. package/docs/webapi/grabNumberOfOpenTabs.mustache +0 -8
  198. package/docs/webapi/grabNumberOfVisibleElements.mustache +0 -9
  199. package/docs/webapi/grabPageScrollPosition.mustache +0 -8
  200. package/docs/webapi/grabPopupText.mustache +0 -5
  201. package/docs/webapi/grabSource.mustache +0 -8
  202. package/docs/webapi/grabTextFrom.mustache +0 -10
  203. package/docs/webapi/grabTextFromAll.mustache +0 -9
  204. package/docs/webapi/grabTitle.mustache +0 -8
  205. package/docs/webapi/grabValueFrom.mustache +0 -9
  206. package/docs/webapi/grabValueFromAll.mustache +0 -8
  207. package/docs/webapi/moveCursorTo.mustache +0 -12
  208. package/docs/webapi/openNewTab.mustache +0 -7
  209. package/docs/webapi/pressKey.mustache +0 -12
  210. package/docs/webapi/pressKeyDown.mustache +0 -12
  211. package/docs/webapi/pressKeyUp.mustache +0 -12
  212. package/docs/webapi/pressKeyWithKeyNormalization.mustache +0 -60
  213. package/docs/webapi/refreshPage.mustache +0 -6
  214. package/docs/webapi/resizeWindow.mustache +0 -6
  215. package/docs/webapi/rightClick.mustache +0 -14
  216. package/docs/webapi/saveElementScreenshot.mustache +0 -10
  217. package/docs/webapi/saveScreenshot.mustache +0 -12
  218. package/docs/webapi/say.mustache +0 -10
  219. package/docs/webapi/scrollIntoView.mustache +0 -11
  220. package/docs/webapi/scrollPageToBottom.mustache +0 -6
  221. package/docs/webapi/scrollPageToTop.mustache +0 -6
  222. package/docs/webapi/scrollTo.mustache +0 -12
  223. package/docs/webapi/see.mustache +0 -11
  224. package/docs/webapi/seeAttributesOnElements.mustache +0 -9
  225. package/docs/webapi/seeCheckboxIsChecked.mustache +0 -10
  226. package/docs/webapi/seeCookie.mustache +0 -8
  227. package/docs/webapi/seeCssPropertiesOnElements.mustache +0 -9
  228. package/docs/webapi/seeCurrentUrlEquals.mustache +0 -11
  229. package/docs/webapi/seeElement.mustache +0 -8
  230. package/docs/webapi/seeElementInDOM.mustache +0 -8
  231. package/docs/webapi/seeInCurrentUrl.mustache +0 -8
  232. package/docs/webapi/seeInField.mustache +0 -12
  233. package/docs/webapi/seeInPopup.mustache +0 -8
  234. package/docs/webapi/seeInSource.mustache +0 -7
  235. package/docs/webapi/seeInTitle.mustache +0 -8
  236. package/docs/webapi/seeNumberOfElements.mustache +0 -11
  237. package/docs/webapi/seeNumberOfVisibleElements.mustache +0 -10
  238. package/docs/webapi/seeTextEquals.mustache +0 -9
  239. package/docs/webapi/seeTitleEquals.mustache +0 -8
  240. package/docs/webapi/selectOption.mustache +0 -21
  241. package/docs/webapi/setCookie.mustache +0 -16
  242. package/docs/webapi/setGeoLocation.mustache +0 -12
  243. package/docs/webapi/switchTo.mustache +0 -9
  244. package/docs/webapi/switchToNextTab.mustache +0 -10
  245. package/docs/webapi/switchToPreviousTab.mustache +0 -10
  246. package/docs/webapi/type.mustache +0 -21
  247. package/docs/webapi/uncheckOption.mustache +0 -13
  248. package/docs/webapi/wait.mustache +0 -8
  249. package/docs/webapi/waitForClickable.mustache +0 -11
  250. package/docs/webapi/waitForDetached.mustache +0 -10
  251. package/docs/webapi/waitForElement.mustache +0 -11
  252. package/docs/webapi/waitForEnabled.mustache +0 -6
  253. package/docs/webapi/waitForFunction.mustache +0 -17
  254. package/docs/webapi/waitForInvisible.mustache +0 -10
  255. package/docs/webapi/waitForText.mustache +0 -13
  256. package/docs/webapi/waitForValue.mustache +0 -10
  257. package/docs/webapi/waitForVisible.mustache +0 -10
  258. package/docs/webapi/waitInUrl.mustache +0 -9
  259. package/docs/webapi/waitNumberOfVisibleElements.mustache +0 -10
  260. package/docs/webapi/waitToHide.mustache +0 -10
  261. package/docs/webapi/waitUrlEquals.mustache +0 -10
  262. package/docs/webdriver.md +0 -657
  263. package/docs/wiki/Books-&-Posts.md +0 -27
  264. package/docs/wiki/Community-Helpers-&-Plugins.md +0 -49
  265. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +0 -29
  266. package/docs/wiki/Examples.md +0 -139
  267. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -68
  268. package/docs/wiki/Home.md +0 -16
  269. package/docs/wiki/Release-Process.md +0 -24
  270. package/docs/wiki/Roadmap.md +0 -23
  271. package/docs/wiki/Tests.md +0 -1393
  272. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -153
  273. package/docs/wiki/Videos.md +0 -19
@@ -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): Promise<any>;
461
+ switchToContext(context: any): Promise<any>;
462
462
  /**
463
463
  * Switches to web context.
464
464
  * If no context is provided switches to the first detected web context
@@ -508,10 +508,12 @@ declare namespace CodeceptJS {
508
508
  * I.setNetworkConnection(4) // airplane mode off, wifi off, data on
509
509
  * I.setNetworkConnection(6) // airplane mode off, wifi on, data on
510
510
  * ```
511
- * See corresponding [webdriverio reference](http://webdriver.io/api/mobile/setNetworkConnection.html).
512
- * @returns Appium: support only Android
511
+ * See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
512
+ *
513
+ * Appium: support only Android
514
+ * @param value - The network connection mode bitmask
513
515
  */
514
- setNetworkConnection(): Promise<{}>;
516
+ setNetworkConnection(value: number): Promise<number>;
515
517
  /**
516
518
  * Update the current setting on the device
517
519
  *
@@ -747,7 +749,7 @@ declare namespace CodeceptJS {
747
749
  * ```js
748
750
  * I.closeApp();
749
751
  * ```
750
- * @returns Appium: support only iOS
752
+ * @returns Appium: support both Android and iOS
751
753
  */
752
754
  closeApp(): Promise<void>;
753
755
  /**
@@ -761,7 +763,6 @@ declare namespace CodeceptJS {
761
763
  * ```
762
764
  * @param field - located by label|name|CSS|XPath|strict locator
763
765
  * @param value - text value to append.
764
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
765
766
  */
766
767
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
767
768
  /**
@@ -777,7 +778,6 @@ declare namespace CodeceptJS {
777
778
  * ```
778
779
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
779
780
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
780
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
781
781
  */
782
782
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
783
783
  /**
@@ -804,7 +804,6 @@ declare namespace CodeceptJS {
804
804
  * ```
805
805
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
806
806
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
807
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
808
807
  */
809
808
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
810
809
  /**
@@ -816,7 +815,6 @@ declare namespace CodeceptJS {
816
815
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
817
816
  * ```
818
817
  * @param field - located by label|name|CSS|XPath|strict locator.
819
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
820
818
  */
821
819
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
822
820
  /**
@@ -826,7 +824,6 @@ declare namespace CodeceptJS {
826
824
  * I.dontSeeElement('.modal'); // modal is not shown
827
825
  * ```
828
826
  * @param locator - located by CSS|XPath|Strict locator.
829
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
830
827
  */
831
828
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
832
829
  /**
@@ -839,9 +836,8 @@ declare namespace CodeceptJS {
839
836
  * ```
840
837
  * @param field - located by label|name|CSS|XPath|strict locator.
841
838
  * @param value - value to check.
842
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
843
839
  */
844
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
840
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
845
841
  /**
846
842
  * Opposite to `see`. Checks that a text is not present on a page.
847
843
  * Use context parameter to narrow down the search.
@@ -852,7 +848,6 @@ declare namespace CodeceptJS {
852
848
  * ```
853
849
  * @param text - which is not present.
854
850
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
855
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
856
851
  */
857
852
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
858
853
  /**
@@ -871,7 +866,6 @@ declare namespace CodeceptJS {
871
866
  * ```
872
867
  * @param field - located by label|name|CSS|XPath|strict locator.
873
868
  * @param value - text value to fill.
874
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
875
869
  */
876
870
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
877
871
  /**
@@ -978,13 +972,9 @@ declare namespace CodeceptJS {
978
972
  * I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
979
973
  * ```
980
974
  * @param locator - located by CSS|XPath|strict locator.
981
- * @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
982
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
983
- *
984
- *
985
- * Supported only for web testing
975
+ * @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
986
976
  */
987
- scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
977
+ scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): Promise<any>;
988
978
  /**
989
979
  * Verifies that the specified checkbox is checked.
990
980
  *
@@ -994,7 +984,6 @@ declare namespace CodeceptJS {
994
984
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
995
985
  * ```
996
986
  * @param field - located by label|name|CSS|XPath|strict locator.
997
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
998
987
  */
999
988
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
1000
989
  /**
@@ -1005,7 +994,6 @@ declare namespace CodeceptJS {
1005
994
  * I.seeElement('#modal');
1006
995
  * ```
1007
996
  * @param locator - located by CSS|XPath|strict locator.
1008
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1009
997
  */
1010
998
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
1011
999
  /**
@@ -1020,9 +1008,8 @@ declare namespace CodeceptJS {
1020
1008
  * ```
1021
1009
  * @param field - located by label|name|CSS|XPath|strict locator.
1022
1010
  * @param value - value to check.
1023
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1024
1011
  */
1025
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
1012
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
1026
1013
  /**
1027
1014
  * Checks that a page contains a visible text.
1028
1015
  * Use context parameter to narrow down the search.
@@ -1034,7 +1021,6 @@ declare namespace CodeceptJS {
1034
1021
  * ```
1035
1022
  * @param text - expected on page.
1036
1023
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1037
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1038
1024
  */
1039
1025
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
1040
1026
  /**
@@ -1058,10 +1044,6 @@ declare namespace CodeceptJS {
1058
1044
  * ```
1059
1045
  * @param select - field located by label|name|CSS|XPath|strict locator.
1060
1046
  * @param option - visible text or value of option.
1061
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1062
- *
1063
- *
1064
- * Supported only for web testing
1065
1047
  */
1066
1048
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
1067
1049
  /**
@@ -1074,7 +1056,6 @@ declare namespace CodeceptJS {
1074
1056
  * ```
1075
1057
  * @param locator - element located by CSS|XPath|strict locator.
1076
1058
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
1077
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1078
1059
  */
1079
1060
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
1080
1061
  /**
@@ -1086,7 +1067,6 @@ declare namespace CodeceptJS {
1086
1067
  * ```
1087
1068
  * @param locator - element located by CSS|XPath|strict locator.
1088
1069
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1089
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1090
1070
  */
1091
1071
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
1092
1072
  /**
@@ -1098,7 +1078,6 @@ declare namespace CodeceptJS {
1098
1078
  * ```
1099
1079
  * @param locator - element located by CSS|XPath|strict locator.
1100
1080
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1101
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1102
1081
  */
1103
1082
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
1104
1083
  /**
@@ -1113,10 +1092,75 @@ declare namespace CodeceptJS {
1113
1092
  * @param text - to wait for.
1114
1093
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1115
1094
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
1116
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1117
1095
  */
1118
1096
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
1119
1097
  }
1098
+ /**
1099
+ * This helper allows performing assertions based on Chai.
1100
+ *
1101
+ * ### Examples
1102
+ *
1103
+ * Zero-configuration when paired with other helpers like REST, Playwright:
1104
+ *
1105
+ * ```js
1106
+ * // inside codecept.conf.js
1107
+ * {
1108
+ * helpers: {
1109
+ * Playwright: {...},
1110
+ * Expect: {},
1111
+ * }
1112
+ * }
1113
+ * ```
1114
+ *
1115
+ * ## Methods
1116
+ */
1117
+ class ExpectHelper {
1118
+ expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1119
+ expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1120
+ expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1121
+ expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1122
+ expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
1123
+ expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
1124
+ expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
1125
+ expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
1126
+ expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
1127
+ expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
1128
+ expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
1129
+ /**
1130
+ * @param ajvOptions - Pass AJV options
1131
+ */
1132
+ expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions: any): Promise<any>;
1133
+ expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
1134
+ expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
1135
+ expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
1136
+ expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
1137
+ expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
1138
+ expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
1139
+ expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
1140
+ expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
1141
+ expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
1142
+ expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
1143
+ expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
1144
+ expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
1145
+ expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
1146
+ expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1147
+ /**
1148
+ * expects members of two arrays are deeply equal
1149
+ */
1150
+ expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1151
+ /**
1152
+ * expects an array to be a superset of another array
1153
+ */
1154
+ expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
1155
+ /**
1156
+ * expects members of two JSON objects are deeply equal excluding some properties
1157
+ */
1158
+ expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
1159
+ /**
1160
+ * expects a JSON object matches a provided pattern
1161
+ */
1162
+ expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
1163
+ }
1120
1164
  /**
1121
1165
  * Helper for testing filesystem.
1122
1166
  * Can be easily used to check file structures:
@@ -1147,7 +1191,7 @@ declare namespace CodeceptJS {
1147
1191
  */
1148
1192
  amInPath(openPath: string): Promise<any>;
1149
1193
  /**
1150
- * Writes test to file
1194
+ * Writes text to file
1151
1195
  */
1152
1196
  writeToFile(name: string, text: string): Promise<any>;
1153
1197
  /**
@@ -1295,6 +1339,21 @@ declare namespace CodeceptJS {
1295
1339
  * @param [options] - are additional query options
1296
1340
  */
1297
1341
  sendMutation(mutation: string, variables?: any, options?: any, headers?: any): Promise<any>;
1342
+ /**
1343
+ * Sets request headers for all requests of this test
1344
+ * @param headers - headers list
1345
+ */
1346
+ haveRequestHeaders(headers: any): Promise<any>;
1347
+ /**
1348
+ * Adds a header for Bearer authentication
1349
+ *
1350
+ * ```js
1351
+ * // we use secret function to hide token from logs
1352
+ * I.amBearerAuthenticated(secret('heregoestoken'))
1353
+ * ```
1354
+ * @param accessToken - Bearer access token
1355
+ */
1356
+ amBearerAuthenticated(accessToken: string | CodeceptJS.Secret): Promise<any>;
1298
1357
  }
1299
1358
  /**
1300
1359
  * Helper for managing remote data using GraphQL queries.
@@ -1759,7 +1818,6 @@ declare namespace CodeceptJS {
1759
1818
  * I.seeInTitle('Home Page');
1760
1819
  * ```
1761
1820
  * @param text - text value to check.
1762
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1763
1821
  */
1764
1822
  seeInTitle(text: string): Promise<any>;
1765
1823
  /**
@@ -1769,7 +1827,6 @@ declare namespace CodeceptJS {
1769
1827
  * I.dontSeeInTitle('Error');
1770
1828
  * ```
1771
1829
  * @param text - value to check.
1772
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1773
1830
  */
1774
1831
  dontSeeInTitle(text: string): Promise<any>;
1775
1832
  /**
@@ -1800,13 +1857,11 @@ declare namespace CodeceptJS {
1800
1857
  * I.seeInCurrentUrl('/register'); // we are on registration page
1801
1858
  * ```
1802
1859
  * @param url - a fragment to check
1803
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1804
1860
  */
1805
1861
  seeInCurrentUrl(url: string): Promise<any>;
1806
1862
  /**
1807
1863
  * Checks that current url does not contain a provided fragment.
1808
1864
  * @param url - value to check.
1809
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1810
1865
  */
1811
1866
  dontSeeInCurrentUrl(url: string): Promise<any>;
1812
1867
  /**
@@ -1819,7 +1874,6 @@ declare namespace CodeceptJS {
1819
1874
  * I.seeCurrentUrlEquals('http://my.site.com/register');
1820
1875
  * ```
1821
1876
  * @param url - value to check.
1822
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1823
1877
  */
1824
1878
  seeCurrentUrlEquals(url: string): Promise<any>;
1825
1879
  /**
@@ -1831,7 +1885,6 @@ declare namespace CodeceptJS {
1831
1885
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
1832
1886
  * ```
1833
1887
  * @param url - value to check.
1834
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1835
1888
  */
1836
1889
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
1837
1890
  /**
@@ -1845,7 +1898,6 @@ declare namespace CodeceptJS {
1845
1898
  * ```
1846
1899
  * @param text - expected on page.
1847
1900
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1848
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1849
1901
  */
1850
1902
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
1851
1903
  /**
@@ -1858,7 +1910,6 @@ declare namespace CodeceptJS {
1858
1910
  * ```
1859
1911
  * @param text - which is not present.
1860
1912
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
1861
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1862
1913
  */
1863
1914
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
1864
1915
  /**
@@ -1869,7 +1920,6 @@ declare namespace CodeceptJS {
1869
1920
  * I.seeElement('#modal');
1870
1921
  * ```
1871
1922
  * @param locator - located by CSS|XPath|strict locator.
1872
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1873
1923
  */
1874
1924
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
1875
1925
  /**
@@ -1879,7 +1929,6 @@ declare namespace CodeceptJS {
1879
1929
  * I.dontSeeElement('.modal'); // modal is not shown
1880
1930
  * ```
1881
1931
  * @param locator - located by CSS|XPath|Strict locator.
1882
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1883
1932
  */
1884
1933
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
1885
1934
  /**
@@ -1890,7 +1939,6 @@ declare namespace CodeceptJS {
1890
1939
  * I.seeElementInDOM('#modal');
1891
1940
  * ```
1892
1941
  * @param locator - element located by CSS|XPath|strict locator.
1893
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1894
1942
  */
1895
1943
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
1896
1944
  /**
@@ -1900,7 +1948,6 @@ declare namespace CodeceptJS {
1900
1948
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
1901
1949
  * ```
1902
1950
  * @param locator - located by CSS|XPath|Strict locator.
1903
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1904
1951
  */
1905
1952
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
1906
1953
  /**
@@ -1910,7 +1957,6 @@ declare namespace CodeceptJS {
1910
1957
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1911
1958
  * ```
1912
1959
  * @param text - value to check.
1913
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1914
1960
  */
1915
1961
  seeInSource(text: string): Promise<any>;
1916
1962
  /**
@@ -1920,7 +1966,6 @@ declare namespace CodeceptJS {
1920
1966
  * I.dontSeeInSource('<!--'); // no comments in source
1921
1967
  * ```
1922
1968
  * @param value - to check.
1923
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1924
1969
  */
1925
1970
  dontSeeInSource(value: string): Promise<any>;
1926
1971
  /**
@@ -1933,7 +1978,6 @@ declare namespace CodeceptJS {
1933
1978
  * ```
1934
1979
  * @param locator - element located by CSS|XPath|strict locator.
1935
1980
  * @param num - number of elements.
1936
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1937
1981
  */
1938
1982
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
1939
1983
  /**
@@ -1945,7 +1989,6 @@ declare namespace CodeceptJS {
1945
1989
  * ```
1946
1990
  * @param locator - element located by CSS|XPath|strict locator.
1947
1991
  * @param num - number of elements.
1948
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1949
1992
  */
1950
1993
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
1951
1994
  /**
@@ -1983,7 +2026,6 @@ declare namespace CodeceptJS {
1983
2026
  * ```
1984
2027
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1985
2028
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1986
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
1987
2029
  */
1988
2030
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
1989
2031
  /**
@@ -1998,7 +2040,6 @@ declare namespace CodeceptJS {
1998
2040
  * ```
1999
2041
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
2000
2042
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
2001
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2002
2043
  */
2003
2044
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
2004
2045
  /**
@@ -2014,7 +2055,6 @@ declare namespace CodeceptJS {
2014
2055
  * ```
2015
2056
  * @param locator - clickable element located by CSS|XPath|strict locator.
2016
2057
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
2017
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2018
2058
  */
2019
2059
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
2020
2060
  /**
@@ -2028,7 +2068,6 @@ declare namespace CodeceptJS {
2028
2068
  * @param locator - located by CSS|XPath|strict locator.
2029
2069
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
2030
2070
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2031
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2032
2071
  */
2033
2072
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
2034
2073
  /**
@@ -2056,7 +2095,7 @@ declare namespace CodeceptJS {
2056
2095
  * ```
2057
2096
  * @param fn - function to be executed in browser context.
2058
2097
  * @param args - to be passed to function.
2059
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2098
+ * @returns script return value
2060
2099
  *
2061
2100
  *
2062
2101
  * Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
@@ -2085,7 +2124,7 @@ declare namespace CodeceptJS {
2085
2124
  * ```
2086
2125
  * @param fn - function to be executed in browser context.
2087
2126
  * @param args - to be passed to function.
2088
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2127
+ * @returns script return value
2089
2128
  *
2090
2129
  *
2091
2130
  * Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
@@ -2097,7 +2136,6 @@ declare namespace CodeceptJS {
2097
2136
  * First parameter can be set to `maximize`.
2098
2137
  * @param width - width in pixels or `maximize`.
2099
2138
  * @param height - height in pixels.
2100
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2101
2139
  */
2102
2140
  resizeWindow(width: number, height: number): Promise<any>;
2103
2141
  /**
@@ -2113,7 +2151,6 @@ declare namespace CodeceptJS {
2113
2151
  * ```
2114
2152
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
2115
2153
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2116
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2117
2154
  */
2118
2155
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
2119
2156
  /**
@@ -2129,7 +2166,6 @@ declare namespace CodeceptJS {
2129
2166
  * ```
2130
2167
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
2131
2168
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2132
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2133
2169
  */
2134
2170
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
2135
2171
  /**
@@ -2148,7 +2184,6 @@ declare namespace CodeceptJS {
2148
2184
  * ```
2149
2185
  * @param field - located by label|name|CSS|XPath|strict locator.
2150
2186
  * @param value - text value to fill.
2151
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2152
2187
  */
2153
2188
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
2154
2189
  /**
@@ -2160,7 +2195,6 @@ declare namespace CodeceptJS {
2160
2195
  * I.clearField('#email');
2161
2196
  * ```
2162
2197
  * @param editable - field located by label|name|CSS|XPath|strict locator.
2163
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
2164
2198
  */
2165
2199
  clearField(editable: LocatorOrString): Promise<any>;
2166
2200
  /**
@@ -2174,7 +2208,6 @@ declare namespace CodeceptJS {
2174
2208
  * ```
2175
2209
  * @param field - located by label|name|CSS|XPath|strict locator
2176
2210
  * @param value - text value to append.
2177
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2178
2211
  */
2179
2212
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
2180
2213
  /**
@@ -2189,9 +2222,8 @@ declare namespace CodeceptJS {
2189
2222
  * ```
2190
2223
  * @param field - located by label|name|CSS|XPath|strict locator.
2191
2224
  * @param value - value to check.
2192
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2193
2225
  */
2194
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
2226
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
2195
2227
  /**
2196
2228
  * Checks that value of input field or textarea doesn't equal to given value
2197
2229
  * Opposite to `seeInField`.
@@ -2202,9 +2234,8 @@ declare namespace CodeceptJS {
2202
2234
  * ```
2203
2235
  * @param field - located by label|name|CSS|XPath|strict locator.
2204
2236
  * @param value - value to check.
2205
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2206
2237
  */
2207
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
2238
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
2208
2239
  /**
2209
2240
  * Sends [input event](http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent) on a page.
2210
2241
  * Can submit special keys like 'Enter', 'Backspace', etc
@@ -2230,7 +2261,6 @@ declare namespace CodeceptJS {
2230
2261
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
2231
2262
  * ```
2232
2263
  * @param field - located by label|name|CSS|XPath|strict locator.
2233
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2234
2264
  */
2235
2265
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
2236
2266
  /**
@@ -2242,7 +2272,6 @@ declare namespace CodeceptJS {
2242
2272
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
2243
2273
  * ```
2244
2274
  * @param field - located by label|name|CSS|XPath|strict locator.
2245
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2246
2275
  */
2247
2276
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
2248
2277
  /**
@@ -2256,10 +2285,6 @@ declare namespace CodeceptJS {
2256
2285
  * ```
2257
2286
  * @param locator - field located by label|name|CSS|XPath|strict locator.
2258
2287
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
2259
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2260
- *
2261
- *
2262
- * 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))
2263
2288
  */
2264
2289
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
2265
2290
  /**
@@ -2390,7 +2415,6 @@ declare namespace CodeceptJS {
2390
2415
  * ```
2391
2416
  * @param select - field located by label|name|CSS|XPath|strict locator.
2392
2417
  * @param option - visible text or value of option.
2393
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2394
2418
  */
2395
2419
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
2396
2420
  /**
@@ -2408,11 +2432,6 @@ declare namespace CodeceptJS {
2408
2432
  * ]);
2409
2433
  * ```
2410
2434
  * @param cookie - a cookie object or array of cookie objects.
2411
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2412
- *
2413
- *
2414
- * Wrapper for `.cookies.set(cookie)`.
2415
- * [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
2416
2435
  */
2417
2436
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
2418
2437
  /**
@@ -2422,7 +2441,6 @@ declare namespace CodeceptJS {
2422
2441
  * I.seeCookie('Auth');
2423
2442
  * ```
2424
2443
  * @param name - cookie name.
2425
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2426
2444
  */
2427
2445
  seeCookie(name: string): Promise<any>;
2428
2446
  /**
@@ -2432,7 +2450,6 @@ declare namespace CodeceptJS {
2432
2450
  * I.dontSeeCookie('auth'); // no auth cookie
2433
2451
  * ```
2434
2452
  * @param name - cookie name.
2435
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2436
2453
  */
2437
2454
  dontSeeCookie(name: string): Promise<any>;
2438
2455
  /**
@@ -2445,24 +2462,17 @@ declare namespace CodeceptJS {
2445
2462
  * assert(cookie.value, '123456');
2446
2463
  * ```
2447
2464
  * @param [name = null] - cookie name.
2448
- * @returns attribute value
2449
- *
2450
- *
2451
- * Cookie in JSON format. If name not passed returns all cookies for this domain.
2452
- *
2453
- * Multiple cookies can be received by passing query object `I.grabCookie({ secure: true});`. If you'd like get all cookies for all urls, use: `.grabCookie({ url: null }).`
2454
2465
  */
2455
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
2466
+ grabCookie(name?: string): Promise<any>;
2456
2467
  /**
2457
2468
  * Clears a cookie by name,
2458
2469
  * if none provided clears all cookies.
2459
2470
  *
2460
2471
  * ```js
2461
2472
  * I.clearCookie();
2462
- * I.clearCookie('test');
2473
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
2463
2474
  * ```
2464
2475
  * @param [cookie = null] - (optional, `null` by default) cookie name
2465
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2466
2476
  */
2467
2477
  clearCookie(cookie?: string): Promise<any>;
2468
2478
  /**
@@ -2481,7 +2491,6 @@ declare namespace CodeceptJS {
2481
2491
  * @param fn - to be executed in browser context.
2482
2492
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
2483
2493
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
2484
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2485
2494
  */
2486
2495
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
2487
2496
  /**
@@ -2491,7 +2500,6 @@ declare namespace CodeceptJS {
2491
2500
  * I.wait(2); // wait 2 secs
2492
2501
  * ```
2493
2502
  * @param sec - number of second to wait.
2494
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2495
2503
  */
2496
2504
  wait(sec: number): Promise<any>;
2497
2505
  /**
@@ -2506,7 +2514,6 @@ declare namespace CodeceptJS {
2506
2514
  * @param text - to wait for.
2507
2515
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2508
2516
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
2509
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2510
2517
  */
2511
2518
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
2512
2519
  /**
@@ -2518,7 +2525,6 @@ declare namespace CodeceptJS {
2518
2525
  * ```
2519
2526
  * @param locator - element located by CSS|XPath|strict locator.
2520
2527
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2521
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2522
2528
  */
2523
2529
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
2524
2530
  /**
@@ -2530,7 +2536,6 @@ declare namespace CodeceptJS {
2530
2536
  * ```
2531
2537
  * @param locator - element located by CSS|XPath|strict locator.
2532
2538
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2533
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2534
2539
  */
2535
2540
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
2536
2541
  /**
@@ -2542,7 +2547,6 @@ declare namespace CodeceptJS {
2542
2547
  * ```
2543
2548
  * @param locator - element located by CSS|XPath|strict locator.
2544
2549
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2545
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2546
2550
  */
2547
2551
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
2548
2552
  /**
@@ -2555,7 +2559,6 @@ declare namespace CodeceptJS {
2555
2559
  * ```
2556
2560
  * @param locator - element located by CSS|XPath|strict locator.
2557
2561
  * @param [sec] - (optional, `1` by default) time in seconds to wait
2558
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2559
2562
  */
2560
2563
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
2561
2564
  /**
@@ -2567,7 +2570,6 @@ declare namespace CodeceptJS {
2567
2570
  * ```
2568
2571
  * @param locator - element located by CSS|XPath|strict locator.
2569
2572
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2570
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2571
2573
  */
2572
2574
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
2573
2575
  /**
@@ -2576,7 +2578,6 @@ declare namespace CodeceptJS {
2576
2578
  * ```js
2577
2579
  * I.refreshPage();
2578
2580
  * ```
2579
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2580
2581
  */
2581
2582
  refreshPage(): Promise<any>;
2582
2583
  /**
@@ -2592,7 +2593,6 @@ declare namespace CodeceptJS {
2592
2593
  * ```
2593
2594
  * @param locator - element located by CSS|XPath|strict locator.
2594
2595
  * @param fileName - file name to save.
2595
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2596
2596
  */
2597
2597
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
2598
2598
  /**
@@ -2629,7 +2629,6 @@ declare namespace CodeceptJS {
2629
2629
  * ```
2630
2630
  * @param fileName - file name to save.
2631
2631
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
2632
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2633
2632
  */
2634
2633
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
2635
2634
  /**
@@ -2643,7 +2642,6 @@ declare namespace CodeceptJS {
2643
2642
  * @param locator - located by CSS|XPath|strict locator.
2644
2643
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
2645
2644
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2646
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2647
2645
  */
2648
2646
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
2649
2647
  /**
@@ -2652,7 +2650,6 @@ declare namespace CodeceptJS {
2652
2650
  * ```js
2653
2651
  * I.scrollPageToTop();
2654
2652
  * ```
2655
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2656
2653
  */
2657
2654
  scrollPageToTop(): Promise<any>;
2658
2655
  /**
@@ -2661,7 +2658,6 @@ declare namespace CodeceptJS {
2661
2658
  * ```js
2662
2659
  * I.scrollPageToBottom();
2663
2660
  * ```
2664
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2665
2661
  */
2666
2662
  scrollPageToBottom(): Promise<any>;
2667
2663
  /**
@@ -2734,6 +2730,10 @@ declare namespace CodeceptJS {
2734
2730
  * npm i playwright-core@^1.18 --save
2735
2731
  * ```
2736
2732
  *
2733
+ * Breaking Changes: if you use Playwright v1.38 and later, it will no longer download browsers automatically.
2734
+ *
2735
+ * Run `npx playwright install` to download browsers after `npm install`.
2736
+ *
2737
2737
  * Using playwright-core package, will prevent the download of browser binaries and allow connecting to an existing browser installation or for connecting to a remote one.
2738
2738
  *
2739
2739
  *
@@ -2755,6 +2755,21 @@ declare namespace CodeceptJS {
2755
2755
  * * `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
2756
2756
  * * `keepTraceForPassedTests`: - save trace for passed tests
2757
2757
  *
2758
+ * #### HAR Recording Customization
2759
+ *
2760
+ * 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.
2761
+ * 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.
2762
+ * 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.
2763
+ *
2764
+ * ```
2765
+ * ...
2766
+ * recordHar: {
2767
+ * mode: 'minimal', // possible values: 'minimal'|'full'.
2768
+ * content: 'embed' // possible values: "omit"|"embed"|"attach".
2769
+ * }
2770
+ * ...
2771
+ * ```
2772
+ *
2758
2773
  * #### Example #1: Wait for 0 network connections.
2759
2774
  *
2760
2775
  * ```js
@@ -2825,6 +2840,7 @@ declare namespace CodeceptJS {
2825
2840
  * url: "http://localhost",
2826
2841
  * show: true // headless mode not supported for extensions
2827
2842
  * chromium: {
2843
+ * // Note: due to this would launch persistent context, so to avoid the error when running tests with run-workers a timestamp would be appended to the defined folder name. For instance: playwright-tmp_1692715649511
2828
2844
  * userDataDir: '/tmp/playwright-tmp', // necessary to launch the browser in normal mode instead of incognito,
2829
2845
  * args: [
2830
2846
  * `--disable-extensions-except=${pathToExtension}`,
@@ -2879,6 +2895,22 @@ declare namespace CodeceptJS {
2879
2895
  * }
2880
2896
  * ```
2881
2897
  *
2898
+ * * #### Example #9: Launch electron test
2899
+ *
2900
+ * ```js
2901
+ * {
2902
+ * helpers: {
2903
+ * Playwright: {
2904
+ * browser: 'electron',
2905
+ * electron: {
2906
+ * executablePath: require("electron"),
2907
+ * args: [path.join('../', "main.js")],
2908
+ * },
2909
+ * }
2910
+ * },
2911
+ * }
2912
+ * ```
2913
+ *
2882
2914
  * Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
2883
2915
  *
2884
2916
  * ## Access From Helpers
@@ -2912,7 +2944,7 @@ declare namespace CodeceptJS {
2912
2944
  * });
2913
2945
  * ```
2914
2946
  * @param description - used to show in logs.
2915
- * @param fn - async function that executed with Playwright helper as argumen
2947
+ * @param fn - async function that executed with Playwright helper as arguments
2916
2948
  */
2917
2949
  usePlaywrightTo(description: string, fn: (...params: any[]) => any): Promise<any>;
2918
2950
  /**
@@ -2955,7 +2987,6 @@ declare namespace CodeceptJS {
2955
2987
  * I.seeInPopup('Popup text');
2956
2988
  * ```
2957
2989
  * @param text - value to check.
2958
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
2959
2990
  */
2960
2991
  seeInPopup(text: string): Promise<any>;
2961
2992
  /**
@@ -2998,15 +3029,8 @@ declare namespace CodeceptJS {
2998
3029
  */
2999
3030
  amOnPage(url: string): Promise<any>;
3000
3031
  /**
3001
- * Resize the current window to provided width and height.
3002
- * First parameter can be set to `maximize`.
3003
- * @param width - width in pixels or `maximize`.
3004
- * @param height - height in pixels.
3005
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3006
- *
3007
- *
3008
3032
  * Unlike other drivers Playwright changes the size of a viewport, not the window!
3009
- * Playwright does not control the window of a browser so it can't adjust its real size.
3033
+ * Playwright does not control the window of a browser, so it can't adjust its real size.
3010
3034
  * It also can't maximize a window.
3011
3035
  *
3012
3036
  * Update configuration to change real window size on start:
@@ -3016,19 +3040,24 @@ declare namespace CodeceptJS {
3016
3040
  * // @codeceptjs/configure package must be installed
3017
3041
  * { setWindowSize } = require('@codeceptjs/configure');
3018
3042
  * ````
3043
+ *
3044
+ * Resize the current window to provided width and height.
3045
+ * First parameter can be set to `maximize`.
3046
+ * @param width - width in pixels or `maximize`.
3047
+ * @param height - height in pixels.
3019
3048
  */
3020
3049
  resizeWindow(width: number, height: number): Promise<any>;
3021
3050
  /**
3022
3051
  * Set headers for all next requests
3023
3052
  *
3024
3053
  * ```js
3025
- * I.haveRequestHeaders({
3054
+ * I.setPlaywrightRequestHeaders({
3026
3055
  * 'X-Sent-By': 'CodeceptJS',
3027
3056
  * });
3028
3057
  * ```
3029
3058
  * @param customHeaders - headers to set
3030
3059
  */
3031
- haveRequestHeaders(customHeaders: any): Promise<any>;
3060
+ setPlaywrightRequestHeaders(customHeaders: any): Promise<any>;
3032
3061
  /**
3033
3062
  * Moves cursor to element matched by locator.
3034
3063
  * Extra shift can be set with offsetX and offsetY options.
@@ -3040,13 +3069,10 @@ declare namespace CodeceptJS {
3040
3069
  * @param locator - located by CSS|XPath|strict locator.
3041
3070
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
3042
3071
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
3043
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3044
3072
  */
3045
3073
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
3046
3074
  /**
3047
3075
  * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
3048
- * @param locator - field located by label|name|CSS|XPath|strict locator.
3049
- * @param [options] - [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
3050
3076
  *
3051
3077
  * Examples:
3052
3078
  *
@@ -3055,13 +3081,13 @@ declare namespace CodeceptJS {
3055
3081
  * I.focus('#product-tile')
3056
3082
  * I.see('#add-to-cart-bnt');
3057
3083
  * ```
3084
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
3085
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
3058
3086
  */
3059
3087
  focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
3060
3088
  /**
3061
- * Remove focus from a text input, button, etc
3062
- * Calls [blur](https://playwright.dev/docs/api/class-locator#locator-blur) on the element.
3063
- * @param locator - field located by label|name|CSS|XPath|strict locator.
3064
- * @param [options] - [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
3089
+ * Remove focus from a text input, button, etc.
3090
+ * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
3065
3091
  *
3066
3092
  * Examples:
3067
3093
  *
@@ -3074,9 +3100,30 @@ declare namespace CodeceptJS {
3074
3100
  * I.blur('#product-tile')
3075
3101
  * I.dontSee('#add-to-cart-btn');
3076
3102
  * ```
3103
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
3104
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
3077
3105
  */
3078
3106
  blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
3079
3107
  /**
3108
+ * Return the checked status of given element.
3109
+ * @param locator - element located by CSS|XPath|strict locator.
3110
+ * @param [options] - See https://playwright.dev/docs/api/class-locator#locator-is-checked
3111
+ */
3112
+ grabCheckedElementStatus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<boolean>;
3113
+ /**
3114
+ * Return the disabled status of given element.
3115
+ * @param locator - element located by CSS|XPath|strict locator.
3116
+ * @param [options] - See https://playwright.dev/docs/api/class-locator#locator-is-disabled
3117
+ */
3118
+ grabDisabledElementStatus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<boolean>;
3119
+ /**
3120
+ * ```js
3121
+ * // specify coordinates for source position
3122
+ * I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
3123
+ * ```
3124
+ *
3125
+ * > 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`
3126
+ *
3080
3127
  * Drag an item to a destination element.
3081
3128
  *
3082
3129
  * ```js
@@ -3084,15 +3131,7 @@ declare namespace CodeceptJS {
3084
3131
  * ```
3085
3132
  * @param srcElement - located by CSS|XPath|strict locator.
3086
3133
  * @param destElement - located by CSS|XPath|strict locator.
3087
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3088
3134
  * @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
3089
- *
3090
- * ```js
3091
- * // specify coordinates for source position
3092
- * I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
3093
- * ```
3094
- *
3095
- * > 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`
3096
3135
  */
3097
3136
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): Promise<any>;
3098
3137
  /**
@@ -3115,16 +3154,29 @@ declare namespace CodeceptJS {
3115
3154
  * ```js
3116
3155
  * I.refreshPage();
3117
3156
  * ```
3118
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3119
3157
  */
3120
3158
  refreshPage(): Promise<any>;
3159
+ /**
3160
+ * Replaying from HAR
3161
+ *
3162
+ * ```js
3163
+ * // Replay API requests from HAR.
3164
+ * // Either use a matching response from the HAR,
3165
+ * // or abort the request if nothing matches.
3166
+ * I.replayFromHar('./output/har/something.har', { url: "*\/**\/api/v1/fruits" });
3167
+ * I.amOnPage('https://demo.playwright.dev/api-mocking');
3168
+ * I.see('CodeceptJS');
3169
+ * ```
3170
+ * @param harFilePath - Path to recorded HAR file
3171
+ * @param [opts] - [Options for replaying from HAR](https://playwright.dev/docs/api/class-page#page-route-from-har)
3172
+ */
3173
+ replayFromHar(harFilePath: string, opts?: any): Promise<any>;
3121
3174
  /**
3122
3175
  * Scroll page to the top.
3123
3176
  *
3124
3177
  * ```js
3125
3178
  * I.scrollPageToTop();
3126
3179
  * ```
3127
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3128
3180
  */
3129
3181
  scrollPageToTop(): Promise<any>;
3130
3182
  /**
@@ -3133,7 +3185,6 @@ declare namespace CodeceptJS {
3133
3185
  * ```js
3134
3186
  * I.scrollPageToBottom();
3135
3187
  * ```
3136
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3137
3188
  */
3138
3189
  scrollPageToBottom(): Promise<any>;
3139
3190
  /**
@@ -3147,7 +3198,6 @@ declare namespace CodeceptJS {
3147
3198
  * @param locator - located by CSS|XPath|strict locator.
3148
3199
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
3149
3200
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
3150
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3151
3201
  */
3152
3202
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
3153
3203
  /**
@@ -3157,7 +3207,6 @@ declare namespace CodeceptJS {
3157
3207
  * I.seeInTitle('Home Page');
3158
3208
  * ```
3159
3209
  * @param text - text value to check.
3160
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3161
3210
  */
3162
3211
  seeInTitle(text: string): Promise<any>;
3163
3212
  /**
@@ -3177,7 +3226,6 @@ declare namespace CodeceptJS {
3177
3226
  * I.seeTitleEquals('Test title.');
3178
3227
  * ```
3179
3228
  * @param text - value to check.
3180
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3181
3229
  */
3182
3230
  seeTitleEquals(text: string): Promise<any>;
3183
3231
  /**
@@ -3187,7 +3235,6 @@ declare namespace CodeceptJS {
3187
3235
  * I.dontSeeInTitle('Error');
3188
3236
  * ```
3189
3237
  * @param text - value to check.
3190
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3191
3238
  */
3192
3239
  dontSeeInTitle(text: string): Promise<any>;
3193
3240
  /**
@@ -3210,7 +3257,16 @@ declare namespace CodeceptJS {
3210
3257
  */
3211
3258
  _locate(): Promise<any>;
3212
3259
  /**
3213
- * Find a checkbox by providing human readable text:
3260
+ * Get the first element by different locator types, including strict locator
3261
+ * Should be used in custom helpers:
3262
+ *
3263
+ * ```js
3264
+ * const element = await this.helpers['Playwright']._locateElement({name: 'password'});
3265
+ * ```
3266
+ */
3267
+ _locateElement(): Promise<any>;
3268
+ /**
3269
+ * Find a checkbox by providing human-readable text:
3214
3270
  * NOTE: Assumes the checkable element exists
3215
3271
  *
3216
3272
  * ```js
@@ -3219,7 +3275,7 @@ declare namespace CodeceptJS {
3219
3275
  */
3220
3276
  _locateCheckable(): Promise<any>;
3221
3277
  /**
3222
- * Find a clickable element by providing human readable text:
3278
+ * Find a clickable element by providing human-readable text:
3223
3279
  *
3224
3280
  * ```js
3225
3281
  * this.helpers['Playwright']._locateClickable('Next page').then // ...
@@ -3227,13 +3283,35 @@ declare namespace CodeceptJS {
3227
3283
  */
3228
3284
  _locateClickable(): Promise<any>;
3229
3285
  /**
3230
- * Find field elements by providing human readable text:
3286
+ * Find field elements by providing human-readable text:
3231
3287
  *
3232
3288
  * ```js
3233
3289
  * this.helpers['Playwright']._locateFields('Your email').then // ...
3234
3290
  * ```
3235
3291
  */
3236
3292
  _locateFields(): Promise<any>;
3293
+ /**
3294
+ * Grab WebElements for given locator
3295
+ * Resumes test execution, so **should be used inside an async function with `await`** operator.
3296
+ *
3297
+ * ```js
3298
+ * const webElements = await I.grabWebElements('#button');
3299
+ * ```
3300
+ * @param locator - element located by CSS|XPath|strict locator.
3301
+ * @returns WebElement of being used Web helper
3302
+ */
3303
+ grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<any>;
3304
+ /**
3305
+ * Grab WebElement for given locator
3306
+ * Resumes test execution, so **should be used inside an async function with `await`** operator.
3307
+ *
3308
+ * ```js
3309
+ * const webElement = await I.grabWebElement('#button');
3310
+ * ```
3311
+ * @param locator - element located by CSS|XPath|strict locator.
3312
+ * @returns WebElement of being used Web helper
3313
+ */
3314
+ grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
3237
3315
  /**
3238
3316
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
3239
3317
  *
@@ -3301,7 +3379,6 @@ declare namespace CodeceptJS {
3301
3379
  * I.seeElement('#modal');
3302
3380
  * ```
3303
3381
  * @param locator - located by CSS|XPath|strict locator.
3304
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3305
3382
  */
3306
3383
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
3307
3384
  /**
@@ -3311,7 +3388,6 @@ declare namespace CodeceptJS {
3311
3388
  * I.dontSeeElement('.modal'); // modal is not shown
3312
3389
  * ```
3313
3390
  * @param locator - located by CSS|XPath|Strict locator.
3314
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3315
3391
  */
3316
3392
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
3317
3393
  /**
@@ -3322,7 +3398,6 @@ declare namespace CodeceptJS {
3322
3398
  * I.seeElementInDOM('#modal');
3323
3399
  * ```
3324
3400
  * @param locator - element located by CSS|XPath|strict locator.
3325
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3326
3401
  */
3327
3402
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
3328
3403
  /**
@@ -3332,7 +3407,6 @@ declare namespace CodeceptJS {
3332
3407
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
3333
3408
  * ```
3334
3409
  * @param locator - located by CSS|XPath|Strict locator.
3335
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3336
3410
  */
3337
3411
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
3338
3412
  /**
@@ -3373,13 +3447,7 @@ declare namespace CodeceptJS {
3373
3447
  * // using strict locator
3374
3448
  * I.click({css: 'nav a.login'});
3375
3449
  * ```
3376
- * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3377
- * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3378
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3379
- * @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
3380
- *
3381
- * Examples:
3382
- *
3450
+ * @example
3383
3451
  * ```js
3384
3452
  * // click on element at position
3385
3453
  * I.click('canvas', '.model', { position: { x: 20, y: 40 } })
@@ -3387,6 +3455,9 @@ declare namespace CodeceptJS {
3387
3455
  * // make ctrl-click
3388
3456
  * I.click('.edit', null, { modifiers: ['Ctrl'] } )
3389
3457
  * ```
3458
+ * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3459
+ * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3460
+ * @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
3390
3461
  */
3391
3462
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): Promise<any>;
3392
3463
  /**
@@ -3420,7 +3491,6 @@ declare namespace CodeceptJS {
3420
3491
  * ```
3421
3492
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3422
3493
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3423
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3424
3494
  */
3425
3495
  forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3426
3496
  /**
@@ -3435,7 +3505,6 @@ declare namespace CodeceptJS {
3435
3505
  * ```
3436
3506
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3437
3507
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3438
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3439
3508
  */
3440
3509
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3441
3510
  /**
@@ -3451,10 +3520,19 @@ declare namespace CodeceptJS {
3451
3520
  * ```
3452
3521
  * @param locator - clickable element located by CSS|XPath|strict locator.
3453
3522
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
3454
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3455
3523
  */
3456
3524
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3457
3525
  /**
3526
+ * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
3527
+ *
3528
+ * Examples:
3529
+ *
3530
+ * ```js
3531
+ * // click on element at position
3532
+ * I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3533
+ * ```
3534
+ * > ⚠️ To avoid flakiness, option `force: true` is set by default
3535
+ *
3458
3536
  * Selects a checkbox or radio button.
3459
3537
  * Element is located by label or name or CSS or XPath.
3460
3538
  *
@@ -3467,21 +3545,19 @@ declare namespace CodeceptJS {
3467
3545
  * ```
3468
3546
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
3469
3547
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
3470
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3471
- *
3472
- *
3473
- * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
3548
+ */
3549
+ checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3550
+ /**
3551
+ * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
3474
3552
  *
3475
3553
  * Examples:
3476
3554
  *
3477
3555
  * ```js
3478
3556
  * // click on element at position
3479
- * I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3557
+ * I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3480
3558
  * ```
3481
3559
  * > ⚠️ To avoid flakiness, option `force: true` is set by default
3482
- */
3483
- checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3484
- /**
3560
+ *
3485
3561
  * Unselects a checkbox or radio button.
3486
3562
  * Element is located by label or name or CSS or XPath.
3487
3563
  *
@@ -3494,18 +3570,6 @@ declare namespace CodeceptJS {
3494
3570
  * ```
3495
3571
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
3496
3572
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
3497
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3498
- *
3499
- *
3500
- * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
3501
- *
3502
- * Examples:
3503
- *
3504
- * ```js
3505
- * // click on element at position
3506
- * I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3507
- * ```
3508
- * > ⚠️ To avoid flakiness, option `force: true` is set by default
3509
3573
  */
3510
3574
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
3511
3575
  /**
@@ -3517,7 +3581,6 @@ declare namespace CodeceptJS {
3517
3581
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
3518
3582
  * ```
3519
3583
  * @param field - located by label|name|CSS|XPath|strict locator.
3520
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3521
3584
  */
3522
3585
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
3523
3586
  /**
@@ -3529,7 +3592,6 @@ declare namespace CodeceptJS {
3529
3592
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
3530
3593
  * ```
3531
3594
  * @param field - located by label|name|CSS|XPath|strict locator.
3532
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3533
3595
  */
3534
3596
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
3535
3597
  /**
@@ -3543,7 +3605,6 @@ declare namespace CodeceptJS {
3543
3605
  * I.pressKeyUp('Control');
3544
3606
  * ```
3545
3607
  * @param key - name of key to press down.
3546
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3547
3608
  */
3548
3609
  pressKeyDown(key: string): Promise<any>;
3549
3610
  /**
@@ -3557,10 +3618,11 @@ declare namespace CodeceptJS {
3557
3618
  * I.pressKeyUp('Control');
3558
3619
  * ```
3559
3620
  * @param key - name of key to release.
3560
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3561
3621
  */
3562
3622
  pressKeyUp(key: string): Promise<any>;
3563
3623
  /**
3624
+ * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
3625
+ *
3564
3626
  * Presses a key in the browser (on a focused element).
3565
3627
  *
3566
3628
  * _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
@@ -3619,10 +3681,6 @@ declare namespace CodeceptJS {
3619
3681
  * - `'Space'`
3620
3682
  * - `'Tab'`
3621
3683
  * @param key - key or array of keys to press.
3622
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3623
- *
3624
- *
3625
- * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
3626
3684
  */
3627
3685
  pressKey(key: string | string[]): Promise<any>;
3628
3686
  /**
@@ -3645,7 +3703,6 @@ declare namespace CodeceptJS {
3645
3703
  * ```
3646
3704
  * @param key - or array of keys to type.
3647
3705
  * @param [delay = null] - (optional) delay in ms between key presses
3648
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3649
3706
  */
3650
3707
  type(key: string | string[], delay?: number): Promise<any>;
3651
3708
  /**
@@ -3664,22 +3721,23 @@ declare namespace CodeceptJS {
3664
3721
  * ```
3665
3722
  * @param field - located by label|name|CSS|XPath|strict locator.
3666
3723
  * @param value - text value to fill.
3667
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3668
3724
  */
3669
3725
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
3670
3726
  /**
3671
- * Clear the <input>, <textarea> or [contenteditable] .
3672
- * @param locator - field located by label|name|CSS|XPath|strict locator.
3673
- * @param [options] - [Additional options](https://playwright.dev/docs/api/class-locator#locator-clear) for available options object as 2nd argument.
3727
+ * Clears the text input element: `<input>`, `<textarea>` or `[contenteditable]` .
3728
+ *
3674
3729
  *
3675
3730
  * Examples:
3676
3731
  *
3677
3732
  * ```js
3678
3733
  * I.clearField('.text-area')
3734
+ *
3735
+ * // if this doesn't work use force option
3736
+ * I.clearField('#submit', { force: true })
3679
3737
  * ```
3680
- * ```js
3681
- * I.clearField('#submit', { force: true }) // force to bypass the [actionability](https://playwright.dev/docs/actionability) checks.
3682
- * ```
3738
+ * Use `force` to bypass the [actionability](https://playwright.dev/docs/actionability) checks.
3739
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
3740
+ * @param [options] - [Additional options](https://playwright.dev/docs/api/class-locator#locator-clear) for available options object as 2nd argument.
3683
3741
  */
3684
3742
  clearField(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
3685
3743
  /**
@@ -3693,7 +3751,6 @@ declare namespace CodeceptJS {
3693
3751
  * ```
3694
3752
  * @param field - located by label|name|CSS|XPath|strict locator
3695
3753
  * @param value - text value to append.
3696
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3697
3754
  */
3698
3755
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
3699
3756
  /**
@@ -3708,9 +3765,8 @@ declare namespace CodeceptJS {
3708
3765
  * ```
3709
3766
  * @param field - located by label|name|CSS|XPath|strict locator.
3710
3767
  * @param value - value to check.
3711
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3712
3768
  */
3713
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
3769
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
3714
3770
  /**
3715
3771
  * Checks that value of input field or textarea doesn't equal to given value
3716
3772
  * Opposite to `seeInField`.
@@ -3721,9 +3777,8 @@ declare namespace CodeceptJS {
3721
3777
  * ```
3722
3778
  * @param field - located by label|name|CSS|XPath|strict locator.
3723
3779
  * @param value - value to check.
3724
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3725
3780
  */
3726
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
3781
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
3727
3782
  /**
3728
3783
  * Attaches a file to element located by label, name, CSS or XPath
3729
3784
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -3735,7 +3790,6 @@ declare namespace CodeceptJS {
3735
3790
  * ```
3736
3791
  * @param locator - field located by label|name|CSS|XPath|strict locator.
3737
3792
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
3738
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3739
3793
  */
3740
3794
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
3741
3795
  /**
@@ -3759,7 +3813,6 @@ declare namespace CodeceptJS {
3759
3813
  * ```
3760
3814
  * @param select - field located by label|name|CSS|XPath|strict locator.
3761
3815
  * @param option - visible text or value of option.
3762
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3763
3816
  */
3764
3817
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
3765
3818
  /**
@@ -3780,13 +3833,11 @@ declare namespace CodeceptJS {
3780
3833
  * I.seeInCurrentUrl('/register'); // we are on registration page
3781
3834
  * ```
3782
3835
  * @param url - a fragment to check
3783
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3784
3836
  */
3785
3837
  seeInCurrentUrl(url: string): Promise<any>;
3786
3838
  /**
3787
3839
  * Checks that current url does not contain a provided fragment.
3788
3840
  * @param url - value to check.
3789
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3790
3841
  */
3791
3842
  dontSeeInCurrentUrl(url: string): Promise<any>;
3792
3843
  /**
@@ -3799,7 +3850,6 @@ declare namespace CodeceptJS {
3799
3850
  * I.seeCurrentUrlEquals('http://my.site.com/register');
3800
3851
  * ```
3801
3852
  * @param url - value to check.
3802
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3803
3853
  */
3804
3854
  seeCurrentUrlEquals(url: string): Promise<any>;
3805
3855
  /**
@@ -3811,7 +3861,6 @@ declare namespace CodeceptJS {
3811
3861
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
3812
3862
  * ```
3813
3863
  * @param url - value to check.
3814
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3815
3864
  */
3816
3865
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
3817
3866
  /**
@@ -3825,7 +3874,6 @@ declare namespace CodeceptJS {
3825
3874
  * ```
3826
3875
  * @param text - expected on page.
3827
3876
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
3828
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3829
3877
  */
3830
3878
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
3831
3879
  /**
@@ -3836,7 +3884,6 @@ declare namespace CodeceptJS {
3836
3884
  * ```
3837
3885
  * @param text - element value to check.
3838
3886
  * @param [context = null] - element located by CSS|XPath|strict locator.
3839
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3840
3887
  */
3841
3888
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
3842
3889
  /**
@@ -3849,7 +3896,6 @@ declare namespace CodeceptJS {
3849
3896
  * ```
3850
3897
  * @param text - which is not present.
3851
3898
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
3852
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3853
3899
  */
3854
3900
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
3855
3901
  /**
@@ -3891,7 +3937,6 @@ declare namespace CodeceptJS {
3891
3937
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
3892
3938
  * ```
3893
3939
  * @param text - value to check.
3894
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3895
3940
  */
3896
3941
  seeInSource(text: string): Promise<any>;
3897
3942
  /**
@@ -3901,7 +3946,6 @@ declare namespace CodeceptJS {
3901
3946
  * I.dontSeeInSource('<!--'); // no comments in source
3902
3947
  * ```
3903
3948
  * @param value - to check.
3904
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3905
3949
  */
3906
3950
  dontSeeInSource(value: string): Promise<any>;
3907
3951
  /**
@@ -3914,7 +3958,6 @@ declare namespace CodeceptJS {
3914
3958
  * ```
3915
3959
  * @param locator - element located by CSS|XPath|strict locator.
3916
3960
  * @param num - number of elements.
3917
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3918
3961
  */
3919
3962
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
3920
3963
  /**
@@ -3926,7 +3969,6 @@ declare namespace CodeceptJS {
3926
3969
  * ```
3927
3970
  * @param locator - element located by CSS|XPath|strict locator.
3928
3971
  * @param num - number of elements.
3929
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3930
3972
  */
3931
3973
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
3932
3974
  /**
@@ -3944,7 +3986,6 @@ declare namespace CodeceptJS {
3944
3986
  * ]);
3945
3987
  * ```
3946
3988
  * @param cookie - a cookie object or array of cookie objects.
3947
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3948
3989
  */
3949
3990
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
3950
3991
  /**
@@ -3954,7 +3995,6 @@ declare namespace CodeceptJS {
3954
3995
  * I.seeCookie('Auth');
3955
3996
  * ```
3956
3997
  * @param name - cookie name.
3957
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3958
3998
  */
3959
3999
  seeCookie(name: string): Promise<any>;
3960
4000
  /**
@@ -3964,10 +4004,11 @@ declare namespace CodeceptJS {
3964
4004
  * I.dontSeeCookie('auth'); // no auth cookie
3965
4005
  * ```
3966
4006
  * @param name - cookie name.
3967
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3968
4007
  */
3969
4008
  dontSeeCookie(name: string): Promise<any>;
3970
4009
  /**
4010
+ * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
4011
+ *
3971
4012
  * Gets a cookie object by name.
3972
4013
  * If none provided gets all cookies.
3973
4014
  * Resumes test execution, so **should be used inside async function with `await`** operator.
@@ -3977,22 +4018,17 @@ declare namespace CodeceptJS {
3977
4018
  * assert(cookie.value, '123456');
3978
4019
  * ```
3979
4020
  * @param [name = null] - cookie name.
3980
- * @returns attribute value
3981
- *
3982
- *
3983
- * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
3984
4021
  */
3985
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
4022
+ grabCookie(name?: string): Promise<any>;
3986
4023
  /**
3987
4024
  * Clears a cookie by name,
3988
4025
  * if none provided clears all cookies.
3989
4026
  *
3990
4027
  * ```js
3991
4028
  * I.clearCookie();
3992
- * I.clearCookie('test');
4029
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
3993
4030
  * ```
3994
4031
  * @param [cookie = null] - (optional, `null` by default) cookie name
3995
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
3996
4032
  */
3997
4033
  clearCookie(cookie?: string): Promise<any>;
3998
4034
  /**
@@ -4007,8 +4043,8 @@ declare namespace CodeceptJS {
4007
4043
  * ```js
4008
4044
  * I.executeScript(({x, y}) => x + y, {x, y});
4009
4045
  * ```
4010
- * You can pass only one parameter into a function
4011
- * but you can pass in array or object.
4046
+ * You can pass only one parameter into a function,
4047
+ * or you can pass in array or object.
4012
4048
  *
4013
4049
  * ```js
4014
4050
  * I.executeScript(([x, y]) => x + y, [x, y]);
@@ -4124,7 +4160,6 @@ declare namespace CodeceptJS {
4124
4160
  * ```
4125
4161
  * @param locator - located by CSS|XPath|strict locator.
4126
4162
  * @param cssProperties - object with CSS properties and their values to check.
4127
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4128
4163
  */
4129
4164
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
4130
4165
  /**
@@ -4135,7 +4170,6 @@ declare namespace CodeceptJS {
4135
4170
  * ```
4136
4171
  * @param locator - located by CSS|XPath|strict locator.
4137
4172
  * @param attributes - attributes and their values to check.
4138
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4139
4173
  */
4140
4174
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
4141
4175
  /**
@@ -4148,7 +4182,6 @@ declare namespace CodeceptJS {
4148
4182
  * ```
4149
4183
  * @param locator - located by label|name|CSS|XPath|strict locator.
4150
4184
  * @param offsetX - position to drag.
4151
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4152
4185
  */
4153
4186
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
4154
4187
  /**
@@ -4185,7 +4218,6 @@ declare namespace CodeceptJS {
4185
4218
  * ```
4186
4219
  * @param locator - element located by CSS|XPath|strict locator.
4187
4220
  * @param fileName - file name to save.
4188
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4189
4221
  */
4190
4222
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
4191
4223
  /**
@@ -4199,7 +4231,6 @@ declare namespace CodeceptJS {
4199
4231
  * ```
4200
4232
  * @param fileName - file name to save.
4201
4233
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
4202
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4203
4234
  */
4204
4235
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
4205
4236
  /**
@@ -4226,7 +4257,6 @@ declare namespace CodeceptJS {
4226
4257
  * I.wait(2); // wait 2 secs
4227
4258
  * ```
4228
4259
  * @param sec - number of second to wait.
4229
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4230
4260
  */
4231
4261
  wait(sec: number): Promise<any>;
4232
4262
  /**
@@ -4234,7 +4264,6 @@ declare namespace CodeceptJS {
4234
4264
  * Element can be located by CSS or XPath.
4235
4265
  * @param locator - element located by CSS|XPath|strict locator.
4236
4266
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
4237
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4238
4267
  */
4239
4268
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4240
4269
  /**
@@ -4246,7 +4275,6 @@ declare namespace CodeceptJS {
4246
4275
  * @param field - input field.
4247
4276
  * @param value - expected value.
4248
4277
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4249
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4250
4278
  */
4251
4279
  waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
4252
4280
  /**
@@ -4258,7 +4286,6 @@ declare namespace CodeceptJS {
4258
4286
  * @param locator - element located by CSS|XPath|strict locator.
4259
4287
  * @param num - number of elements.
4260
4288
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4261
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4262
4289
  */
4263
4290
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
4264
4291
  /**
@@ -4271,7 +4298,6 @@ declare namespace CodeceptJS {
4271
4298
  * ```
4272
4299
  * @param locator - element located by CSS|XPath|strict locator.
4273
4300
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4274
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4275
4301
  */
4276
4302
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4277
4303
  /**
@@ -4284,10 +4310,11 @@ declare namespace CodeceptJS {
4284
4310
  * ```
4285
4311
  * @param locator - element located by CSS|XPath|strict locator.
4286
4312
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4287
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4288
4313
  */
4289
4314
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4290
4315
  /**
4316
+ * This method accepts [React selectors](https://codecept.io/react).
4317
+ *
4291
4318
  * Waits for an element to become visible on a page (by default waits for 1sec).
4292
4319
  * Element can be located by CSS or XPath.
4293
4320
  *
@@ -4296,10 +4323,6 @@ declare namespace CodeceptJS {
4296
4323
  * ```
4297
4324
  * @param locator - element located by CSS|XPath|strict locator.
4298
4325
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4299
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4300
- *
4301
- *
4302
- * This method accepts [React selectors](https://codecept.io/react).
4303
4326
  */
4304
4327
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4305
4328
  /**
@@ -4311,7 +4334,6 @@ declare namespace CodeceptJS {
4311
4334
  * ```
4312
4335
  * @param locator - element located by CSS|XPath|strict locator.
4313
4336
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4314
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4315
4337
  */
4316
4338
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4317
4339
  /**
@@ -4323,9 +4345,18 @@ declare namespace CodeceptJS {
4323
4345
  * ```
4324
4346
  * @param locator - element located by CSS|XPath|strict locator.
4325
4347
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4326
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4327
4348
  */
4328
4349
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4350
+ /**
4351
+ * Waits for number of tabs.
4352
+ *
4353
+ * ```js
4354
+ * I.waitForNumberOfTabs(2);
4355
+ * ```
4356
+ * @param expectedTabs - expecting the number of tabs.
4357
+ * @param sec - number of secs to wait.
4358
+ */
4359
+ waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
4329
4360
  /**
4330
4361
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
4331
4362
  *
@@ -4334,7 +4365,6 @@ declare namespace CodeceptJS {
4334
4365
  * ```
4335
4366
  * @param urlPart - value to check.
4336
4367
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4337
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4338
4368
  */
4339
4369
  waitInUrl(urlPart: string, sec?: number): Promise<any>;
4340
4370
  /**
@@ -4346,7 +4376,6 @@ declare namespace CodeceptJS {
4346
4376
  * ```
4347
4377
  * @param urlPart - value to check.
4348
4378
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4349
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4350
4379
  */
4351
4380
  waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
4352
4381
  /**
@@ -4361,7 +4390,6 @@ declare namespace CodeceptJS {
4361
4390
  * @param text - to wait for.
4362
4391
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4363
4392
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
4364
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4365
4393
  */
4366
4394
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
4367
4395
  /**
@@ -4392,7 +4420,6 @@ declare namespace CodeceptJS {
4392
4420
  * I.switchTo(); // switch back to main page
4393
4421
  * ```
4394
4422
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
4395
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4396
4423
  */
4397
4424
  switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
4398
4425
  /**
@@ -4411,15 +4438,21 @@ declare namespace CodeceptJS {
4411
4438
  * @param fn - to be executed in browser context.
4412
4439
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
4413
4440
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
4414
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4415
4441
  */
4416
4442
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
4417
4443
  /**
4418
- * Waits for navigation to finish. By default takes configured `waitForNavigation` option.
4444
+ * Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
4419
4445
  *
4420
4446
  * See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
4421
4447
  */
4422
4448
  waitForNavigation(options: any): Promise<any>;
4449
+ /**
4450
+ * Waits for page navigates to a new URL or reloads. By default, it takes configured `waitForNavigation` option.
4451
+ *
4452
+ * See [Playwright's reference](https://playwright.dev/docs/api/class-page#page-wait-for-url)
4453
+ * @param url - A glob pattern, regex pattern or predicate receiving URL to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
4454
+ */
4455
+ waitForURL(url: string | RegExp, options: any): Promise<any>;
4423
4456
  /**
4424
4457
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
4425
4458
  * Element can be located by CSS or XPath.
@@ -4429,7 +4462,6 @@ declare namespace CodeceptJS {
4429
4462
  * ```
4430
4463
  * @param locator - element located by CSS|XPath|strict locator.
4431
4464
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4432
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4433
4465
  */
4434
4466
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
4435
4467
  /**
@@ -4452,7 +4484,6 @@ declare namespace CodeceptJS {
4452
4484
  * loadEventEnd: 241
4453
4485
  * }
4454
4486
  * ```
4455
- * @returns automatically synchronized promise through #recorder
4456
4487
  */
4457
4488
  grabDataFromPerformanceTiming(): Promise<any>;
4458
4489
  /**
@@ -4501,71 +4532,251 @@ declare namespace CodeceptJS {
4501
4532
  * @param [handler] - a function to process reques
4502
4533
  */
4503
4534
  stopMockingRoute(url?: string | RegExp, handler?: (...params: any[]) => any): Promise<any>;
4504
- }
4505
- /**
4506
- * This helper works the same as MockRequest helper. It has been included for backwards compatibility
4507
- * reasons. So use MockRequest helper instead of this.
4508
- *
4509
- * Please refer to MockRequest helper documentation for details.
4510
- *
4511
- * ### Installations
4512
- *
4513
- * Requires [Polly.js](https://netflix.github.io/pollyjs/#/) library by Netflix installed
4514
- *
4515
- * ```
4516
- * npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-dev
4517
- * ```
4518
- *
4519
- * Requires Puppeteer helper or WebDriver helper enabled
4520
- *
4521
- * ### Configuration
4522
- *
4523
- * Just enable helper in config file:
4524
- *
4525
- * ```js
4526
- * helpers: {
4527
- * Puppeteer: {
4528
- * // regular Puppeteer config here
4529
- * },
4530
- * Polly: {}
4531
- * }
4532
- * ```
4533
- * The same can be done when using WebDriver helper..
4534
- *
4535
- * ### Usage
4536
- *
4537
- * Use `I.mockRequest` to intercept and mock requests.
4538
- */
4539
- class PollyTs {
4540
- }
4541
- /**
4542
- * Protractor helper is based on [Protractor library](http://www.protractortest.org) and used for testing web applications.
4543
- *
4544
- * Protractor requires [Selenium Server and ChromeDriver/GeckoDriver to be installed](http://codecept.io/quickstart/#prepare-selenium-server).
4545
- * To test non-Angular applications please make sure you have `angular: false` in configuration file.
4546
- *
4547
- * ### Configuration
4548
- *
4549
- * This helper should be configured in codecept.conf.ts or codecept.conf.js
4550
- *
4551
- * * `url` - base url of website to be tested
4552
- * * `browser` - browser in which perform testing
4553
- * * `angular` (optional, default: true): disable this option to run tests for non-Angular applications.
4554
- * * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
4555
- * * `restart` (optional, default: true) - restart browser between tests.
4556
- * * `smartWait`: (optional) **enables [SmartWait](http://codecept.io/acceptance/#smartwait)**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
4557
- * * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
4558
- * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
4559
- * * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
4560
- * * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
4561
- * * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
4562
- * * `rootElement` - Root element of AngularJS application (default: body)
4563
- * * `getPageTimeout` (optional) sets default timeout for a page to be loaded. 10000 by default.
4564
- * * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default.
4565
- * * `scriptsTimeout`: (optional) timeout in milliseconds for each script run on the browser, 10000 by default.
4566
- * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
4567
- * * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers.WebDriver._startBrowser()`
4568
- * * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
4535
+ /**
4536
+ * Starts recording the network traffics.
4537
+ * This also resets recorded network requests.
4538
+ *
4539
+ * ```js
4540
+ * I.startRecordingTraffic();
4541
+ * ```
4542
+ */
4543
+ startRecordingTraffic(): Promise<any>;
4544
+ /**
4545
+ * Grab the recording network traffics
4546
+ *
4547
+ * ```js
4548
+ * const traffics = await I.grabRecordedNetworkTraffics();
4549
+ * expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
4550
+ * expect(traffics[0].response.status).to.equal(200);
4551
+ * expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
4552
+ * ```
4553
+ */
4554
+ grabRecordedNetworkTraffics(): Promise<any[]>;
4555
+ /**
4556
+ * Blocks traffic of a given URL or a list of URLs.
4557
+ *
4558
+ * Examples:
4559
+ *
4560
+ * ```js
4561
+ * I.blockTraffic('http://example.com/css/style.css');
4562
+ * I.blockTraffic('http://example.com/css/*.css');
4563
+ * I.blockTraffic('http://example.com/**');
4564
+ * I.blockTraffic(/\.css$/);
4565
+ * ```
4566
+ *
4567
+ * ```js
4568
+ * I.blockTraffic(['http://example.com/css/style.css', 'http://example.com/css/*.css']);
4569
+ * ```
4570
+ * @param urls - URL or a list of URLs to block . URL can contain * for wildcards. Example: https://www.example.com** to block all traffic for that domain. Regexp are also supported.
4571
+ */
4572
+ blockTraffic(urls: string | any[] | RegExp): Promise<any>;
4573
+ /**
4574
+ * Mocks traffic for URL(s).
4575
+ * This is a powerful feature to manipulate network traffic. Can be used e.g. to stabilize your tests, speed up your tests or as a last resort to make some test scenarios even possible.
4576
+ *
4577
+ * Examples:
4578
+ *
4579
+ * ```js
4580
+ * I.mockTraffic('/api/users/1', '{ id: 1, name: 'John Doe' }');
4581
+ * I.mockTraffic('/api/users/*', JSON.stringify({ id: 1, name: 'John Doe' }));
4582
+ * I.mockTraffic([/^https://api.example.com/v1/, 'https://api.example.com/v2/**'], 'Internal Server Error', 'text/html');
4583
+ * ```
4584
+ * @param urls - string|Array These are the URL(s) to mock, e.g. "/fooapi/*" or "['/fooapi_1/*', '/barapi_2/*']". Regular expressions are also supported.
4585
+ * @param responseString - string The string to return in fake response's body.
4586
+ * @param contentType - Content type of fake response. If not specified default value 'application/json' is used.
4587
+ */
4588
+ mockTraffic(urls: any, responseString: any, contentType?: any): Promise<any>;
4589
+ /**
4590
+ * Resets all recorded network requests.
4591
+ */
4592
+ flushNetworkTraffics(): Promise<any>;
4593
+ /**
4594
+ * Stops recording of network traffic. Recorded traffic is not flashed.
4595
+ *
4596
+ * ```js
4597
+ * I.stopRecordingTraffic();
4598
+ * ```
4599
+ */
4600
+ stopRecordingTraffic(): Promise<any>;
4601
+ /**
4602
+ * Verifies that a certain request is part of network traffic.
4603
+ *
4604
+ * ```js
4605
+ * // checking the request url contains certain query strings
4606
+ * I.amOnPage('https://openai.com/blog/chatgpt');
4607
+ * I.startRecordingTraffic();
4608
+ * await I.seeTraffic({
4609
+ * name: 'sentry event',
4610
+ * url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
4611
+ * parameters: {
4612
+ * width: '1919',
4613
+ * height: '1138',
4614
+ * },
4615
+ * });
4616
+ * ```
4617
+ *
4618
+ * ```js
4619
+ * // checking the request url contains certain post data
4620
+ * I.amOnPage('https://openai.com/blog/chatgpt');
4621
+ * I.startRecordingTraffic();
4622
+ * await I.seeTraffic({
4623
+ * name: 'event',
4624
+ * url: 'https://cloudflareinsights.com/cdn-cgi/rum',
4625
+ * requestPostData: {
4626
+ * st: 2,
4627
+ * },
4628
+ * });
4629
+ * ```
4630
+ * @param opts - options when checking the traffic network.
4631
+ * @param opts.name - A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
4632
+ * @param opts.url - Expected URL of request in network traffic
4633
+ * @param [opts.parameters] - Expected parameters of that request in network traffic
4634
+ * @param [opts.requestPostData] - Expected that request contains post data in network traffic
4635
+ * @param [opts.timeout] - Timeout to wait for request in seconds. Default is 10 seconds.
4636
+ */
4637
+ seeTraffic(opts: {
4638
+ name: string;
4639
+ url: string;
4640
+ parameters?: any;
4641
+ requestPostData?: any;
4642
+ timeout?: number;
4643
+ }): Promise<any>;
4644
+ /**
4645
+ * Returns full URL of request matching parameter "urlMatch".
4646
+ * @param urlMatch - Expected URL of request in network traffic. Can be a string or a regular expression.
4647
+ *
4648
+ * Examples:
4649
+ *
4650
+ * ```js
4651
+ * I.grabTrafficUrl('https://api.example.com/session');
4652
+ * I.grabTrafficUrl(/session.*start/);
4653
+ * ```
4654
+ */
4655
+ grabTrafficUrl(urlMatch: string | RegExp): Promise<any>;
4656
+ /**
4657
+ * Verifies that a certain request is not part of network traffic.
4658
+ *
4659
+ * Examples:
4660
+ *
4661
+ * ```js
4662
+ * I.dontSeeTraffic({ name: 'Unexpected API Call', url: 'https://api.example.com' });
4663
+ * I.dontSeeTraffic({ name: 'Unexpected API Call of "user" endpoint', url: /api.example.com.*user/ });
4664
+ * ```
4665
+ * @param opts - options when checking the traffic network.
4666
+ * @param opts.name - A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
4667
+ * @param opts.url - Expected URL of request in network traffic. Can be a string or a regular expression.
4668
+ */
4669
+ dontSeeTraffic(opts: {
4670
+ name: string;
4671
+ url: string | RegExp;
4672
+ }): Promise<any>;
4673
+ /**
4674
+ * Starts recording of websocket messages.
4675
+ * This also resets recorded websocket messages.
4676
+ *
4677
+ * ```js
4678
+ * await I.startRecordingWebSocketMessages();
4679
+ * ```
4680
+ */
4681
+ startRecordingWebSocketMessages(): Promise<any>;
4682
+ /**
4683
+ * Stops recording WS messages. Recorded WS messages is not flashed.
4684
+ *
4685
+ * ```js
4686
+ * await I.stopRecordingWebSocketMessages();
4687
+ * ```
4688
+ */
4689
+ stopRecordingWebSocketMessages(): Promise<any>;
4690
+ /**
4691
+ * Grab the recording WS messages
4692
+ */
4693
+ grabWebSocketMessages(): Promise<any>;
4694
+ /**
4695
+ * Resets all recorded WS messages.
4696
+ */
4697
+ flushWebSocketMessages(): Promise<any>;
4698
+ /**
4699
+ * Return a performance metric from the chrome cdp session.
4700
+ * Note: Chrome-only
4701
+ *
4702
+ * Examples:
4703
+ *
4704
+ * ```js
4705
+ * const metrics = await I.grabMetrics();
4706
+ *
4707
+ * // returned metrics
4708
+ *
4709
+ * [
4710
+ * { name: 'Timestamp', value: 1584904.203473 },
4711
+ * { name: 'AudioHandlers', value: 0 },
4712
+ * { name: 'AudioWorkletProcessors', value: 0 },
4713
+ * { name: 'Documents', value: 22 },
4714
+ * { name: 'Frames', value: 10 },
4715
+ * { name: 'JSEventListeners', value: 366 },
4716
+ * { name: 'LayoutObjects', value: 1240 },
4717
+ * { name: 'MediaKeySessions', value: 0 },
4718
+ * { name: 'MediaKeys', value: 0 },
4719
+ * { name: 'Nodes', value: 4505 },
4720
+ * { name: 'Resources', value: 141 },
4721
+ * { name: 'ContextLifecycleStateObservers', value: 34 },
4722
+ * { name: 'V8PerContextDatas', value: 4 },
4723
+ * { name: 'WorkerGlobalScopes', value: 0 },
4724
+ * { name: 'UACSSResources', value: 0 },
4725
+ * { name: 'RTCPeerConnections', value: 0 },
4726
+ * { name: 'ResourceFetchers', value: 22 },
4727
+ * { name: 'AdSubframes', value: 0 },
4728
+ * { name: 'DetachedScriptStates', value: 2 },
4729
+ * { name: 'ArrayBufferContents', value: 1 },
4730
+ * { name: 'LayoutCount', value: 0 },
4731
+ * { name: 'RecalcStyleCount', value: 0 },
4732
+ * { name: 'LayoutDuration', value: 0 },
4733
+ * { name: 'RecalcStyleDuration', value: 0 },
4734
+ * { name: 'DevToolsCommandDuration', value: 0.000013 },
4735
+ * { name: 'ScriptDuration', value: 0 },
4736
+ * { name: 'V8CompileDuration', value: 0 },
4737
+ * { name: 'TaskDuration', value: 0.000014 },
4738
+ * { name: 'TaskOtherDuration', value: 0.000001 },
4739
+ * { name: 'ThreadTime', value: 0.000046 },
4740
+ * { name: 'ProcessTime', value: 0.616852 },
4741
+ * { name: 'JSHeapUsedSize', value: 19004908 },
4742
+ * { name: 'JSHeapTotalSize', value: 26820608 },
4743
+ * { name: 'FirstMeaningfulPaint', value: 0 },
4744
+ * { name: 'DomContentLoaded', value: 1584903.690491 },
4745
+ * { name: 'NavigationStart', value: 1584902.841845 }
4746
+ * ]
4747
+ *
4748
+ * ```
4749
+ */
4750
+ grabMetrics(): Promise<object[]>;
4751
+ }
4752
+ /**
4753
+ * Protractor helper is based on [Protractor library](http://www.protractortest.org) and used for testing web applications.
4754
+ *
4755
+ * Protractor requires [Selenium Server and ChromeDriver/GeckoDriver to be installed](http://codecept.io/quickstart/#prepare-selenium-server).
4756
+ * To test non-Angular applications please make sure you have `angular: false` in configuration file.
4757
+ *
4758
+ * ### Configuration
4759
+ *
4760
+ * This helper should be configured in codecept.conf.ts or codecept.conf.js
4761
+ *
4762
+ * * `url` - base url of website to be tested
4763
+ * * `browser` - browser in which perform testing
4764
+ * * `angular` (optional, default: true): disable this option to run tests for non-Angular applications.
4765
+ * * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
4766
+ * * `restart` (optional, default: true) - restart browser between tests.
4767
+ * * `smartWait`: (optional) **enables [SmartWait](http://codecept.io/acceptance/#smartwait)**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
4768
+ * * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
4769
+ * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
4770
+ * * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
4771
+ * * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
4772
+ * * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
4773
+ * * `rootElement` - Root element of AngularJS application (default: body)
4774
+ * * `getPageTimeout` (optional) sets default timeout for a page to be loaded. 10000 by default.
4775
+ * * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default.
4776
+ * * `scriptsTimeout`: (optional) timeout in milliseconds for each script run on the browser, 10000 by default.
4777
+ * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
4778
+ * * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers.WebDriver._startBrowser()`
4779
+ * * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
4569
4780
  * * `proxy`: set proxy settings
4570
4781
  *
4571
4782
  * other options are the same as in [Protractor config](https://github.com/angular/protractor/blob/master/docs/referenceConf.js).
@@ -4729,7 +4940,6 @@ declare namespace CodeceptJS {
4729
4940
  * ```
4730
4941
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
4731
4942
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
4732
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4733
4943
  */
4734
4944
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
4735
4945
  /**
@@ -4744,7 +4954,6 @@ declare namespace CodeceptJS {
4744
4954
  * ```
4745
4955
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
4746
4956
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
4747
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4748
4957
  */
4749
4958
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
4750
4959
  /**
@@ -4760,7 +4969,6 @@ declare namespace CodeceptJS {
4760
4969
  * ```
4761
4970
  * @param locator - clickable element located by CSS|XPath|strict locator.
4762
4971
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
4763
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4764
4972
  */
4765
4973
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
4766
4974
  /**
@@ -4774,7 +4982,6 @@ declare namespace CodeceptJS {
4774
4982
  * @param locator - located by CSS|XPath|strict locator.
4775
4983
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
4776
4984
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
4777
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4778
4985
  */
4779
4986
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
4780
4987
  /**
@@ -4788,7 +4995,6 @@ declare namespace CodeceptJS {
4788
4995
  * ```
4789
4996
  * @param text - expected on page.
4790
4997
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
4791
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4792
4998
  */
4793
4999
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
4794
5000
  /**
@@ -4799,7 +5005,6 @@ declare namespace CodeceptJS {
4799
5005
  * ```
4800
5006
  * @param text - element value to check.
4801
5007
  * @param [context = null] - element located by CSS|XPath|strict locator.
4802
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4803
5008
  */
4804
5009
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
4805
5010
  /**
@@ -4812,7 +5017,6 @@ declare namespace CodeceptJS {
4812
5017
  * ```
4813
5018
  * @param text - which is not present.
4814
5019
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
4815
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4816
5020
  */
4817
5021
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
4818
5022
  /**
@@ -4858,7 +5062,6 @@ declare namespace CodeceptJS {
4858
5062
  * ```
4859
5063
  * @param select - field located by label|name|CSS|XPath|strict locator.
4860
5064
  * @param option - visible text or value of option.
4861
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4862
5065
  */
4863
5066
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
4864
5067
  /**
@@ -4877,7 +5080,6 @@ declare namespace CodeceptJS {
4877
5080
  * ```
4878
5081
  * @param field - located by label|name|CSS|XPath|strict locator.
4879
5082
  * @param value - text value to fill.
4880
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4881
5083
  */
4882
5084
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
4883
5085
  /**
@@ -4891,9 +5093,6 @@ declare namespace CodeceptJS {
4891
5093
  * I.pressKey(['Control','a']);
4892
5094
  * ```
4893
5095
  * @param key - key or array of keys to press.
4894
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4895
- *
4896
- * {{ keys }}
4897
5096
  */
4898
5097
  pressKey(key: string | string[]): Promise<any>;
4899
5098
  /**
@@ -4907,7 +5106,6 @@ declare namespace CodeceptJS {
4907
5106
  * ```
4908
5107
  * @param locator - field located by label|name|CSS|XPath|strict locator.
4909
5108
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
4910
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4911
5109
  */
4912
5110
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
4913
5111
  /**
@@ -4922,9 +5120,8 @@ declare namespace CodeceptJS {
4922
5120
  * ```
4923
5121
  * @param field - located by label|name|CSS|XPath|strict locator.
4924
5122
  * @param value - value to check.
4925
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4926
5123
  */
4927
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
5124
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
4928
5125
  /**
4929
5126
  * Checks that value of input field or textarea doesn't equal to given value
4930
5127
  * Opposite to `seeInField`.
@@ -4935,9 +5132,8 @@ declare namespace CodeceptJS {
4935
5132
  * ```
4936
5133
  * @param field - located by label|name|CSS|XPath|strict locator.
4937
5134
  * @param value - value to check.
4938
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4939
5135
  */
4940
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
5136
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
4941
5137
  /**
4942
5138
  * Appends text to a input field or textarea.
4943
5139
  * Field is located by name, label, CSS or XPath
@@ -4949,7 +5145,6 @@ declare namespace CodeceptJS {
4949
5145
  * ```
4950
5146
  * @param field - located by label|name|CSS|XPath|strict locator
4951
5147
  * @param value - text value to append.
4952
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4953
5148
  */
4954
5149
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
4955
5150
  /**
@@ -4961,7 +5156,6 @@ declare namespace CodeceptJS {
4961
5156
  * I.clearField('#email');
4962
5157
  * ```
4963
5158
  * @param editable - field located by label|name|CSS|XPath|strict locator.
4964
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
4965
5159
  */
4966
5160
  clearField(editable: LocatorOrString): Promise<any>;
4967
5161
  /**
@@ -4977,7 +5171,6 @@ declare namespace CodeceptJS {
4977
5171
  * ```
4978
5172
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
4979
5173
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
4980
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4981
5174
  */
4982
5175
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
4983
5176
  /**
@@ -4993,7 +5186,6 @@ declare namespace CodeceptJS {
4993
5186
  * ```
4994
5187
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
4995
5188
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
4996
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
4997
5189
  */
4998
5190
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
4999
5191
  /**
@@ -5005,7 +5197,6 @@ declare namespace CodeceptJS {
5005
5197
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
5006
5198
  * ```
5007
5199
  * @param field - located by label|name|CSS|XPath|strict locator.
5008
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5009
5200
  */
5010
5201
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
5011
5202
  /**
@@ -5017,7 +5208,6 @@ declare namespace CodeceptJS {
5017
5208
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
5018
5209
  * ```
5019
5210
  * @param field - located by label|name|CSS|XPath|strict locator.
5020
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5021
5211
  */
5022
5212
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
5023
5213
  /**
@@ -5146,7 +5336,6 @@ declare namespace CodeceptJS {
5146
5336
  * I.seeInTitle('Home Page');
5147
5337
  * ```
5148
5338
  * @param text - text value to check.
5149
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5150
5339
  */
5151
5340
  seeInTitle(text: string): Promise<any>;
5152
5341
  /**
@@ -5156,7 +5345,6 @@ declare namespace CodeceptJS {
5156
5345
  * I.seeTitleEquals('Test title.');
5157
5346
  * ```
5158
5347
  * @param text - value to check.
5159
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5160
5348
  */
5161
5349
  seeTitleEquals(text: string): Promise<any>;
5162
5350
  /**
@@ -5166,7 +5354,6 @@ declare namespace CodeceptJS {
5166
5354
  * I.dontSeeInTitle('Error');
5167
5355
  * ```
5168
5356
  * @param text - value to check.
5169
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5170
5357
  */
5171
5358
  dontSeeInTitle(text: string): Promise<any>;
5172
5359
  /**
@@ -5187,7 +5374,6 @@ declare namespace CodeceptJS {
5187
5374
  * I.seeElement('#modal');
5188
5375
  * ```
5189
5376
  * @param locator - located by CSS|XPath|strict locator.
5190
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5191
5377
  */
5192
5378
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
5193
5379
  /**
@@ -5197,7 +5383,6 @@ declare namespace CodeceptJS {
5197
5383
  * I.dontSeeElement('.modal'); // modal is not shown
5198
5384
  * ```
5199
5385
  * @param locator - located by CSS|XPath|Strict locator.
5200
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5201
5386
  */
5202
5387
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
5203
5388
  /**
@@ -5208,7 +5393,6 @@ declare namespace CodeceptJS {
5208
5393
  * I.seeElementInDOM('#modal');
5209
5394
  * ```
5210
5395
  * @param locator - element located by CSS|XPath|strict locator.
5211
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5212
5396
  */
5213
5397
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
5214
5398
  /**
@@ -5218,7 +5402,6 @@ declare namespace CodeceptJS {
5218
5402
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
5219
5403
  * ```
5220
5404
  * @param locator - located by CSS|XPath|Strict locator.
5221
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5222
5405
  */
5223
5406
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
5224
5407
  /**
@@ -5228,7 +5411,6 @@ declare namespace CodeceptJS {
5228
5411
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
5229
5412
  * ```
5230
5413
  * @param text - value to check.
5231
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5232
5414
  */
5233
5415
  seeInSource(text: string): Promise<any>;
5234
5416
  /**
@@ -5248,7 +5430,6 @@ declare namespace CodeceptJS {
5248
5430
  * I.dontSeeInSource('<!--'); // no comments in source
5249
5431
  * ```
5250
5432
  * @param value - to check.
5251
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5252
5433
  */
5253
5434
  dontSeeInSource(value: string): Promise<any>;
5254
5435
  /**
@@ -5261,7 +5442,6 @@ declare namespace CodeceptJS {
5261
5442
  * ```
5262
5443
  * @param locator - element located by CSS|XPath|strict locator.
5263
5444
  * @param num - number of elements.
5264
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5265
5445
  */
5266
5446
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
5267
5447
  /**
@@ -5273,7 +5453,6 @@ declare namespace CodeceptJS {
5273
5453
  * ```
5274
5454
  * @param locator - element located by CSS|XPath|strict locator.
5275
5455
  * @param num - number of elements.
5276
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5277
5456
  */
5278
5457
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
5279
5458
  /**
@@ -5295,7 +5474,6 @@ declare namespace CodeceptJS {
5295
5474
  * ```
5296
5475
  * @param locator - located by CSS|XPath|strict locator.
5297
5476
  * @param cssProperties - object with CSS properties and their values to check.
5298
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5299
5477
  */
5300
5478
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
5301
5479
  /**
@@ -5306,7 +5484,6 @@ declare namespace CodeceptJS {
5306
5484
  * ```
5307
5485
  * @param locator - located by CSS|XPath|strict locator.
5308
5486
  * @param attributes - attributes and their values to check.
5309
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5310
5487
  */
5311
5488
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
5312
5489
  /**
@@ -5334,7 +5511,7 @@ declare namespace CodeceptJS {
5334
5511
  * ```
5335
5512
  * @param fn - function to be executed in browser context.
5336
5513
  * @param args - to be passed to function.
5337
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5514
+ * @returns script return value
5338
5515
  */
5339
5516
  executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
5340
5517
  /**
@@ -5360,7 +5537,7 @@ declare namespace CodeceptJS {
5360
5537
  * ```
5361
5538
  * @param fn - function to be executed in browser context.
5362
5539
  * @param args - to be passed to function.
5363
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5540
+ * @returns script return value
5364
5541
  */
5365
5542
  executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
5366
5543
  /**
@@ -5370,13 +5547,11 @@ declare namespace CodeceptJS {
5370
5547
  * I.seeInCurrentUrl('/register'); // we are on registration page
5371
5548
  * ```
5372
5549
  * @param url - a fragment to check
5373
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5374
5550
  */
5375
5551
  seeInCurrentUrl(url: string): Promise<any>;
5376
5552
  /**
5377
5553
  * Checks that current url does not contain a provided fragment.
5378
5554
  * @param url - value to check.
5379
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5380
5555
  */
5381
5556
  dontSeeInCurrentUrl(url: string): Promise<any>;
5382
5557
  /**
@@ -5389,7 +5564,6 @@ declare namespace CodeceptJS {
5389
5564
  * I.seeCurrentUrlEquals('http://my.site.com/register');
5390
5565
  * ```
5391
5566
  * @param url - value to check.
5392
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5393
5567
  */
5394
5568
  seeCurrentUrlEquals(url: string): Promise<any>;
5395
5569
  /**
@@ -5401,7 +5575,6 @@ declare namespace CodeceptJS {
5401
5575
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
5402
5576
  * ```
5403
5577
  * @param url - value to check.
5404
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5405
5578
  */
5406
5579
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
5407
5580
  /**
@@ -5413,7 +5586,6 @@ declare namespace CodeceptJS {
5413
5586
  * ```
5414
5587
  * @param locator - element located by CSS|XPath|strict locator.
5415
5588
  * @param fileName - file name to save.
5416
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5417
5589
  */
5418
5590
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
5419
5591
  /**
@@ -5427,7 +5599,6 @@ declare namespace CodeceptJS {
5427
5599
  * ```
5428
5600
  * @param fileName - file name to save.
5429
5601
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
5430
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5431
5602
  */
5432
5603
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
5433
5604
  /**
@@ -5436,10 +5607,9 @@ declare namespace CodeceptJS {
5436
5607
  *
5437
5608
  * ```js
5438
5609
  * I.clearCookie();
5439
- * I.clearCookie('test');
5610
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
5440
5611
  * ```
5441
5612
  * @param [cookie = null] - (optional, `null` by default) cookie name
5442
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5443
5613
  */
5444
5614
  clearCookie(cookie?: string): Promise<any>;
5445
5615
  /**
@@ -5449,7 +5619,6 @@ declare namespace CodeceptJS {
5449
5619
  * I.seeCookie('Auth');
5450
5620
  * ```
5451
5621
  * @param name - cookie name.
5452
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5453
5622
  */
5454
5623
  seeCookie(name: string): Promise<any>;
5455
5624
  /**
@@ -5459,7 +5628,6 @@ declare namespace CodeceptJS {
5459
5628
  * I.dontSeeCookie('auth'); // no auth cookie
5460
5629
  * ```
5461
5630
  * @param name - cookie name.
5462
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5463
5631
  */
5464
5632
  dontSeeCookie(name: string): Promise<any>;
5465
5633
  /**
@@ -5472,12 +5640,8 @@ declare namespace CodeceptJS {
5472
5640
  * assert(cookie.value, '123456');
5473
5641
  * ```
5474
5642
  * @param [name = null] - cookie name.
5475
- * @returns attribute value
5476
- *
5477
- *
5478
- * Returns cookie in JSON [format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
5479
5643
  */
5480
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
5644
+ grabCookie(name?: string): Promise<any>;
5481
5645
  /**
5482
5646
  * Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
5483
5647
  * Don't confuse popups with modal windows, as created by [various
@@ -5496,7 +5660,6 @@ declare namespace CodeceptJS {
5496
5660
  * I.seeInPopup('Popup text');
5497
5661
  * ```
5498
5662
  * @param text - value to check.
5499
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5500
5663
  */
5501
5664
  seeInPopup(text: string): Promise<any>;
5502
5665
  /**
@@ -5512,7 +5675,6 @@ declare namespace CodeceptJS {
5512
5675
  * First parameter can be set to `maximize`.
5513
5676
  * @param width - width in pixels or `maximize`.
5514
5677
  * @param height - height in pixels.
5515
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5516
5678
  */
5517
5679
  resizeWindow(width: number, height: number): Promise<any>;
5518
5680
  /**
@@ -5523,7 +5685,6 @@ declare namespace CodeceptJS {
5523
5685
  * ```
5524
5686
  * @param srcElement - located by CSS|XPath|strict locator.
5525
5687
  * @param destElement - located by CSS|XPath|strict locator.
5526
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5527
5688
  */
5528
5689
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
5529
5690
  /**
@@ -5591,7 +5752,6 @@ declare namespace CodeceptJS {
5591
5752
  * I.switchTo(); // switch back to main page
5592
5753
  * ```
5593
5754
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
5594
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5595
5755
  */
5596
5756
  switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
5597
5757
  /**
@@ -5601,7 +5761,6 @@ declare namespace CodeceptJS {
5601
5761
  * I.wait(2); // wait 2 secs
5602
5762
  * ```
5603
5763
  * @param sec - number of second to wait.
5604
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5605
5764
  */
5606
5765
  wait(sec: number): Promise<any>;
5607
5766
  /**
@@ -5614,7 +5773,6 @@ declare namespace CodeceptJS {
5614
5773
  * ```
5615
5774
  * @param locator - element located by CSS|XPath|strict locator.
5616
5775
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
5617
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5618
5776
  */
5619
5777
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5620
5778
  /**
@@ -5626,7 +5784,6 @@ declare namespace CodeceptJS {
5626
5784
  * ```
5627
5785
  * @param locator - element located by CSS|XPath|strict locator.
5628
5786
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5629
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5630
5787
  */
5631
5788
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5632
5789
  /**
@@ -5646,7 +5803,6 @@ declare namespace CodeceptJS {
5646
5803
  * ```
5647
5804
  * @param locator - element located by CSS|XPath|strict locator.
5648
5805
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5649
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5650
5806
  */
5651
5807
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5652
5808
  /**
@@ -5658,7 +5814,6 @@ declare namespace CodeceptJS {
5658
5814
  * ```
5659
5815
  * @param locator - element located by CSS|XPath|strict locator.
5660
5816
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5661
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5662
5817
  */
5663
5818
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5664
5819
  /**
@@ -5670,7 +5825,6 @@ declare namespace CodeceptJS {
5670
5825
  * ```
5671
5826
  * @param locator - element located by CSS|XPath|strict locator.
5672
5827
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5673
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5674
5828
  */
5675
5829
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5676
5830
  /**
@@ -5682,7 +5836,6 @@ declare namespace CodeceptJS {
5682
5836
  * @param locator - element located by CSS|XPath|strict locator.
5683
5837
  * @param num - number of elements.
5684
5838
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5685
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5686
5839
  */
5687
5840
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
5688
5841
  /**
@@ -5690,7 +5843,6 @@ declare namespace CodeceptJS {
5690
5843
  * Element can be located by CSS or XPath.
5691
5844
  * @param locator - element located by CSS|XPath|strict locator.
5692
5845
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
5693
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5694
5846
  */
5695
5847
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
5696
5848
  /**
@@ -5702,7 +5854,6 @@ declare namespace CodeceptJS {
5702
5854
  * @param field - input field.
5703
5855
  * @param value - expected value.
5704
5856
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5705
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5706
5857
  */
5707
5858
  waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
5708
5859
  /**
@@ -5721,7 +5872,6 @@ declare namespace CodeceptJS {
5721
5872
  * @param fn - to be executed in browser context.
5722
5873
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
5723
5874
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
5724
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5725
5875
  */
5726
5876
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
5727
5877
  /**
@@ -5732,7 +5882,6 @@ declare namespace CodeceptJS {
5732
5882
  * ```
5733
5883
  * @param urlPart - value to check.
5734
5884
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5735
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5736
5885
  */
5737
5886
  waitInUrl(urlPart: string, sec?: number): Promise<any>;
5738
5887
  /**
@@ -5744,7 +5893,6 @@ declare namespace CodeceptJS {
5744
5893
  * ```
5745
5894
  * @param urlPart - value to check.
5746
5895
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5747
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5748
5896
  */
5749
5897
  waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
5750
5898
  /**
@@ -5759,7 +5907,6 @@ declare namespace CodeceptJS {
5759
5907
  * @param text - to wait for.
5760
5908
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5761
5909
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
5762
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5763
5910
  */
5764
5911
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
5765
5912
  /**
@@ -5772,7 +5919,6 @@ declare namespace CodeceptJS {
5772
5919
  * ```js
5773
5920
  * I.refreshPage();
5774
5921
  * ```
5775
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5776
5922
  */
5777
5923
  refreshPage(): Promise<any>;
5778
5924
  /**
@@ -5790,7 +5936,6 @@ declare namespace CodeceptJS {
5790
5936
  * @param locator - located by CSS|XPath|strict locator.
5791
5937
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
5792
5938
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
5793
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5794
5939
  */
5795
5940
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
5796
5941
  /**
@@ -5799,7 +5944,6 @@ declare namespace CodeceptJS {
5799
5944
  * ```js
5800
5945
  * I.scrollPageToTop();
5801
5946
  * ```
5802
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5803
5947
  */
5804
5948
  scrollPageToTop(): Promise<any>;
5805
5949
  /**
@@ -5808,7 +5952,6 @@ declare namespace CodeceptJS {
5808
5952
  * ```js
5809
5953
  * I.scrollPageToBottom();
5810
5954
  * ```
5811
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5812
5955
  */
5813
5956
  scrollPageToBottom(): Promise<any>;
5814
5957
  /**
@@ -5855,7 +5998,6 @@ declare namespace CodeceptJS {
5855
5998
  * ]);
5856
5999
  * ```
5857
6000
  * @param cookie - a cookie object or array of cookie objects.
5858
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
5859
6001
  */
5860
6002
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
5861
6003
  }
@@ -5878,6 +6020,14 @@ declare namespace CodeceptJS {
5878
6020
  *
5879
6021
  * <!-- configuration -->
5880
6022
  *
6023
+ * #### Trace Recording Customization
6024
+ *
6025
+ * Trace recording provides complete information on test execution and includes screenshots, and network requests logged during run.
6026
+ * Traces will be saved to `output/trace`
6027
+ *
6028
+ * * `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
6029
+ * * `keepTraceForPassedTests`: - save trace for passed tests
6030
+ *
5881
6031
  * #### Example #1: Wait for 0 network connections.
5882
6032
  *
5883
6033
  * ```js
@@ -6042,7 +6192,6 @@ declare namespace CodeceptJS {
6042
6192
  * I.seeInPopup('Popup text');
6043
6193
  * ```
6044
6194
  * @param text - value to check.
6045
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6046
6195
  */
6047
6196
  seeInPopup(text: string): Promise<any>;
6048
6197
  /**
@@ -6079,29 +6228,27 @@ declare namespace CodeceptJS {
6079
6228
  */
6080
6229
  amOnPage(url: string): Promise<any>;
6081
6230
  /**
6231
+ * Unlike other drivers Puppeteer changes the size of a viewport, not the window!
6232
+ * Puppeteer does not control the window of a browser, so it can't adjust its real size.
6233
+ * It also can't maximize a window.
6234
+ *
6082
6235
  * Resize the current window to provided width and height.
6083
6236
  * First parameter can be set to `maximize`.
6084
6237
  * @param width - width in pixels or `maximize`.
6085
6238
  * @param height - height in pixels.
6086
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6087
- *
6088
- *
6089
- * Unlike other drivers Puppeteer changes the size of a viewport, not the window!
6090
- * Puppeteer does not control the window of a browser so it can't adjust its real size.
6091
- * It also can't maximize a window.
6092
6239
  */
6093
6240
  resizeWindow(width: number, height: number): Promise<any>;
6094
6241
  /**
6095
6242
  * Set headers for all next requests
6096
6243
  *
6097
6244
  * ```js
6098
- * I.haveRequestHeaders({
6245
+ * I.setPuppeteerRequestHeaders({
6099
6246
  * 'X-Sent-By': 'CodeceptJS',
6100
6247
  * });
6101
6248
  * ```
6102
6249
  * @param customHeaders - headers to set
6103
6250
  */
6104
- haveRequestHeaders(customHeaders: any): Promise<any>;
6251
+ setPuppeteerRequestHeaders(customHeaders: any): Promise<any>;
6105
6252
  /**
6106
6253
  * Moves cursor to element matched by locator.
6107
6254
  * Extra shift can be set with offsetX and offsetY options.
@@ -6113,11 +6260,41 @@ declare namespace CodeceptJS {
6113
6260
  * @param locator - located by CSS|XPath|strict locator.
6114
6261
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
6115
6262
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
6116
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6117
- *
6118
- * {{ react }}
6119
6263
  */
6120
6264
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
6265
+ /**
6266
+ * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
6267
+ *
6268
+ * Examples:
6269
+ *
6270
+ * ```js
6271
+ * I.dontSee('#add-to-cart-btn');
6272
+ * I.focus('#product-tile')
6273
+ * I.see('#add-to-cart-bnt');
6274
+ * ```
6275
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
6276
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
6277
+ */
6278
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
6279
+ /**
6280
+ * Remove focus from a text input, button, etc.
6281
+ * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
6282
+ *
6283
+ * Examples:
6284
+ *
6285
+ * ```js
6286
+ * I.blur('.text-area')
6287
+ * ```
6288
+ * ```js
6289
+ * //element `#product-tile` is focused
6290
+ * I.see('#add-to-cart-btn');
6291
+ * I.blur('#product-tile')
6292
+ * I.dontSee('#add-to-cart-btn');
6293
+ * ```
6294
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
6295
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
6296
+ */
6297
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
6121
6298
  /**
6122
6299
  * Drag an item to a destination element.
6123
6300
  *
@@ -6126,7 +6303,6 @@ declare namespace CodeceptJS {
6126
6303
  * ```
6127
6304
  * @param srcElement - located by CSS|XPath|strict locator.
6128
6305
  * @param destElement - located by CSS|XPath|strict locator.
6129
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6130
6306
  */
6131
6307
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
6132
6308
  /**
@@ -6135,7 +6311,6 @@ declare namespace CodeceptJS {
6135
6311
  * ```js
6136
6312
  * I.refreshPage();
6137
6313
  * ```
6138
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6139
6314
  */
6140
6315
  refreshPage(): Promise<any>;
6141
6316
  /**
@@ -6144,7 +6319,6 @@ declare namespace CodeceptJS {
6144
6319
  * ```js
6145
6320
  * I.scrollPageToTop();
6146
6321
  * ```
6147
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6148
6322
  */
6149
6323
  scrollPageToTop(): Promise<any>;
6150
6324
  /**
@@ -6153,7 +6327,6 @@ declare namespace CodeceptJS {
6153
6327
  * ```js
6154
6328
  * I.scrollPageToBottom();
6155
6329
  * ```
6156
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6157
6330
  */
6158
6331
  scrollPageToBottom(): Promise<any>;
6159
6332
  /**
@@ -6167,7 +6340,6 @@ declare namespace CodeceptJS {
6167
6340
  * @param locator - located by CSS|XPath|strict locator.
6168
6341
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
6169
6342
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
6170
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6171
6343
  */
6172
6344
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
6173
6345
  /**
@@ -6177,7 +6349,6 @@ declare namespace CodeceptJS {
6177
6349
  * I.seeInTitle('Home Page');
6178
6350
  * ```
6179
6351
  * @param text - text value to check.
6180
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6181
6352
  */
6182
6353
  seeInTitle(text: string): Promise<any>;
6183
6354
  /**
@@ -6197,7 +6368,6 @@ declare namespace CodeceptJS {
6197
6368
  * I.seeTitleEquals('Test title.');
6198
6369
  * ```
6199
6370
  * @param text - value to check.
6200
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6201
6371
  */
6202
6372
  seeTitleEquals(text: string): Promise<any>;
6203
6373
  /**
@@ -6207,7 +6377,6 @@ declare namespace CodeceptJS {
6207
6377
  * I.dontSeeInTitle('Error');
6208
6378
  * ```
6209
6379
  * @param text - value to check.
6210
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6211
6380
  */
6212
6381
  dontSeeInTitle(text: string): Promise<any>;
6213
6382
  /**
@@ -6232,7 +6401,7 @@ declare namespace CodeceptJS {
6232
6401
  */
6233
6402
  _locate(): Promise<any>;
6234
6403
  /**
6235
- * Find a checkbox by providing human readable text:
6404
+ * Find a checkbox by providing human-readable text:
6236
6405
  * NOTE: Assumes the checkable element exists
6237
6406
  *
6238
6407
  * ```js
@@ -6241,7 +6410,7 @@ declare namespace CodeceptJS {
6241
6410
  */
6242
6411
  _locateCheckable(): Promise<any>;
6243
6412
  /**
6244
- * Find a clickable element by providing human readable text:
6413
+ * Find a clickable element by providing human-readable text:
6245
6414
  *
6246
6415
  * ```js
6247
6416
  * this.helpers['Puppeteer']._locateClickable('Next page').then // ...
@@ -6249,13 +6418,24 @@ declare namespace CodeceptJS {
6249
6418
  */
6250
6419
  _locateClickable(): Promise<any>;
6251
6420
  /**
6252
- * Find field elements by providing human readable text:
6421
+ * Find field elements by providing human-readable text:
6253
6422
  *
6254
6423
  * ```js
6255
6424
  * this.helpers['Puppeteer']._locateFields('Your email').then // ...
6256
6425
  * ```
6257
6426
  */
6258
6427
  _locateFields(): Promise<any>;
6428
+ /**
6429
+ * Grab WebElements for given locator
6430
+ * Resumes test execution, so **should be used inside an async function with `await`** operator.
6431
+ *
6432
+ * ```js
6433
+ * const webElements = await I.grabWebElements('#button');
6434
+ * ```
6435
+ * @param locator - element located by CSS|XPath|strict locator.
6436
+ * @returns WebElement of being used Web helper
6437
+ */
6438
+ grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<any>;
6259
6439
  /**
6260
6440
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
6261
6441
  *
@@ -6316,9 +6496,6 @@ declare namespace CodeceptJS {
6316
6496
  * I.seeElement('#modal');
6317
6497
  * ```
6318
6498
  * @param locator - located by CSS|XPath|strict locator.
6319
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6320
- *
6321
- * {{ react }}
6322
6499
  */
6323
6500
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
6324
6501
  /**
@@ -6328,9 +6505,6 @@ declare namespace CodeceptJS {
6328
6505
  * I.dontSeeElement('.modal'); // modal is not shown
6329
6506
  * ```
6330
6507
  * @param locator - located by CSS|XPath|Strict locator.
6331
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6332
- *
6333
- * {{ react }}
6334
6508
  */
6335
6509
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
6336
6510
  /**
@@ -6341,7 +6515,6 @@ declare namespace CodeceptJS {
6341
6515
  * I.seeElementInDOM('#modal');
6342
6516
  * ```
6343
6517
  * @param locator - element located by CSS|XPath|strict locator.
6344
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6345
6518
  */
6346
6519
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
6347
6520
  /**
@@ -6351,7 +6524,6 @@ declare namespace CodeceptJS {
6351
6524
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
6352
6525
  * ```
6353
6526
  * @param locator - located by CSS|XPath|Strict locator.
6354
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6355
6527
  */
6356
6528
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
6357
6529
  /**
@@ -6378,10 +6550,6 @@ declare namespace CodeceptJS {
6378
6550
  * ```
6379
6551
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
6380
6552
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6381
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6382
- *
6383
- *
6384
- * {{ react }}
6385
6553
  */
6386
6554
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
6387
6555
  /**
@@ -6411,10 +6579,6 @@ declare namespace CodeceptJS {
6411
6579
  * ```
6412
6580
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
6413
6581
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6414
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6415
- *
6416
- *
6417
- * {{ react }}
6418
6582
  */
6419
6583
  forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6420
6584
  /**
@@ -6425,17 +6589,13 @@ declare namespace CodeceptJS {
6425
6589
  * ```
6426
6590
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
6427
6591
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
6428
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6429
- *
6430
- *
6431
- * {{ react }}
6432
6592
  */
6433
6593
  clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6434
6594
  /**
6435
6595
  * Sets a directory to where save files. Allows to test file downloads.
6436
6596
  * Should be used with [FileSystem helper](https://codecept.io/helpers/FileSystem) to check that file were downloaded correctly.
6437
6597
  *
6438
- * By default files are saved to `output/downloads`.
6598
+ * By default, files are saved to `output/downloads`.
6439
6599
  * This directory is cleaned on every `handleDownloads` call, to ensure no old files are kept.
6440
6600
  *
6441
6601
  * ```js
@@ -6466,10 +6626,6 @@ declare namespace CodeceptJS {
6466
6626
  * ```
6467
6627
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
6468
6628
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6469
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6470
- *
6471
- *
6472
- * {{ react }}
6473
6629
  */
6474
6630
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6475
6631
  /**
@@ -6485,10 +6641,6 @@ declare namespace CodeceptJS {
6485
6641
  * ```
6486
6642
  * @param locator - clickable element located by CSS|XPath|strict locator.
6487
6643
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
6488
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6489
- *
6490
- *
6491
- * {{ react }}
6492
6644
  */
6493
6645
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6494
6646
  /**
@@ -6504,7 +6656,6 @@ declare namespace CodeceptJS {
6504
6656
  * ```
6505
6657
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
6506
6658
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
6507
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6508
6659
  */
6509
6660
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6510
6661
  /**
@@ -6520,7 +6671,6 @@ declare namespace CodeceptJS {
6520
6671
  * ```
6521
6672
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
6522
6673
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
6523
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6524
6674
  */
6525
6675
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
6526
6676
  /**
@@ -6532,7 +6682,6 @@ declare namespace CodeceptJS {
6532
6682
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
6533
6683
  * ```
6534
6684
  * @param field - located by label|name|CSS|XPath|strict locator.
6535
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6536
6685
  */
6537
6686
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
6538
6687
  /**
@@ -6544,7 +6693,6 @@ declare namespace CodeceptJS {
6544
6693
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
6545
6694
  * ```
6546
6695
  * @param field - located by label|name|CSS|XPath|strict locator.
6547
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6548
6696
  */
6549
6697
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
6550
6698
  /**
@@ -6558,7 +6706,6 @@ declare namespace CodeceptJS {
6558
6706
  * I.pressKeyUp('Control');
6559
6707
  * ```
6560
6708
  * @param key - name of key to press down.
6561
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6562
6709
  */
6563
6710
  pressKeyDown(key: string): Promise<any>;
6564
6711
  /**
@@ -6572,10 +6719,11 @@ declare namespace CodeceptJS {
6572
6719
  * I.pressKeyUp('Control');
6573
6720
  * ```
6574
6721
  * @param key - name of key to release.
6575
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6576
6722
  */
6577
6723
  pressKeyUp(key: string): Promise<any>;
6578
6724
  /**
6725
+ * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
6726
+ *
6579
6727
  * Presses a key in the browser (on a focused element).
6580
6728
  *
6581
6729
  * _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
@@ -6634,10 +6782,6 @@ declare namespace CodeceptJS {
6634
6782
  * - `'Space'`
6635
6783
  * - `'Tab'`
6636
6784
  * @param key - key or array of keys to press.
6637
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6638
- *
6639
- *
6640
- * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
6641
6785
  */
6642
6786
  pressKey(key: string | string[]): Promise<any>;
6643
6787
  /**
@@ -6660,7 +6804,6 @@ declare namespace CodeceptJS {
6660
6804
  * ```
6661
6805
  * @param key - or array of keys to type.
6662
6806
  * @param [delay = null] - (optional) delay in ms between key presses
6663
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6664
6807
  */
6665
6808
  type(key: string | string[], delay?: number): Promise<any>;
6666
6809
  /**
@@ -6679,9 +6822,6 @@ declare namespace CodeceptJS {
6679
6822
  * ```
6680
6823
  * @param field - located by label|name|CSS|XPath|strict locator.
6681
6824
  * @param value - text value to fill.
6682
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6683
- *
6684
- * {{ react }}
6685
6825
  */
6686
6826
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
6687
6827
  /**
@@ -6693,7 +6833,6 @@ declare namespace CodeceptJS {
6693
6833
  * I.clearField('#email');
6694
6834
  * ```
6695
6835
  * @param editable - field located by label|name|CSS|XPath|strict locator.
6696
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
6697
6836
  */
6698
6837
  clearField(editable: LocatorOrString): Promise<any>;
6699
6838
  /**
@@ -6707,10 +6846,6 @@ declare namespace CodeceptJS {
6707
6846
  * ```
6708
6847
  * @param field - located by label|name|CSS|XPath|strict locator
6709
6848
  * @param value - text value to append.
6710
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6711
- *
6712
- *
6713
- * {{ react }}
6714
6849
  */
6715
6850
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
6716
6851
  /**
@@ -6725,9 +6860,8 @@ declare namespace CodeceptJS {
6725
6860
  * ```
6726
6861
  * @param field - located by label|name|CSS|XPath|strict locator.
6727
6862
  * @param value - value to check.
6728
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6729
6863
  */
6730
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
6864
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
6731
6865
  /**
6732
6866
  * Checks that value of input field or textarea doesn't equal to given value
6733
6867
  * Opposite to `seeInField`.
@@ -6738,10 +6872,11 @@ declare namespace CodeceptJS {
6738
6872
  * ```
6739
6873
  * @param field - located by label|name|CSS|XPath|strict locator.
6740
6874
  * @param value - value to check.
6741
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6742
6875
  */
6743
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
6876
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
6744
6877
  /**
6878
+ * > ⚠ 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.
6879
+ *
6745
6880
  * Attaches a file to element located by label, name, CSS or XPath
6746
6881
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
6747
6882
  * File will be uploaded to remote system (if tests are running remotely).
@@ -6752,10 +6887,6 @@ declare namespace CodeceptJS {
6752
6887
  * ```
6753
6888
  * @param locator - field located by label|name|CSS|XPath|strict locator.
6754
6889
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
6755
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6756
- *
6757
- *
6758
- * > ⚠ 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.
6759
6890
  */
6760
6891
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
6761
6892
  /**
@@ -6779,7 +6910,6 @@ declare namespace CodeceptJS {
6779
6910
  * ```
6780
6911
  * @param select - field located by label|name|CSS|XPath|strict locator.
6781
6912
  * @param option - visible text or value of option.
6782
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6783
6913
  */
6784
6914
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
6785
6915
  /**
@@ -6801,13 +6931,11 @@ declare namespace CodeceptJS {
6801
6931
  * I.seeInCurrentUrl('/register'); // we are on registration page
6802
6932
  * ```
6803
6933
  * @param url - a fragment to check
6804
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6805
6934
  */
6806
6935
  seeInCurrentUrl(url: string): Promise<any>;
6807
6936
  /**
6808
6937
  * Checks that current url does not contain a provided fragment.
6809
6938
  * @param url - value to check.
6810
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6811
6939
  */
6812
6940
  dontSeeInCurrentUrl(url: string): Promise<any>;
6813
6941
  /**
@@ -6820,7 +6948,6 @@ declare namespace CodeceptJS {
6820
6948
  * I.seeCurrentUrlEquals('http://my.site.com/register');
6821
6949
  * ```
6822
6950
  * @param url - value to check.
6823
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6824
6951
  */
6825
6952
  seeCurrentUrlEquals(url: string): Promise<any>;
6826
6953
  /**
@@ -6832,7 +6959,6 @@ declare namespace CodeceptJS {
6832
6959
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
6833
6960
  * ```
6834
6961
  * @param url - value to check.
6835
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6836
6962
  */
6837
6963
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
6838
6964
  /**
@@ -6846,10 +6972,6 @@ declare namespace CodeceptJS {
6846
6972
  * ```
6847
6973
  * @param text - expected on page.
6848
6974
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
6849
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6850
- *
6851
- *
6852
- * {{ react }}
6853
6975
  */
6854
6976
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
6855
6977
  /**
@@ -6860,7 +6982,6 @@ declare namespace CodeceptJS {
6860
6982
  * ```
6861
6983
  * @param text - element value to check.
6862
6984
  * @param [context = null] - element located by CSS|XPath|strict locator.
6863
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6864
6985
  */
6865
6986
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
6866
6987
  /**
@@ -6873,10 +6994,6 @@ declare namespace CodeceptJS {
6873
6994
  * ```
6874
6995
  * @param text - which is not present.
6875
6996
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
6876
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6877
- *
6878
- *
6879
- * {{ react }}
6880
6997
  */
6881
6998
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
6882
6999
  /**
@@ -6916,7 +7033,6 @@ declare namespace CodeceptJS {
6916
7033
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
6917
7034
  * ```
6918
7035
  * @param text - value to check.
6919
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6920
7036
  */
6921
7037
  seeInSource(text: string): Promise<any>;
6922
7038
  /**
@@ -6926,7 +7042,6 @@ declare namespace CodeceptJS {
6926
7042
  * I.dontSeeInSource('<!--'); // no comments in source
6927
7043
  * ```
6928
7044
  * @param value - to check.
6929
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6930
7045
  */
6931
7046
  dontSeeInSource(value: string): Promise<any>;
6932
7047
  /**
@@ -6939,10 +7054,6 @@ declare namespace CodeceptJS {
6939
7054
  * ```
6940
7055
  * @param locator - element located by CSS|XPath|strict locator.
6941
7056
  * @param num - number of elements.
6942
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6943
- *
6944
- *
6945
- * {{ react }}
6946
7057
  */
6947
7058
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
6948
7059
  /**
@@ -6954,10 +7065,6 @@ declare namespace CodeceptJS {
6954
7065
  * ```
6955
7066
  * @param locator - element located by CSS|XPath|strict locator.
6956
7067
  * @param num - number of elements.
6957
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6958
- *
6959
- *
6960
- * {{ react }}
6961
7068
  */
6962
7069
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
6963
7070
  /**
@@ -6975,7 +7082,6 @@ declare namespace CodeceptJS {
6975
7082
  * ]);
6976
7083
  * ```
6977
7084
  * @param cookie - a cookie object or array of cookie objects.
6978
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6979
7085
  */
6980
7086
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
6981
7087
  /**
@@ -6985,7 +7091,6 @@ declare namespace CodeceptJS {
6985
7091
  * I.seeCookie('Auth');
6986
7092
  * ```
6987
7093
  * @param name - cookie name.
6988
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6989
7094
  */
6990
7095
  seeCookie(name: string): Promise<any>;
6991
7096
  /**
@@ -6995,7 +7100,6 @@ declare namespace CodeceptJS {
6995
7100
  * I.dontSeeCookie('auth'); // no auth cookie
6996
7101
  * ```
6997
7102
  * @param name - cookie name.
6998
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
6999
7103
  */
7000
7104
  dontSeeCookie(name: string): Promise<any>;
7001
7105
  /**
@@ -7008,25 +7112,22 @@ declare namespace CodeceptJS {
7008
7112
  * assert(cookie.value, '123456');
7009
7113
  * ```
7010
7114
  * @param [name = null] - cookie name.
7011
- * @returns attribute value
7012
- *
7013
- *
7014
- * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
7015
7115
  */
7016
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
7116
+ grabCookie(name?: string): Promise<any>;
7017
7117
  /**
7018
7118
  * Clears a cookie by name,
7019
7119
  * if none provided clears all cookies.
7020
7120
  *
7021
7121
  * ```js
7022
7122
  * I.clearCookie();
7023
- * I.clearCookie('test');
7123
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
7024
7124
  * ```
7025
7125
  * @param [cookie = null] - (optional, `null` by default) cookie name
7026
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7027
7126
  */
7028
7127
  clearCookie(cookie?: string): Promise<any>;
7029
7128
  /**
7129
+ * If a function returns a Promise, tt will wait for its resolution.
7130
+ *
7030
7131
  * Executes sync script on a page.
7031
7132
  * Pass arguments to function as additional parameters.
7032
7133
  * Will return execution result to a test.
@@ -7051,13 +7152,11 @@ declare namespace CodeceptJS {
7051
7152
  * ```
7052
7153
  * @param fn - function to be executed in browser context.
7053
7154
  * @param args - to be passed to function.
7054
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7055
- *
7056
- *
7057
- * If a function returns a Promise It will wait for it resolution.
7155
+ * @returns script return value
7058
7156
  */
7059
7157
  executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
7060
7158
  /**
7159
+ * Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
7061
7160
  * Executes async script on page.
7062
7161
  * Provided function should execute a passed callback (as first argument) to signal it is finished.
7063
7162
  *
@@ -7080,10 +7179,7 @@ declare namespace CodeceptJS {
7080
7179
  * ```
7081
7180
  * @param fn - function to be executed in browser context.
7082
7181
  * @param args - to be passed to function.
7083
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7084
- *
7085
- *
7086
- * Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
7182
+ * @returns script return value
7087
7183
  */
7088
7184
  executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
7089
7185
  /**
@@ -7196,9 +7292,6 @@ declare namespace CodeceptJS {
7196
7292
  * ```
7197
7293
  * @param locator - located by CSS|XPath|strict locator.
7198
7294
  * @param cssProperties - object with CSS properties and their values to check.
7199
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7200
- *
7201
- * {{ react }}
7202
7295
  */
7203
7296
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
7204
7297
  /**
@@ -7209,9 +7302,6 @@ declare namespace CodeceptJS {
7209
7302
  * ```
7210
7303
  * @param locator - located by CSS|XPath|strict locator.
7211
7304
  * @param attributes - attributes and their values to check.
7212
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7213
- *
7214
- * {{ react }}
7215
7305
  */
7216
7306
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
7217
7307
  /**
@@ -7224,9 +7314,6 @@ declare namespace CodeceptJS {
7224
7314
  * ```
7225
7315
  * @param locator - located by label|name|CSS|XPath|strict locator.
7226
7316
  * @param offsetX - position to drag.
7227
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7228
- *
7229
- * {{ react }}
7230
7317
  */
7231
7318
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
7232
7319
  /**
@@ -7267,7 +7354,6 @@ declare namespace CodeceptJS {
7267
7354
  * ```
7268
7355
  * @param locator - element located by CSS|XPath|strict locator.
7269
7356
  * @param fileName - file name to save.
7270
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7271
7357
  */
7272
7358
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
7273
7359
  /**
@@ -7281,7 +7367,6 @@ declare namespace CodeceptJS {
7281
7367
  * ```
7282
7368
  * @param fileName - file name to save.
7283
7369
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
7284
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7285
7370
  */
7286
7371
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
7287
7372
  /**
@@ -7291,7 +7376,6 @@ declare namespace CodeceptJS {
7291
7376
  * I.wait(2); // wait 2 secs
7292
7377
  * ```
7293
7378
  * @param sec - number of second to wait.
7294
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7295
7379
  */
7296
7380
  wait(sec: number): Promise<any>;
7297
7381
  /**
@@ -7299,7 +7383,6 @@ declare namespace CodeceptJS {
7299
7383
  * Element can be located by CSS or XPath.
7300
7384
  * @param locator - element located by CSS|XPath|strict locator.
7301
7385
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
7302
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7303
7386
  */
7304
7387
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7305
7388
  /**
@@ -7311,7 +7394,6 @@ declare namespace CodeceptJS {
7311
7394
  * @param field - input field.
7312
7395
  * @param value - expected value.
7313
7396
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7314
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7315
7397
  */
7316
7398
  waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
7317
7399
  /**
@@ -7323,9 +7405,6 @@ declare namespace CodeceptJS {
7323
7405
  * @param locator - element located by CSS|XPath|strict locator.
7324
7406
  * @param num - number of elements.
7325
7407
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7326
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7327
- *
7328
- * {{ react }}
7329
7408
  */
7330
7409
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
7331
7410
  /**
@@ -7338,7 +7417,6 @@ declare namespace CodeceptJS {
7338
7417
  * ```
7339
7418
  * @param locator - element located by CSS|XPath|strict locator.
7340
7419
  * @param [sec] - (optional, `1` by default) time in seconds to wait
7341
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7342
7420
  */
7343
7421
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7344
7422
  /**
@@ -7351,9 +7429,6 @@ declare namespace CodeceptJS {
7351
7429
  * ```
7352
7430
  * @param locator - element located by CSS|XPath|strict locator.
7353
7431
  * @param [sec] - (optional, `1` by default) time in seconds to wait
7354
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7355
- *
7356
- * {{ react }}
7357
7432
  */
7358
7433
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7359
7434
  /**
@@ -7365,10 +7440,6 @@ declare namespace CodeceptJS {
7365
7440
  * ```
7366
7441
  * @param locator - element located by CSS|XPath|strict locator.
7367
7442
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7368
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7369
- *
7370
- *
7371
- * This method accepts [React selectors](https://codecept.io/react).
7372
7443
  */
7373
7444
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7374
7445
  /**
@@ -7380,7 +7451,6 @@ declare namespace CodeceptJS {
7380
7451
  * ```
7381
7452
  * @param locator - element located by CSS|XPath|strict locator.
7382
7453
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7383
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7384
7454
  */
7385
7455
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7386
7456
  /**
@@ -7392,9 +7462,18 @@ declare namespace CodeceptJS {
7392
7462
  * ```
7393
7463
  * @param locator - element located by CSS|XPath|strict locator.
7394
7464
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7395
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7396
7465
  */
7397
7466
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7467
+ /**
7468
+ * Waits for number of tabs.
7469
+ *
7470
+ * ```js
7471
+ * I.waitForNumberOfTabs(2);
7472
+ * ```
7473
+ * @param expectedTabs - expecting the number of tabs.
7474
+ * @param sec - number of secs to wait.
7475
+ */
7476
+ waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
7398
7477
  /**
7399
7478
  * Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
7400
7479
  *
@@ -7403,7 +7482,6 @@ declare namespace CodeceptJS {
7403
7482
  * ```
7404
7483
  * @param urlPart - value to check.
7405
7484
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7406
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7407
7485
  */
7408
7486
  waitInUrl(urlPart: string, sec?: number): Promise<any>;
7409
7487
  /**
@@ -7415,7 +7493,6 @@ declare namespace CodeceptJS {
7415
7493
  * ```
7416
7494
  * @param urlPart - value to check.
7417
7495
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7418
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7419
7496
  */
7420
7497
  waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
7421
7498
  /**
@@ -7430,7 +7507,6 @@ declare namespace CodeceptJS {
7430
7507
  * @param text - to wait for.
7431
7508
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7432
7509
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
7433
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7434
7510
  */
7435
7511
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
7436
7512
  /**
@@ -7461,7 +7537,6 @@ declare namespace CodeceptJS {
7461
7537
  * I.switchTo(); // switch back to main page
7462
7538
  * ```
7463
7539
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
7464
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7465
7540
  */
7466
7541
  switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
7467
7542
  /**
@@ -7480,13 +7555,12 @@ declare namespace CodeceptJS {
7480
7555
  * @param fn - to be executed in browser context.
7481
7556
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
7482
7557
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
7483
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7484
7558
  */
7485
7559
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
7486
7560
  /**
7487
- * Waits for navigation to finish. By default takes configured `waitForNavigation` option.
7561
+ * Waits for navigation to finish. By default, takes configured `waitForNavigation` option.
7488
7562
  *
7489
- * See [Pupeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
7563
+ * See [Puppeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
7490
7564
  */
7491
7565
  waitForNavigation(opts: any): Promise<any>;
7492
7566
  /**
@@ -7498,7 +7572,6 @@ declare namespace CodeceptJS {
7498
7572
  * ```
7499
7573
  * @param locator - element located by CSS|XPath|strict locator.
7500
7574
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7501
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7502
7575
  */
7503
7576
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7504
7577
  /**
@@ -7521,7 +7594,6 @@ declare namespace CodeceptJS {
7521
7594
  * loadEventEnd: 241
7522
7595
  * }
7523
7596
  * ```
7524
- * @returns automatically synchronized promise through #recorder
7525
7597
  */
7526
7598
  grabDataFromPerformanceTiming(): Promise<any>;
7527
7599
  /**
@@ -7683,72 +7755,6 @@ declare namespace CodeceptJS {
7683
7755
  */
7684
7756
  sendDeleteRequest(url: any, headers?: any): Promise<any>;
7685
7757
  }
7686
- /**
7687
- * SeleniumWebdriver helper is based on the official [Selenium Webdriver JS](https://www.npmjs.com/package/selenium-webdriver)
7688
- * library. It implements common web api methods (amOnPage, click, see).
7689
- *
7690
- * ## Backends
7691
- *
7692
- * ### Selenium Installation
7693
- *
7694
- * 1. Download [Selenium Server](http://docs.seleniumhq.org/download/)
7695
- * 2. For Chrome browser install [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/getting-started), for Firefox browser install [GeckoDriver](https://github.com/mozilla/geckodriver).
7696
- * 3. Launch the server: `java -jar selenium-server-standalone-3.xx.xxx.jar`. To locate Chromedriver binary use `-Dwebdriver.chrome.driver=./chromedriver` option. For Geckodriver use `-Dwebdriver.gecko.driver=`.
7697
- *
7698
- *
7699
- * ### PhantomJS Installation
7700
- *
7701
- * PhantomJS is a headless alternative to Selenium Server that implements [the WebDriver protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
7702
- * It allows you to run Selenium tests on a server without a GUI installed.
7703
- *
7704
- * 1. Download [PhantomJS](http://phantomjs.org/download.html)
7705
- * 2. Run PhantomJS in WebDriver mode: `phantomjs --webdriver=4444`
7706
- *
7707
- * ## Configuration
7708
- *
7709
- * This helper should be configured in codecept.json or codecept.conf.js
7710
- *
7711
- * * `url` - base url of website to be tested
7712
- * * `browser` - browser in which perform testing
7713
- * * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
7714
- * * `restart` - restart browser between tests (default: true).
7715
- * * `smartWait`: (optional) **enables SmartWait**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
7716
- * * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
7717
- * * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
7718
- * * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
7719
- * * `keepCookies` (optional, default: false) - keep cookies between tests when `restart` set to false.*
7720
- * * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
7721
- * * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default;
7722
- * * `scriptTimeout`: (optional) sets default timeout for scripts in `executeAsync`. 1000 by default.
7723
- * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
7724
- * * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriverIO"]._startBrowser()`
7725
- * * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
7726
- *
7727
- * Example:
7728
- *
7729
- * ```json
7730
- * {
7731
- * "helpers": {
7732
- * "SeleniumWebdriver" : {
7733
- * "url": "http://localhost",
7734
- * "browser": "chrome",
7735
- * "smartWait": 5000,
7736
- * "restart": false
7737
- * }
7738
- * }
7739
- * }
7740
- * ```
7741
- *
7742
- * ## Access From Helpers
7743
- *
7744
- * Receive a WebDriverIO client from a custom helper by accessing `browser` property:
7745
- *
7746
- * ```js
7747
- * this.helpers['SeleniumWebdriver'].browser
7748
- * ```
7749
- */
7750
- class SeleniumWebdriverTs {
7751
- }
7752
7758
  /**
7753
7759
  * Client Functions
7754
7760
  */
@@ -7864,9 +7870,41 @@ declare namespace CodeceptJS {
7864
7870
  * First parameter can be set to `maximize`.
7865
7871
  * @param width - width in pixels or `maximize`.
7866
7872
  * @param height - height in pixels.
7867
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7868
7873
  */
7869
7874
  resizeWindow(width: number, height: number): Promise<any>;
7875
+ /**
7876
+ * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
7877
+ *
7878
+ * Examples:
7879
+ *
7880
+ * ```js
7881
+ * I.dontSee('#add-to-cart-btn');
7882
+ * I.focus('#product-tile')
7883
+ * I.see('#add-to-cart-bnt');
7884
+ * ```
7885
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
7886
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
7887
+ */
7888
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
7889
+ /**
7890
+ * Remove focus from a text input, button, etc.
7891
+ * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
7892
+ *
7893
+ * Examples:
7894
+ *
7895
+ * ```js
7896
+ * I.blur('.text-area')
7897
+ * ```
7898
+ * ```js
7899
+ * //element `#product-tile` is focused
7900
+ * I.see('#add-to-cart-btn');
7901
+ * I.blur('#product-tile')
7902
+ * I.dontSee('#add-to-cart-btn');
7903
+ * ```
7904
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
7905
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
7906
+ */
7907
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
7870
7908
  /**
7871
7909
  * Perform a click on a link or a button, given by a locator.
7872
7910
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -7891,7 +7929,6 @@ declare namespace CodeceptJS {
7891
7929
  * ```
7892
7930
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
7893
7931
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
7894
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7895
7932
  */
7896
7933
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
7897
7934
  /**
@@ -7900,7 +7937,6 @@ declare namespace CodeceptJS {
7900
7937
  * ```js
7901
7938
  * I.refreshPage();
7902
7939
  * ```
7903
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7904
7940
  */
7905
7941
  refreshPage(): Promise<any>;
7906
7942
  /**
@@ -7912,7 +7948,6 @@ declare namespace CodeceptJS {
7912
7948
  * ```
7913
7949
  * @param locator - element located by CSS|XPath|strict locator.
7914
7950
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7915
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7916
7951
  */
7917
7952
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
7918
7953
  /**
@@ -7931,7 +7966,6 @@ declare namespace CodeceptJS {
7931
7966
  * ```
7932
7967
  * @param field - located by label|name|CSS|XPath|strict locator.
7933
7968
  * @param value - text value to fill.
7934
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7935
7969
  */
7936
7970
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
7937
7971
  /**
@@ -7943,7 +7977,6 @@ declare namespace CodeceptJS {
7943
7977
  * I.clearField('#email');
7944
7978
  * ```
7945
7979
  * @param editable - field located by label|name|CSS|XPath|strict locator.
7946
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
7947
7980
  */
7948
7981
  clearField(editable: LocatorOrString): Promise<any>;
7949
7982
  /**
@@ -7957,7 +7990,6 @@ declare namespace CodeceptJS {
7957
7990
  * ```
7958
7991
  * @param field - located by label|name|CSS|XPath|strict locator
7959
7992
  * @param value - text value to append.
7960
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7961
7993
  */
7962
7994
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
7963
7995
  /**
@@ -7971,7 +8003,6 @@ declare namespace CodeceptJS {
7971
8003
  * ```
7972
8004
  * @param locator - field located by label|name|CSS|XPath|strict locator.
7973
8005
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
7974
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7975
8006
  */
7976
8007
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
7977
8008
  /**
@@ -7985,10 +8016,6 @@ declare namespace CodeceptJS {
7985
8016
  * I.pressKey(['Control','a']);
7986
8017
  * ```
7987
8018
  * @param key - key or array of keys to press.
7988
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
7989
- *
7990
- *
7991
- * {{ keys }}
7992
8019
  */
7993
8020
  pressKey(key: string | string[]): Promise<any>;
7994
8021
  /**
@@ -8002,7 +8029,6 @@ declare namespace CodeceptJS {
8002
8029
  * @param locator - located by CSS|XPath|strict locator.
8003
8030
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
8004
8031
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
8005
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8006
8032
  */
8007
8033
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
8008
8034
  /**
@@ -8017,7 +8043,6 @@ declare namespace CodeceptJS {
8017
8043
  * ```
8018
8044
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
8019
8045
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
8020
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8021
8046
  */
8022
8047
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
8023
8048
  /**
@@ -8033,7 +8058,6 @@ declare namespace CodeceptJS {
8033
8058
  * ```
8034
8059
  * @param locator - clickable element located by CSS|XPath|strict locator.
8035
8060
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
8036
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8037
8061
  */
8038
8062
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
8039
8063
  /**
@@ -8049,7 +8073,6 @@ declare namespace CodeceptJS {
8049
8073
  * ```
8050
8074
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
8051
8075
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
8052
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8053
8076
  */
8054
8077
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
8055
8078
  /**
@@ -8065,7 +8088,6 @@ declare namespace CodeceptJS {
8065
8088
  * ```
8066
8089
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
8067
8090
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
8068
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8069
8091
  */
8070
8092
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
8071
8093
  /**
@@ -8077,7 +8099,6 @@ declare namespace CodeceptJS {
8077
8099
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
8078
8100
  * ```
8079
8101
  * @param field - located by label|name|CSS|XPath|strict locator.
8080
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8081
8102
  */
8082
8103
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
8083
8104
  /**
@@ -8089,7 +8110,6 @@ declare namespace CodeceptJS {
8089
8110
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
8090
8111
  * ```
8091
8112
  * @param field - located by label|name|CSS|XPath|strict locator.
8092
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8093
8113
  */
8094
8114
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
8095
8115
  /**
@@ -8113,7 +8133,6 @@ declare namespace CodeceptJS {
8113
8133
  * ```
8114
8134
  * @param select - field located by label|name|CSS|XPath|strict locator.
8115
8135
  * @param option - visible text or value of option.
8116
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8117
8136
  */
8118
8137
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
8119
8138
  /**
@@ -8123,13 +8142,11 @@ declare namespace CodeceptJS {
8123
8142
  * I.seeInCurrentUrl('/register'); // we are on registration page
8124
8143
  * ```
8125
8144
  * @param url - a fragment to check
8126
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8127
8145
  */
8128
8146
  seeInCurrentUrl(url: string): Promise<any>;
8129
8147
  /**
8130
8148
  * Checks that current url does not contain a provided fragment.
8131
8149
  * @param url - value to check.
8132
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8133
8150
  */
8134
8151
  dontSeeInCurrentUrl(url: string): Promise<any>;
8135
8152
  /**
@@ -8142,7 +8159,6 @@ declare namespace CodeceptJS {
8142
8159
  * I.seeCurrentUrlEquals('http://my.site.com/register');
8143
8160
  * ```
8144
8161
  * @param url - value to check.
8145
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8146
8162
  */
8147
8163
  seeCurrentUrlEquals(url: string): Promise<any>;
8148
8164
  /**
@@ -8154,7 +8170,6 @@ declare namespace CodeceptJS {
8154
8170
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
8155
8171
  * ```
8156
8172
  * @param url - value to check.
8157
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8158
8173
  */
8159
8174
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
8160
8175
  /**
@@ -8168,7 +8183,6 @@ declare namespace CodeceptJS {
8168
8183
  * ```
8169
8184
  * @param text - expected on page.
8170
8185
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
8171
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8172
8186
  */
8173
8187
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
8174
8188
  /**
@@ -8181,7 +8195,6 @@ declare namespace CodeceptJS {
8181
8195
  * ```
8182
8196
  * @param text - which is not present.
8183
8197
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
8184
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8185
8198
  */
8186
8199
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
8187
8200
  /**
@@ -8192,7 +8205,6 @@ declare namespace CodeceptJS {
8192
8205
  * I.seeElement('#modal');
8193
8206
  * ```
8194
8207
  * @param locator - located by CSS|XPath|strict locator.
8195
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8196
8208
  */
8197
8209
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
8198
8210
  /**
@@ -8202,7 +8214,6 @@ declare namespace CodeceptJS {
8202
8214
  * I.dontSeeElement('.modal'); // modal is not shown
8203
8215
  * ```
8204
8216
  * @param locator - located by CSS|XPath|Strict locator.
8205
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8206
8217
  */
8207
8218
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
8208
8219
  /**
@@ -8213,7 +8224,6 @@ declare namespace CodeceptJS {
8213
8224
  * I.seeElementInDOM('#modal');
8214
8225
  * ```
8215
8226
  * @param locator - element located by CSS|XPath|strict locator.
8216
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8217
8227
  */
8218
8228
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
8219
8229
  /**
@@ -8223,7 +8233,6 @@ declare namespace CodeceptJS {
8223
8233
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
8224
8234
  * ```
8225
8235
  * @param locator - located by CSS|XPath|Strict locator.
8226
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8227
8236
  */
8228
8237
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
8229
8238
  /**
@@ -8235,7 +8244,6 @@ declare namespace CodeceptJS {
8235
8244
  * ```
8236
8245
  * @param locator - element located by CSS|XPath|strict locator.
8237
8246
  * @param num - number of elements.
8238
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8239
8247
  */
8240
8248
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
8241
8249
  /**
@@ -8261,9 +8269,8 @@ declare namespace CodeceptJS {
8261
8269
  * ```
8262
8270
  * @param field - located by label|name|CSS|XPath|strict locator.
8263
8271
  * @param value - value to check.
8264
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8265
8272
  */
8266
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
8273
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
8267
8274
  /**
8268
8275
  * Checks that value of input field or textarea doesn't equal to given value
8269
8276
  * Opposite to `seeInField`.
@@ -8274,9 +8281,8 @@ declare namespace CodeceptJS {
8274
8281
  * ```
8275
8282
  * @param field - located by label|name|CSS|XPath|strict locator.
8276
8283
  * @param value - value to check.
8277
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8278
8284
  */
8279
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
8285
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
8280
8286
  /**
8281
8287
  * Checks that text is equal to provided one.
8282
8288
  *
@@ -8292,7 +8298,6 @@ declare namespace CodeceptJS {
8292
8298
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
8293
8299
  * ```
8294
8300
  * @param text - value to check.
8295
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8296
8301
  */
8297
8302
  seeInSource(text: string): Promise<any>;
8298
8303
  /**
@@ -8302,7 +8307,6 @@ declare namespace CodeceptJS {
8302
8307
  * I.dontSeeInSource('<!--'); // no comments in source
8303
8308
  * ```
8304
8309
  * @param value - to check.
8305
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8306
8310
  */
8307
8311
  dontSeeInSource(value: string): Promise<any>;
8308
8312
  /**
@@ -8314,7 +8318,6 @@ declare namespace CodeceptJS {
8314
8318
  * ```
8315
8319
  * @param locator - element located by CSS|XPath|strict locator.
8316
8320
  * @param fileName - file name to save.
8317
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8318
8321
  */
8319
8322
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
8320
8323
  /**
@@ -8328,7 +8331,6 @@ declare namespace CodeceptJS {
8328
8331
  * ```
8329
8332
  * @param fileName - file name to save.
8330
8333
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
8331
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8332
8334
  */
8333
8335
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
8334
8336
  /**
@@ -8338,7 +8340,6 @@ declare namespace CodeceptJS {
8338
8340
  * I.wait(2); // wait 2 secs
8339
8341
  * ```
8340
8342
  * @param sec - number of second to wait.
8341
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8342
8343
  */
8343
8344
  wait(sec: number): Promise<any>;
8344
8345
  /**
@@ -8366,10 +8367,10 @@ declare namespace CodeceptJS {
8366
8367
  * ```
8367
8368
  * @param fn - function to be executed in browser context.
8368
8369
  * @param args - to be passed to function.
8369
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8370
+ * @returns script return value
8370
8371
  *
8371
8372
  *
8372
- * If a function returns a Promise It will wait for it resolution.
8373
+ * If a function returns a Promise It will wait for its resolution.
8373
8374
  */
8374
8375
  executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
8375
8376
  /**
@@ -8490,7 +8491,6 @@ declare namespace CodeceptJS {
8490
8491
  * ```js
8491
8492
  * I.scrollPageToTop();
8492
8493
  * ```
8493
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8494
8494
  */
8495
8495
  scrollPageToTop(): Promise<any>;
8496
8496
  /**
@@ -8499,7 +8499,6 @@ declare namespace CodeceptJS {
8499
8499
  * ```js
8500
8500
  * I.scrollPageToBottom();
8501
8501
  * ```
8502
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8503
8502
  */
8504
8503
  scrollPageToBottom(): Promise<any>;
8505
8504
  /**
@@ -8513,7 +8512,6 @@ declare namespace CodeceptJS {
8513
8512
  * @param locator - located by CSS|XPath|strict locator.
8514
8513
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
8515
8514
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
8516
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8517
8515
  */
8518
8516
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
8519
8517
  /**
@@ -8524,7 +8522,6 @@ declare namespace CodeceptJS {
8524
8522
  * I.switchTo(); // switch back to main page
8525
8523
  * ```
8526
8524
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
8527
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8528
8525
  */
8529
8526
  switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
8530
8527
  /**
@@ -8542,7 +8539,6 @@ declare namespace CodeceptJS {
8542
8539
  * ]);
8543
8540
  * ```
8544
8541
  * @param cookie - a cookie object or array of cookie objects.
8545
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8546
8542
  */
8547
8543
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
8548
8544
  /**
@@ -8552,7 +8548,6 @@ declare namespace CodeceptJS {
8552
8548
  * I.seeCookie('Auth');
8553
8549
  * ```
8554
8550
  * @param name - cookie name.
8555
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8556
8551
  */
8557
8552
  seeCookie(name: string): Promise<any>;
8558
8553
  /**
@@ -8562,7 +8557,6 @@ declare namespace CodeceptJS {
8562
8557
  * I.dontSeeCookie('auth'); // no auth cookie
8563
8558
  * ```
8564
8559
  * @param name - cookie name.
8565
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8566
8560
  */
8567
8561
  dontSeeCookie(name: string): Promise<any>;
8568
8562
  /**
@@ -8575,22 +8569,17 @@ declare namespace CodeceptJS {
8575
8569
  * assert(cookie.value, '123456');
8576
8570
  * ```
8577
8571
  * @param [name = null] - cookie name.
8578
- * @returns attribute value
8579
- *
8580
- *
8581
- * Returns cookie in JSON format. If name not passed returns all cookies for this domain.
8582
8572
  */
8583
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
8573
+ grabCookie(name?: string): Promise<any>;
8584
8574
  /**
8585
8575
  * Clears a cookie by name,
8586
8576
  * if none provided clears all cookies.
8587
8577
  *
8588
8578
  * ```js
8589
8579
  * I.clearCookie();
8590
- * I.clearCookie('test');
8580
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
8591
8581
  * ```
8592
8582
  * @param [cookie = null] - (optional, `null` by default) cookie name
8593
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8594
8583
  */
8595
8584
  clearCookie(cookie?: string): Promise<any>;
8596
8585
  /**
@@ -8601,7 +8590,6 @@ declare namespace CodeceptJS {
8601
8590
  * ```
8602
8591
  * @param urlPart - value to check.
8603
8592
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8604
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8605
8593
  */
8606
8594
  waitInUrl(urlPart: string, sec?: number): Promise<any>;
8607
8595
  /**
@@ -8613,7 +8601,6 @@ declare namespace CodeceptJS {
8613
8601
  * ```
8614
8602
  * @param urlPart - value to check.
8615
8603
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8616
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8617
8604
  */
8618
8605
  waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
8619
8606
  /**
@@ -8632,7 +8619,6 @@ declare namespace CodeceptJS {
8632
8619
  * @param fn - to be executed in browser context.
8633
8620
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
8634
8621
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
8635
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8636
8622
  */
8637
8623
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
8638
8624
  /**
@@ -8644,7 +8630,6 @@ declare namespace CodeceptJS {
8644
8630
  * @param locator - element located by CSS|XPath|strict locator.
8645
8631
  * @param num - number of elements.
8646
8632
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8647
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8648
8633
  */
8649
8634
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
8650
8635
  /**
@@ -8657,7 +8642,6 @@ declare namespace CodeceptJS {
8657
8642
  * ```
8658
8643
  * @param locator - element located by CSS|XPath|strict locator.
8659
8644
  * @param [sec] - (optional, `1` by default) time in seconds to wait
8660
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8661
8645
  */
8662
8646
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
8663
8647
  /**
@@ -8669,7 +8653,6 @@ declare namespace CodeceptJS {
8669
8653
  * ```
8670
8654
  * @param locator - element located by CSS|XPath|strict locator.
8671
8655
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8672
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8673
8656
  */
8674
8657
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
8675
8658
  /**
@@ -8681,7 +8664,6 @@ declare namespace CodeceptJS {
8681
8664
  * ```
8682
8665
  * @param locator - element located by CSS|XPath|strict locator.
8683
8666
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8684
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8685
8667
  */
8686
8668
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
8687
8669
  /**
@@ -8696,7 +8678,6 @@ declare namespace CodeceptJS {
8696
8678
  * @param text - to wait for.
8697
8679
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8698
8680
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
8699
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
8700
8681
  */
8701
8682
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
8702
8683
  }
@@ -8706,6 +8687,13 @@ declare namespace CodeceptJS {
8706
8687
  *
8707
8688
  * WebDriver requires Selenium Server and ChromeDriver/GeckoDriver to be installed. Those tools can be easily installed via NPM. Please check [Testing with WebDriver](https://codecept.io/webdriver/#testing-with-webdriver) for more details.
8708
8689
  *
8690
+ * With the release of WebdriverIO version v8.14.0, and onwards, all driver management hassles are now a thing of the past 🙌. Read more [here](https://webdriver.io/blog/2023/07/31/driver-management/).
8691
+ * One of the significant advantages of this update is that you can now get rid of any driver services you previously had to manage, such as
8692
+ * `wdio-chromedriver-service`, `wdio-geckodriver-service`, `wdio-edgedriver-service`, `wdio-safaridriver-service`, and even `@wdio/selenium-standalone-service`.
8693
+ *
8694
+ * For those who require custom driver options, fear not; WebDriver Helper allows you to pass in driver options through custom WebDriver configuration.
8695
+ * If you have a custom grid, use a cloud service, or prefer to run your own driver, there's no need to worry since WebDriver Helper will only start a driver when there are no other connection information settings like hostname or port specified.
8696
+ *
8709
8697
  * <!-- configuration -->
8710
8698
  *
8711
8699
  * Example:
@@ -8727,6 +8715,28 @@ declare namespace CodeceptJS {
8727
8715
  * }
8728
8716
  * ```
8729
8717
  *
8718
+ * Testing Chrome locally is now more convenient than ever. You can define a browser channel, and WebDriver Helper will take care of downloading the specified browser version for you.
8719
+ * For example:
8720
+ *
8721
+ * ```js
8722
+ * {
8723
+ * helpers: {
8724
+ * WebDriver : {
8725
+ * smartWait: 5000,
8726
+ * browser: "chrome",
8727
+ * browserVersion: '116.0.5793.0', // or 'stable', 'beta', 'dev' or 'canary'
8728
+ * restart: false,
8729
+ * windowSize: "maximize",
8730
+ * timeouts: {
8731
+ * "script": 60000,
8732
+ * "page load": 10000
8733
+ * }
8734
+ * }
8735
+ * }
8736
+ * }
8737
+ * ```
8738
+ *
8739
+ *
8730
8740
  * Example with basic authentication
8731
8741
  * ```js
8732
8742
  * {
@@ -8767,6 +8777,25 @@ declare namespace CodeceptJS {
8767
8777
  * }
8768
8778
  * ```
8769
8779
  *
8780
+ * ### Running with devtools protocol
8781
+ *
8782
+ * ```js
8783
+ * {
8784
+ * helpers: {
8785
+ * WebDriver : {
8786
+ * url: "http://localhost",
8787
+ * browser: "chrome",
8788
+ * devtoolsProtocol: true,
8789
+ * desiredCapabilities: {
8790
+ * chromeOptions: {
8791
+ * args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
8792
+ * }
8793
+ * }
8794
+ * }
8795
+ * }
8796
+ * }
8797
+ * ```
8798
+ *
8770
8799
  * ### Internet Explorer
8771
8800
  *
8772
8801
  * Additional configuration params can be used from [IE options](https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/IE/Options.html)
@@ -9088,6 +9117,17 @@ declare namespace CodeceptJS {
9088
9117
  * @param locator - element located by CSS|XPath|strict locator.
9089
9118
  */
9090
9119
  _locateFields(locator: CodeceptJS.LocatorOrString): Promise<any>;
9120
+ /**
9121
+ * Grab WebElements for given locator
9122
+ * Resumes test execution, so **should be used inside an async function with `await`** operator.
9123
+ *
9124
+ * ```js
9125
+ * const webElements = await I.grabWebElements('#button');
9126
+ * ```
9127
+ * @param locator - element located by CSS|XPath|strict locator.
9128
+ * @returns WebElement of being used Web helper
9129
+ */
9130
+ grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<any>;
9091
9131
  /**
9092
9132
  * Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime.
9093
9133
  *
@@ -9136,10 +9176,6 @@ declare namespace CodeceptJS {
9136
9176
  * ```
9137
9177
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
9138
9178
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9139
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9140
- *
9141
- *
9142
- * {{ react }}
9143
9179
  */
9144
9180
  click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
9145
9181
  /**
@@ -9169,10 +9205,6 @@ declare namespace CodeceptJS {
9169
9205
  * ```
9170
9206
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
9171
9207
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9172
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9173
- *
9174
- *
9175
- * {{ react }}
9176
9208
  */
9177
9209
  forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9178
9210
  /**
@@ -9187,10 +9219,6 @@ declare namespace CodeceptJS {
9187
9219
  * ```
9188
9220
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
9189
9221
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9190
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9191
- *
9192
- *
9193
- * {{ react }}
9194
9222
  */
9195
9223
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9196
9224
  /**
@@ -9206,10 +9234,6 @@ declare namespace CodeceptJS {
9206
9234
  * ```
9207
9235
  * @param locator - clickable element located by CSS|XPath|strict locator.
9208
9236
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
9209
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9210
- *
9211
- *
9212
- * {{ react }}
9213
9237
  */
9214
9238
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9215
9239
  /**
@@ -9229,10 +9253,6 @@ declare namespace CodeceptJS {
9229
9253
  * ```
9230
9254
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
9231
9255
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9232
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9233
- *
9234
- *
9235
- * {{ react }}
9236
9256
  */
9237
9257
  forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9238
9258
  /**
@@ -9251,10 +9271,6 @@ declare namespace CodeceptJS {
9251
9271
  * ```
9252
9272
  * @param field - located by label|name|CSS|XPath|strict locator.
9253
9273
  * @param value - text value to fill.
9254
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9255
- *
9256
- * {{ react }}
9257
- * {{ custom }}
9258
9274
  */
9259
9275
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
9260
9276
  /**
@@ -9268,9 +9284,6 @@ declare namespace CodeceptJS {
9268
9284
  * ```
9269
9285
  * @param field - located by label|name|CSS|XPath|strict locator
9270
9286
  * @param value - text value to append.
9271
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9272
- *
9273
- * {{ react }}
9274
9287
  */
9275
9288
  appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
9276
9289
  /**
@@ -9282,7 +9295,6 @@ declare namespace CodeceptJS {
9282
9295
  * I.clearField('#email');
9283
9296
  * ```
9284
9297
  * @param editable - field located by label|name|CSS|XPath|strict locator.
9285
- * ⚠️ returns a _promise_ which is synchronized internally by recorder.
9286
9298
  */
9287
9299
  clearField(editable: LocatorOrString): Promise<any>;
9288
9300
  /**
@@ -9306,10 +9318,11 @@ declare namespace CodeceptJS {
9306
9318
  * ```
9307
9319
  * @param select - field located by label|name|CSS|XPath|strict locator.
9308
9320
  * @param option - visible text or value of option.
9309
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9310
9321
  */
9311
9322
  selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
9312
9323
  /**
9324
+ * Appium: not tested
9325
+ *
9313
9326
  * Attaches a file to element located by label, name, CSS or XPath
9314
9327
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
9315
9328
  * File will be uploaded to remote system (if tests are running remotely).
@@ -9320,12 +9333,10 @@ declare namespace CodeceptJS {
9320
9333
  * ```
9321
9334
  * @param locator - field located by label|name|CSS|XPath|strict locator.
9322
9335
  * @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
9323
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9324
- *
9325
- * Appium: not tested
9326
9336
  */
9327
9337
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
9328
9338
  /**
9339
+ * Appium: not tested
9329
9340
  * Selects a checkbox or radio button.
9330
9341
  * Element is located by label or name or CSS or XPath.
9331
9342
  *
@@ -9338,12 +9349,10 @@ declare namespace CodeceptJS {
9338
9349
  * ```
9339
9350
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
9340
9351
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
9341
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9342
- *
9343
- * Appium: not tested
9344
9352
  */
9345
9353
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9346
9354
  /**
9355
+ * Appium: not tested
9347
9356
  * Unselects a checkbox or radio button.
9348
9357
  * Element is located by label or name or CSS or XPath.
9349
9358
  *
@@ -9356,9 +9365,6 @@ declare namespace CodeceptJS {
9356
9365
  * ```
9357
9366
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
9358
9367
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
9359
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9360
- *
9361
- * Appium: not tested
9362
9368
  */
9363
9369
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
9364
9370
  /**
@@ -9487,7 +9493,6 @@ declare namespace CodeceptJS {
9487
9493
  * I.seeInTitle('Home Page');
9488
9494
  * ```
9489
9495
  * @param text - text value to check.
9490
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9491
9496
  */
9492
9497
  seeInTitle(text: string): Promise<any>;
9493
9498
  /**
@@ -9497,7 +9502,6 @@ declare namespace CodeceptJS {
9497
9502
  * I.seeTitleEquals('Test title.');
9498
9503
  * ```
9499
9504
  * @param text - value to check.
9500
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9501
9505
  */
9502
9506
  seeTitleEquals(text: string): Promise<any>;
9503
9507
  /**
@@ -9507,7 +9511,6 @@ declare namespace CodeceptJS {
9507
9511
  * I.dontSeeInTitle('Error');
9508
9512
  * ```
9509
9513
  * @param text - value to check.
9510
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9511
9514
  */
9512
9515
  dontSeeInTitle(text: string): Promise<any>;
9513
9516
  /**
@@ -9531,10 +9534,6 @@ declare namespace CodeceptJS {
9531
9534
  * ```
9532
9535
  * @param text - expected on page.
9533
9536
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
9534
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9535
- *
9536
- *
9537
- * {{ react }}
9538
9537
  */
9539
9538
  see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
9540
9539
  /**
@@ -9545,7 +9544,6 @@ declare namespace CodeceptJS {
9545
9544
  * ```
9546
9545
  * @param text - element value to check.
9547
9546
  * @param [context = null] - element located by CSS|XPath|strict locator.
9548
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9549
9547
  */
9550
9548
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
9551
9549
  /**
@@ -9558,10 +9556,6 @@ declare namespace CodeceptJS {
9558
9556
  * ```
9559
9557
  * @param text - which is not present.
9560
9558
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
9561
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9562
- *
9563
- *
9564
- * {{ react }}
9565
9559
  */
9566
9560
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
9567
9561
  /**
@@ -9576,9 +9570,8 @@ declare namespace CodeceptJS {
9576
9570
  * ```
9577
9571
  * @param field - located by label|name|CSS|XPath|strict locator.
9578
9572
  * @param value - value to check.
9579
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9580
9573
  */
9581
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
9574
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
9582
9575
  /**
9583
9576
  * Checks that value of input field or textarea doesn't equal to given value
9584
9577
  * Opposite to `seeInField`.
@@ -9589,10 +9582,10 @@ declare namespace CodeceptJS {
9589
9582
  * ```
9590
9583
  * @param field - located by label|name|CSS|XPath|strict locator.
9591
9584
  * @param value - value to check.
9592
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9593
9585
  */
9594
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
9586
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
9595
9587
  /**
9588
+ * Appium: not tested
9596
9589
  * Verifies that the specified checkbox is checked.
9597
9590
  *
9598
9591
  * ```js
@@ -9601,12 +9594,10 @@ declare namespace CodeceptJS {
9601
9594
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
9602
9595
  * ```
9603
9596
  * @param field - located by label|name|CSS|XPath|strict locator.
9604
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9605
- *
9606
- * Appium: not tested
9607
9597
  */
9608
9598
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
9609
9599
  /**
9600
+ * Appium: not tested
9610
9601
  * Verifies that the specified checkbox is not checked.
9611
9602
  *
9612
9603
  * ```js
@@ -9615,9 +9606,6 @@ declare namespace CodeceptJS {
9615
9606
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
9616
9607
  * ```
9617
9608
  * @param field - located by label|name|CSS|XPath|strict locator.
9618
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9619
- *
9620
- * Appium: not tested
9621
9609
  */
9622
9610
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
9623
9611
  /**
@@ -9628,9 +9616,6 @@ declare namespace CodeceptJS {
9628
9616
  * I.seeElement('#modal');
9629
9617
  * ```
9630
9618
  * @param locator - located by CSS|XPath|strict locator.
9631
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9632
- *
9633
- * {{ react }}
9634
9619
  */
9635
9620
  seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
9636
9621
  /**
@@ -9640,9 +9625,6 @@ declare namespace CodeceptJS {
9640
9625
  * I.dontSeeElement('.modal'); // modal is not shown
9641
9626
  * ```
9642
9627
  * @param locator - located by CSS|XPath|Strict locator.
9643
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9644
- *
9645
- * {{ react }}
9646
9628
  */
9647
9629
  dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
9648
9630
  /**
@@ -9653,7 +9635,6 @@ declare namespace CodeceptJS {
9653
9635
  * I.seeElementInDOM('#modal');
9654
9636
  * ```
9655
9637
  * @param locator - element located by CSS|XPath|strict locator.
9656
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9657
9638
  */
9658
9639
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
9659
9640
  /**
@@ -9663,7 +9644,6 @@ declare namespace CodeceptJS {
9663
9644
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
9664
9645
  * ```
9665
9646
  * @param locator - located by CSS|XPath|Strict locator.
9666
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9667
9647
  */
9668
9648
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
9669
9649
  /**
@@ -9673,7 +9653,6 @@ declare namespace CodeceptJS {
9673
9653
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
9674
9654
  * ```
9675
9655
  * @param text - value to check.
9676
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9677
9656
  */
9678
9657
  seeInSource(text: string): Promise<any>;
9679
9658
  /**
@@ -9715,7 +9694,6 @@ declare namespace CodeceptJS {
9715
9694
  * I.dontSeeInSource('<!--'); // no comments in source
9716
9695
  * ```
9717
9696
  * @param value - to check.
9718
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9719
9697
  */
9720
9698
  dontSeeInSource(value: string): Promise<any>;
9721
9699
  /**
@@ -9728,9 +9706,6 @@ declare namespace CodeceptJS {
9728
9706
  * ```
9729
9707
  * @param locator - element located by CSS|XPath|strict locator.
9730
9708
  * @param num - number of elements.
9731
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9732
- *
9733
- * {{ react }}
9734
9709
  */
9735
9710
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
9736
9711
  /**
@@ -9742,9 +9717,6 @@ declare namespace CodeceptJS {
9742
9717
  * ```
9743
9718
  * @param locator - element located by CSS|XPath|strict locator.
9744
9719
  * @param num - number of elements.
9745
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9746
- *
9747
- * {{ react }}
9748
9720
  */
9749
9721
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
9750
9722
  /**
@@ -9755,7 +9727,6 @@ declare namespace CodeceptJS {
9755
9727
  * ```
9756
9728
  * @param locator - located by CSS|XPath|strict locator.
9757
9729
  * @param cssProperties - object with CSS properties and their values to check.
9758
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9759
9730
  */
9760
9731
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
9761
9732
  /**
@@ -9766,7 +9737,6 @@ declare namespace CodeceptJS {
9766
9737
  * ```
9767
9738
  * @param locator - located by CSS|XPath|strict locator.
9768
9739
  * @param attributes - attributes and their values to check.
9769
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9770
9740
  */
9771
9741
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
9772
9742
  /**
@@ -9787,13 +9757,11 @@ declare namespace CodeceptJS {
9787
9757
  * I.seeInCurrentUrl('/register'); // we are on registration page
9788
9758
  * ```
9789
9759
  * @param url - a fragment to check
9790
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9791
9760
  */
9792
9761
  seeInCurrentUrl(url: string): Promise<any>;
9793
9762
  /**
9794
9763
  * Checks that current url does not contain a provided fragment.
9795
9764
  * @param url - value to check.
9796
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9797
9765
  */
9798
9766
  dontSeeInCurrentUrl(url: string): Promise<any>;
9799
9767
  /**
@@ -9806,7 +9774,6 @@ declare namespace CodeceptJS {
9806
9774
  * I.seeCurrentUrlEquals('http://my.site.com/register');
9807
9775
  * ```
9808
9776
  * @param url - value to check.
9809
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9810
9777
  */
9811
9778
  seeCurrentUrlEquals(url: string): Promise<any>;
9812
9779
  /**
@@ -9818,10 +9785,11 @@ declare namespace CodeceptJS {
9818
9785
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
9819
9786
  * ```
9820
9787
  * @param url - value to check.
9821
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9822
9788
  */
9823
9789
  dontSeeCurrentUrlEquals(url: string): Promise<any>;
9824
9790
  /**
9791
+ * Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
9792
+ *
9825
9793
  * Executes sync script on a page.
9826
9794
  * Pass arguments to function as additional parameters.
9827
9795
  * Will return execution result to a test.
@@ -9846,11 +9814,7 @@ declare namespace CodeceptJS {
9846
9814
  * ```
9847
9815
  * @param fn - function to be executed in browser context.
9848
9816
  * @param args - to be passed to function.
9849
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9850
- *
9851
- *
9852
- *
9853
- * Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
9817
+ * @returns script return value
9854
9818
  */
9855
9819
  executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
9856
9820
  /**
@@ -9876,7 +9840,7 @@ declare namespace CodeceptJS {
9876
9840
  * ```
9877
9841
  * @param fn - function to be executed in browser context.
9878
9842
  * @param args - to be passed to function.
9879
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9843
+ * @returns script return value
9880
9844
  */
9881
9845
  executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
9882
9846
  /**
@@ -9888,10 +9852,9 @@ declare namespace CodeceptJS {
9888
9852
  * I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
9889
9853
  * ```
9890
9854
  * @param locator - located by CSS|XPath|strict locator.
9891
- * @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
9892
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9855
+ * @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
9893
9856
  */
9894
- scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
9857
+ scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): Promise<any>;
9895
9858
  /**
9896
9859
  * Scrolls to element matched by locator.
9897
9860
  * Extra shift can be set with offsetX and offsetY options.
@@ -9903,7 +9866,6 @@ declare namespace CodeceptJS {
9903
9866
  * @param locator - located by CSS|XPath|strict locator.
9904
9867
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
9905
9868
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
9906
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9907
9869
  */
9908
9870
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
9909
9871
  /**
@@ -9917,7 +9879,6 @@ declare namespace CodeceptJS {
9917
9879
  * @param locator - located by CSS|XPath|strict locator.
9918
9880
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
9919
9881
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
9920
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9921
9882
  */
9922
9883
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
9923
9884
  /**
@@ -9929,7 +9890,6 @@ declare namespace CodeceptJS {
9929
9890
  * ```
9930
9891
  * @param locator - element located by CSS|XPath|strict locator.
9931
9892
  * @param fileName - file name to save.
9932
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9933
9893
  */
9934
9894
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
9935
9895
  /**
@@ -9943,10 +9903,10 @@ declare namespace CodeceptJS {
9943
9903
  * ```
9944
9904
  * @param fileName - file name to save.
9945
9905
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
9946
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9947
9906
  */
9948
9907
  saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
9949
9908
  /**
9909
+ * Uses Selenium's JSON [cookie format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
9950
9910
  * Sets cookie(s).
9951
9911
  *
9952
9912
  * Can be a single cookie object or an array of cookies:
@@ -9961,12 +9921,6 @@ declare namespace CodeceptJS {
9961
9921
  * ]);
9962
9922
  * ```
9963
9923
  * @param cookie - a cookie object or array of cookie objects.
9964
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9965
- *
9966
- *
9967
- *
9968
- * Uses Selenium's JSON [cookie
9969
- * format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
9970
9924
  */
9971
9925
  setCookie(cookie: Cookie | Cookie[]): Promise<any>;
9972
9926
  /**
@@ -9975,10 +9929,9 @@ declare namespace CodeceptJS {
9975
9929
  *
9976
9930
  * ```js
9977
9931
  * I.clearCookie();
9978
- * I.clearCookie('test');
9932
+ * I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
9979
9933
  * ```
9980
9934
  * @param [cookie = null] - (optional, `null` by default) cookie name
9981
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9982
9935
  */
9983
9936
  clearCookie(cookie?: string): Promise<any>;
9984
9937
  /**
@@ -9988,7 +9941,6 @@ declare namespace CodeceptJS {
9988
9941
  * I.seeCookie('Auth');
9989
9942
  * ```
9990
9943
  * @param name - cookie name.
9991
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
9992
9944
  */
9993
9945
  seeCookie(name: string): Promise<any>;
9994
9946
  /**
@@ -9998,7 +9950,6 @@ declare namespace CodeceptJS {
9998
9950
  * I.dontSeeCookie('auth'); // no auth cookie
9999
9951
  * ```
10000
9952
  * @param name - cookie name.
10001
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10002
9953
  */
10003
9954
  dontSeeCookie(name: string): Promise<any>;
10004
9955
  /**
@@ -10011,9 +9962,8 @@ declare namespace CodeceptJS {
10011
9962
  * assert(cookie.value, '123456');
10012
9963
  * ```
10013
9964
  * @param [name = null] - cookie name.
10014
- * @returns attribute value
10015
9965
  */
10016
- grabCookie(name?: string): Promise<string> | Promise<string[]>;
9966
+ grabCookie(name?: string): Promise<any>;
10017
9967
  /**
10018
9968
  * Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
10019
9969
  * Don't confuse popups with modal windows, as created by [various
@@ -10021,7 +9971,7 @@ declare namespace CodeceptJS {
10021
9971
  */
10022
9972
  acceptPopup(): Promise<any>;
10023
9973
  /**
10024
- * Dismisses the active JavaScript popup, as created by window.alert|window.confirm|window.prompt.
9974
+ * Dismisses the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`.
10025
9975
  */
10026
9976
  cancelPopup(): Promise<any>;
10027
9977
  /**
@@ -10048,7 +9998,6 @@ declare namespace CodeceptJS {
10048
9998
  * I.pressKeyUp('Control');
10049
9999
  * ```
10050
10000
  * @param key - name of key to press down.
10051
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10052
10001
  */
10053
10002
  pressKeyDown(key: string): Promise<any>;
10054
10003
  /**
@@ -10062,10 +10011,11 @@ declare namespace CodeceptJS {
10062
10011
  * I.pressKeyUp('Control');
10063
10012
  * ```
10064
10013
  * @param key - name of key to release.
10065
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10066
10014
  */
10067
10015
  pressKeyUp(key: string): Promise<any>;
10068
10016
  /**
10017
+ * _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.
10018
+ *
10069
10019
  * Presses a key in the browser (on a focused element).
10070
10020
  *
10071
10021
  * _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
@@ -10124,10 +10074,6 @@ declare namespace CodeceptJS {
10124
10074
  * - `'Space'`
10125
10075
  * - `'Tab'`
10126
10076
  * @param key - key or array of keys to press.
10127
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10128
- *
10129
- *
10130
- * _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.
10131
10077
  */
10132
10078
  pressKey(key: string | string[]): Promise<any>;
10133
10079
  /**
@@ -10150,20 +10096,52 @@ declare namespace CodeceptJS {
10150
10096
  * ```
10151
10097
  * @param key - or array of keys to type.
10152
10098
  * @param [delay = null] - (optional) delay in ms between key presses
10153
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10154
10099
  */
10155
10100
  type(key: string | string[], delay?: number): Promise<any>;
10156
10101
  /**
10102
+ * Appium: not tested in web, in apps doesn't work
10103
+ *
10157
10104
  * Resize the current window to provided width and height.
10158
10105
  * First parameter can be set to `maximize`.
10159
10106
  * @param width - width in pixels or `maximize`.
10160
10107
  * @param height - height in pixels.
10161
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10162
- *
10163
- * Appium: not tested in web, in apps doesn't work
10164
10108
  */
10165
10109
  resizeWindow(width: number, height: number): Promise<any>;
10166
10110
  /**
10111
+ * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
10112
+ *
10113
+ * Examples:
10114
+ *
10115
+ * ```js
10116
+ * I.dontSee('#add-to-cart-btn');
10117
+ * I.focus('#product-tile')
10118
+ * I.see('#add-to-cart-bnt');
10119
+ * ```
10120
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
10121
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
10122
+ */
10123
+ focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
10124
+ /**
10125
+ * Remove focus from a text input, button, etc.
10126
+ * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
10127
+ *
10128
+ * Examples:
10129
+ *
10130
+ * ```js
10131
+ * I.blur('.text-area')
10132
+ * ```
10133
+ * ```js
10134
+ * //element `#product-tile` is focused
10135
+ * I.see('#add-to-cart-btn');
10136
+ * I.blur('#product-tile')
10137
+ * I.dontSee('#add-to-cart-btn');
10138
+ * ```
10139
+ * @param locator - field located by label|name|CSS|XPath|strict locator.
10140
+ * @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
10141
+ */
10142
+ blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
10143
+ /**
10144
+ * Appium: not tested
10167
10145
  * Drag an item to a destination element.
10168
10146
  *
10169
10147
  * ```js
@@ -10171,9 +10149,6 @@ declare namespace CodeceptJS {
10171
10149
  * ```
10172
10150
  * @param srcElement - located by CSS|XPath|strict locator.
10173
10151
  * @param destElement - located by CSS|XPath|strict locator.
10174
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10175
- *
10176
- * Appium: not tested
10177
10152
  */
10178
10153
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
10179
10154
  /**
@@ -10186,7 +10161,6 @@ declare namespace CodeceptJS {
10186
10161
  * ```
10187
10162
  * @param locator - located by label|name|CSS|XPath|strict locator.
10188
10163
  * @param offsetX - position to drag.
10189
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10190
10164
  */
10191
10165
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
10192
10166
  /**
@@ -10228,8 +10202,6 @@ declare namespace CodeceptJS {
10228
10202
  * ```js
10229
10203
  * I.closeOtherTabs();
10230
10204
  * ```
10231
- *
10232
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10233
10205
  */
10234
10206
  closeOtherTabs(): Promise<any>;
10235
10207
  /**
@@ -10239,7 +10211,6 @@ declare namespace CodeceptJS {
10239
10211
  * I.wait(2); // wait 2 secs
10240
10212
  * ```
10241
10213
  * @param sec - number of second to wait.
10242
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10243
10214
  */
10244
10215
  wait(sec: number): Promise<any>;
10245
10216
  /**
@@ -10247,7 +10218,6 @@ declare namespace CodeceptJS {
10247
10218
  * Element can be located by CSS or XPath.
10248
10219
  * @param locator - element located by CSS|XPath|strict locator.
10249
10220
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
10250
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10251
10221
  */
10252
10222
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10253
10223
  /**
@@ -10260,7 +10230,6 @@ declare namespace CodeceptJS {
10260
10230
  * ```
10261
10231
  * @param locator - element located by CSS|XPath|strict locator.
10262
10232
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10263
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10264
10233
  */
10265
10234
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10266
10235
  /**
@@ -10273,7 +10242,6 @@ declare namespace CodeceptJS {
10273
10242
  * ```
10274
10243
  * @param locator - element located by CSS|XPath|strict locator.
10275
10244
  * @param [sec] - (optional, `1` by default) time in seconds to wait
10276
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10277
10245
  */
10278
10246
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10279
10247
  /**
@@ -10284,7 +10252,6 @@ declare namespace CodeceptJS {
10284
10252
  * ```
10285
10253
  * @param urlPart - value to check.
10286
10254
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10287
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10288
10255
  */
10289
10256
  waitInUrl(urlPart: string, sec?: number): Promise<any>;
10290
10257
  /**
@@ -10296,7 +10263,6 @@ declare namespace CodeceptJS {
10296
10263
  * ```
10297
10264
  * @param urlPart - value to check.
10298
10265
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10299
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10300
10266
  */
10301
10267
  waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
10302
10268
  /**
@@ -10311,7 +10277,6 @@ declare namespace CodeceptJS {
10311
10277
  * @param text - to wait for.
10312
10278
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10313
10279
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
10314
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10315
10280
  */
10316
10281
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
10317
10282
  /**
@@ -10323,7 +10288,6 @@ declare namespace CodeceptJS {
10323
10288
  * @param field - input field.
10324
10289
  * @param value - expected value.
10325
10290
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10326
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10327
10291
  */
10328
10292
  waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
10329
10293
  /**
@@ -10335,7 +10299,6 @@ declare namespace CodeceptJS {
10335
10299
  * ```
10336
10300
  * @param locator - element located by CSS|XPath|strict locator.
10337
10301
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10338
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10339
10302
  */
10340
10303
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10341
10304
  /**
@@ -10347,7 +10310,6 @@ declare namespace CodeceptJS {
10347
10310
  * @param locator - element located by CSS|XPath|strict locator.
10348
10311
  * @param num - number of elements.
10349
10312
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10350
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10351
10313
  */
10352
10314
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
10353
10315
  /**
@@ -10359,7 +10321,6 @@ declare namespace CodeceptJS {
10359
10321
  * ```
10360
10322
  * @param locator - element located by CSS|XPath|strict locator.
10361
10323
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10362
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10363
10324
  */
10364
10325
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10365
10326
  /**
@@ -10371,7 +10332,6 @@ declare namespace CodeceptJS {
10371
10332
  * ```
10372
10333
  * @param locator - element located by CSS|XPath|strict locator.
10373
10334
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10374
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10375
10335
  */
10376
10336
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10377
10337
  /**
@@ -10383,7 +10343,6 @@ declare namespace CodeceptJS {
10383
10343
  * ```
10384
10344
  * @param locator - element located by CSS|XPath|strict locator.
10385
10345
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10386
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10387
10346
  */
10388
10347
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
10389
10348
  /**
@@ -10402,9 +10361,18 @@ declare namespace CodeceptJS {
10402
10361
  * @param fn - to be executed in browser context.
10403
10362
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
10404
10363
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10405
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10406
10364
  */
10407
10365
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
10366
+ /**
10367
+ * Waits for number of tabs.
10368
+ *
10369
+ * ```js
10370
+ * I.waitForNumberOfTabs(2);
10371
+ * ```
10372
+ * @param expectedTabs - expecting the number of tabs.
10373
+ * @param sec - number of secs to wait.
10374
+ */
10375
+ waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
10408
10376
  /**
10409
10377
  * Switches frame or in case of null locator reverts to parent.
10410
10378
  *
@@ -10413,7 +10381,6 @@ declare namespace CodeceptJS {
10413
10381
  * I.switchTo(); // switch back to main page
10414
10382
  * ```
10415
10383
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
10416
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10417
10384
  */
10418
10385
  switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
10419
10386
  /**
@@ -10425,7 +10392,6 @@ declare namespace CodeceptJS {
10425
10392
  * ```
10426
10393
  * @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
10427
10394
  * @param [sec = null] - (optional) time in seconds to wait.
10428
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10429
10395
  */
10430
10396
  switchToNextTab(num?: number, sec?: number | null): Promise<any>;
10431
10397
  /**
@@ -10437,7 +10403,6 @@ declare namespace CodeceptJS {
10437
10403
  * ```
10438
10404
  * @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
10439
10405
  * @param [sec = null] - (optional) time in seconds to wait.
10440
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10441
10406
  */
10442
10407
  switchToPreviousTab(num?: number, sec?: number): Promise<any>;
10443
10408
  /**
@@ -10446,8 +10411,6 @@ declare namespace CodeceptJS {
10446
10411
  * ```js
10447
10412
  * I.closeCurrentTab();
10448
10413
  * ```
10449
- *
10450
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10451
10414
  */
10452
10415
  closeCurrentTab(): Promise<any>;
10453
10416
  /**
@@ -10456,8 +10419,6 @@ declare namespace CodeceptJS {
10456
10419
  * ```js
10457
10420
  * I.openNewTab();
10458
10421
  * ```
10459
- *
10460
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10461
10422
  */
10462
10423
  openNewTab(): Promise<any>;
10463
10424
  /**
@@ -10476,7 +10437,6 @@ declare namespace CodeceptJS {
10476
10437
  * ```js
10477
10438
  * I.refreshPage();
10478
10439
  * ```
10479
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10480
10440
  */
10481
10441
  refreshPage(): Promise<any>;
10482
10442
  /**
@@ -10485,7 +10445,6 @@ declare namespace CodeceptJS {
10485
10445
  * ```js
10486
10446
  * I.scrollPageToTop();
10487
10447
  * ```
10488
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10489
10448
  */
10490
10449
  scrollPageToTop(): Promise<any>;
10491
10450
  /**
@@ -10494,7 +10453,6 @@ declare namespace CodeceptJS {
10494
10453
  * ```js
10495
10454
  * I.scrollPageToBottom();
10496
10455
  * ```
10497
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10498
10456
  */
10499
10457
  scrollPageToBottom(): Promise<any>;
10500
10458
  /**
@@ -10508,6 +10466,9 @@ declare namespace CodeceptJS {
10508
10466
  */
10509
10467
  grabPageScrollPosition(): Promise<PageScrollPosition>;
10510
10468
  /**
10469
+ * This method is **deprecated**.
10470
+ *
10471
+ *
10511
10472
  * Set the current geo location
10512
10473
  *
10513
10474
  *
@@ -10517,11 +10478,12 @@ declare namespace CodeceptJS {
10517
10478
  * ```
10518
10479
  * @param latitude - to set.
10519
10480
  * @param longitude - to set
10520
- * @param [altitude = null] - (optional, null by default) to set
10521
- * ⚠️ returns a _promise_ which is synchronized internally by recorder
10481
+ * @param [altitude] - (optional, null by default) to set
10522
10482
  */
10523
10483
  setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<any>;
10524
10484
  /**
10485
+ * This method is **deprecated**.
10486
+ *
10525
10487
  * Return the current geo location
10526
10488
  * Resumes test execution, so **should be used inside async function with `await`** operator.
10527
10489
  *