codeceptjs 3.3.0-beta.5 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/README.md +6 -1
  3. package/docs/api.md +45 -30
  4. package/docs/bdd.md +1 -0
  5. package/docs/best.md +1 -1
  6. package/docs/build/ApiDataFactory.js +4 -3
  7. package/docs/build/Appium.js +53 -48
  8. package/docs/build/GraphQL.js +4 -2
  9. package/docs/build/GraphQLDataFactory.js +3 -3
  10. package/docs/build/JSONResponse.js +1 -1
  11. package/docs/build/Nightmare.js +101 -72
  12. package/docs/build/Playwright.js +166 -113
  13. package/docs/build/Protractor.js +72 -34
  14. package/docs/build/Puppeteer.js +143 -100
  15. package/docs/build/REST.js +5 -2
  16. package/docs/build/TestCafe.js +97 -66
  17. package/docs/build/WebDriver.js +183 -135
  18. package/docs/changelog.md +99 -0
  19. package/docs/custom-helpers.md +1 -1
  20. package/docs/data.md +2 -2
  21. package/docs/email.md +5 -0
  22. package/docs/helpers/ApiDataFactory.md +7 -3
  23. package/docs/helpers/Appium.md +217 -175
  24. package/docs/helpers/GraphQL.md +6 -0
  25. package/docs/helpers/GraphQLDataFactory.md +3 -3
  26. package/docs/helpers/JSONResponse.md +1 -1
  27. package/docs/helpers/MockRequest.md +8 -6
  28. package/docs/helpers/Nightmare.md +98 -45
  29. package/docs/helpers/Playwright.md +151 -59
  30. package/docs/helpers/Puppeteer.md +103 -26
  31. package/docs/helpers/REST.md +1 -1
  32. package/docs/helpers/TestCafe.md +77 -22
  33. package/docs/helpers/WebDriver.md +150 -62
  34. package/docs/index.md +1 -1
  35. package/docs/locators.md +1 -1
  36. package/docs/videos.md +2 -2
  37. package/docs/webapi/amOnPage.mustache +2 -1
  38. package/docs/webapi/appendField.mustache +2 -1
  39. package/docs/webapi/attachFile.mustache +2 -1
  40. package/docs/webapi/checkOption.mustache +2 -1
  41. package/docs/webapi/clearCookie.mustache +2 -1
  42. package/docs/webapi/clearField.mustache +1 -0
  43. package/docs/webapi/click.mustache +2 -1
  44. package/docs/webapi/clickLink.mustache +2 -1
  45. package/docs/webapi/closeCurrentTab.mustache +6 -4
  46. package/docs/webapi/closeOtherTabs.mustache +6 -4
  47. package/docs/webapi/dontSee.mustache +1 -0
  48. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
  49. package/docs/webapi/dontSeeCookie.mustache +2 -1
  50. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
  51. package/docs/webapi/dontSeeElement.mustache +2 -1
  52. package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
  53. package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
  54. package/docs/webapi/dontSeeInField.mustache +2 -1
  55. package/docs/webapi/dontSeeInSource.mustache +1 -0
  56. package/docs/webapi/dontSeeInTitle.mustache +2 -1
  57. package/docs/webapi/doubleClick.mustache +1 -0
  58. package/docs/webapi/downloadFile.mustache +2 -1
  59. package/docs/webapi/dragAndDrop.mustache +1 -0
  60. package/docs/webapi/dragSlider.mustache +2 -1
  61. package/docs/webapi/executeAsyncScript.mustache +1 -1
  62. package/docs/webapi/executeScript.mustache +1 -1
  63. package/docs/webapi/fillField.mustache +1 -0
  64. package/docs/webapi/forceClick.mustache +1 -0
  65. package/docs/webapi/forceRightClick.mustache +1 -0
  66. package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
  67. package/docs/webapi/moveCursorTo.mustache +1 -0
  68. package/docs/webapi/openNewTab.mustache +6 -4
  69. package/docs/webapi/pressKey.mustache +2 -1
  70. package/docs/webapi/pressKeyDown.mustache +1 -0
  71. package/docs/webapi/pressKeyUp.mustache +1 -0
  72. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
  73. package/docs/webapi/refreshPage.mustache +1 -0
  74. package/docs/webapi/resizeWindow.mustache +2 -1
  75. package/docs/webapi/rightClick.mustache +1 -0
  76. package/docs/webapi/saveElementScreenshot.mustache +1 -0
  77. package/docs/webapi/saveScreenshot.mustache +2 -1
  78. package/docs/webapi/say.mustache +2 -1
  79. package/docs/webapi/scrollIntoView.mustache +1 -0
  80. package/docs/webapi/scrollPageToBottom.mustache +1 -0
  81. package/docs/webapi/scrollPageToTop.mustache +1 -0
  82. package/docs/webapi/scrollTo.mustache +2 -1
  83. package/docs/webapi/see.mustache +2 -1
  84. package/docs/webapi/seeAttributesOnElements.mustache +2 -1
  85. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
  86. package/docs/webapi/seeCookie.mustache +1 -0
  87. package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
  88. package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
  89. package/docs/webapi/seeElement.mustache +2 -1
  90. package/docs/webapi/seeElementInDOM.mustache +1 -0
  91. package/docs/webapi/seeInCurrentUrl.mustache +2 -1
  92. package/docs/webapi/seeInField.mustache +1 -0
  93. package/docs/webapi/seeInPopup.mustache +1 -0
  94. package/docs/webapi/seeInSource.mustache +2 -1
  95. package/docs/webapi/seeInTitle.mustache +2 -1
  96. package/docs/webapi/seeNumberOfElements.mustache +1 -0
  97. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
  98. package/docs/webapi/seeTextEquals.mustache +2 -1
  99. package/docs/webapi/seeTitleEquals.mustache +6 -5
  100. package/docs/webapi/selectOption.mustache +1 -0
  101. package/docs/webapi/setCookie.mustache +1 -0
  102. package/docs/webapi/setGeoLocation.mustache +1 -0
  103. package/docs/webapi/switchTo.mustache +2 -1
  104. package/docs/webapi/switchToNextTab.mustache +8 -7
  105. package/docs/webapi/switchToPreviousTab.mustache +8 -7
  106. package/docs/webapi/type.mustache +1 -0
  107. package/docs/webapi/uncheckOption.mustache +2 -1
  108. package/docs/webapi/wait.mustache +2 -1
  109. package/docs/webapi/waitForClickable.mustache +2 -1
  110. package/docs/webapi/waitForDetached.mustache +2 -1
  111. package/docs/webapi/waitForElement.mustache +2 -1
  112. package/docs/webapi/waitForEnabled.mustache +2 -1
  113. package/docs/webapi/waitForFunction.mustache +1 -0
  114. package/docs/webapi/waitForInvisible.mustache +2 -1
  115. package/docs/webapi/waitForText.mustache +2 -1
  116. package/docs/webapi/waitForValue.mustache +1 -0
  117. package/docs/webapi/waitForVisible.mustache +1 -0
  118. package/docs/webapi/waitInUrl.mustache +2 -1
  119. package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
  120. package/docs/webapi/waitToHide.mustache +2 -1
  121. package/docs/webapi/waitUrlEquals.mustache +2 -1
  122. package/lib/command/definitions.js +9 -0
  123. package/lib/command/run.js +2 -2
  124. package/lib/command/workers/runTests.js +40 -0
  125. package/lib/helper/ApiDataFactory.js +4 -3
  126. package/lib/helper/Appium.js +2 -7
  127. package/lib/helper/GraphQL.js +4 -2
  128. package/lib/helper/GraphQLDataFactory.js +3 -3
  129. package/lib/helper/JSONResponse.js +1 -1
  130. package/lib/helper/Playwright.js +28 -17
  131. package/lib/helper/REST.js +5 -2
  132. package/lib/helper/WebDriver.js +4 -0
  133. package/lib/interfaces/bdd.js +5 -0
  134. package/lib/listener/steps.js +1 -0
  135. package/lib/plugin/fakerTransform.js +1 -1
  136. package/lib/plugin/stepByStepReport.js +8 -6
  137. package/lib/workers.js +12 -0
  138. package/package.json +3 -3
  139. package/typings/types.d.ts +578 -109
@@ -32,7 +32,7 @@ declare namespace CodeceptJS {
32
32
  * Install [Rosie](https://github.com/rosiejs/rosie) and [Faker](https://www.npmjs.com/package/faker) libraries.
33
33
  *
34
34
  * ```sh
35
- * npm i rosie faker --save-dev
35
+ * npm i rosie @faker-js/faker --save-dev
36
36
  * ```
37
37
  *
38
38
  * Create a factory file for a resource.
@@ -42,8 +42,8 @@ declare namespace CodeceptJS {
42
42
  * ```js
43
43
  * // tests/factories/posts.js
44
44
  *
45
- * var Factory = require('rosie').Factory;
46
- * var faker = require('faker');
45
+ * const Factory = require('rosie').Factory;
46
+ * const faker = require('@faker-js/faker');
47
47
  *
48
48
  * module.exports = new Factory()
49
49
  * // no need to set id, it will be set by REST API
@@ -193,7 +193,7 @@ declare namespace CodeceptJS {
193
193
  * @param params - predefined parameters
194
194
  * @param options - options for programmatically generate the attributes
195
195
  */
196
- have(factory: any, params: any, options: any): void;
196
+ have(factory: any, params: any, options: any): Promise<any>;
197
197
  /**
198
198
  * Generates bunch of records and saves multiple API requests to store them.
199
199
  *
@@ -223,7 +223,7 @@ declare namespace CodeceptJS {
223
223
  /**
224
224
  * Appium Special Methods for Mobile only
225
225
  */
226
- class Appium {
226
+ class Appium extends WebDriver {
227
227
  /**
228
228
  * Execute code only on iOS
229
229
  *
@@ -255,7 +255,7 @@ declare namespace CodeceptJS {
255
255
  * });
256
256
  * ```
257
257
  */
258
- runOnIOS(caps: any, fn: any): Promise<any>;
258
+ runOnIOS(caps: any, fn: any): void;
259
259
  /**
260
260
  * Execute code only on Android
261
261
  *
@@ -287,7 +287,7 @@ declare namespace CodeceptJS {
287
287
  * });
288
288
  * ```
289
289
  */
290
- runOnAndroid(caps: any, fn: any): Promise<any>;
290
+ runOnAndroid(caps: any, fn: any): void;
291
291
  /**
292
292
  * Check if an app is installed.
293
293
  *
@@ -376,9 +376,10 @@ declare namespace CodeceptJS {
376
376
  * I.setOrientation('LANDSCAPE')
377
377
  * ```
378
378
  * @param orientation - LANDSCAPE or PORTRAIT
379
- * @returns Appium: support Android and iOS
379
+ *
380
+ * Appium: support Android and iOS
380
381
  */
381
- setOrientation(orientation: 'LANDSCAPE' | 'PORTRAIT'): Promise<any>;
382
+ setOrientation(orientation: 'LANDSCAPE' | 'PORTRAIT'): void;
382
383
  /**
383
384
  * Get list of all available contexts
384
385
  *
@@ -464,7 +465,7 @@ declare namespace CodeceptJS {
464
465
  * I.switchToNative('SOME_OTHER_CONTEXT');
465
466
  * ```
466
467
  */
467
- switchToNative(context: any): Promise<void>;
468
+ switchToNative(context?: any): Promise<void>;
468
469
  /**
469
470
  * Start an arbitrary Android activity during a session.
470
471
  *
@@ -499,9 +500,10 @@ declare namespace CodeceptJS {
499
500
  * I.setSettings({cyberdelia: 'open'});
500
501
  * ```
501
502
  * @param settings - object
502
- * @returns Appium: support Android and iOS
503
+ *
504
+ * Appium: support Android and iOS
503
505
  */
504
- setSettings(settings: any): Promise<any>;
506
+ setSettings(settings: any): void;
505
507
  /**
506
508
  * Hide the keyboard.
507
509
  *
@@ -738,6 +740,7 @@ declare namespace CodeceptJS {
738
740
  * ```
739
741
  * @param field - located by label|name|CSS|XPath|strict locator
740
742
  * @param value - text value to append.
743
+ * [!] returns a _promise_ which is synchronized internally by recorder
741
744
  */
742
745
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
743
746
  /**
@@ -753,6 +756,7 @@ declare namespace CodeceptJS {
753
756
  * ```
754
757
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
755
758
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
759
+ * [!] returns a _promise_ which is synchronized internally by recorder
756
760
  */
757
761
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
758
762
  /**
@@ -779,8 +783,9 @@ declare namespace CodeceptJS {
779
783
  * ```
780
784
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
781
785
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
786
+ * [!] returns a _promise_ which is synchronized internally by recorder
782
787
  */
783
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
788
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
784
789
  /**
785
790
  * Verifies that the specified checkbox is not checked.
786
791
  *
@@ -790,6 +795,7 @@ declare namespace CodeceptJS {
790
795
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
791
796
  * ```
792
797
  * @param field - located by label|name|CSS|XPath|strict locator.
798
+ * [!] returns a _promise_ which is synchronized internally by recorder
793
799
  */
794
800
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
795
801
  /**
@@ -799,6 +805,7 @@ declare namespace CodeceptJS {
799
805
  * I.dontSeeElement('.modal'); // modal is not shown
800
806
  * ```
801
807
  * @param locator - located by CSS|XPath|Strict locator.
808
+ * [!] returns a _promise_ which is synchronized internally by recorder
802
809
  */
803
810
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
804
811
  /**
@@ -811,6 +818,7 @@ declare namespace CodeceptJS {
811
818
  * ```
812
819
  * @param field - located by label|name|CSS|XPath|strict locator.
813
820
  * @param value - value to check.
821
+ * [!] returns a _promise_ which is synchronized internally by recorder
814
822
  */
815
823
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
816
824
  /**
@@ -823,6 +831,7 @@ declare namespace CodeceptJS {
823
831
  * ```
824
832
  * @param text - which is not present.
825
833
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
834
+ * [!] returns a _promise_ which is synchronized internally by recorder
826
835
  */
827
836
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
828
837
  /**
@@ -841,6 +850,7 @@ declare namespace CodeceptJS {
841
850
  * ```
842
851
  * @param field - located by label|name|CSS|XPath|strict locator.
843
852
  * @param value - text value to fill.
853
+ * [!] returns a _promise_ which is synchronized internally by recorder
844
854
  */
845
855
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
846
856
  /**
@@ -948,7 +958,7 @@ declare namespace CodeceptJS {
948
958
  * ```
949
959
  * @param locator - located by CSS|XPath|strict locator.
950
960
  * @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
951
- *
961
+ * [!] returns a _promise_ which is synchronized internally by recorder
952
962
  *
953
963
  * Supported only for web testing
954
964
  */
@@ -962,6 +972,7 @@ declare namespace CodeceptJS {
962
972
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
963
973
  * ```
964
974
  * @param field - located by label|name|CSS|XPath|strict locator.
975
+ * [!] returns a _promise_ which is synchronized internally by recorder
965
976
  */
966
977
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
967
978
  /**
@@ -972,6 +983,7 @@ declare namespace CodeceptJS {
972
983
  * I.seeElement('#modal');
973
984
  * ```
974
985
  * @param locator - located by CSS|XPath|strict locator.
986
+ * [!] returns a _promise_ which is synchronized internally by recorder
975
987
  */
976
988
  seeElement(locator: CodeceptJS.LocatorOrString): void;
977
989
  /**
@@ -986,6 +998,7 @@ declare namespace CodeceptJS {
986
998
  * ```
987
999
  * @param field - located by label|name|CSS|XPath|strict locator.
988
1000
  * @param value - value to check.
1001
+ * [!] returns a _promise_ which is synchronized internally by recorder
989
1002
  */
990
1003
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
991
1004
  /**
@@ -999,6 +1012,7 @@ declare namespace CodeceptJS {
999
1012
  * ```
1000
1013
  * @param text - expected on page.
1001
1014
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1015
+ * [!] returns a _promise_ which is synchronized internally by recorder
1002
1016
  */
1003
1017
  see(text: string, context?: CodeceptJS.LocatorOrString): void;
1004
1018
  /**
@@ -1022,7 +1036,7 @@ declare namespace CodeceptJS {
1022
1036
  * ```
1023
1037
  * @param select - field located by label|name|CSS|XPath|strict locator.
1024
1038
  * @param option - visible text or value of option.
1025
- *
1039
+ * [!] returns a _promise_ which is synchronized internally by recorder
1026
1040
  *
1027
1041
  * Supported only for web testing
1028
1042
  */
@@ -1037,6 +1051,7 @@ declare namespace CodeceptJS {
1037
1051
  * ```
1038
1052
  * @param locator - element located by CSS|XPath|strict locator.
1039
1053
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
1054
+ * [!] returns a _promise_ which is synchronized internally by recorder
1040
1055
  */
1041
1056
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1042
1057
  /**
@@ -1048,6 +1063,7 @@ declare namespace CodeceptJS {
1048
1063
  * ```
1049
1064
  * @param locator - element located by CSS|XPath|strict locator.
1050
1065
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1066
+ * [!] returns a _promise_ which is synchronized internally by recorder
1051
1067
  */
1052
1068
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1053
1069
  /**
@@ -1059,6 +1075,7 @@ declare namespace CodeceptJS {
1059
1075
  * ```
1060
1076
  * @param locator - element located by CSS|XPath|strict locator.
1061
1077
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1078
+ * [!] returns a _promise_ which is synchronized internally by recorder
1062
1079
  */
1063
1080
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
1064
1081
  /**
@@ -1073,6 +1090,7 @@ declare namespace CodeceptJS {
1073
1090
  * @param text - to wait for.
1074
1091
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
1075
1092
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
1093
+ * [!] returns a _promise_ which is synchronized internally by recorder
1076
1094
  */
1077
1095
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
1078
1096
  }
@@ -1210,8 +1228,9 @@ declare namespace CodeceptJS {
1210
1228
  _executeQuery(request: any): void;
1211
1229
  /**
1212
1230
  * Prepares request for axios call
1231
+ * @returns graphQLRequest
1213
1232
  */
1214
- _prepareGraphQLRequest(operation: any, headers: any): void;
1233
+ _prepareGraphQLRequest(operation: any, headers: any): any;
1215
1234
  /**
1216
1235
  * Send query to GraphQL endpoint over http.
1217
1236
  * Returns a response as a promise.
@@ -1228,8 +1247,9 @@ declare namespace CodeceptJS {
1228
1247
  * ```
1229
1248
  * @param variables - that may go along with the query
1230
1249
  * @param options - are additional query options
1250
+ * @returns Promise<any>
1231
1251
  */
1232
- sendQuery(query: string, variables: any, options: any, headers: any): void;
1252
+ sendQuery(query: string, variables: any, options: any, headers: any): any;
1233
1253
  /**
1234
1254
  * Send query to GraphQL endpoint over http
1235
1255
  *
@@ -1252,8 +1272,9 @@ declare namespace CodeceptJS {
1252
1272
  * ```
1253
1273
  * @param variables - that may go along with the mutation
1254
1274
  * @param options - are additional query options
1275
+ * @returns Promise<any>
1255
1276
  */
1256
- sendMutation(mutation: string, variables: any, options: any, headers: any): void;
1277
+ sendMutation(mutation: string, variables: any, options: any, headers: any): any;
1257
1278
  }
1258
1279
  /**
1259
1280
  * Helper for managing remote data using GraphQL queries.
@@ -1288,7 +1309,7 @@ declare namespace CodeceptJS {
1288
1309
  * Install [Rosie](https://github.com/rosiejs/rosie) and [Faker](https://www.npmjs.com/package/faker) libraries.
1289
1310
  *
1290
1311
  * ```sh
1291
- * npm i rosie faker --save-dev
1312
+ * npm i rosie @faker-js/faker --save-dev
1292
1313
  * ```
1293
1314
  *
1294
1315
  * Create a factory file for a resource.
@@ -1298,8 +1319,8 @@ declare namespace CodeceptJS {
1298
1319
  * ```js
1299
1320
  * // tests/factories/users.js
1300
1321
  *
1301
- * var Factory = require('rosie').Factory;
1302
- * var faker = require('faker');
1322
+ * const Factory = require('rosie').Factory;
1323
+ * const faker = require('@faker-js/faker');
1303
1324
  *
1304
1325
  * // Used with a constructor function passed to Factory, so that the final build
1305
1326
  * // object matches the necessary pattern to be sent as the variables object.
@@ -1568,7 +1589,7 @@ declare namespace CodeceptJS {
1568
1589
  * Use it to perform custom checks of response data
1569
1590
  *
1570
1591
  * ```js
1571
- * I.seeResponseValidByCallback({ data, status, expect } => {
1592
+ * I.seeResponseValidByCallback(({ data, status, expect }) => {
1572
1593
  * expect(status).to.eql(200);
1573
1594
  * expect(data).keys.to.include(['user', 'company']);
1574
1595
  * });
@@ -1689,6 +1710,7 @@ declare namespace CodeceptJS {
1689
1710
  * ```
1690
1711
  * @param url - url path or global url.
1691
1712
  * @param headers - list of request headers can be passed
1713
+ * @returns automatically synchronized promise with recorder #!
1692
1714
  */
1693
1715
  amOnPage(url: string, headers: any): void;
1694
1716
  /**
@@ -1698,6 +1720,7 @@ declare namespace CodeceptJS {
1698
1720
  * I.seeInTitle('Home Page');
1699
1721
  * ```
1700
1722
  * @param text - text value to check.
1723
+ * [!] returns a _promise_ which is synchronized internally by recorder
1701
1724
  */
1702
1725
  seeInTitle(text: string): void;
1703
1726
  /**
@@ -1707,6 +1730,7 @@ declare namespace CodeceptJS {
1707
1730
  * I.dontSeeInTitle('Error');
1708
1731
  * ```
1709
1732
  * @param text - value to check.
1733
+ * [!] returns a _promise_ which is synchronized internally by recorder
1710
1734
  */
1711
1735
  dontSeeInTitle(text: string): void;
1712
1736
  /**
@@ -1737,11 +1761,13 @@ declare namespace CodeceptJS {
1737
1761
  * I.seeInCurrentUrl('/register'); // we are on registration page
1738
1762
  * ```
1739
1763
  * @param url - a fragment to check
1764
+ * [!] returns a _promise_ which is synchronized internally by recorder
1740
1765
  */
1741
1766
  seeInCurrentUrl(url: string): void;
1742
1767
  /**
1743
1768
  * Checks that current url does not contain a provided fragment.
1744
1769
  * @param url - value to check.
1770
+ * [!] returns a _promise_ which is synchronized internally by recorder
1745
1771
  */
1746
1772
  dontSeeInCurrentUrl(url: string): void;
1747
1773
  /**
@@ -1754,6 +1780,7 @@ declare namespace CodeceptJS {
1754
1780
  * I.seeCurrentUrlEquals('http://my.site.com/register');
1755
1781
  * ```
1756
1782
  * @param url - value to check.
1783
+ * [!] returns a _promise_ which is synchronized internally by recorder
1757
1784
  */
1758
1785
  seeCurrentUrlEquals(url: string): void;
1759
1786
  /**
@@ -1765,6 +1792,7 @@ declare namespace CodeceptJS {
1765
1792
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
1766
1793
  * ```
1767
1794
  * @param url - value to check.
1795
+ * [!] returns a _promise_ which is synchronized internally by recorder
1768
1796
  */
1769
1797
  dontSeeCurrentUrlEquals(url: string): void;
1770
1798
  /**
@@ -1778,6 +1806,7 @@ declare namespace CodeceptJS {
1778
1806
  * ```
1779
1807
  * @param text - expected on page.
1780
1808
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
1809
+ * [!] returns a _promise_ which is synchronized internally by recorder
1781
1810
  */
1782
1811
  see(text: string, context?: CodeceptJS.LocatorOrString): void;
1783
1812
  /**
@@ -1790,6 +1819,7 @@ declare namespace CodeceptJS {
1790
1819
  * ```
1791
1820
  * @param text - which is not present.
1792
1821
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
1822
+ * [!] returns a _promise_ which is synchronized internally by recorder
1793
1823
  */
1794
1824
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
1795
1825
  /**
@@ -1800,6 +1830,7 @@ declare namespace CodeceptJS {
1800
1830
  * I.seeElement('#modal');
1801
1831
  * ```
1802
1832
  * @param locator - located by CSS|XPath|strict locator.
1833
+ * [!] returns a _promise_ which is synchronized internally by recorder
1803
1834
  */
1804
1835
  seeElement(locator: CodeceptJS.LocatorOrString): void;
1805
1836
  /**
@@ -1809,6 +1840,7 @@ declare namespace CodeceptJS {
1809
1840
  * I.dontSeeElement('.modal'); // modal is not shown
1810
1841
  * ```
1811
1842
  * @param locator - located by CSS|XPath|Strict locator.
1843
+ * [!] returns a _promise_ which is synchronized internally by recorder
1812
1844
  */
1813
1845
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
1814
1846
  /**
@@ -1819,6 +1851,7 @@ declare namespace CodeceptJS {
1819
1851
  * I.seeElementInDOM('#modal');
1820
1852
  * ```
1821
1853
  * @param locator - element located by CSS|XPath|strict locator.
1854
+ * [!] returns a _promise_ which is synchronized internally by recorder
1822
1855
  */
1823
1856
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
1824
1857
  /**
@@ -1828,6 +1861,7 @@ declare namespace CodeceptJS {
1828
1861
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
1829
1862
  * ```
1830
1863
  * @param locator - located by CSS|XPath|Strict locator.
1864
+ * [!] returns a _promise_ which is synchronized internally by recorder
1831
1865
  */
1832
1866
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
1833
1867
  /**
@@ -1837,6 +1871,7 @@ declare namespace CodeceptJS {
1837
1871
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
1838
1872
  * ```
1839
1873
  * @param text - value to check.
1874
+ * [!] returns a _promise_ which is synchronized internally by recorder
1840
1875
  */
1841
1876
  seeInSource(text: string): void;
1842
1877
  /**
@@ -1846,6 +1881,7 @@ declare namespace CodeceptJS {
1846
1881
  * I.dontSeeInSource('<!--'); // no comments in source
1847
1882
  * ```
1848
1883
  * @param value - to check.
1884
+ * [!] returns a _promise_ which is synchronized internally by recorder
1849
1885
  */
1850
1886
  dontSeeInSource(value: string): void;
1851
1887
  /**
@@ -1858,6 +1894,7 @@ declare namespace CodeceptJS {
1858
1894
  * ```
1859
1895
  * @param locator - element located by CSS|XPath|strict locator.
1860
1896
  * @param num - number of elements.
1897
+ * [!] returns a _promise_ which is synchronized internally by recorder
1861
1898
  */
1862
1899
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
1863
1900
  /**
@@ -1869,6 +1906,7 @@ declare namespace CodeceptJS {
1869
1906
  * ```
1870
1907
  * @param locator - element located by CSS|XPath|strict locator.
1871
1908
  * @param num - number of elements.
1909
+ * [!] returns a _promise_ which is synchronized internally by recorder
1872
1910
  */
1873
1911
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
1874
1912
  /**
@@ -1906,8 +1944,9 @@ declare namespace CodeceptJS {
1906
1944
  * ```
1907
1945
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1908
1946
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1947
+ * [!] returns a _promise_ which is synchronized internally by recorder
1909
1948
  */
1910
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
1949
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
1911
1950
  /**
1912
1951
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
1913
1952
  * Context can be specified as second parameter to narrow search.
@@ -1920,6 +1959,7 @@ declare namespace CodeceptJS {
1920
1959
  * ```
1921
1960
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
1922
1961
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
1962
+ * [!] returns a _promise_ which is synchronized internally by recorder
1923
1963
  */
1924
1964
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
1925
1965
  /**
@@ -1935,6 +1975,7 @@ declare namespace CodeceptJS {
1935
1975
  * ```
1936
1976
  * @param locator - clickable element located by CSS|XPath|strict locator.
1937
1977
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
1978
+ * [!] returns a _promise_ which is synchronized internally by recorder
1938
1979
  */
1939
1980
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
1940
1981
  /**
@@ -1948,6 +1989,7 @@ declare namespace CodeceptJS {
1948
1989
  * @param locator - located by CSS|XPath|strict locator.
1949
1990
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
1950
1991
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
1992
+ * [!] returns a _promise_ which is synchronized internally by recorder
1951
1993
  */
1952
1994
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
1953
1995
  /**
@@ -1975,9 +2017,12 @@ declare namespace CodeceptJS {
1975
2017
  * ```
1976
2018
  * @param fn - function to be executed in browser context.
1977
2019
  * @param args - to be passed to function.
1978
- * @returns Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
2020
+ * [!] returns a _promise_ which is synchronized internally by recorder
2021
+ *
2022
+ *
2023
+ * Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
1979
2024
  */
1980
- executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
2025
+ executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
1981
2026
  /**
1982
2027
  * Executes async script on page.
1983
2028
  * Provided function should execute a passed callback (as first argument) to signal it is finished.
@@ -2001,15 +2046,19 @@ declare namespace CodeceptJS {
2001
2046
  * ```
2002
2047
  * @param fn - function to be executed in browser context.
2003
2048
  * @param args - to be passed to function.
2004
- * @returns Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
2049
+ * [!] returns a _promise_ which is synchronized internally by recorder
2050
+ *
2051
+ *
2052
+ * Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
2005
2053
  * Unlike NightmareJS implementation calling `done` will return its first argument.
2006
2054
  */
2007
- executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
2055
+ executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
2008
2056
  /**
2009
2057
  * Resize the current window to provided width and height.
2010
2058
  * First parameter can be set to `maximize`.
2011
2059
  * @param width - width in pixels or `maximize`.
2012
2060
  * @param height - height in pixels.
2061
+ * [!] returns a _promise_ which is synchronized internally by recorder
2013
2062
  */
2014
2063
  resizeWindow(width: number, height: number): void;
2015
2064
  /**
@@ -2025,6 +2074,7 @@ declare namespace CodeceptJS {
2025
2074
  * ```
2026
2075
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
2027
2076
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2077
+ * [!] returns a _promise_ which is synchronized internally by recorder
2028
2078
  */
2029
2079
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2030
2080
  /**
@@ -2040,6 +2090,7 @@ declare namespace CodeceptJS {
2040
2090
  * ```
2041
2091
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
2042
2092
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
2093
+ * [!] returns a _promise_ which is synchronized internally by recorder
2043
2094
  */
2044
2095
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
2045
2096
  /**
@@ -2058,6 +2109,7 @@ declare namespace CodeceptJS {
2058
2109
  * ```
2059
2110
  * @param field - located by label|name|CSS|XPath|strict locator.
2060
2111
  * @param value - text value to fill.
2112
+ * [!] returns a _promise_ which is synchronized internally by recorder
2061
2113
  */
2062
2114
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2063
2115
  /**
@@ -2069,6 +2121,7 @@ declare namespace CodeceptJS {
2069
2121
  * I.clearField('#email');
2070
2122
  * ```
2071
2123
  * @param editable - field located by label|name|CSS|XPath|strict locator.
2124
+ * [!] returns a _promise_ which is synchronized internally by recorder
2072
2125
  */
2073
2126
  clearField(editable: LocatorOrString): void;
2074
2127
  /**
@@ -2080,6 +2133,7 @@ declare namespace CodeceptJS {
2080
2133
  * ```
2081
2134
  * @param field - located by label|name|CSS|XPath|strict locator
2082
2135
  * @param value - text value to append.
2136
+ * [!] returns a _promise_ which is synchronized internally by recorder
2083
2137
  */
2084
2138
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
2085
2139
  /**
@@ -2094,6 +2148,7 @@ declare namespace CodeceptJS {
2094
2148
  * ```
2095
2149
  * @param field - located by label|name|CSS|XPath|strict locator.
2096
2150
  * @param value - value to check.
2151
+ * [!] returns a _promise_ which is synchronized internally by recorder
2097
2152
  */
2098
2153
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
2099
2154
  /**
@@ -2106,6 +2161,7 @@ declare namespace CodeceptJS {
2106
2161
  * ```
2107
2162
  * @param field - located by label|name|CSS|XPath|strict locator.
2108
2163
  * @param value - value to check.
2164
+ * [!] returns a _promise_ which is synchronized internally by recorder
2109
2165
  */
2110
2166
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
2111
2167
  /**
@@ -2133,6 +2189,7 @@ declare namespace CodeceptJS {
2133
2189
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
2134
2190
  * ```
2135
2191
  * @param field - located by label|name|CSS|XPath|strict locator.
2192
+ * [!] returns a _promise_ which is synchronized internally by recorder
2136
2193
  */
2137
2194
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
2138
2195
  /**
@@ -2144,6 +2201,7 @@ declare namespace CodeceptJS {
2144
2201
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
2145
2202
  * ```
2146
2203
  * @param field - located by label|name|CSS|XPath|strict locator.
2204
+ * [!] returns a _promise_ which is synchronized internally by recorder
2147
2205
  */
2148
2206
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
2149
2207
  /**
@@ -2157,6 +2215,7 @@ declare namespace CodeceptJS {
2157
2215
  * ```
2158
2216
  * @param locator - field located by label|name|CSS|XPath|strict locator.
2159
2217
  * @param pathToFile - local file path relative to codecept.json config file.
2218
+ * [!] returns a _promise_ which is synchronized internally by recorder
2160
2219
  *
2161
2220
  * 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))
2162
2221
  */
@@ -2289,6 +2348,7 @@ declare namespace CodeceptJS {
2289
2348
  * ```
2290
2349
  * @param select - field located by label|name|CSS|XPath|strict locator.
2291
2350
  * @param option - visible text or value of option.
2351
+ * [!] returns a _promise_ which is synchronized internally by recorder
2292
2352
  */
2293
2353
  selectOption(select: LocatorOrString, option: string | any[]): void;
2294
2354
  /**
@@ -2306,7 +2366,7 @@ declare namespace CodeceptJS {
2306
2366
  * ]);
2307
2367
  * ```
2308
2368
  * @param cookie - a cookie object or array of cookie objects.
2309
- *
2369
+ * [!] returns a _promise_ which is synchronized internally by recorder
2310
2370
  *
2311
2371
  * Wrapper for `.cookies.set(cookie)`.
2312
2372
  * [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
@@ -2319,6 +2379,7 @@ declare namespace CodeceptJS {
2319
2379
  * I.seeCookie('Auth');
2320
2380
  * ```
2321
2381
  * @param name - cookie name.
2382
+ * [!] returns a _promise_ which is synchronized internally by recorder
2322
2383
  */
2323
2384
  seeCookie(name: string): void;
2324
2385
  /**
@@ -2328,6 +2389,7 @@ declare namespace CodeceptJS {
2328
2389
  * I.dontSeeCookie('auth'); // no auth cookie
2329
2390
  * ```
2330
2391
  * @param name - cookie name.
2392
+ * [!] returns a _promise_ which is synchronized internally by recorder
2331
2393
  */
2332
2394
  dontSeeCookie(name: string): void;
2333
2395
  /**
@@ -2357,6 +2419,7 @@ declare namespace CodeceptJS {
2357
2419
  * I.clearCookie('test');
2358
2420
  * ```
2359
2421
  * @param [cookie = null] - (optional, `null` by default) cookie name
2422
+ * [!] returns a _promise_ which is synchronized internally by recorder
2360
2423
  */
2361
2424
  clearCookie(cookie?: string): void;
2362
2425
  /**
@@ -2375,6 +2438,7 @@ declare namespace CodeceptJS {
2375
2438
  * @param fn - to be executed in browser context.
2376
2439
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
2377
2440
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
2441
+ * [!] returns a _promise_ which is synchronized internally by recorder
2378
2442
  */
2379
2443
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
2380
2444
  /**
@@ -2384,6 +2448,7 @@ declare namespace CodeceptJS {
2384
2448
  * I.wait(2); // wait 2 secs
2385
2449
  * ```
2386
2450
  * @param sec - number of second to wait.
2451
+ * [!] returns a _promise_ which is synchronized internally by recorder
2387
2452
  */
2388
2453
  wait(sec: number): void;
2389
2454
  /**
@@ -2398,6 +2463,7 @@ declare namespace CodeceptJS {
2398
2463
  * @param text - to wait for.
2399
2464
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2400
2465
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
2466
+ * [!] returns a _promise_ which is synchronized internally by recorder
2401
2467
  */
2402
2468
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
2403
2469
  /**
@@ -2409,6 +2475,7 @@ declare namespace CodeceptJS {
2409
2475
  * ```
2410
2476
  * @param locator - element located by CSS|XPath|strict locator.
2411
2477
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2478
+ * [!] returns a _promise_ which is synchronized internally by recorder
2412
2479
  */
2413
2480
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2414
2481
  /**
@@ -2420,6 +2487,7 @@ declare namespace CodeceptJS {
2420
2487
  * ```
2421
2488
  * @param locator - element located by CSS|XPath|strict locator.
2422
2489
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2490
+ * [!] returns a _promise_ which is synchronized internally by recorder
2423
2491
  */
2424
2492
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2425
2493
  /**
@@ -2431,6 +2499,7 @@ declare namespace CodeceptJS {
2431
2499
  * ```
2432
2500
  * @param locator - element located by CSS|XPath|strict locator.
2433
2501
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2502
+ * [!] returns a _promise_ which is synchronized internally by recorder
2434
2503
  */
2435
2504
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2436
2505
  /**
@@ -2443,6 +2512,7 @@ declare namespace CodeceptJS {
2443
2512
  * ```
2444
2513
  * @param locator - element located by CSS|XPath|strict locator.
2445
2514
  * @param [sec] - (optional, `1` by default) time in seconds to wait
2515
+ * [!] returns a _promise_ which is synchronized internally by recorder
2446
2516
  */
2447
2517
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2448
2518
  /**
@@ -2454,6 +2524,7 @@ declare namespace CodeceptJS {
2454
2524
  * ```
2455
2525
  * @param locator - element located by CSS|XPath|strict locator.
2456
2526
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
2527
+ * [!] returns a _promise_ which is synchronized internally by recorder
2457
2528
  */
2458
2529
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
2459
2530
  /**
@@ -2462,6 +2533,7 @@ declare namespace CodeceptJS {
2462
2533
  * ```js
2463
2534
  * I.refreshPage();
2464
2535
  * ```
2536
+ * [!] returns a _promise_ which is synchronized internally by recorder
2465
2537
  */
2466
2538
  refreshPage(): void;
2467
2539
  /**
@@ -2477,6 +2549,7 @@ declare namespace CodeceptJS {
2477
2549
  * ```
2478
2550
  * @param locator - element located by CSS|XPath|strict locator.
2479
2551
  * @param fileName - file name to save.
2552
+ * [!] returns a _promise_ which is synchronized internally by recorder
2480
2553
  */
2481
2554
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
2482
2555
  /**
@@ -2513,6 +2586,7 @@ declare namespace CodeceptJS {
2513
2586
  * ```
2514
2587
  * @param fileName - file name to save.
2515
2588
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
2589
+ * [!] returns a _promise_ which is synchronized internally by recorder
2516
2590
  */
2517
2591
  saveScreenshot(fileName: string, fullPage?: boolean): void;
2518
2592
  /**
@@ -2526,6 +2600,7 @@ declare namespace CodeceptJS {
2526
2600
  * @param locator - located by CSS|XPath|strict locator.
2527
2601
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
2528
2602
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2603
+ * [!] returns a _promise_ which is synchronized internally by recorder
2529
2604
  */
2530
2605
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
2531
2606
  /**
@@ -2534,6 +2609,7 @@ declare namespace CodeceptJS {
2534
2609
  * ```js
2535
2610
  * I.scrollPageToTop();
2536
2611
  * ```
2612
+ * [!] returns a _promise_ which is synchronized internally by recorder
2537
2613
  */
2538
2614
  scrollPageToTop(): void;
2539
2615
  /**
@@ -2542,6 +2618,7 @@ declare namespace CodeceptJS {
2542
2618
  * ```js
2543
2619
  * I.scrollPageToBottom();
2544
2620
  * ```
2621
+ * [!] returns a _promise_ which is synchronized internally by recorder
2545
2622
  */
2546
2623
  scrollPageToBottom(): void;
2547
2624
  /**
@@ -2583,15 +2660,19 @@ declare namespace CodeceptJS {
2583
2660
  * * `url`: base url of website to be tested
2584
2661
  * * `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
2585
2662
  * * `show`: (optional, default: false) - show browser window.
2586
- * * `restart`: (optional, default: true) - restart browser between tests.
2663
+ * * `restart`: (optional, default: false) - restart strategy between tests. Possible values:
2664
+ * * 'context' or **false** - restarts [browser context](https://playwright.dev/docs/api/class-browsercontext) but keeps running browser. Recommended by Playwright team to keep tests isolated.
2665
+ * * 'browser' or **true** - closes browser and opens it again between tests.
2666
+ * * 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default before CodeceptJS 3.1
2667
+ * * `timeout`: (optional, default: 1000) - [timeout](https://playwright.dev/docs/api/class-page#page-set-default-timeout) in ms of all Playwright actions .
2587
2668
  * * `disableScreenshots`: (optional, default: false) - don't save screenshot on failure.
2588
2669
  * * `emulate`: (optional, default: {}) launch browser in device emulation mode.
2589
2670
  * * `video`: (optional, default: false) enables video recording for failed tests; videos are saved into `output/videos` folder
2590
2671
  * * `trace`: (optional, default: false) record [tracing information](https://playwright.dev/docs/trace-viewer) with screenshots and snapshots.
2591
2672
  * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
2592
2673
  * * `uniqueScreenshotNames`: (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites.
2593
- * * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
2594
- * * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to false.
2674
+ * * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to 'session'.
2675
+ * * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to 'session'.
2595
2676
  * * `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
2596
2677
  * * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions).
2597
2678
  * * `pressKeyDelay`: (optional, default: '10'). Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
@@ -2599,6 +2680,7 @@ declare namespace CodeceptJS {
2599
2680
  * * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
2600
2681
  * * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
2601
2682
  * * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
2683
+ * * `colorScheme`: (optional) default color scheme. Possible values: `dark` | `light` | `no-preference`.
2602
2684
  * * `userAgent`: (optional) user-agent string.
2603
2685
  * * `locale`: (optional) locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
2604
2686
  * * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
@@ -2719,7 +2801,7 @@ declare namespace CodeceptJS {
2719
2801
  * }
2720
2802
  * ```
2721
2803
  *
2722
- * #### Example #7: Launch test with a specifc user locale
2804
+ * #### Example #7: Launch test with a specific user locale
2723
2805
  *
2724
2806
  * ```js
2725
2807
  * {
@@ -2732,6 +2814,19 @@ declare namespace CodeceptJS {
2732
2814
  * }
2733
2815
  * ```
2734
2816
  *
2817
+ * * #### Example #8: Launch test with a specific color scheme
2818
+ *
2819
+ * ```js
2820
+ * {
2821
+ * helpers: {
2822
+ * Playwright : {
2823
+ * url: "http://localhost",
2824
+ * colorScheme: "dark",
2825
+ * }
2826
+ * }
2827
+ * }
2828
+ * ```
2829
+ *
2735
2830
  * Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
2736
2831
  *
2737
2832
  * ## Access From Helpers
@@ -2767,7 +2862,7 @@ declare namespace CodeceptJS {
2767
2862
  * });
2768
2863
  * ```
2769
2864
  * @param description - used to show in logs.
2770
- * @param fn - async function that executed with Playwright helper as argument
2865
+ * @param fn - async function that executed with Playwright helper as argumen
2771
2866
  */
2772
2867
  usePlaywrightTo(description: string, fn: (...params: any[]) => any): void;
2773
2868
  /**
@@ -2810,6 +2905,7 @@ declare namespace CodeceptJS {
2810
2905
  * I.seeInPopup('Popup text');
2811
2906
  * ```
2812
2907
  * @param text - value to check.
2908
+ * [!] returns a _promise_ which is synchronized internally by recorder
2813
2909
  */
2814
2910
  seeInPopup(text: string): void;
2815
2911
  /**
@@ -2843,6 +2939,7 @@ declare namespace CodeceptJS {
2843
2939
  * I.amOnPage('/login'); // opens a login page
2844
2940
  * ```
2845
2941
  * @param url - url path or global url.
2942
+ * @returns automatically synchronized promise with recorder #!
2846
2943
  */
2847
2944
  amOnPage(url: string): void;
2848
2945
  /**
@@ -2850,6 +2947,7 @@ declare namespace CodeceptJS {
2850
2947
  * First parameter can be set to `maximize`.
2851
2948
  * @param width - width in pixels or `maximize`.
2852
2949
  * @param height - height in pixels.
2950
+ * [!] returns a _promise_ which is synchronized internally by recorder
2853
2951
  *
2854
2952
  * Unlike other drivers Playwright changes the size of a viewport, not the window!
2855
2953
  * Playwright does not control the window of a browser so it can't adjust its real size.
@@ -2886,6 +2984,7 @@ declare namespace CodeceptJS {
2886
2984
  * @param locator - located by CSS|XPath|strict locator.
2887
2985
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
2888
2986
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
2987
+ * [!] returns a _promise_ which is synchronized internally by recorder
2889
2988
  */
2890
2989
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
2891
2990
  /**
@@ -2896,14 +2995,24 @@ declare namespace CodeceptJS {
2896
2995
  * ```
2897
2996
  * @param srcElement - located by CSS|XPath|strict locator.
2898
2997
  * @param destElement - located by CSS|XPath|strict locator.
2998
+ * [!] returns a _promise_ which is synchronized internally by recorder
2999
+ * @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
3000
+ *
3001
+ * ```js
3002
+ * // specify coordinates for source position
3003
+ * I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
3004
+ * ```
3005
+ *
3006
+ * > By default option `force: true` is set
2899
3007
  */
2900
- dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
3008
+ dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): void;
2901
3009
  /**
2902
3010
  * Reload the current page.
2903
3011
  *
2904
3012
  * ```js
2905
3013
  * I.refreshPage();
2906
3014
  * ```
3015
+ * [!] returns a _promise_ which is synchronized internally by recorder
2907
3016
  */
2908
3017
  refreshPage(): void;
2909
3018
  /**
@@ -2912,6 +3021,7 @@ declare namespace CodeceptJS {
2912
3021
  * ```js
2913
3022
  * I.scrollPageToTop();
2914
3023
  * ```
3024
+ * [!] returns a _promise_ which is synchronized internally by recorder
2915
3025
  */
2916
3026
  scrollPageToTop(): void;
2917
3027
  /**
@@ -2920,6 +3030,7 @@ declare namespace CodeceptJS {
2920
3030
  * ```js
2921
3031
  * I.scrollPageToBottom();
2922
3032
  * ```
3033
+ * [!] returns a _promise_ which is synchronized internally by recorder
2923
3034
  */
2924
3035
  scrollPageToBottom(): void;
2925
3036
  /**
@@ -2933,6 +3044,7 @@ declare namespace CodeceptJS {
2933
3044
  * @param locator - located by CSS|XPath|strict locator.
2934
3045
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
2935
3046
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
3047
+ * [!] returns a _promise_ which is synchronized internally by recorder
2936
3048
  */
2937
3049
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
2938
3050
  /**
@@ -2942,6 +3054,7 @@ declare namespace CodeceptJS {
2942
3054
  * I.seeInTitle('Home Page');
2943
3055
  * ```
2944
3056
  * @param text - text value to check.
3057
+ * [!] returns a _promise_ which is synchronized internally by recorder
2945
3058
  */
2946
3059
  seeInTitle(text: string): void;
2947
3060
  /**
@@ -2957,10 +3070,11 @@ declare namespace CodeceptJS {
2957
3070
  /**
2958
3071
  * Checks that title is equal to provided one.
2959
3072
  *
2960
- * ```js
2961
- * I.seeTitleEquals('Test title.');
2962
- * ```
3073
+ * ```js
3074
+ * I.seeTitleEquals('Test title.');
3075
+ * ```
2963
3076
  * @param text - value to check.
3077
+ * [!] returns a _promise_ which is synchronized internally by recorder
2964
3078
  */
2965
3079
  seeTitleEquals(text: string): void;
2966
3080
  /**
@@ -2970,6 +3084,7 @@ declare namespace CodeceptJS {
2970
3084
  * I.dontSeeInTitle('Error');
2971
3085
  * ```
2972
3086
  * @param text - value to check.
3087
+ * [!] returns a _promise_ which is synchronized internally by recorder
2973
3088
  */
2974
3089
  dontSeeInTitle(text: string): void;
2975
3090
  /**
@@ -3083,6 +3198,7 @@ declare namespace CodeceptJS {
3083
3198
  * I.seeElement('#modal');
3084
3199
  * ```
3085
3200
  * @param locator - located by CSS|XPath|strict locator.
3201
+ * [!] returns a _promise_ which is synchronized internally by recorder
3086
3202
  */
3087
3203
  seeElement(locator: CodeceptJS.LocatorOrString): void;
3088
3204
  /**
@@ -3092,6 +3208,7 @@ declare namespace CodeceptJS {
3092
3208
  * I.dontSeeElement('.modal'); // modal is not shown
3093
3209
  * ```
3094
3210
  * @param locator - located by CSS|XPath|Strict locator.
3211
+ * [!] returns a _promise_ which is synchronized internally by recorder
3095
3212
  */
3096
3213
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
3097
3214
  /**
@@ -3102,6 +3219,7 @@ declare namespace CodeceptJS {
3102
3219
  * I.seeElementInDOM('#modal');
3103
3220
  * ```
3104
3221
  * @param locator - element located by CSS|XPath|strict locator.
3222
+ * [!] returns a _promise_ which is synchronized internally by recorder
3105
3223
  */
3106
3224
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
3107
3225
  /**
@@ -3111,6 +3229,7 @@ declare namespace CodeceptJS {
3111
3229
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
3112
3230
  * ```
3113
3231
  * @param locator - located by CSS|XPath|Strict locator.
3232
+ * [!] returns a _promise_ which is synchronized internally by recorder
3114
3233
  */
3115
3234
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
3116
3235
  /**
@@ -3128,7 +3247,7 @@ declare namespace CodeceptJS {
3128
3247
  * ```
3129
3248
  * @param [fileName = downloads] - set filename for downloaded file
3130
3249
  */
3131
- handleDownloads(fileName?: string): void;
3250
+ handleDownloads(fileName?: string): Promise<void>;
3132
3251
  /**
3133
3252
  * Perform a click on a link or a button, given by a locator.
3134
3253
  * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
@@ -3153,8 +3272,20 @@ declare namespace CodeceptJS {
3153
3272
  * ```
3154
3273
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3155
3274
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3275
+ * [!] returns a _promise_ which is synchronized internally by recorder
3276
+ * @param [opts] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
3277
+ *
3278
+ * Examples:
3279
+ *
3280
+ * ```js
3281
+ * // click on element at position
3282
+ * I.click('canvas', '.model', { position: { x: 20, y: 40 } })
3283
+ *
3284
+ * // make ctrl-click
3285
+ * I.click('.edit', null, { modifiers: ['Ctrl'] } )
3286
+ * ```
3156
3287
  */
3157
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3288
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, opts?: any): void;
3158
3289
  /**
3159
3290
  * Clicks link and waits for navigation (deprecated)
3160
3291
  */
@@ -3186,6 +3317,7 @@ declare namespace CodeceptJS {
3186
3317
  * ```
3187
3318
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3188
3319
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3320
+ * [!] returns a _promise_ which is synchronized internally by recorder
3189
3321
  */
3190
3322
  forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3191
3323
  /**
@@ -3200,6 +3332,7 @@ declare namespace CodeceptJS {
3200
3332
  * ```
3201
3333
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
3202
3334
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
3335
+ * [!] returns a _promise_ which is synchronized internally by recorder
3203
3336
  */
3204
3337
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3205
3338
  /**
@@ -3215,6 +3348,7 @@ declare namespace CodeceptJS {
3215
3348
  * ```
3216
3349
  * @param locator - clickable element located by CSS|XPath|strict locator.
3217
3350
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
3351
+ * [!] returns a _promise_ which is synchronized internally by recorder
3218
3352
  */
3219
3353
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3220
3354
  /**
@@ -3230,6 +3364,17 @@ declare namespace CodeceptJS {
3230
3364
  * ```
3231
3365
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
3232
3366
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
3367
+ * [!] returns a _promise_ which is synchronized internally by recorder
3368
+ *
3369
+ * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
3370
+ *
3371
+ * Examples:
3372
+ *
3373
+ * ```js
3374
+ * // click on element at position
3375
+ * I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3376
+ * ```
3377
+ * > ⚠️ To avoid flakiness, option `force: true` is set by default
3233
3378
  */
3234
3379
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3235
3380
  /**
@@ -3245,6 +3390,17 @@ declare namespace CodeceptJS {
3245
3390
  * ```
3246
3391
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
3247
3392
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
3393
+ * [!] returns a _promise_ which is synchronized internally by recorder
3394
+ *
3395
+ * [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
3396
+ *
3397
+ * Examples:
3398
+ *
3399
+ * ```js
3400
+ * // click on element at position
3401
+ * I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
3402
+ * ```
3403
+ * > ⚠️ To avoid flakiness, option `force: true` is set by default
3248
3404
  */
3249
3405
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
3250
3406
  /**
@@ -3256,6 +3412,7 @@ declare namespace CodeceptJS {
3256
3412
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
3257
3413
  * ```
3258
3414
  * @param field - located by label|name|CSS|XPath|strict locator.
3415
+ * [!] returns a _promise_ which is synchronized internally by recorder
3259
3416
  */
3260
3417
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
3261
3418
  /**
@@ -3267,6 +3424,7 @@ declare namespace CodeceptJS {
3267
3424
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
3268
3425
  * ```
3269
3426
  * @param field - located by label|name|CSS|XPath|strict locator.
3427
+ * [!] returns a _promise_ which is synchronized internally by recorder
3270
3428
  */
3271
3429
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
3272
3430
  /**
@@ -3280,6 +3438,7 @@ declare namespace CodeceptJS {
3280
3438
  * I.pressKeyUp('Control');
3281
3439
  * ```
3282
3440
  * @param key - name of key to press down.
3441
+ * [!] returns a _promise_ which is synchronized internally by recorder
3283
3442
  */
3284
3443
  pressKeyDown(key: string): void;
3285
3444
  /**
@@ -3293,6 +3452,7 @@ declare namespace CodeceptJS {
3293
3452
  * I.pressKeyUp('Control');
3294
3453
  * ```
3295
3454
  * @param key - name of key to release.
3455
+ * [!] returns a _promise_ which is synchronized internally by recorder
3296
3456
  */
3297
3457
  pressKeyUp(key: string): void;
3298
3458
  /**
@@ -3354,6 +3514,7 @@ declare namespace CodeceptJS {
3354
3514
  * - `'Space'`
3355
3515
  * - `'Tab'`
3356
3516
  * @param key - key or array of keys to press.
3517
+ * [!] returns a _promise_ which is synchronized internally by recorder
3357
3518
  *
3358
3519
  *
3359
3520
  * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
@@ -3376,6 +3537,7 @@ declare namespace CodeceptJS {
3376
3537
  * ```
3377
3538
  * @param key - or array of keys to type.
3378
3539
  * @param [delay = null] - (optional) delay in ms between key presses
3540
+ * [!] returns a _promise_ which is synchronized internally by recorder
3379
3541
  */
3380
3542
  type(key: string | string[], delay?: number): void;
3381
3543
  /**
@@ -3394,6 +3556,7 @@ declare namespace CodeceptJS {
3394
3556
  * ```
3395
3557
  * @param field - located by label|name|CSS|XPath|strict locator.
3396
3558
  * @param value - text value to fill.
3559
+ * [!] returns a _promise_ which is synchronized internally by recorder
3397
3560
  */
3398
3561
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3399
3562
  /**
@@ -3405,6 +3568,7 @@ declare namespace CodeceptJS {
3405
3568
  * I.clearField('#email');
3406
3569
  * ```
3407
3570
  * @param editable - field located by label|name|CSS|XPath|strict locator.
3571
+ * [!] returns a _promise_ which is synchronized internally by recorder
3408
3572
  */
3409
3573
  clearField(editable: LocatorOrString): void;
3410
3574
  /**
@@ -3416,6 +3580,7 @@ declare namespace CodeceptJS {
3416
3580
  * ```
3417
3581
  * @param field - located by label|name|CSS|XPath|strict locator
3418
3582
  * @param value - text value to append.
3583
+ * [!] returns a _promise_ which is synchronized internally by recorder
3419
3584
  */
3420
3585
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
3421
3586
  /**
@@ -3430,6 +3595,7 @@ declare namespace CodeceptJS {
3430
3595
  * ```
3431
3596
  * @param field - located by label|name|CSS|XPath|strict locator.
3432
3597
  * @param value - value to check.
3598
+ * [!] returns a _promise_ which is synchronized internally by recorder
3433
3599
  */
3434
3600
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
3435
3601
  /**
@@ -3442,6 +3608,7 @@ declare namespace CodeceptJS {
3442
3608
  * ```
3443
3609
  * @param field - located by label|name|CSS|XPath|strict locator.
3444
3610
  * @param value - value to check.
3611
+ * [!] returns a _promise_ which is synchronized internally by recorder
3445
3612
  */
3446
3613
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
3447
3614
  /**
@@ -3455,6 +3622,7 @@ declare namespace CodeceptJS {
3455
3622
  * ```
3456
3623
  * @param locator - field located by label|name|CSS|XPath|strict locator.
3457
3624
  * @param pathToFile - local file path relative to codecept.json config file.
3625
+ * [!] returns a _promise_ which is synchronized internally by recorder
3458
3626
  */
3459
3627
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
3460
3628
  /**
@@ -3478,6 +3646,7 @@ declare namespace CodeceptJS {
3478
3646
  * ```
3479
3647
  * @param select - field located by label|name|CSS|XPath|strict locator.
3480
3648
  * @param option - visible text or value of option.
3649
+ * [!] returns a _promise_ which is synchronized internally by recorder
3481
3650
  */
3482
3651
  selectOption(select: LocatorOrString, option: string | any[]): void;
3483
3652
  /**
@@ -3498,11 +3667,13 @@ declare namespace CodeceptJS {
3498
3667
  * I.seeInCurrentUrl('/register'); // we are on registration page
3499
3668
  * ```
3500
3669
  * @param url - a fragment to check
3670
+ * [!] returns a _promise_ which is synchronized internally by recorder
3501
3671
  */
3502
3672
  seeInCurrentUrl(url: string): void;
3503
3673
  /**
3504
3674
  * Checks that current url does not contain a provided fragment.
3505
3675
  * @param url - value to check.
3676
+ * [!] returns a _promise_ which is synchronized internally by recorder
3506
3677
  */
3507
3678
  dontSeeInCurrentUrl(url: string): void;
3508
3679
  /**
@@ -3515,6 +3686,7 @@ declare namespace CodeceptJS {
3515
3686
  * I.seeCurrentUrlEquals('http://my.site.com/register');
3516
3687
  * ```
3517
3688
  * @param url - value to check.
3689
+ * [!] returns a _promise_ which is synchronized internally by recorder
3518
3690
  */
3519
3691
  seeCurrentUrlEquals(url: string): void;
3520
3692
  /**
@@ -3526,6 +3698,7 @@ declare namespace CodeceptJS {
3526
3698
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
3527
3699
  * ```
3528
3700
  * @param url - value to check.
3701
+ * [!] returns a _promise_ which is synchronized internally by recorder
3529
3702
  */
3530
3703
  dontSeeCurrentUrlEquals(url: string): void;
3531
3704
  /**
@@ -3539,6 +3712,7 @@ declare namespace CodeceptJS {
3539
3712
  * ```
3540
3713
  * @param text - expected on page.
3541
3714
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
3715
+ * [!] returns a _promise_ which is synchronized internally by recorder
3542
3716
  */
3543
3717
  see(text: string, context?: CodeceptJS.LocatorOrString): void;
3544
3718
  /**
@@ -3549,6 +3723,7 @@ declare namespace CodeceptJS {
3549
3723
  * ```
3550
3724
  * @param text - element value to check.
3551
3725
  * @param [context = null] - element located by CSS|XPath|strict locator.
3726
+ * [!] returns a _promise_ which is synchronized internally by recorder
3552
3727
  */
3553
3728
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
3554
3729
  /**
@@ -3561,6 +3736,7 @@ declare namespace CodeceptJS {
3561
3736
  * ```
3562
3737
  * @param text - which is not present.
3563
3738
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
3739
+ * [!] returns a _promise_ which is synchronized internally by recorder
3564
3740
  */
3565
3741
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
3566
3742
  /**
@@ -3600,6 +3776,7 @@ declare namespace CodeceptJS {
3600
3776
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
3601
3777
  * ```
3602
3778
  * @param text - value to check.
3779
+ * [!] returns a _promise_ which is synchronized internally by recorder
3603
3780
  */
3604
3781
  seeInSource(text: string): void;
3605
3782
  /**
@@ -3609,6 +3786,7 @@ declare namespace CodeceptJS {
3609
3786
  * I.dontSeeInSource('<!--'); // no comments in source
3610
3787
  * ```
3611
3788
  * @param value - to check.
3789
+ * [!] returns a _promise_ which is synchronized internally by recorder
3612
3790
  */
3613
3791
  dontSeeInSource(value: string): void;
3614
3792
  /**
@@ -3621,6 +3799,7 @@ declare namespace CodeceptJS {
3621
3799
  * ```
3622
3800
  * @param locator - element located by CSS|XPath|strict locator.
3623
3801
  * @param num - number of elements.
3802
+ * [!] returns a _promise_ which is synchronized internally by recorder
3624
3803
  */
3625
3804
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
3626
3805
  /**
@@ -3632,6 +3811,7 @@ declare namespace CodeceptJS {
3632
3811
  * ```
3633
3812
  * @param locator - element located by CSS|XPath|strict locator.
3634
3813
  * @param num - number of elements.
3814
+ * [!] returns a _promise_ which is synchronized internally by recorder
3635
3815
  */
3636
3816
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
3637
3817
  /**
@@ -3649,6 +3829,7 @@ declare namespace CodeceptJS {
3649
3829
  * ]);
3650
3830
  * ```
3651
3831
  * @param cookie - a cookie object or array of cookie objects.
3832
+ * [!] returns a _promise_ which is synchronized internally by recorder
3652
3833
  */
3653
3834
  setCookie(cookie: Cookie | Cookie[]): void;
3654
3835
  /**
@@ -3658,6 +3839,7 @@ declare namespace CodeceptJS {
3658
3839
  * I.seeCookie('Auth');
3659
3840
  * ```
3660
3841
  * @param name - cookie name.
3842
+ * [!] returns a _promise_ which is synchronized internally by recorder
3661
3843
  */
3662
3844
  seeCookie(name: string): void;
3663
3845
  /**
@@ -3667,6 +3849,7 @@ declare namespace CodeceptJS {
3667
3849
  * I.dontSeeCookie('auth'); // no auth cookie
3668
3850
  * ```
3669
3851
  * @param name - cookie name.
3852
+ * [!] returns a _promise_ which is synchronized internally by recorder
3670
3853
  */
3671
3854
  dontSeeCookie(name: string): void;
3672
3855
  /**
@@ -3694,6 +3877,7 @@ declare namespace CodeceptJS {
3694
3877
  * I.clearCookie('test');
3695
3878
  * ```
3696
3879
  * @param [cookie = null] - (optional, `null` by default) cookie name
3880
+ * [!] returns a _promise_ which is synchronized internally by recorder
3697
3881
  */
3698
3882
  clearCookie(cookie?: string): void;
3699
3883
  /**
@@ -3718,7 +3902,7 @@ declare namespace CodeceptJS {
3718
3902
  * @param fn - function to be executed in browser context.
3719
3903
  * @param [arg] - optional argument to pass to the function
3720
3904
  */
3721
- executeScript(fn: string | ((...params: any[]) => any), arg?: any): Promise<any>;
3905
+ executeScript(fn: string | ((...params: any[]) => any), arg?: any): void;
3722
3906
  /**
3723
3907
  * Grab Locator if called within Context
3724
3908
  */
@@ -3825,6 +4009,7 @@ declare namespace CodeceptJS {
3825
4009
  * ```
3826
4010
  * @param locator - located by CSS|XPath|strict locator.
3827
4011
  * @param cssProperties - object with CSS properties and their values to check.
4012
+ * [!] returns a _promise_ which is synchronized internally by recorder
3828
4013
  */
3829
4014
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
3830
4015
  /**
@@ -3835,6 +4020,7 @@ declare namespace CodeceptJS {
3835
4020
  * ```
3836
4021
  * @param locator - located by CSS|XPath|strict locator.
3837
4022
  * @param attributes - attributes and their values to check.
4023
+ * [!] returns a _promise_ which is synchronized internally by recorder
3838
4024
  */
3839
4025
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
3840
4026
  /**
@@ -3847,6 +4033,7 @@ declare namespace CodeceptJS {
3847
4033
  * ```
3848
4034
  * @param locator - located by label|name|CSS|XPath|strict locator.
3849
4035
  * @param offsetX - position to drag.
4036
+ * [!] returns a _promise_ which is synchronized internally by recorder
3850
4037
  */
3851
4038
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
3852
4039
  /**
@@ -3883,6 +4070,7 @@ declare namespace CodeceptJS {
3883
4070
  * ```
3884
4071
  * @param locator - element located by CSS|XPath|strict locator.
3885
4072
  * @param fileName - file name to save.
4073
+ * [!] returns a _promise_ which is synchronized internally by recorder
3886
4074
  */
3887
4075
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
3888
4076
  /**
@@ -3896,6 +4084,7 @@ declare namespace CodeceptJS {
3896
4084
  * ```
3897
4085
  * @param fileName - file name to save.
3898
4086
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
4087
+ * [!] returns a _promise_ which is synchronized internally by recorder
3899
4088
  */
3900
4089
  saveScreenshot(fileName: string, fullPage?: boolean): void;
3901
4090
  /**
@@ -3922,6 +4111,7 @@ declare namespace CodeceptJS {
3922
4111
  * I.wait(2); // wait 2 secs
3923
4112
  * ```
3924
4113
  * @param sec - number of second to wait.
4114
+ * [!] returns a _promise_ which is synchronized internally by recorder
3925
4115
  */
3926
4116
  wait(sec: number): void;
3927
4117
  /**
@@ -3929,6 +4119,7 @@ declare namespace CodeceptJS {
3929
4119
  * Element can be located by CSS or XPath.
3930
4120
  * @param locator - element located by CSS|XPath|strict locator.
3931
4121
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
4122
+ * [!] returns a _promise_ which is synchronized internally by recorder
3932
4123
  */
3933
4124
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
3934
4125
  /**
@@ -3940,6 +4131,7 @@ declare namespace CodeceptJS {
3940
4131
  * @param field - input field.
3941
4132
  * @param value - expected value.
3942
4133
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4134
+ * [!] returns a _promise_ which is synchronized internally by recorder
3943
4135
  */
3944
4136
  waitForValue(field: LocatorOrString, value: string, sec?: number): void;
3945
4137
  /**
@@ -3951,6 +4143,7 @@ declare namespace CodeceptJS {
3951
4143
  * @param locator - element located by CSS|XPath|strict locator.
3952
4144
  * @param num - number of elements.
3953
4145
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4146
+ * [!] returns a _promise_ which is synchronized internally by recorder
3954
4147
  */
3955
4148
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
3956
4149
  /**
@@ -3963,6 +4156,7 @@ declare namespace CodeceptJS {
3963
4156
  * ```
3964
4157
  * @param locator - element located by CSS|XPath|strict locator.
3965
4158
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4159
+ * [!] returns a _promise_ which is synchronized internally by recorder
3966
4160
  */
3967
4161
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
3968
4162
  /**
@@ -3975,6 +4169,7 @@ declare namespace CodeceptJS {
3975
4169
  * ```
3976
4170
  * @param locator - element located by CSS|XPath|strict locator.
3977
4171
  * @param [sec] - (optional, `1` by default) time in seconds to wait
4172
+ * [!] returns a _promise_ which is synchronized internally by recorder
3978
4173
  */
3979
4174
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
3980
4175
  /**
@@ -3986,7 +4181,7 @@ declare namespace CodeceptJS {
3986
4181
  * ```
3987
4182
  * @param locator - element located by CSS|XPath|strict locator.
3988
4183
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
3989
- *
4184
+ * [!] returns a _promise_ which is synchronized internally by recorder
3990
4185
  *
3991
4186
  * This method accepts [React selectors](https://codecept.io/react).
3992
4187
  */
@@ -4000,6 +4195,7 @@ declare namespace CodeceptJS {
4000
4195
  * ```
4001
4196
  * @param locator - element located by CSS|XPath|strict locator.
4002
4197
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4198
+ * [!] returns a _promise_ which is synchronized internally by recorder
4003
4199
  */
4004
4200
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4005
4201
  /**
@@ -4011,6 +4207,7 @@ declare namespace CodeceptJS {
4011
4207
  * ```
4012
4208
  * @param locator - element located by CSS|XPath|strict locator.
4013
4209
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4210
+ * [!] returns a _promise_ which is synchronized internally by recorder
4014
4211
  */
4015
4212
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4016
4213
  /**
@@ -4021,6 +4218,7 @@ declare namespace CodeceptJS {
4021
4218
  * ```
4022
4219
  * @param urlPart - value to check.
4023
4220
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4221
+ * [!] returns a _promise_ which is synchronized internally by recorder
4024
4222
  */
4025
4223
  waitInUrl(urlPart: string, sec?: number): void;
4026
4224
  /**
@@ -4032,6 +4230,7 @@ declare namespace CodeceptJS {
4032
4230
  * ```
4033
4231
  * @param urlPart - value to check.
4034
4232
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4233
+ * [!] returns a _promise_ which is synchronized internally by recorder
4035
4234
  */
4036
4235
  waitUrlEquals(urlPart: string, sec?: number): void;
4037
4236
  /**
@@ -4046,6 +4245,7 @@ declare namespace CodeceptJS {
4046
4245
  * @param text - to wait for.
4047
4246
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4048
4247
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
4248
+ * [!] returns a _promise_ which is synchronized internally by recorder
4049
4249
  */
4050
4250
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
4051
4251
  /**
@@ -4076,6 +4276,7 @@ declare namespace CodeceptJS {
4076
4276
  * I.switchTo(); // switch back to main page
4077
4277
  * ```
4078
4278
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
4279
+ * [!] returns a _promise_ which is synchronized internally by recorder
4079
4280
  */
4080
4281
  switchTo(locator?: CodeceptJS.LocatorOrString): void;
4081
4282
  /**
@@ -4094,6 +4295,7 @@ declare namespace CodeceptJS {
4094
4295
  * @param fn - to be executed in browser context.
4095
4296
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
4096
4297
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
4298
+ * [!] returns a _promise_ which is synchronized internally by recorder
4097
4299
  */
4098
4300
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
4099
4301
  /**
@@ -4111,6 +4313,7 @@ declare namespace CodeceptJS {
4111
4313
  * ```
4112
4314
  * @param locator - element located by CSS|XPath|strict locator.
4113
4315
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
4316
+ * [!] returns a _promise_ which is synchronized internally by recorder
4114
4317
  */
4115
4318
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
4116
4319
  /**
@@ -4133,8 +4336,9 @@ declare namespace CodeceptJS {
4133
4336
  * loadEventEnd: 241
4134
4337
  * }
4135
4338
  * ```
4339
+ * @returns automatically synchronized promise through #recorder
4136
4340
  */
4137
- grabDataFromPerformanceTiming(): void;
4341
+ grabDataFromPerformanceTiming(): Promise<any>;
4138
4342
  /**
4139
4343
  * Grab the width, height, location of given locator.
4140
4344
  * Provide `width` or `height`as second param to get your desired prop.
@@ -4166,9 +4370,9 @@ declare namespace CodeceptJS {
4166
4370
  * ```
4167
4371
  * This method allows intercepting and mocking requests & responses. [Learn more about it](https://playwright.dev/docs/network#handle-requests)
4168
4372
  * @param [url] - URL, regex or pattern for to match URL
4169
- * @param [handler] - a function to process request
4373
+ * @param [handler] - a function to process reques
4170
4374
  */
4171
- mockRoute(url?: string, handler?: (...params: any[]) => any): void;
4375
+ mockRoute(url?: string | RegExp, handler?: (...params: any[]) => any): void;
4172
4376
  /**
4173
4377
  * Stops network mocking created by `mockRoute`.
4174
4378
  *
@@ -4178,9 +4382,9 @@ declare namespace CodeceptJS {
4178
4382
  * ```
4179
4383
  * If no handler is passed, all mock requests for the rote are disabled.
4180
4384
  * @param [url] - URL, regex or pattern for to match URL
4181
- * @param [handler] - a function to process request
4385
+ * @param [handler] - a function to process reques
4182
4386
  */
4183
- stopMockingRoute(url?: string, handler?: (...params: any[]) => any): void;
4387
+ stopMockingRoute(url?: string | RegExp, handler?: (...params: any[]) => any): void;
4184
4388
  }
4185
4389
  /**
4186
4390
  * This helper works the same as MockRequest helper. It has been included for backwards compatibility
@@ -4383,6 +4587,7 @@ declare namespace CodeceptJS {
4383
4587
  * I.amOnPage('/login'); // opens a login page
4384
4588
  * ```
4385
4589
  * @param url - url path or global url.
4590
+ * @returns automatically synchronized promise with recorder #!
4386
4591
  */
4387
4592
  amOnPage(url: string): void;
4388
4593
  /**
@@ -4409,8 +4614,9 @@ declare namespace CodeceptJS {
4409
4614
  * ```
4410
4615
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
4411
4616
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
4617
+ * [!] returns a _promise_ which is synchronized internally by recorder
4412
4618
  */
4413
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
4619
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
4414
4620
  /**
4415
4621
  * Performs a double-click on an element matched by link|button|label|CSS or XPath.
4416
4622
  * Context can be specified as second parameter to narrow search.
@@ -4423,6 +4629,7 @@ declare namespace CodeceptJS {
4423
4629
  * ```
4424
4630
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
4425
4631
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
4632
+ * [!] returns a _promise_ which is synchronized internally by recorder
4426
4633
  */
4427
4634
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
4428
4635
  /**
@@ -4438,6 +4645,7 @@ declare namespace CodeceptJS {
4438
4645
  * ```
4439
4646
  * @param locator - clickable element located by CSS|XPath|strict locator.
4440
4647
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
4648
+ * [!] returns a _promise_ which is synchronized internally by recorder
4441
4649
  */
4442
4650
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
4443
4651
  /**
@@ -4451,6 +4659,7 @@ declare namespace CodeceptJS {
4451
4659
  * @param locator - located by CSS|XPath|strict locator.
4452
4660
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
4453
4661
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
4662
+ * [!] returns a _promise_ which is synchronized internally by recorder
4454
4663
  */
4455
4664
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
4456
4665
  /**
@@ -4464,6 +4673,7 @@ declare namespace CodeceptJS {
4464
4673
  * ```
4465
4674
  * @param text - expected on page.
4466
4675
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
4676
+ * [!] returns a _promise_ which is synchronized internally by recorder
4467
4677
  */
4468
4678
  see(text: string, context?: CodeceptJS.LocatorOrString): void;
4469
4679
  /**
@@ -4474,6 +4684,7 @@ declare namespace CodeceptJS {
4474
4684
  * ```
4475
4685
  * @param text - element value to check.
4476
4686
  * @param [context = null] - element located by CSS|XPath|strict locator.
4687
+ * [!] returns a _promise_ which is synchronized internally by recorder
4477
4688
  */
4478
4689
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
4479
4690
  /**
@@ -4486,6 +4697,7 @@ declare namespace CodeceptJS {
4486
4697
  * ```
4487
4698
  * @param text - which is not present.
4488
4699
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
4700
+ * [!] returns a _promise_ which is synchronized internally by recorder
4489
4701
  */
4490
4702
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
4491
4703
  /**
@@ -4531,6 +4743,7 @@ declare namespace CodeceptJS {
4531
4743
  * ```
4532
4744
  * @param select - field located by label|name|CSS|XPath|strict locator.
4533
4745
  * @param option - visible text or value of option.
4746
+ * [!] returns a _promise_ which is synchronized internally by recorder
4534
4747
  */
4535
4748
  selectOption(select: LocatorOrString, option: string | any[]): void;
4536
4749
  /**
@@ -4549,6 +4762,7 @@ declare namespace CodeceptJS {
4549
4762
  * ```
4550
4763
  * @param field - located by label|name|CSS|XPath|strict locator.
4551
4764
  * @param value - text value to fill.
4765
+ * [!] returns a _promise_ which is synchronized internally by recorder
4552
4766
  */
4553
4767
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
4554
4768
  /**
@@ -4562,6 +4776,7 @@ declare namespace CodeceptJS {
4562
4776
  * I.pressKey(['Control','a']);
4563
4777
  * ```
4564
4778
  * @param key - key or array of keys to press.
4779
+ * [!] returns a _promise_ which is synchronized internally by recorder
4565
4780
  * {{ keys }}
4566
4781
  */
4567
4782
  pressKey(key: string | string[]): void;
@@ -4576,6 +4791,7 @@ declare namespace CodeceptJS {
4576
4791
  * ```
4577
4792
  * @param locator - field located by label|name|CSS|XPath|strict locator.
4578
4793
  * @param pathToFile - local file path relative to codecept.json config file.
4794
+ * [!] returns a _promise_ which is synchronized internally by recorder
4579
4795
  */
4580
4796
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
4581
4797
  /**
@@ -4590,6 +4806,7 @@ declare namespace CodeceptJS {
4590
4806
  * ```
4591
4807
  * @param field - located by label|name|CSS|XPath|strict locator.
4592
4808
  * @param value - value to check.
4809
+ * [!] returns a _promise_ which is synchronized internally by recorder
4593
4810
  */
4594
4811
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
4595
4812
  /**
@@ -4602,6 +4819,7 @@ declare namespace CodeceptJS {
4602
4819
  * ```
4603
4820
  * @param field - located by label|name|CSS|XPath|strict locator.
4604
4821
  * @param value - value to check.
4822
+ * [!] returns a _promise_ which is synchronized internally by recorder
4605
4823
  */
4606
4824
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
4607
4825
  /**
@@ -4613,6 +4831,7 @@ declare namespace CodeceptJS {
4613
4831
  * ```
4614
4832
  * @param field - located by label|name|CSS|XPath|strict locator
4615
4833
  * @param value - text value to append.
4834
+ * [!] returns a _promise_ which is synchronized internally by recorder
4616
4835
  */
4617
4836
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
4618
4837
  /**
@@ -4624,6 +4843,7 @@ declare namespace CodeceptJS {
4624
4843
  * I.clearField('#email');
4625
4844
  * ```
4626
4845
  * @param editable - field located by label|name|CSS|XPath|strict locator.
4846
+ * [!] returns a _promise_ which is synchronized internally by recorder
4627
4847
  */
4628
4848
  clearField(editable: LocatorOrString): void;
4629
4849
  /**
@@ -4639,6 +4859,7 @@ declare namespace CodeceptJS {
4639
4859
  * ```
4640
4860
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
4641
4861
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
4862
+ * [!] returns a _promise_ which is synchronized internally by recorder
4642
4863
  */
4643
4864
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
4644
4865
  /**
@@ -4654,6 +4875,7 @@ declare namespace CodeceptJS {
4654
4875
  * ```
4655
4876
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
4656
4877
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
4878
+ * [!] returns a _promise_ which is synchronized internally by recorder
4657
4879
  */
4658
4880
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
4659
4881
  /**
@@ -4665,6 +4887,7 @@ declare namespace CodeceptJS {
4665
4887
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
4666
4888
  * ```
4667
4889
  * @param field - located by label|name|CSS|XPath|strict locator.
4890
+ * [!] returns a _promise_ which is synchronized internally by recorder
4668
4891
  */
4669
4892
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
4670
4893
  /**
@@ -4676,6 +4899,7 @@ declare namespace CodeceptJS {
4676
4899
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
4677
4900
  * ```
4678
4901
  * @param field - located by label|name|CSS|XPath|strict locator.
4902
+ * [!] returns a _promise_ which is synchronized internally by recorder
4679
4903
  */
4680
4904
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
4681
4905
  /**
@@ -4804,15 +5028,17 @@ declare namespace CodeceptJS {
4804
5028
  * I.seeInTitle('Home Page');
4805
5029
  * ```
4806
5030
  * @param text - text value to check.
5031
+ * [!] returns a _promise_ which is synchronized internally by recorder
4807
5032
  */
4808
5033
  seeInTitle(text: string): void;
4809
5034
  /**
4810
5035
  * Checks that title is equal to provided one.
4811
5036
  *
4812
- * ```js
4813
- * I.seeTitleEquals('Test title.');
4814
- * ```
5037
+ * ```js
5038
+ * I.seeTitleEquals('Test title.');
5039
+ * ```
4815
5040
  * @param text - value to check.
5041
+ * [!] returns a _promise_ which is synchronized internally by recorder
4816
5042
  */
4817
5043
  seeTitleEquals(text: string): void;
4818
5044
  /**
@@ -4822,6 +5048,7 @@ declare namespace CodeceptJS {
4822
5048
  * I.dontSeeInTitle('Error');
4823
5049
  * ```
4824
5050
  * @param text - value to check.
5051
+ * [!] returns a _promise_ which is synchronized internally by recorder
4825
5052
  */
4826
5053
  dontSeeInTitle(text: string): void;
4827
5054
  /**
@@ -4842,6 +5069,7 @@ declare namespace CodeceptJS {
4842
5069
  * I.seeElement('#modal');
4843
5070
  * ```
4844
5071
  * @param locator - located by CSS|XPath|strict locator.
5072
+ * [!] returns a _promise_ which is synchronized internally by recorder
4845
5073
  */
4846
5074
  seeElement(locator: CodeceptJS.LocatorOrString): void;
4847
5075
  /**
@@ -4851,6 +5079,7 @@ declare namespace CodeceptJS {
4851
5079
  * I.dontSeeElement('.modal'); // modal is not shown
4852
5080
  * ```
4853
5081
  * @param locator - located by CSS|XPath|Strict locator.
5082
+ * [!] returns a _promise_ which is synchronized internally by recorder
4854
5083
  */
4855
5084
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
4856
5085
  /**
@@ -4861,6 +5090,7 @@ declare namespace CodeceptJS {
4861
5090
  * I.seeElementInDOM('#modal');
4862
5091
  * ```
4863
5092
  * @param locator - element located by CSS|XPath|strict locator.
5093
+ * [!] returns a _promise_ which is synchronized internally by recorder
4864
5094
  */
4865
5095
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
4866
5096
  /**
@@ -4870,6 +5100,7 @@ declare namespace CodeceptJS {
4870
5100
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
4871
5101
  * ```
4872
5102
  * @param locator - located by CSS|XPath|Strict locator.
5103
+ * [!] returns a _promise_ which is synchronized internally by recorder
4873
5104
  */
4874
5105
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
4875
5106
  /**
@@ -4879,6 +5110,7 @@ declare namespace CodeceptJS {
4879
5110
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
4880
5111
  * ```
4881
5112
  * @param text - value to check.
5113
+ * [!] returns a _promise_ which is synchronized internally by recorder
4882
5114
  */
4883
5115
  seeInSource(text: string): void;
4884
5116
  /**
@@ -4898,6 +5130,7 @@ declare namespace CodeceptJS {
4898
5130
  * I.dontSeeInSource('<!--'); // no comments in source
4899
5131
  * ```
4900
5132
  * @param value - to check.
5133
+ * [!] returns a _promise_ which is synchronized internally by recorder
4901
5134
  */
4902
5135
  dontSeeInSource(value: string): void;
4903
5136
  /**
@@ -4910,6 +5143,7 @@ declare namespace CodeceptJS {
4910
5143
  * ```
4911
5144
  * @param locator - element located by CSS|XPath|strict locator.
4912
5145
  * @param num - number of elements.
5146
+ * [!] returns a _promise_ which is synchronized internally by recorder
4913
5147
  */
4914
5148
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
4915
5149
  /**
@@ -4921,6 +5155,7 @@ declare namespace CodeceptJS {
4921
5155
  * ```
4922
5156
  * @param locator - element located by CSS|XPath|strict locator.
4923
5157
  * @param num - number of elements.
5158
+ * [!] returns a _promise_ which is synchronized internally by recorder
4924
5159
  */
4925
5160
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
4926
5161
  /**
@@ -4942,6 +5177,7 @@ declare namespace CodeceptJS {
4942
5177
  * ```
4943
5178
  * @param locator - located by CSS|XPath|strict locator.
4944
5179
  * @param cssProperties - object with CSS properties and their values to check.
5180
+ * [!] returns a _promise_ which is synchronized internally by recorder
4945
5181
  */
4946
5182
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
4947
5183
  /**
@@ -4952,6 +5188,7 @@ declare namespace CodeceptJS {
4952
5188
  * ```
4953
5189
  * @param locator - located by CSS|XPath|strict locator.
4954
5190
  * @param attributes - attributes and their values to check.
5191
+ * [!] returns a _promise_ which is synchronized internally by recorder
4955
5192
  */
4956
5193
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
4957
5194
  /**
@@ -4979,8 +5216,9 @@ declare namespace CodeceptJS {
4979
5216
  * ```
4980
5217
  * @param fn - function to be executed in browser context.
4981
5218
  * @param args - to be passed to function.
5219
+ * [!] returns a _promise_ which is synchronized internally by recorder
4982
5220
  */
4983
- executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
5221
+ executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
4984
5222
  /**
4985
5223
  * Executes async script on page.
4986
5224
  * Provided function should execute a passed callback (as first argument) to signal it is finished.
@@ -5004,8 +5242,9 @@ declare namespace CodeceptJS {
5004
5242
  * ```
5005
5243
  * @param fn - function to be executed in browser context.
5006
5244
  * @param args - to be passed to function.
5245
+ * [!] returns a _promise_ which is synchronized internally by recorder
5007
5246
  */
5008
- executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
5247
+ executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
5009
5248
  /**
5010
5249
  * Checks that current url contains a provided fragment.
5011
5250
  *
@@ -5013,11 +5252,13 @@ declare namespace CodeceptJS {
5013
5252
  * I.seeInCurrentUrl('/register'); // we are on registration page
5014
5253
  * ```
5015
5254
  * @param url - a fragment to check
5255
+ * [!] returns a _promise_ which is synchronized internally by recorder
5016
5256
  */
5017
5257
  seeInCurrentUrl(url: string): void;
5018
5258
  /**
5019
5259
  * Checks that current url does not contain a provided fragment.
5020
5260
  * @param url - value to check.
5261
+ * [!] returns a _promise_ which is synchronized internally by recorder
5021
5262
  */
5022
5263
  dontSeeInCurrentUrl(url: string): void;
5023
5264
  /**
@@ -5030,6 +5271,7 @@ declare namespace CodeceptJS {
5030
5271
  * I.seeCurrentUrlEquals('http://my.site.com/register');
5031
5272
  * ```
5032
5273
  * @param url - value to check.
5274
+ * [!] returns a _promise_ which is synchronized internally by recorder
5033
5275
  */
5034
5276
  seeCurrentUrlEquals(url: string): void;
5035
5277
  /**
@@ -5041,6 +5283,7 @@ declare namespace CodeceptJS {
5041
5283
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
5042
5284
  * ```
5043
5285
  * @param url - value to check.
5286
+ * [!] returns a _promise_ which is synchronized internally by recorder
5044
5287
  */
5045
5288
  dontSeeCurrentUrlEquals(url: string): void;
5046
5289
  /**
@@ -5052,6 +5295,7 @@ declare namespace CodeceptJS {
5052
5295
  * ```
5053
5296
  * @param locator - element located by CSS|XPath|strict locator.
5054
5297
  * @param fileName - file name to save.
5298
+ * [!] returns a _promise_ which is synchronized internally by recorder
5055
5299
  */
5056
5300
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
5057
5301
  /**
@@ -5065,6 +5309,7 @@ declare namespace CodeceptJS {
5065
5309
  * ```
5066
5310
  * @param fileName - file name to save.
5067
5311
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
5312
+ * [!] returns a _promise_ which is synchronized internally by recorder
5068
5313
  */
5069
5314
  saveScreenshot(fileName: string, fullPage?: boolean): void;
5070
5315
  /**
@@ -5076,6 +5321,7 @@ declare namespace CodeceptJS {
5076
5321
  * I.clearCookie('test');
5077
5322
  * ```
5078
5323
  * @param [cookie = null] - (optional, `null` by default) cookie name
5324
+ * [!] returns a _promise_ which is synchronized internally by recorder
5079
5325
  */
5080
5326
  clearCookie(cookie?: string): void;
5081
5327
  /**
@@ -5085,6 +5331,7 @@ declare namespace CodeceptJS {
5085
5331
  * I.seeCookie('Auth');
5086
5332
  * ```
5087
5333
  * @param name - cookie name.
5334
+ * [!] returns a _promise_ which is synchronized internally by recorder
5088
5335
  */
5089
5336
  seeCookie(name: string): void;
5090
5337
  /**
@@ -5094,6 +5341,7 @@ declare namespace CodeceptJS {
5094
5341
  * I.dontSeeCookie('auth'); // no auth cookie
5095
5342
  * ```
5096
5343
  * @param name - cookie name.
5344
+ * [!] returns a _promise_ which is synchronized internally by recorder
5097
5345
  */
5098
5346
  dontSeeCookie(name: string): void;
5099
5347
  /**
@@ -5130,6 +5378,7 @@ declare namespace CodeceptJS {
5130
5378
  * I.seeInPopup('Popup text');
5131
5379
  * ```
5132
5380
  * @param text - value to check.
5381
+ * [!] returns a _promise_ which is synchronized internally by recorder
5133
5382
  */
5134
5383
  seeInPopup(text: string): void;
5135
5384
  /**
@@ -5145,6 +5394,7 @@ declare namespace CodeceptJS {
5145
5394
  * First parameter can be set to `maximize`.
5146
5395
  * @param width - width in pixels or `maximize`.
5147
5396
  * @param height - height in pixels.
5397
+ * [!] returns a _promise_ which is synchronized internally by recorder
5148
5398
  */
5149
5399
  resizeWindow(width: number, height: number): void;
5150
5400
  /**
@@ -5155,6 +5405,7 @@ declare namespace CodeceptJS {
5155
5405
  * ```
5156
5406
  * @param srcElement - located by CSS|XPath|strict locator.
5157
5407
  * @param destElement - located by CSS|XPath|strict locator.
5408
+ * [!] returns a _promise_ which is synchronized internally by recorder
5158
5409
  */
5159
5410
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
5160
5411
  /**
@@ -5222,6 +5473,7 @@ declare namespace CodeceptJS {
5222
5473
  * I.switchTo(); // switch back to main page
5223
5474
  * ```
5224
5475
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
5476
+ * [!] returns a _promise_ which is synchronized internally by recorder
5225
5477
  */
5226
5478
  switchTo(locator?: CodeceptJS.LocatorOrString): void;
5227
5479
  /**
@@ -5231,6 +5483,7 @@ declare namespace CodeceptJS {
5231
5483
  * I.wait(2); // wait 2 secs
5232
5484
  * ```
5233
5485
  * @param sec - number of second to wait.
5486
+ * [!] returns a _promise_ which is synchronized internally by recorder
5234
5487
  */
5235
5488
  wait(sec: number): void;
5236
5489
  /**
@@ -5243,6 +5496,7 @@ declare namespace CodeceptJS {
5243
5496
  * ```
5244
5497
  * @param locator - element located by CSS|XPath|strict locator.
5245
5498
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
5499
+ * [!] returns a _promise_ which is synchronized internally by recorder
5246
5500
  */
5247
5501
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5248
5502
  /**
@@ -5254,6 +5508,7 @@ declare namespace CodeceptJS {
5254
5508
  * ```
5255
5509
  * @param locator - element located by CSS|XPath|strict locator.
5256
5510
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5511
+ * [!] returns a _promise_ which is synchronized internally by recorder
5257
5512
  */
5258
5513
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5259
5514
  /**
@@ -5273,6 +5528,7 @@ declare namespace CodeceptJS {
5273
5528
  * ```
5274
5529
  * @param locator - element located by CSS|XPath|strict locator.
5275
5530
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5531
+ * [!] returns a _promise_ which is synchronized internally by recorder
5276
5532
  */
5277
5533
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5278
5534
  /**
@@ -5284,6 +5540,7 @@ declare namespace CodeceptJS {
5284
5540
  * ```
5285
5541
  * @param locator - element located by CSS|XPath|strict locator.
5286
5542
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5543
+ * [!] returns a _promise_ which is synchronized internally by recorder
5287
5544
  */
5288
5545
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5289
5546
  /**
@@ -5295,6 +5552,7 @@ declare namespace CodeceptJS {
5295
5552
  * ```
5296
5553
  * @param locator - element located by CSS|XPath|strict locator.
5297
5554
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5555
+ * [!] returns a _promise_ which is synchronized internally by recorder
5298
5556
  */
5299
5557
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5300
5558
  /**
@@ -5306,6 +5564,7 @@ declare namespace CodeceptJS {
5306
5564
  * @param locator - element located by CSS|XPath|strict locator.
5307
5565
  * @param num - number of elements.
5308
5566
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5567
+ * [!] returns a _promise_ which is synchronized internally by recorder
5309
5568
  */
5310
5569
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
5311
5570
  /**
@@ -5313,6 +5572,7 @@ declare namespace CodeceptJS {
5313
5572
  * Element can be located by CSS or XPath.
5314
5573
  * @param locator - element located by CSS|XPath|strict locator.
5315
5574
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
5575
+ * [!] returns a _promise_ which is synchronized internally by recorder
5316
5576
  */
5317
5577
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
5318
5578
  /**
@@ -5324,6 +5584,7 @@ declare namespace CodeceptJS {
5324
5584
  * @param field - input field.
5325
5585
  * @param value - expected value.
5326
5586
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5587
+ * [!] returns a _promise_ which is synchronized internally by recorder
5327
5588
  */
5328
5589
  waitForValue(field: LocatorOrString, value: string, sec?: number): void;
5329
5590
  /**
@@ -5342,6 +5603,7 @@ declare namespace CodeceptJS {
5342
5603
  * @param fn - to be executed in browser context.
5343
5604
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
5344
5605
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
5606
+ * [!] returns a _promise_ which is synchronized internally by recorder
5345
5607
  */
5346
5608
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
5347
5609
  /**
@@ -5352,6 +5614,7 @@ declare namespace CodeceptJS {
5352
5614
  * ```
5353
5615
  * @param urlPart - value to check.
5354
5616
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5617
+ * [!] returns a _promise_ which is synchronized internally by recorder
5355
5618
  */
5356
5619
  waitInUrl(urlPart: string, sec?: number): void;
5357
5620
  /**
@@ -5363,6 +5626,7 @@ declare namespace CodeceptJS {
5363
5626
  * ```
5364
5627
  * @param urlPart - value to check.
5365
5628
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5629
+ * [!] returns a _promise_ which is synchronized internally by recorder
5366
5630
  */
5367
5631
  waitUrlEquals(urlPart: string, sec?: number): void;
5368
5632
  /**
@@ -5377,6 +5641,7 @@ declare namespace CodeceptJS {
5377
5641
  * @param text - to wait for.
5378
5642
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
5379
5643
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
5644
+ * [!] returns a _promise_ which is synchronized internally by recorder
5380
5645
  */
5381
5646
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
5382
5647
  /**
@@ -5389,6 +5654,7 @@ declare namespace CodeceptJS {
5389
5654
  * ```js
5390
5655
  * I.refreshPage();
5391
5656
  * ```
5657
+ * [!] returns a _promise_ which is synchronized internally by recorder
5392
5658
  */
5393
5659
  refreshPage(): void;
5394
5660
  /**
@@ -5406,6 +5672,7 @@ declare namespace CodeceptJS {
5406
5672
  * @param locator - located by CSS|XPath|strict locator.
5407
5673
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
5408
5674
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
5675
+ * [!] returns a _promise_ which is synchronized internally by recorder
5409
5676
  */
5410
5677
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
5411
5678
  /**
@@ -5414,6 +5681,7 @@ declare namespace CodeceptJS {
5414
5681
  * ```js
5415
5682
  * I.scrollPageToTop();
5416
5683
  * ```
5684
+ * [!] returns a _promise_ which is synchronized internally by recorder
5417
5685
  */
5418
5686
  scrollPageToTop(): void;
5419
5687
  /**
@@ -5422,6 +5690,7 @@ declare namespace CodeceptJS {
5422
5690
  * ```js
5423
5691
  * I.scrollPageToBottom();
5424
5692
  * ```
5693
+ * [!] returns a _promise_ which is synchronized internally by recorder
5425
5694
  */
5426
5695
  scrollPageToBottom(): void;
5427
5696
  /**
@@ -5468,6 +5737,7 @@ declare namespace CodeceptJS {
5468
5737
  * ]);
5469
5738
  * ```
5470
5739
  * @param cookie - a cookie object or array of cookie objects.
5740
+ * [!] returns a _promise_ which is synchronized internally by recorder
5471
5741
  */
5472
5742
  setCookie(cookie: Cookie | Cookie[]): void;
5473
5743
  }
@@ -5677,6 +5947,7 @@ declare namespace CodeceptJS {
5677
5947
  * I.seeInPopup('Popup text');
5678
5948
  * ```
5679
5949
  * @param text - value to check.
5950
+ * [!] returns a _promise_ which is synchronized internally by recorder
5680
5951
  */
5681
5952
  seeInPopup(text: string): void;
5682
5953
  /**
@@ -5710,6 +5981,7 @@ declare namespace CodeceptJS {
5710
5981
  * I.amOnPage('/login'); // opens a login page
5711
5982
  * ```
5712
5983
  * @param url - url path or global url.
5984
+ * @returns automatically synchronized promise with recorder #!
5713
5985
  */
5714
5986
  amOnPage(url: string): void;
5715
5987
  /**
@@ -5717,6 +5989,7 @@ declare namespace CodeceptJS {
5717
5989
  * First parameter can be set to `maximize`.
5718
5990
  * @param width - width in pixels or `maximize`.
5719
5991
  * @param height - height in pixels.
5992
+ * [!] returns a _promise_ which is synchronized internally by recorder
5720
5993
  *
5721
5994
  * Unlike other drivers Puppeteer changes the size of a viewport, not the window!
5722
5995
  * Puppeteer does not control the window of a browser so it can't adjust its real size.
@@ -5745,7 +6018,7 @@ declare namespace CodeceptJS {
5745
6018
  * @param locator - located by CSS|XPath|strict locator.
5746
6019
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
5747
6020
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
5748
- *
6021
+ * [!] returns a _promise_ which is synchronized internally by recorder
5749
6022
  * {{ react }}
5750
6023
  */
5751
6024
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
@@ -5757,6 +6030,7 @@ declare namespace CodeceptJS {
5757
6030
  * ```
5758
6031
  * @param srcElement - located by CSS|XPath|strict locator.
5759
6032
  * @param destElement - located by CSS|XPath|strict locator.
6033
+ * [!] returns a _promise_ which is synchronized internally by recorder
5760
6034
  */
5761
6035
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
5762
6036
  /**
@@ -5765,6 +6039,7 @@ declare namespace CodeceptJS {
5765
6039
  * ```js
5766
6040
  * I.refreshPage();
5767
6041
  * ```
6042
+ * [!] returns a _promise_ which is synchronized internally by recorder
5768
6043
  */
5769
6044
  refreshPage(): void;
5770
6045
  /**
@@ -5773,6 +6048,7 @@ declare namespace CodeceptJS {
5773
6048
  * ```js
5774
6049
  * I.scrollPageToTop();
5775
6050
  * ```
6051
+ * [!] returns a _promise_ which is synchronized internally by recorder
5776
6052
  */
5777
6053
  scrollPageToTop(): void;
5778
6054
  /**
@@ -5781,6 +6057,7 @@ declare namespace CodeceptJS {
5781
6057
  * ```js
5782
6058
  * I.scrollPageToBottom();
5783
6059
  * ```
6060
+ * [!] returns a _promise_ which is synchronized internally by recorder
5784
6061
  */
5785
6062
  scrollPageToBottom(): void;
5786
6063
  /**
@@ -5794,6 +6071,7 @@ declare namespace CodeceptJS {
5794
6071
  * @param locator - located by CSS|XPath|strict locator.
5795
6072
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
5796
6073
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
6074
+ * [!] returns a _promise_ which is synchronized internally by recorder
5797
6075
  */
5798
6076
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
5799
6077
  /**
@@ -5803,6 +6081,7 @@ declare namespace CodeceptJS {
5803
6081
  * I.seeInTitle('Home Page');
5804
6082
  * ```
5805
6083
  * @param text - text value to check.
6084
+ * [!] returns a _promise_ which is synchronized internally by recorder
5806
6085
  */
5807
6086
  seeInTitle(text: string): void;
5808
6087
  /**
@@ -5818,10 +6097,11 @@ declare namespace CodeceptJS {
5818
6097
  /**
5819
6098
  * Checks that title is equal to provided one.
5820
6099
  *
5821
- * ```js
5822
- * I.seeTitleEquals('Test title.');
5823
- * ```
6100
+ * ```js
6101
+ * I.seeTitleEquals('Test title.');
6102
+ * ```
5824
6103
  * @param text - value to check.
6104
+ * [!] returns a _promise_ which is synchronized internally by recorder
5825
6105
  */
5826
6106
  seeTitleEquals(text: string): void;
5827
6107
  /**
@@ -5831,6 +6111,7 @@ declare namespace CodeceptJS {
5831
6111
  * I.dontSeeInTitle('Error');
5832
6112
  * ```
5833
6113
  * @param text - value to check.
6114
+ * [!] returns a _promise_ which is synchronized internally by recorder
5834
6115
  */
5835
6116
  dontSeeInTitle(text: string): void;
5836
6117
  /**
@@ -5939,6 +6220,7 @@ declare namespace CodeceptJS {
5939
6220
  * I.seeElement('#modal');
5940
6221
  * ```
5941
6222
  * @param locator - located by CSS|XPath|strict locator.
6223
+ * [!] returns a _promise_ which is synchronized internally by recorder
5942
6224
  * {{ react }}
5943
6225
  */
5944
6226
  seeElement(locator: CodeceptJS.LocatorOrString): void;
@@ -5949,6 +6231,7 @@ declare namespace CodeceptJS {
5949
6231
  * I.dontSeeElement('.modal'); // modal is not shown
5950
6232
  * ```
5951
6233
  * @param locator - located by CSS|XPath|Strict locator.
6234
+ * [!] returns a _promise_ which is synchronized internally by recorder
5952
6235
  * {{ react }}
5953
6236
  */
5954
6237
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
@@ -5960,6 +6243,7 @@ declare namespace CodeceptJS {
5960
6243
  * I.seeElementInDOM('#modal');
5961
6244
  * ```
5962
6245
  * @param locator - element located by CSS|XPath|strict locator.
6246
+ * [!] returns a _promise_ which is synchronized internally by recorder
5963
6247
  */
5964
6248
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
5965
6249
  /**
@@ -5969,6 +6253,7 @@ declare namespace CodeceptJS {
5969
6253
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
5970
6254
  * ```
5971
6255
  * @param locator - located by CSS|XPath|Strict locator.
6256
+ * [!] returns a _promise_ which is synchronized internally by recorder
5972
6257
  */
5973
6258
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
5974
6259
  /**
@@ -5995,11 +6280,12 @@ declare namespace CodeceptJS {
5995
6280
  * ```
5996
6281
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
5997
6282
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6283
+ * [!] returns a _promise_ which is synchronized internally by recorder
5998
6284
  *
5999
6285
  *
6000
6286
  * {{ react }}
6001
6287
  */
6002
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6288
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
6003
6289
  /**
6004
6290
  * Perform an emulated click on a link or a button, given by a locator.
6005
6291
  * Unlike normal click instead of sending native event, emulates a click with JavaScript.
@@ -6027,6 +6313,7 @@ declare namespace CodeceptJS {
6027
6313
  * ```
6028
6314
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
6029
6315
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6316
+ * [!] returns a _promise_ which is synchronized internally by recorder
6030
6317
  *
6031
6318
  *
6032
6319
  * {{ react }}
@@ -6040,6 +6327,7 @@ declare namespace CodeceptJS {
6040
6327
  * ```
6041
6328
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
6042
6329
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
6330
+ * [!] returns a _promise_ which is synchronized internally by recorder
6043
6331
  *
6044
6332
  * {{ react }}
6045
6333
  */
@@ -6079,7 +6367,7 @@ declare namespace CodeceptJS {
6079
6367
  * ```
6080
6368
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
6081
6369
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
6082
- *
6370
+ * [!] returns a _promise_ which is synchronized internally by recorder
6083
6371
  *
6084
6372
  * {{ react }}
6085
6373
  */
@@ -6097,7 +6385,7 @@ declare namespace CodeceptJS {
6097
6385
  * ```
6098
6386
  * @param locator - clickable element located by CSS|XPath|strict locator.
6099
6387
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
6100
- *
6388
+ * [!] returns a _promise_ which is synchronized internally by recorder
6101
6389
  *
6102
6390
  * {{ react }}
6103
6391
  */
@@ -6115,6 +6403,7 @@ declare namespace CodeceptJS {
6115
6403
  * ```
6116
6404
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
6117
6405
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
6406
+ * [!] returns a _promise_ which is synchronized internally by recorder
6118
6407
  */
6119
6408
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6120
6409
  /**
@@ -6130,6 +6419,7 @@ declare namespace CodeceptJS {
6130
6419
  * ```
6131
6420
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
6132
6421
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
6422
+ * [!] returns a _promise_ which is synchronized internally by recorder
6133
6423
  */
6134
6424
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
6135
6425
  /**
@@ -6141,6 +6431,7 @@ declare namespace CodeceptJS {
6141
6431
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
6142
6432
  * ```
6143
6433
  * @param field - located by label|name|CSS|XPath|strict locator.
6434
+ * [!] returns a _promise_ which is synchronized internally by recorder
6144
6435
  */
6145
6436
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
6146
6437
  /**
@@ -6152,6 +6443,7 @@ declare namespace CodeceptJS {
6152
6443
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
6153
6444
  * ```
6154
6445
  * @param field - located by label|name|CSS|XPath|strict locator.
6446
+ * [!] returns a _promise_ which is synchronized internally by recorder
6155
6447
  */
6156
6448
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
6157
6449
  /**
@@ -6165,6 +6457,7 @@ declare namespace CodeceptJS {
6165
6457
  * I.pressKeyUp('Control');
6166
6458
  * ```
6167
6459
  * @param key - name of key to press down.
6460
+ * [!] returns a _promise_ which is synchronized internally by recorder
6168
6461
  */
6169
6462
  pressKeyDown(key: string): void;
6170
6463
  /**
@@ -6178,6 +6471,7 @@ declare namespace CodeceptJS {
6178
6471
  * I.pressKeyUp('Control');
6179
6472
  * ```
6180
6473
  * @param key - name of key to release.
6474
+ * [!] returns a _promise_ which is synchronized internally by recorder
6181
6475
  */
6182
6476
  pressKeyUp(key: string): void;
6183
6477
  /**
@@ -6239,6 +6533,7 @@ declare namespace CodeceptJS {
6239
6533
  * - `'Space'`
6240
6534
  * - `'Tab'`
6241
6535
  * @param key - key or array of keys to press.
6536
+ * [!] returns a _promise_ which is synchronized internally by recorder
6242
6537
  *
6243
6538
  *
6244
6539
  * _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
@@ -6261,6 +6556,7 @@ declare namespace CodeceptJS {
6261
6556
  * ```
6262
6557
  * @param key - or array of keys to type.
6263
6558
  * @param [delay = null] - (optional) delay in ms between key presses
6559
+ * [!] returns a _promise_ which is synchronized internally by recorder
6264
6560
  */
6265
6561
  type(key: string | string[], delay?: number): void;
6266
6562
  /**
@@ -6279,7 +6575,7 @@ declare namespace CodeceptJS {
6279
6575
  * ```
6280
6576
  * @param field - located by label|name|CSS|XPath|strict locator.
6281
6577
  * @param value - text value to fill.
6282
- *
6578
+ * [!] returns a _promise_ which is synchronized internally by recorder
6283
6579
  * {{ react }}
6284
6580
  */
6285
6581
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
@@ -6292,6 +6588,7 @@ declare namespace CodeceptJS {
6292
6588
  * I.clearField('#email');
6293
6589
  * ```
6294
6590
  * @param editable - field located by label|name|CSS|XPath|strict locator.
6591
+ * [!] returns a _promise_ which is synchronized internally by recorder
6295
6592
  */
6296
6593
  clearField(editable: LocatorOrString): void;
6297
6594
  /**
@@ -6303,6 +6600,7 @@ declare namespace CodeceptJS {
6303
6600
  * ```
6304
6601
  * @param field - located by label|name|CSS|XPath|strict locator
6305
6602
  * @param value - text value to append.
6603
+ * [!] returns a _promise_ which is synchronized internally by recorder
6306
6604
  *
6307
6605
  * {{ react }}
6308
6606
  */
@@ -6319,6 +6617,7 @@ declare namespace CodeceptJS {
6319
6617
  * ```
6320
6618
  * @param field - located by label|name|CSS|XPath|strict locator.
6321
6619
  * @param value - value to check.
6620
+ * [!] returns a _promise_ which is synchronized internally by recorder
6322
6621
  */
6323
6622
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
6324
6623
  /**
@@ -6331,6 +6630,7 @@ declare namespace CodeceptJS {
6331
6630
  * ```
6332
6631
  * @param field - located by label|name|CSS|XPath|strict locator.
6333
6632
  * @param value - value to check.
6633
+ * [!] returns a _promise_ which is synchronized internally by recorder
6334
6634
  */
6335
6635
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
6336
6636
  /**
@@ -6344,6 +6644,7 @@ declare namespace CodeceptJS {
6344
6644
  * ```
6345
6645
  * @param locator - field located by label|name|CSS|XPath|strict locator.
6346
6646
  * @param pathToFile - local file path relative to codecept.json config file.
6647
+ * [!] returns a _promise_ which is synchronized internally by recorder
6347
6648
  *
6348
6649
  * > ⚠ 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.
6349
6650
  */
@@ -6369,6 +6670,7 @@ declare namespace CodeceptJS {
6369
6670
  * ```
6370
6671
  * @param select - field located by label|name|CSS|XPath|strict locator.
6371
6672
  * @param option - visible text or value of option.
6673
+ * [!] returns a _promise_ which is synchronized internally by recorder
6372
6674
  */
6373
6675
  selectOption(select: LocatorOrString, option: string | any[]): void;
6374
6676
  /**
@@ -6390,11 +6692,13 @@ declare namespace CodeceptJS {
6390
6692
  * I.seeInCurrentUrl('/register'); // we are on registration page
6391
6693
  * ```
6392
6694
  * @param url - a fragment to check
6695
+ * [!] returns a _promise_ which is synchronized internally by recorder
6393
6696
  */
6394
6697
  seeInCurrentUrl(url: string): void;
6395
6698
  /**
6396
6699
  * Checks that current url does not contain a provided fragment.
6397
6700
  * @param url - value to check.
6701
+ * [!] returns a _promise_ which is synchronized internally by recorder
6398
6702
  */
6399
6703
  dontSeeInCurrentUrl(url: string): void;
6400
6704
  /**
@@ -6407,6 +6711,7 @@ declare namespace CodeceptJS {
6407
6711
  * I.seeCurrentUrlEquals('http://my.site.com/register');
6408
6712
  * ```
6409
6713
  * @param url - value to check.
6714
+ * [!] returns a _promise_ which is synchronized internally by recorder
6410
6715
  */
6411
6716
  seeCurrentUrlEquals(url: string): void;
6412
6717
  /**
@@ -6418,6 +6723,7 @@ declare namespace CodeceptJS {
6418
6723
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
6419
6724
  * ```
6420
6725
  * @param url - value to check.
6726
+ * [!] returns a _promise_ which is synchronized internally by recorder
6421
6727
  */
6422
6728
  dontSeeCurrentUrlEquals(url: string): void;
6423
6729
  /**
@@ -6431,6 +6737,7 @@ declare namespace CodeceptJS {
6431
6737
  * ```
6432
6738
  * @param text - expected on page.
6433
6739
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
6740
+ * [!] returns a _promise_ which is synchronized internally by recorder
6434
6741
  *
6435
6742
  * {{ react }}
6436
6743
  */
@@ -6443,6 +6750,7 @@ declare namespace CodeceptJS {
6443
6750
  * ```
6444
6751
  * @param text - element value to check.
6445
6752
  * @param [context = null] - element located by CSS|XPath|strict locator.
6753
+ * [!] returns a _promise_ which is synchronized internally by recorder
6446
6754
  */
6447
6755
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
6448
6756
  /**
@@ -6455,7 +6763,7 @@ declare namespace CodeceptJS {
6455
6763
  * ```
6456
6764
  * @param text - which is not present.
6457
6765
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
6458
- *
6766
+ * [!] returns a _promise_ which is synchronized internally by recorder
6459
6767
  *
6460
6768
  * {{ react }}
6461
6769
  */
@@ -6497,6 +6805,7 @@ declare namespace CodeceptJS {
6497
6805
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
6498
6806
  * ```
6499
6807
  * @param text - value to check.
6808
+ * [!] returns a _promise_ which is synchronized internally by recorder
6500
6809
  */
6501
6810
  seeInSource(text: string): void;
6502
6811
  /**
@@ -6506,6 +6815,7 @@ declare namespace CodeceptJS {
6506
6815
  * I.dontSeeInSource('<!--'); // no comments in source
6507
6816
  * ```
6508
6817
  * @param value - to check.
6818
+ * [!] returns a _promise_ which is synchronized internally by recorder
6509
6819
  */
6510
6820
  dontSeeInSource(value: string): void;
6511
6821
  /**
@@ -6518,7 +6828,7 @@ declare namespace CodeceptJS {
6518
6828
  * ```
6519
6829
  * @param locator - element located by CSS|XPath|strict locator.
6520
6830
  * @param num - number of elements.
6521
- *
6831
+ * [!] returns a _promise_ which is synchronized internally by recorder
6522
6832
  *
6523
6833
  * {{ react }}
6524
6834
  */
@@ -6532,7 +6842,7 @@ declare namespace CodeceptJS {
6532
6842
  * ```
6533
6843
  * @param locator - element located by CSS|XPath|strict locator.
6534
6844
  * @param num - number of elements.
6535
- *
6845
+ * [!] returns a _promise_ which is synchronized internally by recorder
6536
6846
  *
6537
6847
  * {{ react }}
6538
6848
  */
@@ -6552,6 +6862,7 @@ declare namespace CodeceptJS {
6552
6862
  * ]);
6553
6863
  * ```
6554
6864
  * @param cookie - a cookie object or array of cookie objects.
6865
+ * [!] returns a _promise_ which is synchronized internally by recorder
6555
6866
  */
6556
6867
  setCookie(cookie: Cookie | Cookie[]): void;
6557
6868
  /**
@@ -6561,6 +6872,7 @@ declare namespace CodeceptJS {
6561
6872
  * I.seeCookie('Auth');
6562
6873
  * ```
6563
6874
  * @param name - cookie name.
6875
+ * [!] returns a _promise_ which is synchronized internally by recorder
6564
6876
  */
6565
6877
  seeCookie(name: string): void;
6566
6878
  /**
@@ -6570,6 +6882,7 @@ declare namespace CodeceptJS {
6570
6882
  * I.dontSeeCookie('auth'); // no auth cookie
6571
6883
  * ```
6572
6884
  * @param name - cookie name.
6885
+ * [!] returns a _promise_ which is synchronized internally by recorder
6573
6886
  */
6574
6887
  dontSeeCookie(name: string): void;
6575
6888
  /**
@@ -6597,6 +6910,7 @@ declare namespace CodeceptJS {
6597
6910
  * I.clearCookie('test');
6598
6911
  * ```
6599
6912
  * @param [cookie = null] - (optional, `null` by default) cookie name
6913
+ * [!] returns a _promise_ which is synchronized internally by recorder
6600
6914
  */
6601
6915
  clearCookie(cookie?: string): void;
6602
6916
  /**
@@ -6624,9 +6938,12 @@ declare namespace CodeceptJS {
6624
6938
  * ```
6625
6939
  * @param fn - function to be executed in browser context.
6626
6940
  * @param args - to be passed to function.
6627
- * @returns If a function returns a Promise It will wait for it resolution.
6941
+ * [!] returns a _promise_ which is synchronized internally by recorder
6942
+ *
6943
+ *
6944
+ * If a function returns a Promise It will wait for it resolution.
6628
6945
  */
6629
- executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
6946
+ executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
6630
6947
  /**
6631
6948
  * Executes async script on page.
6632
6949
  * Provided function should execute a passed callback (as first argument) to signal it is finished.
@@ -6650,9 +6967,12 @@ declare namespace CodeceptJS {
6650
6967
  * ```
6651
6968
  * @param fn - function to be executed in browser context.
6652
6969
  * @param args - to be passed to function.
6653
- * @returns Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
6970
+ * [!] returns a _promise_ which is synchronized internally by recorder
6971
+ *
6972
+ *
6973
+ * Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
6654
6974
  */
6655
- executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
6975
+ executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
6656
6976
  /**
6657
6977
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
6658
6978
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -6763,6 +7083,7 @@ declare namespace CodeceptJS {
6763
7083
  * ```
6764
7084
  * @param locator - located by CSS|XPath|strict locator.
6765
7085
  * @param cssProperties - object with CSS properties and their values to check.
7086
+ * [!] returns a _promise_ which is synchronized internally by recorder
6766
7087
  * {{ react }}
6767
7088
  */
6768
7089
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
@@ -6774,6 +7095,7 @@ declare namespace CodeceptJS {
6774
7095
  * ```
6775
7096
  * @param locator - located by CSS|XPath|strict locator.
6776
7097
  * @param attributes - attributes and their values to check.
7098
+ * [!] returns a _promise_ which is synchronized internally by recorder
6777
7099
  * {{ react }}
6778
7100
  */
6779
7101
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
@@ -6787,6 +7109,7 @@ declare namespace CodeceptJS {
6787
7109
  * ```
6788
7110
  * @param locator - located by label|name|CSS|XPath|strict locator.
6789
7111
  * @param offsetX - position to drag.
7112
+ * [!] returns a _promise_ which is synchronized internally by recorder
6790
7113
  * {{ react }}
6791
7114
  */
6792
7115
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
@@ -6828,6 +7151,7 @@ declare namespace CodeceptJS {
6828
7151
  * ```
6829
7152
  * @param locator - element located by CSS|XPath|strict locator.
6830
7153
  * @param fileName - file name to save.
7154
+ * [!] returns a _promise_ which is synchronized internally by recorder
6831
7155
  */
6832
7156
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
6833
7157
  /**
@@ -6841,6 +7165,7 @@ declare namespace CodeceptJS {
6841
7165
  * ```
6842
7166
  * @param fileName - file name to save.
6843
7167
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
7168
+ * [!] returns a _promise_ which is synchronized internally by recorder
6844
7169
  */
6845
7170
  saveScreenshot(fileName: string, fullPage?: boolean): void;
6846
7171
  /**
@@ -6850,6 +7175,7 @@ declare namespace CodeceptJS {
6850
7175
  * I.wait(2); // wait 2 secs
6851
7176
  * ```
6852
7177
  * @param sec - number of second to wait.
7178
+ * [!] returns a _promise_ which is synchronized internally by recorder
6853
7179
  */
6854
7180
  wait(sec: number): void;
6855
7181
  /**
@@ -6857,6 +7183,7 @@ declare namespace CodeceptJS {
6857
7183
  * Element can be located by CSS or XPath.
6858
7184
  * @param locator - element located by CSS|XPath|strict locator.
6859
7185
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
7186
+ * [!] returns a _promise_ which is synchronized internally by recorder
6860
7187
  */
6861
7188
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6862
7189
  /**
@@ -6868,6 +7195,7 @@ declare namespace CodeceptJS {
6868
7195
  * @param field - input field.
6869
7196
  * @param value - expected value.
6870
7197
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7198
+ * [!] returns a _promise_ which is synchronized internally by recorder
6871
7199
  */
6872
7200
  waitForValue(field: LocatorOrString, value: string, sec?: number): void;
6873
7201
  /**
@@ -6879,6 +7207,7 @@ declare namespace CodeceptJS {
6879
7207
  * @param locator - element located by CSS|XPath|strict locator.
6880
7208
  * @param num - number of elements.
6881
7209
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7210
+ * [!] returns a _promise_ which is synchronized internally by recorder
6882
7211
  * {{ react }}
6883
7212
  */
6884
7213
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
@@ -6892,6 +7221,7 @@ declare namespace CodeceptJS {
6892
7221
  * ```
6893
7222
  * @param locator - element located by CSS|XPath|strict locator.
6894
7223
  * @param [sec] - (optional, `1` by default) time in seconds to wait
7224
+ * [!] returns a _promise_ which is synchronized internally by recorder
6895
7225
  */
6896
7226
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6897
7227
  /**
@@ -6904,6 +7234,7 @@ declare namespace CodeceptJS {
6904
7234
  * ```
6905
7235
  * @param locator - element located by CSS|XPath|strict locator.
6906
7236
  * @param [sec] - (optional, `1` by default) time in seconds to wait
7237
+ * [!] returns a _promise_ which is synchronized internally by recorder
6907
7238
  * {{ react }}
6908
7239
  */
6909
7240
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
@@ -6916,7 +7247,7 @@ declare namespace CodeceptJS {
6916
7247
  * ```
6917
7248
  * @param locator - element located by CSS|XPath|strict locator.
6918
7249
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6919
- *
7250
+ * [!] returns a _promise_ which is synchronized internally by recorder
6920
7251
  *
6921
7252
  * This method accepts [React selectors](https://codecept.io/react).
6922
7253
  */
@@ -6930,6 +7261,7 @@ declare namespace CodeceptJS {
6930
7261
  * ```
6931
7262
  * @param locator - element located by CSS|XPath|strict locator.
6932
7263
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7264
+ * [!] returns a _promise_ which is synchronized internally by recorder
6933
7265
  */
6934
7266
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6935
7267
  /**
@@ -6941,6 +7273,7 @@ declare namespace CodeceptJS {
6941
7273
  * ```
6942
7274
  * @param locator - element located by CSS|XPath|strict locator.
6943
7275
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7276
+ * [!] returns a _promise_ which is synchronized internally by recorder
6944
7277
  */
6945
7278
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
6946
7279
  /**
@@ -6951,6 +7284,7 @@ declare namespace CodeceptJS {
6951
7284
  * ```
6952
7285
  * @param urlPart - value to check.
6953
7286
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7287
+ * [!] returns a _promise_ which is synchronized internally by recorder
6954
7288
  */
6955
7289
  waitInUrl(urlPart: string, sec?: number): void;
6956
7290
  /**
@@ -6962,6 +7296,7 @@ declare namespace CodeceptJS {
6962
7296
  * ```
6963
7297
  * @param urlPart - value to check.
6964
7298
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7299
+ * [!] returns a _promise_ which is synchronized internally by recorder
6965
7300
  */
6966
7301
  waitUrlEquals(urlPart: string, sec?: number): void;
6967
7302
  /**
@@ -6976,6 +7311,7 @@ declare namespace CodeceptJS {
6976
7311
  * @param text - to wait for.
6977
7312
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
6978
7313
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
7314
+ * [!] returns a _promise_ which is synchronized internally by recorder
6979
7315
  */
6980
7316
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
6981
7317
  /**
@@ -7006,6 +7342,7 @@ declare namespace CodeceptJS {
7006
7342
  * I.switchTo(); // switch back to main page
7007
7343
  * ```
7008
7344
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
7345
+ * [!] returns a _promise_ which is synchronized internally by recorder
7009
7346
  */
7010
7347
  switchTo(locator?: CodeceptJS.LocatorOrString): void;
7011
7348
  /**
@@ -7024,6 +7361,7 @@ declare namespace CodeceptJS {
7024
7361
  * @param fn - to be executed in browser context.
7025
7362
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
7026
7363
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
7364
+ * [!] returns a _promise_ which is synchronized internally by recorder
7027
7365
  */
7028
7366
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
7029
7367
  /**
@@ -7041,6 +7379,7 @@ declare namespace CodeceptJS {
7041
7379
  * ```
7042
7380
  * @param locator - element located by CSS|XPath|strict locator.
7043
7381
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7382
+ * [!] returns a _promise_ which is synchronized internally by recorder
7044
7383
  */
7045
7384
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7046
7385
  /**
@@ -7063,8 +7402,9 @@ declare namespace CodeceptJS {
7063
7402
  * loadEventEnd: 241
7064
7403
  * }
7065
7404
  * ```
7405
+ * @returns automatically synchronized promise through #recorder
7066
7406
  */
7067
- grabDataFromPerformanceTiming(): void;
7407
+ grabDataFromPerformanceTiming(): Promise<any>;
7068
7408
  /**
7069
7409
  * Grab the width, height, location of given locator.
7070
7410
  * Provide `width` or `height`as second param to get your desired prop.
@@ -7143,7 +7483,7 @@ declare namespace CodeceptJS {
7143
7483
  * ```
7144
7484
  * @param accessToken - Bearer access token
7145
7485
  */
7146
- amBearerAuthenticated(accessToken: string): void;
7486
+ amBearerAuthenticated(accessToken: string | CodeceptJS.Secret): void;
7147
7487
  /**
7148
7488
  * Executes axios request
7149
7489
  * @returns response
@@ -7402,6 +7742,7 @@ declare namespace CodeceptJS {
7402
7742
  * I.amOnPage('/login'); // opens a login page
7403
7743
  * ```
7404
7744
  * @param url - url path or global url.
7745
+ * @returns automatically synchronized promise with recorder #!
7405
7746
  */
7406
7747
  amOnPage(url: string): void;
7407
7748
  /**
@@ -7409,6 +7750,7 @@ declare namespace CodeceptJS {
7409
7750
  * First parameter can be set to `maximize`.
7410
7751
  * @param width - width in pixels or `maximize`.
7411
7752
  * @param height - height in pixels.
7753
+ * [!] returns a _promise_ which is synchronized internally by recorder
7412
7754
  */
7413
7755
  resizeWindow(width: number, height: number): void;
7414
7756
  /**
@@ -7435,14 +7777,16 @@ declare namespace CodeceptJS {
7435
7777
  * ```
7436
7778
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
7437
7779
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
7780
+ * [!] returns a _promise_ which is synchronized internally by recorder
7438
7781
  */
7439
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7782
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
7440
7783
  /**
7441
7784
  * Reload the current page.
7442
7785
  *
7443
7786
  * ```js
7444
7787
  * I.refreshPage();
7445
7788
  * ```
7789
+ * [!] returns a _promise_ which is synchronized internally by recorder
7446
7790
  */
7447
7791
  refreshPage(): void;
7448
7792
  /**
@@ -7454,6 +7798,7 @@ declare namespace CodeceptJS {
7454
7798
  * ```
7455
7799
  * @param locator - element located by CSS|XPath|strict locator.
7456
7800
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
7801
+ * [!] returns a _promise_ which is synchronized internally by recorder
7457
7802
  */
7458
7803
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
7459
7804
  /**
@@ -7472,6 +7817,7 @@ declare namespace CodeceptJS {
7472
7817
  * ```
7473
7818
  * @param field - located by label|name|CSS|XPath|strict locator.
7474
7819
  * @param value - text value to fill.
7820
+ * [!] returns a _promise_ which is synchronized internally by recorder
7475
7821
  */
7476
7822
  fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7477
7823
  /**
@@ -7483,6 +7829,7 @@ declare namespace CodeceptJS {
7483
7829
  * I.clearField('#email');
7484
7830
  * ```
7485
7831
  * @param editable - field located by label|name|CSS|XPath|strict locator.
7832
+ * [!] returns a _promise_ which is synchronized internally by recorder
7486
7833
  */
7487
7834
  clearField(editable: LocatorOrString): void;
7488
7835
  /**
@@ -7494,6 +7841,7 @@ declare namespace CodeceptJS {
7494
7841
  * ```
7495
7842
  * @param field - located by label|name|CSS|XPath|strict locator
7496
7843
  * @param value - text value to append.
7844
+ * [!] returns a _promise_ which is synchronized internally by recorder
7497
7845
  */
7498
7846
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
7499
7847
  /**
@@ -7507,6 +7855,7 @@ declare namespace CodeceptJS {
7507
7855
  * ```
7508
7856
  * @param locator - field located by label|name|CSS|XPath|strict locator.
7509
7857
  * @param pathToFile - local file path relative to codecept.json config file.
7858
+ * [!] returns a _promise_ which is synchronized internally by recorder
7510
7859
  */
7511
7860
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
7512
7861
  /**
@@ -7520,6 +7869,7 @@ declare namespace CodeceptJS {
7520
7869
  * I.pressKey(['Control','a']);
7521
7870
  * ```
7522
7871
  * @param key - key or array of keys to press.
7872
+ * [!] returns a _promise_ which is synchronized internally by recorder
7523
7873
  *
7524
7874
  * {{ keys }}
7525
7875
  */
@@ -7535,6 +7885,7 @@ declare namespace CodeceptJS {
7535
7885
  * @param locator - located by CSS|XPath|strict locator.
7536
7886
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
7537
7887
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
7888
+ * [!] returns a _promise_ which is synchronized internally by recorder
7538
7889
  */
7539
7890
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
7540
7891
  /**
@@ -7549,6 +7900,7 @@ declare namespace CodeceptJS {
7549
7900
  * ```
7550
7901
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
7551
7902
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
7903
+ * [!] returns a _promise_ which is synchronized internally by recorder
7552
7904
  */
7553
7905
  doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7554
7906
  /**
@@ -7564,6 +7916,7 @@ declare namespace CodeceptJS {
7564
7916
  * ```
7565
7917
  * @param locator - clickable element located by CSS|XPath|strict locator.
7566
7918
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
7919
+ * [!] returns a _promise_ which is synchronized internally by recorder
7567
7920
  */
7568
7921
  rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7569
7922
  /**
@@ -7579,6 +7932,7 @@ declare namespace CodeceptJS {
7579
7932
  * ```
7580
7933
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
7581
7934
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
7935
+ * [!] returns a _promise_ which is synchronized internally by recorder
7582
7936
  */
7583
7937
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7584
7938
  /**
@@ -7594,6 +7948,7 @@ declare namespace CodeceptJS {
7594
7948
  * ```
7595
7949
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
7596
7950
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
7951
+ * [!] returns a _promise_ which is synchronized internally by recorder
7597
7952
  */
7598
7953
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
7599
7954
  /**
@@ -7605,6 +7960,7 @@ declare namespace CodeceptJS {
7605
7960
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
7606
7961
  * ```
7607
7962
  * @param field - located by label|name|CSS|XPath|strict locator.
7963
+ * [!] returns a _promise_ which is synchronized internally by recorder
7608
7964
  */
7609
7965
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
7610
7966
  /**
@@ -7616,6 +7972,7 @@ declare namespace CodeceptJS {
7616
7972
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
7617
7973
  * ```
7618
7974
  * @param field - located by label|name|CSS|XPath|strict locator.
7975
+ * [!] returns a _promise_ which is synchronized internally by recorder
7619
7976
  */
7620
7977
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
7621
7978
  /**
@@ -7639,6 +7996,7 @@ declare namespace CodeceptJS {
7639
7996
  * ```
7640
7997
  * @param select - field located by label|name|CSS|XPath|strict locator.
7641
7998
  * @param option - visible text or value of option.
7999
+ * [!] returns a _promise_ which is synchronized internally by recorder
7642
8000
  */
7643
8001
  selectOption(select: LocatorOrString, option: string | any[]): void;
7644
8002
  /**
@@ -7648,11 +8006,13 @@ declare namespace CodeceptJS {
7648
8006
  * I.seeInCurrentUrl('/register'); // we are on registration page
7649
8007
  * ```
7650
8008
  * @param url - a fragment to check
8009
+ * [!] returns a _promise_ which is synchronized internally by recorder
7651
8010
  */
7652
8011
  seeInCurrentUrl(url: string): void;
7653
8012
  /**
7654
8013
  * Checks that current url does not contain a provided fragment.
7655
8014
  * @param url - value to check.
8015
+ * [!] returns a _promise_ which is synchronized internally by recorder
7656
8016
  */
7657
8017
  dontSeeInCurrentUrl(url: string): void;
7658
8018
  /**
@@ -7665,6 +8025,7 @@ declare namespace CodeceptJS {
7665
8025
  * I.seeCurrentUrlEquals('http://my.site.com/register');
7666
8026
  * ```
7667
8027
  * @param url - value to check.
8028
+ * [!] returns a _promise_ which is synchronized internally by recorder
7668
8029
  */
7669
8030
  seeCurrentUrlEquals(url: string): void;
7670
8031
  /**
@@ -7676,6 +8037,7 @@ declare namespace CodeceptJS {
7676
8037
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
7677
8038
  * ```
7678
8039
  * @param url - value to check.
8040
+ * [!] returns a _promise_ which is synchronized internally by recorder
7679
8041
  */
7680
8042
  dontSeeCurrentUrlEquals(url: string): void;
7681
8043
  /**
@@ -7689,6 +8051,7 @@ declare namespace CodeceptJS {
7689
8051
  * ```
7690
8052
  * @param text - expected on page.
7691
8053
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
8054
+ * [!] returns a _promise_ which is synchronized internally by recorder
7692
8055
  */
7693
8056
  see(text: string, context?: CodeceptJS.LocatorOrString): void;
7694
8057
  /**
@@ -7701,6 +8064,7 @@ declare namespace CodeceptJS {
7701
8064
  * ```
7702
8065
  * @param text - which is not present.
7703
8066
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
8067
+ * [!] returns a _promise_ which is synchronized internally by recorder
7704
8068
  */
7705
8069
  dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
7706
8070
  /**
@@ -7711,6 +8075,7 @@ declare namespace CodeceptJS {
7711
8075
  * I.seeElement('#modal');
7712
8076
  * ```
7713
8077
  * @param locator - located by CSS|XPath|strict locator.
8078
+ * [!] returns a _promise_ which is synchronized internally by recorder
7714
8079
  */
7715
8080
  seeElement(locator: CodeceptJS.LocatorOrString): void;
7716
8081
  /**
@@ -7720,6 +8085,7 @@ declare namespace CodeceptJS {
7720
8085
  * I.dontSeeElement('.modal'); // modal is not shown
7721
8086
  * ```
7722
8087
  * @param locator - located by CSS|XPath|Strict locator.
8088
+ * [!] returns a _promise_ which is synchronized internally by recorder
7723
8089
  */
7724
8090
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
7725
8091
  /**
@@ -7730,6 +8096,7 @@ declare namespace CodeceptJS {
7730
8096
  * I.seeElementInDOM('#modal');
7731
8097
  * ```
7732
8098
  * @param locator - element located by CSS|XPath|strict locator.
8099
+ * [!] returns a _promise_ which is synchronized internally by recorder
7733
8100
  */
7734
8101
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
7735
8102
  /**
@@ -7739,6 +8106,7 @@ declare namespace CodeceptJS {
7739
8106
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
7740
8107
  * ```
7741
8108
  * @param locator - located by CSS|XPath|Strict locator.
8109
+ * [!] returns a _promise_ which is synchronized internally by recorder
7742
8110
  */
7743
8111
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
7744
8112
  /**
@@ -7750,6 +8118,7 @@ declare namespace CodeceptJS {
7750
8118
  * ```
7751
8119
  * @param locator - element located by CSS|XPath|strict locator.
7752
8120
  * @param num - number of elements.
8121
+ * [!] returns a _promise_ which is synchronized internally by recorder
7753
8122
  */
7754
8123
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
7755
8124
  /**
@@ -7775,6 +8144,7 @@ declare namespace CodeceptJS {
7775
8144
  * ```
7776
8145
  * @param field - located by label|name|CSS|XPath|strict locator.
7777
8146
  * @param value - value to check.
8147
+ * [!] returns a _promise_ which is synchronized internally by recorder
7778
8148
  */
7779
8149
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
7780
8150
  /**
@@ -7787,6 +8157,7 @@ declare namespace CodeceptJS {
7787
8157
  * ```
7788
8158
  * @param field - located by label|name|CSS|XPath|strict locator.
7789
8159
  * @param value - value to check.
8160
+ * [!] returns a _promise_ which is synchronized internally by recorder
7790
8161
  */
7791
8162
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
7792
8163
  /**
@@ -7804,6 +8175,7 @@ declare namespace CodeceptJS {
7804
8175
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
7805
8176
  * ```
7806
8177
  * @param text - value to check.
8178
+ * [!] returns a _promise_ which is synchronized internally by recorder
7807
8179
  */
7808
8180
  seeInSource(text: string): void;
7809
8181
  /**
@@ -7813,6 +8185,7 @@ declare namespace CodeceptJS {
7813
8185
  * I.dontSeeInSource('<!--'); // no comments in source
7814
8186
  * ```
7815
8187
  * @param value - to check.
8188
+ * [!] returns a _promise_ which is synchronized internally by recorder
7816
8189
  */
7817
8190
  dontSeeInSource(value: string): void;
7818
8191
  /**
@@ -7824,6 +8197,7 @@ declare namespace CodeceptJS {
7824
8197
  * ```
7825
8198
  * @param locator - element located by CSS|XPath|strict locator.
7826
8199
  * @param fileName - file name to save.
8200
+ * [!] returns a _promise_ which is synchronized internally by recorder
7827
8201
  */
7828
8202
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
7829
8203
  /**
@@ -7837,6 +8211,7 @@ declare namespace CodeceptJS {
7837
8211
  * ```
7838
8212
  * @param fileName - file name to save.
7839
8213
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
8214
+ * [!] returns a _promise_ which is synchronized internally by recorder
7840
8215
  */
7841
8216
  saveScreenshot(fileName: string, fullPage?: boolean): void;
7842
8217
  /**
@@ -7846,6 +8221,7 @@ declare namespace CodeceptJS {
7846
8221
  * I.wait(2); // wait 2 secs
7847
8222
  * ```
7848
8223
  * @param sec - number of second to wait.
8224
+ * [!] returns a _promise_ which is synchronized internally by recorder
7849
8225
  */
7850
8226
  wait(sec: number): void;
7851
8227
  /**
@@ -7873,9 +8249,12 @@ declare namespace CodeceptJS {
7873
8249
  * ```
7874
8250
  * @param fn - function to be executed in browser context.
7875
8251
  * @param args - to be passed to function.
7876
- * @returns If a function returns a Promise It will wait for it resolution.
8252
+ * [!] returns a _promise_ which is synchronized internally by recorder
8253
+ *
8254
+ *
8255
+ * If a function returns a Promise It will wait for it resolution.
7877
8256
  */
7878
- executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
8257
+ executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
7879
8258
  /**
7880
8259
  * Retrieves all texts from an element located by CSS or XPath and returns it to test.
7881
8260
  * Resumes test execution, so **should be used inside async with `await`** operator.
@@ -7994,6 +8373,7 @@ declare namespace CodeceptJS {
7994
8373
  * ```js
7995
8374
  * I.scrollPageToTop();
7996
8375
  * ```
8376
+ * [!] returns a _promise_ which is synchronized internally by recorder
7997
8377
  */
7998
8378
  scrollPageToTop(): void;
7999
8379
  /**
@@ -8002,6 +8382,7 @@ declare namespace CodeceptJS {
8002
8382
  * ```js
8003
8383
  * I.scrollPageToBottom();
8004
8384
  * ```
8385
+ * [!] returns a _promise_ which is synchronized internally by recorder
8005
8386
  */
8006
8387
  scrollPageToBottom(): void;
8007
8388
  /**
@@ -8015,6 +8396,7 @@ declare namespace CodeceptJS {
8015
8396
  * @param locator - located by CSS|XPath|strict locator.
8016
8397
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
8017
8398
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
8399
+ * [!] returns a _promise_ which is synchronized internally by recorder
8018
8400
  */
8019
8401
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
8020
8402
  /**
@@ -8025,6 +8407,7 @@ declare namespace CodeceptJS {
8025
8407
  * I.switchTo(); // switch back to main page
8026
8408
  * ```
8027
8409
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
8410
+ * [!] returns a _promise_ which is synchronized internally by recorder
8028
8411
  */
8029
8412
  switchTo(locator?: CodeceptJS.LocatorOrString): void;
8030
8413
  /**
@@ -8042,6 +8425,7 @@ declare namespace CodeceptJS {
8042
8425
  * ]);
8043
8426
  * ```
8044
8427
  * @param cookie - a cookie object or array of cookie objects.
8428
+ * [!] returns a _promise_ which is synchronized internally by recorder
8045
8429
  */
8046
8430
  setCookie(cookie: Cookie | Cookie[]): void;
8047
8431
  /**
@@ -8051,6 +8435,7 @@ declare namespace CodeceptJS {
8051
8435
  * I.seeCookie('Auth');
8052
8436
  * ```
8053
8437
  * @param name - cookie name.
8438
+ * [!] returns a _promise_ which is synchronized internally by recorder
8054
8439
  */
8055
8440
  seeCookie(name: string): void;
8056
8441
  /**
@@ -8060,6 +8445,7 @@ declare namespace CodeceptJS {
8060
8445
  * I.dontSeeCookie('auth'); // no auth cookie
8061
8446
  * ```
8062
8447
  * @param name - cookie name.
8448
+ * [!] returns a _promise_ which is synchronized internally by recorder
8063
8449
  */
8064
8450
  dontSeeCookie(name: string): void;
8065
8451
  /**
@@ -8087,6 +8473,7 @@ declare namespace CodeceptJS {
8087
8473
  * I.clearCookie('test');
8088
8474
  * ```
8089
8475
  * @param [cookie = null] - (optional, `null` by default) cookie name
8476
+ * [!] returns a _promise_ which is synchronized internally by recorder
8090
8477
  */
8091
8478
  clearCookie(cookie?: string): void;
8092
8479
  /**
@@ -8097,6 +8484,7 @@ declare namespace CodeceptJS {
8097
8484
  * ```
8098
8485
  * @param urlPart - value to check.
8099
8486
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8487
+ * [!] returns a _promise_ which is synchronized internally by recorder
8100
8488
  */
8101
8489
  waitInUrl(urlPart: string, sec?: number): void;
8102
8490
  /**
@@ -8108,6 +8496,7 @@ declare namespace CodeceptJS {
8108
8496
  * ```
8109
8497
  * @param urlPart - value to check.
8110
8498
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8499
+ * [!] returns a _promise_ which is synchronized internally by recorder
8111
8500
  */
8112
8501
  waitUrlEquals(urlPart: string, sec?: number): void;
8113
8502
  /**
@@ -8126,6 +8515,7 @@ declare namespace CodeceptJS {
8126
8515
  * @param fn - to be executed in browser context.
8127
8516
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
8128
8517
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
8518
+ * [!] returns a _promise_ which is synchronized internally by recorder
8129
8519
  */
8130
8520
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
8131
8521
  /**
@@ -8137,6 +8527,7 @@ declare namespace CodeceptJS {
8137
8527
  * @param locator - element located by CSS|XPath|strict locator.
8138
8528
  * @param num - number of elements.
8139
8529
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8530
+ * [!] returns a _promise_ which is synchronized internally by recorder
8140
8531
  */
8141
8532
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
8142
8533
  /**
@@ -8149,6 +8540,7 @@ declare namespace CodeceptJS {
8149
8540
  * ```
8150
8541
  * @param locator - element located by CSS|XPath|strict locator.
8151
8542
  * @param [sec] - (optional, `1` by default) time in seconds to wait
8543
+ * [!] returns a _promise_ which is synchronized internally by recorder
8152
8544
  */
8153
8545
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
8154
8546
  /**
@@ -8160,6 +8552,7 @@ declare namespace CodeceptJS {
8160
8552
  * ```
8161
8553
  * @param locator - element located by CSS|XPath|strict locator.
8162
8554
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8555
+ * [!] returns a _promise_ which is synchronized internally by recorder
8163
8556
  */
8164
8557
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
8165
8558
  /**
@@ -8171,6 +8564,7 @@ declare namespace CodeceptJS {
8171
8564
  * ```
8172
8565
  * @param locator - element located by CSS|XPath|strict locator.
8173
8566
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8567
+ * [!] returns a _promise_ which is synchronized internally by recorder
8174
8568
  */
8175
8569
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
8176
8570
  /**
@@ -8185,6 +8579,7 @@ declare namespace CodeceptJS {
8185
8579
  * @param text - to wait for.
8186
8580
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
8187
8581
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
8582
+ * [!] returns a _promise_ which is synchronized internally by recorder
8188
8583
  */
8189
8584
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
8190
8585
  }
@@ -8622,6 +9017,7 @@ declare namespace CodeceptJS {
8622
9017
  * I.amOnPage('/login'); // opens a login page
8623
9018
  * ```
8624
9019
  * @param url - url path or global url.
9020
+ * @returns automatically synchronized promise with recorder #!
8625
9021
  */
8626
9022
  amOnPage(url: string): void;
8627
9023
  /**
@@ -8648,11 +9044,12 @@ declare namespace CodeceptJS {
8648
9044
  * ```
8649
9045
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
8650
9046
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9047
+ * [!] returns a _promise_ which is synchronized internally by recorder
8651
9048
  *
8652
9049
  *
8653
9050
  * {{ react }}
8654
9051
  */
8655
- click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
9052
+ click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
8656
9053
  /**
8657
9054
  * Perform an emulated click on a link or a button, given by a locator.
8658
9055
  * Unlike normal click instead of sending native event, emulates a click with JavaScript.
@@ -8680,6 +9077,7 @@ declare namespace CodeceptJS {
8680
9077
  * ```
8681
9078
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
8682
9079
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
9080
+ * [!] returns a _promise_ which is synchronized internally by recorder
8683
9081
  *
8684
9082
  *
8685
9083
  * {{ react }}
@@ -8697,7 +9095,7 @@ declare namespace CodeceptJS {
8697
9095
  * ```
8698
9096
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
8699
9097
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
8700
- *
9098
+ * [!] returns a _promise_ which is synchronized internally by recorder
8701
9099
  *
8702
9100
  * {{ react }}
8703
9101
  */
@@ -8715,7 +9113,7 @@ declare namespace CodeceptJS {
8715
9113
  * ```
8716
9114
  * @param locator - clickable element located by CSS|XPath|strict locator.
8717
9115
  * @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
8718
- *
9116
+ * [!] returns a _promise_ which is synchronized internally by recorder
8719
9117
  *
8720
9118
  * {{ react }}
8721
9119
  */
@@ -8737,7 +9135,7 @@ declare namespace CodeceptJS {
8737
9135
  * ```
8738
9136
  * @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
8739
9137
  * @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
8740
- *
9138
+ * [!] returns a _promise_ which is synchronized internally by recorder
8741
9139
  *
8742
9140
  * {{ react }}
8743
9141
  */
@@ -8758,7 +9156,7 @@ declare namespace CodeceptJS {
8758
9156
  * ```
8759
9157
  * @param field - located by label|name|CSS|XPath|strict locator.
8760
9158
  * @param value - text value to fill.
8761
- *
9159
+ * [!] returns a _promise_ which is synchronized internally by recorder
8762
9160
  * {{ react }}
8763
9161
  * {{ custom }}
8764
9162
  */
@@ -8772,6 +9170,7 @@ declare namespace CodeceptJS {
8772
9170
  * ```
8773
9171
  * @param field - located by label|name|CSS|XPath|strict locator
8774
9172
  * @param value - text value to append.
9173
+ * [!] returns a _promise_ which is synchronized internally by recorder
8775
9174
  * {{ react }}
8776
9175
  */
8777
9176
  appendField(field: CodeceptJS.LocatorOrString, value: string): void;
@@ -8784,6 +9183,7 @@ declare namespace CodeceptJS {
8784
9183
  * I.clearField('#email');
8785
9184
  * ```
8786
9185
  * @param editable - field located by label|name|CSS|XPath|strict locator.
9186
+ * [!] returns a _promise_ which is synchronized internally by recorder
8787
9187
  */
8788
9188
  clearField(editable: LocatorOrString): void;
8789
9189
  /**
@@ -8807,6 +9207,7 @@ declare namespace CodeceptJS {
8807
9207
  * ```
8808
9208
  * @param select - field located by label|name|CSS|XPath|strict locator.
8809
9209
  * @param option - visible text or value of option.
9210
+ * [!] returns a _promise_ which is synchronized internally by recorder
8810
9211
  */
8811
9212
  selectOption(select: LocatorOrString, option: string | any[]): void;
8812
9213
  /**
@@ -8820,6 +9221,7 @@ declare namespace CodeceptJS {
8820
9221
  * ```
8821
9222
  * @param locator - field located by label|name|CSS|XPath|strict locator.
8822
9223
  * @param pathToFile - local file path relative to codecept.json config file.
9224
+ * [!] returns a _promise_ which is synchronized internally by recorder
8823
9225
  * Appium: not tested
8824
9226
  */
8825
9227
  attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
@@ -8836,6 +9238,7 @@ declare namespace CodeceptJS {
8836
9238
  * ```
8837
9239
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
8838
9240
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
9241
+ * [!] returns a _promise_ which is synchronized internally by recorder
8839
9242
  * Appium: not tested
8840
9243
  */
8841
9244
  checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
@@ -8852,6 +9255,7 @@ declare namespace CodeceptJS {
8852
9255
  * ```
8853
9256
  * @param field - checkbox located by label | name | CSS | XPath | strict locator.
8854
9257
  * @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
9258
+ * [!] returns a _promise_ which is synchronized internally by recorder
8855
9259
  * Appium: not tested
8856
9260
  */
8857
9261
  uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
@@ -8981,15 +9385,17 @@ declare namespace CodeceptJS {
8981
9385
  * I.seeInTitle('Home Page');
8982
9386
  * ```
8983
9387
  * @param text - text value to check.
9388
+ * [!] returns a _promise_ which is synchronized internally by recorder
8984
9389
  */
8985
9390
  seeInTitle(text: string): void;
8986
9391
  /**
8987
9392
  * Checks that title is equal to provided one.
8988
9393
  *
8989
- * ```js
8990
- * I.seeTitleEquals('Test title.');
8991
- * ```
9394
+ * ```js
9395
+ * I.seeTitleEquals('Test title.');
9396
+ * ```
8992
9397
  * @param text - value to check.
9398
+ * [!] returns a _promise_ which is synchronized internally by recorder
8993
9399
  */
8994
9400
  seeTitleEquals(text: string): void;
8995
9401
  /**
@@ -8999,6 +9405,7 @@ declare namespace CodeceptJS {
8999
9405
  * I.dontSeeInTitle('Error');
9000
9406
  * ```
9001
9407
  * @param text - value to check.
9408
+ * [!] returns a _promise_ which is synchronized internally by recorder
9002
9409
  */
9003
9410
  dontSeeInTitle(text: string): void;
9004
9411
  /**
@@ -9022,6 +9429,7 @@ declare namespace CodeceptJS {
9022
9429
  * ```
9023
9430
  * @param text - expected on page.
9024
9431
  * @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
9432
+ * [!] returns a _promise_ which is synchronized internally by recorder
9025
9433
  *
9026
9434
  * {{ react }}
9027
9435
  */
@@ -9034,6 +9442,7 @@ declare namespace CodeceptJS {
9034
9442
  * ```
9035
9443
  * @param text - element value to check.
9036
9444
  * @param [context = null] - element located by CSS|XPath|strict locator.
9445
+ * [!] returns a _promise_ which is synchronized internally by recorder
9037
9446
  */
9038
9447
  seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
9039
9448
  /**
@@ -9046,7 +9455,7 @@ declare namespace CodeceptJS {
9046
9455
  * ```
9047
9456
  * @param text - which is not present.
9048
9457
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
9049
- *
9458
+ * [!] returns a _promise_ which is synchronized internally by recorder
9050
9459
  *
9051
9460
  * {{ react }}
9052
9461
  */
@@ -9063,6 +9472,7 @@ declare namespace CodeceptJS {
9063
9472
  * ```
9064
9473
  * @param field - located by label|name|CSS|XPath|strict locator.
9065
9474
  * @param value - value to check.
9475
+ * [!] returns a _promise_ which is synchronized internally by recorder
9066
9476
  */
9067
9477
  seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
9068
9478
  /**
@@ -9075,6 +9485,7 @@ declare namespace CodeceptJS {
9075
9485
  * ```
9076
9486
  * @param field - located by label|name|CSS|XPath|strict locator.
9077
9487
  * @param value - value to check.
9488
+ * [!] returns a _promise_ which is synchronized internally by recorder
9078
9489
  */
9079
9490
  dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
9080
9491
  /**
@@ -9086,7 +9497,7 @@ declare namespace CodeceptJS {
9086
9497
  * I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
9087
9498
  * ```
9088
9499
  * @param field - located by label|name|CSS|XPath|strict locator.
9089
- *
9500
+ * [!] returns a _promise_ which is synchronized internally by recorder
9090
9501
  * Appium: not tested
9091
9502
  */
9092
9503
  seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
@@ -9099,7 +9510,7 @@ declare namespace CodeceptJS {
9099
9510
  * I.dontSeeCheckboxIsChecked('agree'); // located by name
9100
9511
  * ```
9101
9512
  * @param field - located by label|name|CSS|XPath|strict locator.
9102
- *
9513
+ * [!] returns a _promise_ which is synchronized internally by recorder
9103
9514
  * Appium: not tested
9104
9515
  */
9105
9516
  dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
@@ -9111,6 +9522,7 @@ declare namespace CodeceptJS {
9111
9522
  * I.seeElement('#modal');
9112
9523
  * ```
9113
9524
  * @param locator - located by CSS|XPath|strict locator.
9525
+ * [!] returns a _promise_ which is synchronized internally by recorder
9114
9526
  * {{ react }}
9115
9527
  */
9116
9528
  seeElement(locator: CodeceptJS.LocatorOrString): void;
@@ -9121,6 +9533,7 @@ declare namespace CodeceptJS {
9121
9533
  * I.dontSeeElement('.modal'); // modal is not shown
9122
9534
  * ```
9123
9535
  * @param locator - located by CSS|XPath|Strict locator.
9536
+ * [!] returns a _promise_ which is synchronized internally by recorder
9124
9537
  * {{ react }}
9125
9538
  */
9126
9539
  dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
@@ -9132,6 +9545,7 @@ declare namespace CodeceptJS {
9132
9545
  * I.seeElementInDOM('#modal');
9133
9546
  * ```
9134
9547
  * @param locator - element located by CSS|XPath|strict locator.
9548
+ * [!] returns a _promise_ which is synchronized internally by recorder
9135
9549
  */
9136
9550
  seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
9137
9551
  /**
@@ -9141,6 +9555,7 @@ declare namespace CodeceptJS {
9141
9555
  * I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
9142
9556
  * ```
9143
9557
  * @param locator - located by CSS|XPath|Strict locator.
9558
+ * [!] returns a _promise_ which is synchronized internally by recorder
9144
9559
  */
9145
9560
  dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
9146
9561
  /**
@@ -9150,6 +9565,7 @@ declare namespace CodeceptJS {
9150
9565
  * I.seeInSource('<h1>Green eggs &amp; ham</h1>');
9151
9566
  * ```
9152
9567
  * @param text - value to check.
9568
+ * [!] returns a _promise_ which is synchronized internally by recorder
9153
9569
  */
9154
9570
  seeInSource(text: string): void;
9155
9571
  /**
@@ -9191,6 +9607,7 @@ declare namespace CodeceptJS {
9191
9607
  * I.dontSeeInSource('<!--'); // no comments in source
9192
9608
  * ```
9193
9609
  * @param value - to check.
9610
+ * [!] returns a _promise_ which is synchronized internally by recorder
9194
9611
  */
9195
9612
  dontSeeInSource(value: string): void;
9196
9613
  /**
@@ -9203,7 +9620,7 @@ declare namespace CodeceptJS {
9203
9620
  * ```
9204
9621
  * @param locator - element located by CSS|XPath|strict locator.
9205
9622
  * @param num - number of elements.
9206
- *
9623
+ * [!] returns a _promise_ which is synchronized internally by recorder
9207
9624
  * {{ react }}
9208
9625
  */
9209
9626
  seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
@@ -9216,7 +9633,7 @@ declare namespace CodeceptJS {
9216
9633
  * ```
9217
9634
  * @param locator - element located by CSS|XPath|strict locator.
9218
9635
  * @param num - number of elements.
9219
- *
9636
+ * [!] returns a _promise_ which is synchronized internally by recorder
9220
9637
  * {{ react }}
9221
9638
  */
9222
9639
  seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
@@ -9228,6 +9645,7 @@ declare namespace CodeceptJS {
9228
9645
  * ```
9229
9646
  * @param locator - located by CSS|XPath|strict locator.
9230
9647
  * @param cssProperties - object with CSS properties and their values to check.
9648
+ * [!] returns a _promise_ which is synchronized internally by recorder
9231
9649
  */
9232
9650
  seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
9233
9651
  /**
@@ -9238,6 +9656,7 @@ declare namespace CodeceptJS {
9238
9656
  * ```
9239
9657
  * @param locator - located by CSS|XPath|strict locator.
9240
9658
  * @param attributes - attributes and their values to check.
9659
+ * [!] returns a _promise_ which is synchronized internally by recorder
9241
9660
  */
9242
9661
  seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
9243
9662
  /**
@@ -9258,11 +9677,13 @@ declare namespace CodeceptJS {
9258
9677
  * I.seeInCurrentUrl('/register'); // we are on registration page
9259
9678
  * ```
9260
9679
  * @param url - a fragment to check
9680
+ * [!] returns a _promise_ which is synchronized internally by recorder
9261
9681
  */
9262
9682
  seeInCurrentUrl(url: string): void;
9263
9683
  /**
9264
9684
  * Checks that current url does not contain a provided fragment.
9265
9685
  * @param url - value to check.
9686
+ * [!] returns a _promise_ which is synchronized internally by recorder
9266
9687
  */
9267
9688
  dontSeeInCurrentUrl(url: string): void;
9268
9689
  /**
@@ -9275,6 +9696,7 @@ declare namespace CodeceptJS {
9275
9696
  * I.seeCurrentUrlEquals('http://my.site.com/register');
9276
9697
  * ```
9277
9698
  * @param url - value to check.
9699
+ * [!] returns a _promise_ which is synchronized internally by recorder
9278
9700
  */
9279
9701
  seeCurrentUrlEquals(url: string): void;
9280
9702
  /**
@@ -9286,6 +9708,7 @@ declare namespace CodeceptJS {
9286
9708
  * I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
9287
9709
  * ```
9288
9710
  * @param url - value to check.
9711
+ * [!] returns a _promise_ which is synchronized internally by recorder
9289
9712
  */
9290
9713
  dontSeeCurrentUrlEquals(url: string): void;
9291
9714
  /**
@@ -9313,9 +9736,13 @@ declare namespace CodeceptJS {
9313
9736
  * ```
9314
9737
  * @param fn - function to be executed in browser context.
9315
9738
  * @param args - to be passed to function.
9316
- * @returns Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
9739
+ * [!] returns a _promise_ which is synchronized internally by recorder
9740
+ *
9741
+ *
9742
+ *
9743
+ * Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
9317
9744
  */
9318
- executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
9745
+ executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
9319
9746
  /**
9320
9747
  * Executes async script on page.
9321
9748
  * Provided function should execute a passed callback (as first argument) to signal it is finished.
@@ -9339,8 +9766,9 @@ declare namespace CodeceptJS {
9339
9766
  * ```
9340
9767
  * @param fn - function to be executed in browser context.
9341
9768
  * @param args - to be passed to function.
9769
+ * [!] returns a _promise_ which is synchronized internally by recorder
9342
9770
  */
9343
- executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
9771
+ executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
9344
9772
  /**
9345
9773
  * Scroll element into viewport.
9346
9774
  *
@@ -9351,6 +9779,7 @@ declare namespace CodeceptJS {
9351
9779
  * ```
9352
9780
  * @param locator - located by CSS|XPath|strict locator.
9353
9781
  * @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
9782
+ * [!] returns a _promise_ which is synchronized internally by recorder
9354
9783
  */
9355
9784
  scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): void;
9356
9785
  /**
@@ -9364,6 +9793,7 @@ declare namespace CodeceptJS {
9364
9793
  * @param locator - located by CSS|XPath|strict locator.
9365
9794
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
9366
9795
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
9796
+ * [!] returns a _promise_ which is synchronized internally by recorder
9367
9797
  */
9368
9798
  scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
9369
9799
  /**
@@ -9377,6 +9807,7 @@ declare namespace CodeceptJS {
9377
9807
  * @param locator - located by CSS|XPath|strict locator.
9378
9808
  * @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
9379
9809
  * @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
9810
+ * [!] returns a _promise_ which is synchronized internally by recorder
9380
9811
  */
9381
9812
  moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
9382
9813
  /**
@@ -9388,6 +9819,7 @@ declare namespace CodeceptJS {
9388
9819
  * ```
9389
9820
  * @param locator - element located by CSS|XPath|strict locator.
9390
9821
  * @param fileName - file name to save.
9822
+ * [!] returns a _promise_ which is synchronized internally by recorder
9391
9823
  */
9392
9824
  saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
9393
9825
  /**
@@ -9401,6 +9833,7 @@ declare namespace CodeceptJS {
9401
9833
  * ```
9402
9834
  * @param fileName - file name to save.
9403
9835
  * @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
9836
+ * [!] returns a _promise_ which is synchronized internally by recorder
9404
9837
  */
9405
9838
  saveScreenshot(fileName: string, fullPage?: boolean): void;
9406
9839
  /**
@@ -9418,7 +9851,7 @@ declare namespace CodeceptJS {
9418
9851
  * ]);
9419
9852
  * ```
9420
9853
  * @param cookie - a cookie object or array of cookie objects.
9421
- *
9854
+ * [!] returns a _promise_ which is synchronized internally by recorder
9422
9855
  *
9423
9856
  *
9424
9857
  * Uses Selenium's JSON [cookie
@@ -9434,6 +9867,7 @@ declare namespace CodeceptJS {
9434
9867
  * I.clearCookie('test');
9435
9868
  * ```
9436
9869
  * @param [cookie = null] - (optional, `null` by default) cookie name
9870
+ * [!] returns a _promise_ which is synchronized internally by recorder
9437
9871
  */
9438
9872
  clearCookie(cookie?: string): void;
9439
9873
  /**
@@ -9443,6 +9877,7 @@ declare namespace CodeceptJS {
9443
9877
  * I.seeCookie('Auth');
9444
9878
  * ```
9445
9879
  * @param name - cookie name.
9880
+ * [!] returns a _promise_ which is synchronized internally by recorder
9446
9881
  */
9447
9882
  seeCookie(name: string): void;
9448
9883
  /**
@@ -9452,6 +9887,7 @@ declare namespace CodeceptJS {
9452
9887
  * I.dontSeeCookie('auth'); // no auth cookie
9453
9888
  * ```
9454
9889
  * @param name - cookie name.
9890
+ * [!] returns a _promise_ which is synchronized internally by recorder
9455
9891
  */
9456
9892
  dontSeeCookie(name: string): void;
9457
9893
  /**
@@ -9501,6 +9937,7 @@ declare namespace CodeceptJS {
9501
9937
  * I.pressKeyUp('Control');
9502
9938
  * ```
9503
9939
  * @param key - name of key to press down.
9940
+ * [!] returns a _promise_ which is synchronized internally by recorder
9504
9941
  */
9505
9942
  pressKeyDown(key: string): void;
9506
9943
  /**
@@ -9514,6 +9951,7 @@ declare namespace CodeceptJS {
9514
9951
  * I.pressKeyUp('Control');
9515
9952
  * ```
9516
9953
  * @param key - name of key to release.
9954
+ * [!] returns a _promise_ which is synchronized internally by recorder
9517
9955
  */
9518
9956
  pressKeyUp(key: string): void;
9519
9957
  /**
@@ -9575,6 +10013,7 @@ declare namespace CodeceptJS {
9575
10013
  * - `'Space'`
9576
10014
  * - `'Tab'`
9577
10015
  * @param key - key or array of keys to press.
10016
+ * [!] returns a _promise_ which is synchronized internally by recorder
9578
10017
  *
9579
10018
  *
9580
10019
  * _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.
@@ -9597,6 +10036,7 @@ declare namespace CodeceptJS {
9597
10036
  * ```
9598
10037
  * @param key - or array of keys to type.
9599
10038
  * @param [delay = null] - (optional) delay in ms between key presses
10039
+ * [!] returns a _promise_ which is synchronized internally by recorder
9600
10040
  */
9601
10041
  type(key: string | string[], delay?: number): void;
9602
10042
  /**
@@ -9604,6 +10044,7 @@ declare namespace CodeceptJS {
9604
10044
  * First parameter can be set to `maximize`.
9605
10045
  * @param width - width in pixels or `maximize`.
9606
10046
  * @param height - height in pixels.
10047
+ * [!] returns a _promise_ which is synchronized internally by recorder
9607
10048
  * Appium: not tested in web, in apps doesn't work
9608
10049
  */
9609
10050
  resizeWindow(width: number, height: number): void;
@@ -9615,7 +10056,7 @@ declare namespace CodeceptJS {
9615
10056
  * ```
9616
10057
  * @param srcElement - located by CSS|XPath|strict locator.
9617
10058
  * @param destElement - located by CSS|XPath|strict locator.
9618
- *
10059
+ * [!] returns a _promise_ which is synchronized internally by recorder
9619
10060
  * Appium: not tested
9620
10061
  */
9621
10062
  dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
@@ -9629,6 +10070,7 @@ declare namespace CodeceptJS {
9629
10070
  * ```
9630
10071
  * @param locator - located by label|name|CSS|XPath|strict locator.
9631
10072
  * @param offsetX - position to drag.
10073
+ * [!] returns a _promise_ which is synchronized internally by recorder
9632
10074
  */
9633
10075
  dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
9634
10076
  /**
@@ -9667,9 +10109,11 @@ declare namespace CodeceptJS {
9667
10109
  * Close all tabs except for the current one.
9668
10110
  *
9669
10111
  *
9670
- * ```js
9671
- * I.closeOtherTabs();
9672
- * ```
10112
+ * ```js
10113
+ * I.closeOtherTabs();
10114
+ * ```
10115
+ *
10116
+ * [!] returns a _promise_ which is synchronized internally by recorder
9673
10117
  */
9674
10118
  closeOtherTabs(): void;
9675
10119
  /**
@@ -9679,6 +10123,7 @@ declare namespace CodeceptJS {
9679
10123
  * I.wait(2); // wait 2 secs
9680
10124
  * ```
9681
10125
  * @param sec - number of second to wait.
10126
+ * [!] returns a _promise_ which is synchronized internally by recorder
9682
10127
  */
9683
10128
  wait(sec: number): void;
9684
10129
  /**
@@ -9686,6 +10131,7 @@ declare namespace CodeceptJS {
9686
10131
  * Element can be located by CSS or XPath.
9687
10132
  * @param locator - element located by CSS|XPath|strict locator.
9688
10133
  * @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
10134
+ * [!] returns a _promise_ which is synchronized internally by recorder
9689
10135
  */
9690
10136
  waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9691
10137
  /**
@@ -9698,6 +10144,7 @@ declare namespace CodeceptJS {
9698
10144
  * ```
9699
10145
  * @param locator - element located by CSS|XPath|strict locator.
9700
10146
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10147
+ * [!] returns a _promise_ which is synchronized internally by recorder
9701
10148
  */
9702
10149
  waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9703
10150
  /**
@@ -9710,6 +10157,7 @@ declare namespace CodeceptJS {
9710
10157
  * ```
9711
10158
  * @param locator - element located by CSS|XPath|strict locator.
9712
10159
  * @param [sec] - (optional, `1` by default) time in seconds to wait
10160
+ * [!] returns a _promise_ which is synchronized internally by recorder
9713
10161
  */
9714
10162
  waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9715
10163
  /**
@@ -9720,6 +10168,7 @@ declare namespace CodeceptJS {
9720
10168
  * ```
9721
10169
  * @param urlPart - value to check.
9722
10170
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10171
+ * [!] returns a _promise_ which is synchronized internally by recorder
9723
10172
  */
9724
10173
  waitInUrl(urlPart: string, sec?: number): void;
9725
10174
  /**
@@ -9731,6 +10180,7 @@ declare namespace CodeceptJS {
9731
10180
  * ```
9732
10181
  * @param urlPart - value to check.
9733
10182
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10183
+ * [!] returns a _promise_ which is synchronized internally by recorder
9734
10184
  */
9735
10185
  waitUrlEquals(urlPart: string, sec?: number): void;
9736
10186
  /**
@@ -9745,6 +10195,7 @@ declare namespace CodeceptJS {
9745
10195
  * @param text - to wait for.
9746
10196
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
9747
10197
  * @param [context = null] - (optional) element located by CSS|XPath|strict locator.
10198
+ * [!] returns a _promise_ which is synchronized internally by recorder
9748
10199
  */
9749
10200
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
9750
10201
  /**
@@ -9756,6 +10207,7 @@ declare namespace CodeceptJS {
9756
10207
  * @param field - input field.
9757
10208
  * @param value - expected value.
9758
10209
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10210
+ * [!] returns a _promise_ which is synchronized internally by recorder
9759
10211
  */
9760
10212
  waitForValue(field: LocatorOrString, value: string, sec?: number): void;
9761
10213
  /**
@@ -9767,6 +10219,7 @@ declare namespace CodeceptJS {
9767
10219
  * ```
9768
10220
  * @param locator - element located by CSS|XPath|strict locator.
9769
10221
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10222
+ * [!] returns a _promise_ which is synchronized internally by recorder
9770
10223
  */
9771
10224
  waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9772
10225
  /**
@@ -9778,6 +10231,7 @@ declare namespace CodeceptJS {
9778
10231
  * @param locator - element located by CSS|XPath|strict locator.
9779
10232
  * @param num - number of elements.
9780
10233
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10234
+ * [!] returns a _promise_ which is synchronized internally by recorder
9781
10235
  */
9782
10236
  waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
9783
10237
  /**
@@ -9789,6 +10243,7 @@ declare namespace CodeceptJS {
9789
10243
  * ```
9790
10244
  * @param locator - element located by CSS|XPath|strict locator.
9791
10245
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10246
+ * [!] returns a _promise_ which is synchronized internally by recorder
9792
10247
  */
9793
10248
  waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9794
10249
  /**
@@ -9800,6 +10255,7 @@ declare namespace CodeceptJS {
9800
10255
  * ```
9801
10256
  * @param locator - element located by CSS|XPath|strict locator.
9802
10257
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10258
+ * [!] returns a _promise_ which is synchronized internally by recorder
9803
10259
  */
9804
10260
  waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9805
10261
  /**
@@ -9811,6 +10267,7 @@ declare namespace CodeceptJS {
9811
10267
  * ```
9812
10268
  * @param locator - element located by CSS|XPath|strict locator.
9813
10269
  * @param [sec = 1] - (optional, `1` by default) time in seconds to wait
10270
+ * [!] returns a _promise_ which is synchronized internally by recorder
9814
10271
  */
9815
10272
  waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
9816
10273
  /**
@@ -9829,6 +10286,7 @@ declare namespace CodeceptJS {
9829
10286
  * @param fn - to be executed in browser context.
9830
10287
  * @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
9831
10288
  * @param [sec = null] - (optional, `1` by default) time in seconds to wait
10289
+ * [!] returns a _promise_ which is synchronized internally by recorder
9832
10290
  */
9833
10291
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
9834
10292
  /**
@@ -9839,44 +10297,51 @@ declare namespace CodeceptJS {
9839
10297
  * I.switchTo(); // switch back to main page
9840
10298
  * ```
9841
10299
  * @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
10300
+ * [!] returns a _promise_ which is synchronized internally by recorder
9842
10301
  */
9843
10302
  switchTo(locator?: CodeceptJS.LocatorOrString): void;
9844
10303
  /**
9845
10304
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
9846
10305
  *
9847
- * ```js
9848
- * I.switchToNextTab();
9849
- * I.switchToNextTab(2);
9850
- * ```
10306
+ * ```js
10307
+ * I.switchToNextTab();
10308
+ * I.switchToNextTab(2);
10309
+ * ```
9851
10310
  * @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
9852
10311
  * @param [sec = null] - (optional) time in seconds to wait.
10312
+ * [!] returns a _promise_ which is synchronized internally by recorder
9853
10313
  */
9854
10314
  switchToNextTab(num?: number, sec?: number | null): void;
9855
10315
  /**
9856
10316
  * Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
9857
10317
  *
9858
- * ```js
9859
- * I.switchToPreviousTab();
9860
- * I.switchToPreviousTab(2);
9861
- * ```
10318
+ * ```js
10319
+ * I.switchToPreviousTab();
10320
+ * I.switchToPreviousTab(2);
10321
+ * ```
9862
10322
  * @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
9863
10323
  * @param [sec = null] - (optional) time in seconds to wait.
10324
+ * [!] returns a _promise_ which is synchronized internally by recorder
9864
10325
  */
9865
10326
  switchToPreviousTab(num?: number, sec?: number): void;
9866
10327
  /**
9867
10328
  * Close current tab.
9868
10329
  *
9869
- * ```js
9870
- * I.closeCurrentTab();
9871
- * ```
10330
+ * ```js
10331
+ * I.closeCurrentTab();
10332
+ * ```
10333
+ *
10334
+ * [!] returns a _promise_ which is synchronized internally by recorder
9872
10335
  */
9873
10336
  closeCurrentTab(): void;
9874
10337
  /**
9875
10338
  * Open new tab and switch to it.
9876
10339
  *
9877
- * ```js
9878
- * I.openNewTab();
9879
- * ```
10340
+ * ```js
10341
+ * I.openNewTab();
10342
+ * ```
10343
+ *
10344
+ * [!] returns a _promise_ which is synchronized internally by recorder
9880
10345
  */
9881
10346
  openNewTab(): void;
9882
10347
  /**
@@ -9895,6 +10360,7 @@ declare namespace CodeceptJS {
9895
10360
  * ```js
9896
10361
  * I.refreshPage();
9897
10362
  * ```
10363
+ * [!] returns a _promise_ which is synchronized internally by recorder
9898
10364
  */
9899
10365
  refreshPage(): void;
9900
10366
  /**
@@ -9903,6 +10369,7 @@ declare namespace CodeceptJS {
9903
10369
  * ```js
9904
10370
  * I.scrollPageToTop();
9905
10371
  * ```
10372
+ * [!] returns a _promise_ which is synchronized internally by recorder
9906
10373
  */
9907
10374
  scrollPageToTop(): void;
9908
10375
  /**
@@ -9911,6 +10378,7 @@ declare namespace CodeceptJS {
9911
10378
  * ```js
9912
10379
  * I.scrollPageToBottom();
9913
10380
  * ```
10381
+ * [!] returns a _promise_ which is synchronized internally by recorder
9914
10382
  */
9915
10383
  scrollPageToBottom(): void;
9916
10384
  /**
@@ -9934,6 +10402,7 @@ declare namespace CodeceptJS {
9934
10402
  * @param latitude - to set.
9935
10403
  * @param longitude - to set
9936
10404
  * @param [altitude = null] - (optional, null by default) to set
10405
+ * [!] returns a _promise_ which is synchronized internally by recorder
9937
10406
  */
9938
10407
  setGeoLocation(latitude: number, longitude: number, altitude?: number): void;
9939
10408
  /**
@@ -9971,7 +10440,7 @@ declare namespace CodeceptJS {
9971
10440
  /**
9972
10441
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
9973
10442
  */
9974
- runOnAndroid(): void;
10443
+ runOnAndroid(caps: any, fn: any): void;
9975
10444
  /**
9976
10445
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
9977
10446
  */