codeceptjs 3.3.0 → 3.3.3
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.
- package/CHANGELOG.md +50 -1
- package/README.md +6 -1
- package/docs/api.md +1 -1
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +21 -16
- package/docs/build/GraphQL.js +4 -2
- package/docs/build/GraphQLDataFactory.js +3 -3
- package/docs/build/JSONResponse.js +1 -1
- package/docs/build/Nightmare.js +54 -25
- package/docs/build/Playwright.js +105 -52
- package/docs/build/Protractor.js +72 -34
- package/docs/build/Puppeteer.js +80 -37
- package/docs/build/REST.js +5 -2
- package/docs/build/TestCafe.js +54 -23
- package/docs/build/WebDriver.js +115 -67
- package/docs/changelog.md +50 -1
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +217 -175
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/Nightmare.md +98 -45
- package/docs/helpers/Playwright.md +151 -59
- package/docs/helpers/Puppeteer.md +103 -26
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +77 -22
- package/docs/helpers/WebDriver.md +150 -62
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/webapi/amOnPage.mustache +2 -1
- package/docs/webapi/appendField.mustache +2 -1
- package/docs/webapi/attachFile.mustache +2 -1
- package/docs/webapi/checkOption.mustache +2 -1
- package/docs/webapi/clearCookie.mustache +2 -1
- package/docs/webapi/clearField.mustache +1 -0
- package/docs/webapi/click.mustache +2 -1
- package/docs/webapi/clickLink.mustache +2 -1
- package/docs/webapi/closeCurrentTab.mustache +6 -4
- package/docs/webapi/closeOtherTabs.mustache +6 -4
- package/docs/webapi/dontSee.mustache +1 -0
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/dontSeeCookie.mustache +2 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/dontSeeElement.mustache +2 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
- package/docs/webapi/dontSeeInField.mustache +2 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -0
- package/docs/webapi/dontSeeInTitle.mustache +2 -1
- package/docs/webapi/doubleClick.mustache +1 -0
- package/docs/webapi/downloadFile.mustache +2 -1
- package/docs/webapi/dragAndDrop.mustache +1 -0
- package/docs/webapi/dragSlider.mustache +2 -1
- package/docs/webapi/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -0
- package/docs/webapi/forceRightClick.mustache +1 -0
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +1 -0
- package/docs/webapi/openNewTab.mustache +6 -4
- package/docs/webapi/pressKey.mustache +2 -1
- package/docs/webapi/pressKeyDown.mustache +1 -0
- package/docs/webapi/pressKeyUp.mustache +1 -0
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
- package/docs/webapi/refreshPage.mustache +1 -0
- package/docs/webapi/resizeWindow.mustache +2 -1
- package/docs/webapi/rightClick.mustache +1 -0
- package/docs/webapi/saveElementScreenshot.mustache +1 -0
- package/docs/webapi/saveScreenshot.mustache +2 -1
- package/docs/webapi/say.mustache +2 -1
- package/docs/webapi/scrollIntoView.mustache +1 -0
- package/docs/webapi/scrollPageToBottom.mustache +1 -0
- package/docs/webapi/scrollPageToTop.mustache +1 -0
- package/docs/webapi/scrollTo.mustache +2 -1
- package/docs/webapi/see.mustache +2 -1
- package/docs/webapi/seeAttributesOnElements.mustache +2 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/seeCookie.mustache +1 -0
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/seeElement.mustache +2 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -0
- package/docs/webapi/seeInCurrentUrl.mustache +2 -1
- package/docs/webapi/seeInField.mustache +1 -0
- package/docs/webapi/seeInPopup.mustache +1 -0
- package/docs/webapi/seeInSource.mustache +2 -1
- package/docs/webapi/seeInTitle.mustache +2 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
- package/docs/webapi/seeTextEquals.mustache +2 -1
- package/docs/webapi/seeTitleEquals.mustache +6 -5
- package/docs/webapi/selectOption.mustache +1 -0
- package/docs/webapi/setCookie.mustache +1 -0
- package/docs/webapi/setGeoLocation.mustache +1 -0
- package/docs/webapi/switchTo.mustache +2 -1
- package/docs/webapi/switchToNextTab.mustache +8 -7
- package/docs/webapi/switchToPreviousTab.mustache +8 -7
- package/docs/webapi/type.mustache +1 -0
- package/docs/webapi/uncheckOption.mustache +2 -1
- package/docs/webapi/wait.mustache +2 -1
- package/docs/webapi/waitForClickable.mustache +2 -1
- package/docs/webapi/waitForDetached.mustache +2 -1
- package/docs/webapi/waitForElement.mustache +2 -1
- package/docs/webapi/waitForEnabled.mustache +2 -1
- package/docs/webapi/waitForFunction.mustache +1 -0
- package/docs/webapi/waitForInvisible.mustache +2 -1
- package/docs/webapi/waitForText.mustache +2 -1
- package/docs/webapi/waitForValue.mustache +1 -0
- package/docs/webapi/waitForVisible.mustache +1 -0
- package/docs/webapi/waitInUrl.mustache +2 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
- package/docs/webapi/waitToHide.mustache +2 -1
- package/docs/webapi/waitUrlEquals.mustache +2 -1
- package/lib/cli.js +1 -1
- package/lib/command/definitions.js +9 -0
- package/lib/command/run-workers.js +1 -1
- package/lib/command/run.js +2 -2
- package/lib/command/workers/runTests.js +55 -0
- package/lib/helper/ApiDataFactory.js +4 -3
- package/lib/helper/Appium.js +2 -7
- package/lib/helper/GraphQL.js +4 -2
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +1 -1
- package/lib/helper/Playwright.js +28 -17
- package/lib/helper/REST.js +5 -2
- package/lib/helper/WebDriver.js +4 -0
- package/lib/interfaces/bdd.js +5 -0
- package/lib/listener/steps.js +1 -0
- package/lib/output.js +4 -0
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/stepByStepReport.js +8 -6
- package/lib/workers.js +12 -0
- package/package.json +3 -3
- package/typings/types.d.ts +534 -112
package/typings/types.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
46
|
-
*
|
|
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):
|
|
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):
|
|
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):
|
|
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
|
-
*
|
|
379
|
+
*
|
|
380
|
+
* Appium: support Android and iOS
|
|
380
381
|
*/
|
|
381
|
-
setOrientation(orientation: 'LANDSCAPE' | 'PORTRAIT'):
|
|
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
|
|
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
|
-
*
|
|
503
|
+
*
|
|
504
|
+
* Appium: support Android and iOS
|
|
503
505
|
*/
|
|
504
|
-
setSettings(settings: 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):
|
|
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):
|
|
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):
|
|
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
|
-
*
|
|
1302
|
-
*
|
|
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 & 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
|
-
*
|
|
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[]):
|
|
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
|
-
*
|
|
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[]):
|
|
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
|
/**
|
|
@@ -2603,6 +2680,7 @@ declare namespace CodeceptJS {
|
|
|
2603
2680
|
* * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
|
|
2604
2681
|
* * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
|
|
2605
2682
|
* * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
|
|
2683
|
+
* * `colorScheme`: (optional) default color scheme. Possible values: `dark` | `light` | `no-preference`.
|
|
2606
2684
|
* * `userAgent`: (optional) user-agent string.
|
|
2607
2685
|
* * `locale`: (optional) locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
|
|
2608
2686
|
* * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
|
|
@@ -2723,7 +2801,7 @@ declare namespace CodeceptJS {
|
|
|
2723
2801
|
* }
|
|
2724
2802
|
* ```
|
|
2725
2803
|
*
|
|
2726
|
-
* #### Example #7: Launch test with a
|
|
2804
|
+
* #### Example #7: Launch test with a specific user locale
|
|
2727
2805
|
*
|
|
2728
2806
|
* ```js
|
|
2729
2807
|
* {
|
|
@@ -2736,6 +2814,19 @@ declare namespace CodeceptJS {
|
|
|
2736
2814
|
* }
|
|
2737
2815
|
* ```
|
|
2738
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
|
+
*
|
|
2739
2830
|
* Note: When connecting to remote browser `show` and specific `chrome` options (e.g. `headless` or `devtools`) are ignored.
|
|
2740
2831
|
*
|
|
2741
2832
|
* ## Access From Helpers
|
|
@@ -2771,7 +2862,7 @@ declare namespace CodeceptJS {
|
|
|
2771
2862
|
* });
|
|
2772
2863
|
* ```
|
|
2773
2864
|
* @param description - used to show in logs.
|
|
2774
|
-
* @param fn - async function that executed with Playwright helper as
|
|
2865
|
+
* @param fn - async function that executed with Playwright helper as argumen
|
|
2775
2866
|
*/
|
|
2776
2867
|
usePlaywrightTo(description: string, fn: (...params: any[]) => any): void;
|
|
2777
2868
|
/**
|
|
@@ -2814,6 +2905,7 @@ declare namespace CodeceptJS {
|
|
|
2814
2905
|
* I.seeInPopup('Popup text');
|
|
2815
2906
|
* ```
|
|
2816
2907
|
* @param text - value to check.
|
|
2908
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2817
2909
|
*/
|
|
2818
2910
|
seeInPopup(text: string): void;
|
|
2819
2911
|
/**
|
|
@@ -2847,6 +2939,7 @@ declare namespace CodeceptJS {
|
|
|
2847
2939
|
* I.amOnPage('/login'); // opens a login page
|
|
2848
2940
|
* ```
|
|
2849
2941
|
* @param url - url path or global url.
|
|
2942
|
+
* @returns automatically synchronized promise with recorder #!
|
|
2850
2943
|
*/
|
|
2851
2944
|
amOnPage(url: string): void;
|
|
2852
2945
|
/**
|
|
@@ -2854,6 +2947,7 @@ declare namespace CodeceptJS {
|
|
|
2854
2947
|
* First parameter can be set to `maximize`.
|
|
2855
2948
|
* @param width - width in pixels or `maximize`.
|
|
2856
2949
|
* @param height - height in pixels.
|
|
2950
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2857
2951
|
*
|
|
2858
2952
|
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
2859
2953
|
* Playwright does not control the window of a browser so it can't adjust its real size.
|
|
@@ -2890,6 +2984,7 @@ declare namespace CodeceptJS {
|
|
|
2890
2984
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2891
2985
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2892
2986
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2987
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2893
2988
|
*/
|
|
2894
2989
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
2895
2990
|
/**
|
|
@@ -2900,9 +2995,8 @@ declare namespace CodeceptJS {
|
|
|
2900
2995
|
* ```
|
|
2901
2996
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
2902
2997
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
2903
|
-
*
|
|
2904
|
-
*
|
|
2905
|
-
* [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
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.
|
|
2906
3000
|
*
|
|
2907
3001
|
* ```js
|
|
2908
3002
|
* // specify coordinates for source position
|
|
@@ -2911,13 +3005,14 @@ declare namespace CodeceptJS {
|
|
|
2911
3005
|
*
|
|
2912
3006
|
* > By default option `force: true` is set
|
|
2913
3007
|
*/
|
|
2914
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
3008
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): void;
|
|
2915
3009
|
/**
|
|
2916
3010
|
* Reload the current page.
|
|
2917
3011
|
*
|
|
2918
3012
|
* ```js
|
|
2919
3013
|
* I.refreshPage();
|
|
2920
3014
|
* ```
|
|
3015
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2921
3016
|
*/
|
|
2922
3017
|
refreshPage(): void;
|
|
2923
3018
|
/**
|
|
@@ -2926,6 +3021,7 @@ declare namespace CodeceptJS {
|
|
|
2926
3021
|
* ```js
|
|
2927
3022
|
* I.scrollPageToTop();
|
|
2928
3023
|
* ```
|
|
3024
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2929
3025
|
*/
|
|
2930
3026
|
scrollPageToTop(): void;
|
|
2931
3027
|
/**
|
|
@@ -2934,6 +3030,7 @@ declare namespace CodeceptJS {
|
|
|
2934
3030
|
* ```js
|
|
2935
3031
|
* I.scrollPageToBottom();
|
|
2936
3032
|
* ```
|
|
3033
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2937
3034
|
*/
|
|
2938
3035
|
scrollPageToBottom(): void;
|
|
2939
3036
|
/**
|
|
@@ -2947,6 +3044,7 @@ declare namespace CodeceptJS {
|
|
|
2947
3044
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2948
3045
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2949
3046
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
3047
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2950
3048
|
*/
|
|
2951
3049
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
2952
3050
|
/**
|
|
@@ -2956,6 +3054,7 @@ declare namespace CodeceptJS {
|
|
|
2956
3054
|
* I.seeInTitle('Home Page');
|
|
2957
3055
|
* ```
|
|
2958
3056
|
* @param text - text value to check.
|
|
3057
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2959
3058
|
*/
|
|
2960
3059
|
seeInTitle(text: string): void;
|
|
2961
3060
|
/**
|
|
@@ -2971,10 +3070,11 @@ declare namespace CodeceptJS {
|
|
|
2971
3070
|
/**
|
|
2972
3071
|
* Checks that title is equal to provided one.
|
|
2973
3072
|
*
|
|
2974
|
-
*
|
|
2975
|
-
*
|
|
2976
|
-
*
|
|
3073
|
+
* ```js
|
|
3074
|
+
* I.seeTitleEquals('Test title.');
|
|
3075
|
+
* ```
|
|
2977
3076
|
* @param text - value to check.
|
|
3077
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2978
3078
|
*/
|
|
2979
3079
|
seeTitleEquals(text: string): void;
|
|
2980
3080
|
/**
|
|
@@ -2984,6 +3084,7 @@ declare namespace CodeceptJS {
|
|
|
2984
3084
|
* I.dontSeeInTitle('Error');
|
|
2985
3085
|
* ```
|
|
2986
3086
|
* @param text - value to check.
|
|
3087
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
2987
3088
|
*/
|
|
2988
3089
|
dontSeeInTitle(text: string): void;
|
|
2989
3090
|
/**
|
|
@@ -3097,6 +3198,7 @@ declare namespace CodeceptJS {
|
|
|
3097
3198
|
* I.seeElement('#modal');
|
|
3098
3199
|
* ```
|
|
3099
3200
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3201
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3100
3202
|
*/
|
|
3101
3203
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
3102
3204
|
/**
|
|
@@ -3106,6 +3208,7 @@ declare namespace CodeceptJS {
|
|
|
3106
3208
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
3107
3209
|
* ```
|
|
3108
3210
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3211
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3109
3212
|
*/
|
|
3110
3213
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
3111
3214
|
/**
|
|
@@ -3116,6 +3219,7 @@ declare namespace CodeceptJS {
|
|
|
3116
3219
|
* I.seeElementInDOM('#modal');
|
|
3117
3220
|
* ```
|
|
3118
3221
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3222
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3119
3223
|
*/
|
|
3120
3224
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
3121
3225
|
/**
|
|
@@ -3125,6 +3229,7 @@ declare namespace CodeceptJS {
|
|
|
3125
3229
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
3126
3230
|
* ```
|
|
3127
3231
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3232
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3128
3233
|
*/
|
|
3129
3234
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
3130
3235
|
/**
|
|
@@ -3142,7 +3247,7 @@ declare namespace CodeceptJS {
|
|
|
3142
3247
|
* ```
|
|
3143
3248
|
* @param [fileName = downloads] - set filename for downloaded file
|
|
3144
3249
|
*/
|
|
3145
|
-
handleDownloads(fileName?: string): void
|
|
3250
|
+
handleDownloads(fileName?: string): Promise<void>;
|
|
3146
3251
|
/**
|
|
3147
3252
|
* Perform a click on a link or a button, given by a locator.
|
|
3148
3253
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -3167,9 +3272,8 @@ declare namespace CodeceptJS {
|
|
|
3167
3272
|
* ```
|
|
3168
3273
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3169
3274
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3170
|
-
*
|
|
3171
|
-
*
|
|
3172
|
-
* [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
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.
|
|
3173
3277
|
*
|
|
3174
3278
|
* Examples:
|
|
3175
3279
|
*
|
|
@@ -3181,7 +3285,7 @@ declare namespace CodeceptJS {
|
|
|
3181
3285
|
* I.click('.edit', null, { modifiers: ['Ctrl'] } )
|
|
3182
3286
|
* ```
|
|
3183
3287
|
*/
|
|
3184
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3288
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, opts?: any): void;
|
|
3185
3289
|
/**
|
|
3186
3290
|
* Clicks link and waits for navigation (deprecated)
|
|
3187
3291
|
*/
|
|
@@ -3213,6 +3317,7 @@ declare namespace CodeceptJS {
|
|
|
3213
3317
|
* ```
|
|
3214
3318
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3215
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
|
|
3216
3321
|
*/
|
|
3217
3322
|
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3218
3323
|
/**
|
|
@@ -3227,6 +3332,7 @@ declare namespace CodeceptJS {
|
|
|
3227
3332
|
* ```
|
|
3228
3333
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3229
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
|
|
3230
3336
|
*/
|
|
3231
3337
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3232
3338
|
/**
|
|
@@ -3242,6 +3348,7 @@ declare namespace CodeceptJS {
|
|
|
3242
3348
|
* ```
|
|
3243
3349
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
3244
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
|
|
3245
3352
|
*/
|
|
3246
3353
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3247
3354
|
/**
|
|
@@ -3257,6 +3364,7 @@ declare namespace CodeceptJS {
|
|
|
3257
3364
|
* ```
|
|
3258
3365
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3259
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
|
|
3260
3368
|
*
|
|
3261
3369
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
3262
3370
|
*
|
|
@@ -3282,6 +3390,7 @@ declare namespace CodeceptJS {
|
|
|
3282
3390
|
* ```
|
|
3283
3391
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3284
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
|
|
3285
3394
|
*
|
|
3286
3395
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
3287
3396
|
*
|
|
@@ -3303,6 +3412,7 @@ declare namespace CodeceptJS {
|
|
|
3303
3412
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
3304
3413
|
* ```
|
|
3305
3414
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3415
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3306
3416
|
*/
|
|
3307
3417
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
3308
3418
|
/**
|
|
@@ -3314,6 +3424,7 @@ declare namespace CodeceptJS {
|
|
|
3314
3424
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
3315
3425
|
* ```
|
|
3316
3426
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3427
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3317
3428
|
*/
|
|
3318
3429
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
3319
3430
|
/**
|
|
@@ -3327,6 +3438,7 @@ declare namespace CodeceptJS {
|
|
|
3327
3438
|
* I.pressKeyUp('Control');
|
|
3328
3439
|
* ```
|
|
3329
3440
|
* @param key - name of key to press down.
|
|
3441
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3330
3442
|
*/
|
|
3331
3443
|
pressKeyDown(key: string): void;
|
|
3332
3444
|
/**
|
|
@@ -3340,6 +3452,7 @@ declare namespace CodeceptJS {
|
|
|
3340
3452
|
* I.pressKeyUp('Control');
|
|
3341
3453
|
* ```
|
|
3342
3454
|
* @param key - name of key to release.
|
|
3455
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3343
3456
|
*/
|
|
3344
3457
|
pressKeyUp(key: string): void;
|
|
3345
3458
|
/**
|
|
@@ -3401,6 +3514,7 @@ declare namespace CodeceptJS {
|
|
|
3401
3514
|
* - `'Space'`
|
|
3402
3515
|
* - `'Tab'`
|
|
3403
3516
|
* @param key - key or array of keys to press.
|
|
3517
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3404
3518
|
*
|
|
3405
3519
|
*
|
|
3406
3520
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
@@ -3423,6 +3537,7 @@ declare namespace CodeceptJS {
|
|
|
3423
3537
|
* ```
|
|
3424
3538
|
* @param key - or array of keys to type.
|
|
3425
3539
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
3540
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3426
3541
|
*/
|
|
3427
3542
|
type(key: string | string[], delay?: number): void;
|
|
3428
3543
|
/**
|
|
@@ -3441,6 +3556,7 @@ declare namespace CodeceptJS {
|
|
|
3441
3556
|
* ```
|
|
3442
3557
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3443
3558
|
* @param value - text value to fill.
|
|
3559
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3444
3560
|
*/
|
|
3445
3561
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
3446
3562
|
/**
|
|
@@ -3452,6 +3568,7 @@ declare namespace CodeceptJS {
|
|
|
3452
3568
|
* I.clearField('#email');
|
|
3453
3569
|
* ```
|
|
3454
3570
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
3571
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3455
3572
|
*/
|
|
3456
3573
|
clearField(editable: LocatorOrString): void;
|
|
3457
3574
|
/**
|
|
@@ -3463,6 +3580,7 @@ declare namespace CodeceptJS {
|
|
|
3463
3580
|
* ```
|
|
3464
3581
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
3465
3582
|
* @param value - text value to append.
|
|
3583
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3466
3584
|
*/
|
|
3467
3585
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3468
3586
|
/**
|
|
@@ -3477,6 +3595,7 @@ declare namespace CodeceptJS {
|
|
|
3477
3595
|
* ```
|
|
3478
3596
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3479
3597
|
* @param value - value to check.
|
|
3598
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3480
3599
|
*/
|
|
3481
3600
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3482
3601
|
/**
|
|
@@ -3489,6 +3608,7 @@ declare namespace CodeceptJS {
|
|
|
3489
3608
|
* ```
|
|
3490
3609
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3491
3610
|
* @param value - value to check.
|
|
3611
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3492
3612
|
*/
|
|
3493
3613
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3494
3614
|
/**
|
|
@@ -3502,6 +3622,7 @@ declare namespace CodeceptJS {
|
|
|
3502
3622
|
* ```
|
|
3503
3623
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
3504
3624
|
* @param pathToFile - local file path relative to codecept.json config file.
|
|
3625
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3505
3626
|
*/
|
|
3506
3627
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
3507
3628
|
/**
|
|
@@ -3525,6 +3646,7 @@ declare namespace CodeceptJS {
|
|
|
3525
3646
|
* ```
|
|
3526
3647
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
3527
3648
|
* @param option - visible text or value of option.
|
|
3649
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3528
3650
|
*/
|
|
3529
3651
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
3530
3652
|
/**
|
|
@@ -3545,11 +3667,13 @@ declare namespace CodeceptJS {
|
|
|
3545
3667
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
3546
3668
|
* ```
|
|
3547
3669
|
* @param url - a fragment to check
|
|
3670
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3548
3671
|
*/
|
|
3549
3672
|
seeInCurrentUrl(url: string): void;
|
|
3550
3673
|
/**
|
|
3551
3674
|
* Checks that current url does not contain a provided fragment.
|
|
3552
3675
|
* @param url - value to check.
|
|
3676
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3553
3677
|
*/
|
|
3554
3678
|
dontSeeInCurrentUrl(url: string): void;
|
|
3555
3679
|
/**
|
|
@@ -3562,6 +3686,7 @@ declare namespace CodeceptJS {
|
|
|
3562
3686
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
3563
3687
|
* ```
|
|
3564
3688
|
* @param url - value to check.
|
|
3689
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3565
3690
|
*/
|
|
3566
3691
|
seeCurrentUrlEquals(url: string): void;
|
|
3567
3692
|
/**
|
|
@@ -3573,6 +3698,7 @@ declare namespace CodeceptJS {
|
|
|
3573
3698
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
3574
3699
|
* ```
|
|
3575
3700
|
* @param url - value to check.
|
|
3701
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3576
3702
|
*/
|
|
3577
3703
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
3578
3704
|
/**
|
|
@@ -3586,6 +3712,7 @@ declare namespace CodeceptJS {
|
|
|
3586
3712
|
* ```
|
|
3587
3713
|
* @param text - expected on page.
|
|
3588
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
|
|
3589
3716
|
*/
|
|
3590
3717
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3591
3718
|
/**
|
|
@@ -3596,6 +3723,7 @@ declare namespace CodeceptJS {
|
|
|
3596
3723
|
* ```
|
|
3597
3724
|
* @param text - element value to check.
|
|
3598
3725
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
3726
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3599
3727
|
*/
|
|
3600
3728
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3601
3729
|
/**
|
|
@@ -3608,6 +3736,7 @@ declare namespace CodeceptJS {
|
|
|
3608
3736
|
* ```
|
|
3609
3737
|
* @param text - which is not present.
|
|
3610
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
|
|
3611
3740
|
*/
|
|
3612
3741
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3613
3742
|
/**
|
|
@@ -3647,6 +3776,7 @@ declare namespace CodeceptJS {
|
|
|
3647
3776
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
3648
3777
|
* ```
|
|
3649
3778
|
* @param text - value to check.
|
|
3779
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3650
3780
|
*/
|
|
3651
3781
|
seeInSource(text: string): void;
|
|
3652
3782
|
/**
|
|
@@ -3656,6 +3786,7 @@ declare namespace CodeceptJS {
|
|
|
3656
3786
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
3657
3787
|
* ```
|
|
3658
3788
|
* @param value - to check.
|
|
3789
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3659
3790
|
*/
|
|
3660
3791
|
dontSeeInSource(value: string): void;
|
|
3661
3792
|
/**
|
|
@@ -3668,6 +3799,7 @@ declare namespace CodeceptJS {
|
|
|
3668
3799
|
* ```
|
|
3669
3800
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3670
3801
|
* @param num - number of elements.
|
|
3802
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3671
3803
|
*/
|
|
3672
3804
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
3673
3805
|
/**
|
|
@@ -3679,6 +3811,7 @@ declare namespace CodeceptJS {
|
|
|
3679
3811
|
* ```
|
|
3680
3812
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3681
3813
|
* @param num - number of elements.
|
|
3814
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3682
3815
|
*/
|
|
3683
3816
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
3684
3817
|
/**
|
|
@@ -3696,6 +3829,7 @@ declare namespace CodeceptJS {
|
|
|
3696
3829
|
* ]);
|
|
3697
3830
|
* ```
|
|
3698
3831
|
* @param cookie - a cookie object or array of cookie objects.
|
|
3832
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3699
3833
|
*/
|
|
3700
3834
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
3701
3835
|
/**
|
|
@@ -3705,6 +3839,7 @@ declare namespace CodeceptJS {
|
|
|
3705
3839
|
* I.seeCookie('Auth');
|
|
3706
3840
|
* ```
|
|
3707
3841
|
* @param name - cookie name.
|
|
3842
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3708
3843
|
*/
|
|
3709
3844
|
seeCookie(name: string): void;
|
|
3710
3845
|
/**
|
|
@@ -3714,6 +3849,7 @@ declare namespace CodeceptJS {
|
|
|
3714
3849
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
3715
3850
|
* ```
|
|
3716
3851
|
* @param name - cookie name.
|
|
3852
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3717
3853
|
*/
|
|
3718
3854
|
dontSeeCookie(name: string): void;
|
|
3719
3855
|
/**
|
|
@@ -3741,6 +3877,7 @@ declare namespace CodeceptJS {
|
|
|
3741
3877
|
* I.clearCookie('test');
|
|
3742
3878
|
* ```
|
|
3743
3879
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
3880
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3744
3881
|
*/
|
|
3745
3882
|
clearCookie(cookie?: string): void;
|
|
3746
3883
|
/**
|
|
@@ -3765,7 +3902,7 @@ declare namespace CodeceptJS {
|
|
|
3765
3902
|
* @param fn - function to be executed in browser context.
|
|
3766
3903
|
* @param [arg] - optional argument to pass to the function
|
|
3767
3904
|
*/
|
|
3768
|
-
executeScript(fn: string | ((...params: any[]) => any), arg?: any):
|
|
3905
|
+
executeScript(fn: string | ((...params: any[]) => any), arg?: any): void;
|
|
3769
3906
|
/**
|
|
3770
3907
|
* Grab Locator if called within Context
|
|
3771
3908
|
*/
|
|
@@ -3872,6 +4009,7 @@ declare namespace CodeceptJS {
|
|
|
3872
4009
|
* ```
|
|
3873
4010
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3874
4011
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
4012
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3875
4013
|
*/
|
|
3876
4014
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
3877
4015
|
/**
|
|
@@ -3882,6 +4020,7 @@ declare namespace CodeceptJS {
|
|
|
3882
4020
|
* ```
|
|
3883
4021
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3884
4022
|
* @param attributes - attributes and their values to check.
|
|
4023
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3885
4024
|
*/
|
|
3886
4025
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
3887
4026
|
/**
|
|
@@ -3894,6 +4033,7 @@ declare namespace CodeceptJS {
|
|
|
3894
4033
|
* ```
|
|
3895
4034
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
3896
4035
|
* @param offsetX - position to drag.
|
|
4036
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3897
4037
|
*/
|
|
3898
4038
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
3899
4039
|
/**
|
|
@@ -3930,6 +4070,7 @@ declare namespace CodeceptJS {
|
|
|
3930
4070
|
* ```
|
|
3931
4071
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3932
4072
|
* @param fileName - file name to save.
|
|
4073
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3933
4074
|
*/
|
|
3934
4075
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
3935
4076
|
/**
|
|
@@ -3943,6 +4084,7 @@ declare namespace CodeceptJS {
|
|
|
3943
4084
|
* ```
|
|
3944
4085
|
* @param fileName - file name to save.
|
|
3945
4086
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
4087
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3946
4088
|
*/
|
|
3947
4089
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
3948
4090
|
/**
|
|
@@ -3969,6 +4111,7 @@ declare namespace CodeceptJS {
|
|
|
3969
4111
|
* I.wait(2); // wait 2 secs
|
|
3970
4112
|
* ```
|
|
3971
4113
|
* @param sec - number of second to wait.
|
|
4114
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3972
4115
|
*/
|
|
3973
4116
|
wait(sec: number): void;
|
|
3974
4117
|
/**
|
|
@@ -3976,6 +4119,7 @@ declare namespace CodeceptJS {
|
|
|
3976
4119
|
* Element can be located by CSS or XPath.
|
|
3977
4120
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3978
4121
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
4122
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3979
4123
|
*/
|
|
3980
4124
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
3981
4125
|
/**
|
|
@@ -3987,6 +4131,7 @@ declare namespace CodeceptJS {
|
|
|
3987
4131
|
* @param field - input field.
|
|
3988
4132
|
* @param value - expected value.
|
|
3989
4133
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4134
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
3990
4135
|
*/
|
|
3991
4136
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
3992
4137
|
/**
|
|
@@ -3998,6 +4143,7 @@ declare namespace CodeceptJS {
|
|
|
3998
4143
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3999
4144
|
* @param num - number of elements.
|
|
4000
4145
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4146
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4001
4147
|
*/
|
|
4002
4148
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
4003
4149
|
/**
|
|
@@ -4010,6 +4156,7 @@ declare namespace CodeceptJS {
|
|
|
4010
4156
|
* ```
|
|
4011
4157
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4012
4158
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4159
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4013
4160
|
*/
|
|
4014
4161
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4015
4162
|
/**
|
|
@@ -4022,6 +4169,7 @@ declare namespace CodeceptJS {
|
|
|
4022
4169
|
* ```
|
|
4023
4170
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4024
4171
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4172
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4025
4173
|
*/
|
|
4026
4174
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4027
4175
|
/**
|
|
@@ -4033,7 +4181,7 @@ declare namespace CodeceptJS {
|
|
|
4033
4181
|
* ```
|
|
4034
4182
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4035
4183
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4036
|
-
*
|
|
4184
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4037
4185
|
*
|
|
4038
4186
|
* This method accepts [React selectors](https://codecept.io/react).
|
|
4039
4187
|
*/
|
|
@@ -4047,6 +4195,7 @@ declare namespace CodeceptJS {
|
|
|
4047
4195
|
* ```
|
|
4048
4196
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4049
4197
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4198
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4050
4199
|
*/
|
|
4051
4200
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4052
4201
|
/**
|
|
@@ -4058,6 +4207,7 @@ declare namespace CodeceptJS {
|
|
|
4058
4207
|
* ```
|
|
4059
4208
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4060
4209
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4210
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4061
4211
|
*/
|
|
4062
4212
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4063
4213
|
/**
|
|
@@ -4068,6 +4218,7 @@ declare namespace CodeceptJS {
|
|
|
4068
4218
|
* ```
|
|
4069
4219
|
* @param urlPart - value to check.
|
|
4070
4220
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4221
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4071
4222
|
*/
|
|
4072
4223
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
4073
4224
|
/**
|
|
@@ -4079,6 +4230,7 @@ declare namespace CodeceptJS {
|
|
|
4079
4230
|
* ```
|
|
4080
4231
|
* @param urlPart - value to check.
|
|
4081
4232
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4233
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4082
4234
|
*/
|
|
4083
4235
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
4084
4236
|
/**
|
|
@@ -4093,6 +4245,7 @@ declare namespace CodeceptJS {
|
|
|
4093
4245
|
* @param text - to wait for.
|
|
4094
4246
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4095
4247
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
4248
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4096
4249
|
*/
|
|
4097
4250
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
4098
4251
|
/**
|
|
@@ -4123,6 +4276,7 @@ declare namespace CodeceptJS {
|
|
|
4123
4276
|
* I.switchTo(); // switch back to main page
|
|
4124
4277
|
* ```
|
|
4125
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
|
|
4126
4280
|
*/
|
|
4127
4281
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
4128
4282
|
/**
|
|
@@ -4141,6 +4295,7 @@ declare namespace CodeceptJS {
|
|
|
4141
4295
|
* @param fn - to be executed in browser context.
|
|
4142
4296
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
4143
4297
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
4298
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4144
4299
|
*/
|
|
4145
4300
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
4146
4301
|
/**
|
|
@@ -4158,6 +4313,7 @@ declare namespace CodeceptJS {
|
|
|
4158
4313
|
* ```
|
|
4159
4314
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4160
4315
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4316
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4161
4317
|
*/
|
|
4162
4318
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4163
4319
|
/**
|
|
@@ -4180,8 +4336,9 @@ declare namespace CodeceptJS {
|
|
|
4180
4336
|
* loadEventEnd: 241
|
|
4181
4337
|
* }
|
|
4182
4338
|
* ```
|
|
4339
|
+
* @returns automatically synchronized promise through #recorder
|
|
4183
4340
|
*/
|
|
4184
|
-
grabDataFromPerformanceTiming():
|
|
4341
|
+
grabDataFromPerformanceTiming(): Promise<any>;
|
|
4185
4342
|
/**
|
|
4186
4343
|
* Grab the width, height, location of given locator.
|
|
4187
4344
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -4213,9 +4370,9 @@ declare namespace CodeceptJS {
|
|
|
4213
4370
|
* ```
|
|
4214
4371
|
* This method allows intercepting and mocking requests & responses. [Learn more about it](https://playwright.dev/docs/network#handle-requests)
|
|
4215
4372
|
* @param [url] - URL, regex or pattern for to match URL
|
|
4216
|
-
* @param [handler] - a function to process
|
|
4373
|
+
* @param [handler] - a function to process reques
|
|
4217
4374
|
*/
|
|
4218
|
-
mockRoute(url?: string, handler?: (...params: any[]) => any): void;
|
|
4375
|
+
mockRoute(url?: string | RegExp, handler?: (...params: any[]) => any): void;
|
|
4219
4376
|
/**
|
|
4220
4377
|
* Stops network mocking created by `mockRoute`.
|
|
4221
4378
|
*
|
|
@@ -4225,9 +4382,9 @@ declare namespace CodeceptJS {
|
|
|
4225
4382
|
* ```
|
|
4226
4383
|
* If no handler is passed, all mock requests for the rote are disabled.
|
|
4227
4384
|
* @param [url] - URL, regex or pattern for to match URL
|
|
4228
|
-
* @param [handler] - a function to process
|
|
4385
|
+
* @param [handler] - a function to process reques
|
|
4229
4386
|
*/
|
|
4230
|
-
stopMockingRoute(url?: string, handler?: (...params: any[]) => any): void;
|
|
4387
|
+
stopMockingRoute(url?: string | RegExp, handler?: (...params: any[]) => any): void;
|
|
4231
4388
|
}
|
|
4232
4389
|
/**
|
|
4233
4390
|
* This helper works the same as MockRequest helper. It has been included for backwards compatibility
|
|
@@ -4430,6 +4587,7 @@ declare namespace CodeceptJS {
|
|
|
4430
4587
|
* I.amOnPage('/login'); // opens a login page
|
|
4431
4588
|
* ```
|
|
4432
4589
|
* @param url - url path or global url.
|
|
4590
|
+
* @returns automatically synchronized promise with recorder #!
|
|
4433
4591
|
*/
|
|
4434
4592
|
amOnPage(url: string): void;
|
|
4435
4593
|
/**
|
|
@@ -4456,8 +4614,9 @@ declare namespace CodeceptJS {
|
|
|
4456
4614
|
* ```
|
|
4457
4615
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4458
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
|
|
4459
4618
|
*/
|
|
4460
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4619
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
4461
4620
|
/**
|
|
4462
4621
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
4463
4622
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -4470,6 +4629,7 @@ declare namespace CodeceptJS {
|
|
|
4470
4629
|
* ```
|
|
4471
4630
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4472
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
|
|
4473
4633
|
*/
|
|
4474
4634
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4475
4635
|
/**
|
|
@@ -4485,6 +4645,7 @@ declare namespace CodeceptJS {
|
|
|
4485
4645
|
* ```
|
|
4486
4646
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
4487
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
|
|
4488
4649
|
*/
|
|
4489
4650
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4490
4651
|
/**
|
|
@@ -4498,6 +4659,7 @@ declare namespace CodeceptJS {
|
|
|
4498
4659
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4499
4660
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
4500
4661
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4662
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4501
4663
|
*/
|
|
4502
4664
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
4503
4665
|
/**
|
|
@@ -4511,6 +4673,7 @@ declare namespace CodeceptJS {
|
|
|
4511
4673
|
* ```
|
|
4512
4674
|
* @param text - expected on page.
|
|
4513
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
|
|
4514
4677
|
*/
|
|
4515
4678
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4516
4679
|
/**
|
|
@@ -4521,6 +4684,7 @@ declare namespace CodeceptJS {
|
|
|
4521
4684
|
* ```
|
|
4522
4685
|
* @param text - element value to check.
|
|
4523
4686
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
4687
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4524
4688
|
*/
|
|
4525
4689
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4526
4690
|
/**
|
|
@@ -4533,6 +4697,7 @@ declare namespace CodeceptJS {
|
|
|
4533
4697
|
* ```
|
|
4534
4698
|
* @param text - which is not present.
|
|
4535
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
|
|
4536
4701
|
*/
|
|
4537
4702
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4538
4703
|
/**
|
|
@@ -4578,6 +4743,7 @@ declare namespace CodeceptJS {
|
|
|
4578
4743
|
* ```
|
|
4579
4744
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
4580
4745
|
* @param option - visible text or value of option.
|
|
4746
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4581
4747
|
*/
|
|
4582
4748
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
4583
4749
|
/**
|
|
@@ -4596,6 +4762,7 @@ declare namespace CodeceptJS {
|
|
|
4596
4762
|
* ```
|
|
4597
4763
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4598
4764
|
* @param value - text value to fill.
|
|
4765
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4599
4766
|
*/
|
|
4600
4767
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
4601
4768
|
/**
|
|
@@ -4609,6 +4776,7 @@ declare namespace CodeceptJS {
|
|
|
4609
4776
|
* I.pressKey(['Control','a']);
|
|
4610
4777
|
* ```
|
|
4611
4778
|
* @param key - key or array of keys to press.
|
|
4779
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4612
4780
|
* {{ keys }}
|
|
4613
4781
|
*/
|
|
4614
4782
|
pressKey(key: string | string[]): void;
|
|
@@ -4623,6 +4791,7 @@ declare namespace CodeceptJS {
|
|
|
4623
4791
|
* ```
|
|
4624
4792
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
4625
4793
|
* @param pathToFile - local file path relative to codecept.json config file.
|
|
4794
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4626
4795
|
*/
|
|
4627
4796
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
4628
4797
|
/**
|
|
@@ -4637,6 +4806,7 @@ declare namespace CodeceptJS {
|
|
|
4637
4806
|
* ```
|
|
4638
4807
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4639
4808
|
* @param value - value to check.
|
|
4809
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4640
4810
|
*/
|
|
4641
4811
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4642
4812
|
/**
|
|
@@ -4649,6 +4819,7 @@ declare namespace CodeceptJS {
|
|
|
4649
4819
|
* ```
|
|
4650
4820
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4651
4821
|
* @param value - value to check.
|
|
4822
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4652
4823
|
*/
|
|
4653
4824
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4654
4825
|
/**
|
|
@@ -4660,6 +4831,7 @@ declare namespace CodeceptJS {
|
|
|
4660
4831
|
* ```
|
|
4661
4832
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
4662
4833
|
* @param value - text value to append.
|
|
4834
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4663
4835
|
*/
|
|
4664
4836
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4665
4837
|
/**
|
|
@@ -4671,6 +4843,7 @@ declare namespace CodeceptJS {
|
|
|
4671
4843
|
* I.clearField('#email');
|
|
4672
4844
|
* ```
|
|
4673
4845
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
4846
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4674
4847
|
*/
|
|
4675
4848
|
clearField(editable: LocatorOrString): void;
|
|
4676
4849
|
/**
|
|
@@ -4686,6 +4859,7 @@ declare namespace CodeceptJS {
|
|
|
4686
4859
|
* ```
|
|
4687
4860
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4688
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
|
|
4689
4863
|
*/
|
|
4690
4864
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4691
4865
|
/**
|
|
@@ -4701,6 +4875,7 @@ declare namespace CodeceptJS {
|
|
|
4701
4875
|
* ```
|
|
4702
4876
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4703
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
|
|
4704
4879
|
*/
|
|
4705
4880
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4706
4881
|
/**
|
|
@@ -4712,6 +4887,7 @@ declare namespace CodeceptJS {
|
|
|
4712
4887
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
4713
4888
|
* ```
|
|
4714
4889
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4890
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4715
4891
|
*/
|
|
4716
4892
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
4717
4893
|
/**
|
|
@@ -4723,6 +4899,7 @@ declare namespace CodeceptJS {
|
|
|
4723
4899
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
4724
4900
|
* ```
|
|
4725
4901
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4902
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4726
4903
|
*/
|
|
4727
4904
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
4728
4905
|
/**
|
|
@@ -4851,15 +5028,17 @@ declare namespace CodeceptJS {
|
|
|
4851
5028
|
* I.seeInTitle('Home Page');
|
|
4852
5029
|
* ```
|
|
4853
5030
|
* @param text - text value to check.
|
|
5031
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4854
5032
|
*/
|
|
4855
5033
|
seeInTitle(text: string): void;
|
|
4856
5034
|
/**
|
|
4857
5035
|
* Checks that title is equal to provided one.
|
|
4858
5036
|
*
|
|
4859
|
-
*
|
|
4860
|
-
*
|
|
4861
|
-
*
|
|
5037
|
+
* ```js
|
|
5038
|
+
* I.seeTitleEquals('Test title.');
|
|
5039
|
+
* ```
|
|
4862
5040
|
* @param text - value to check.
|
|
5041
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4863
5042
|
*/
|
|
4864
5043
|
seeTitleEquals(text: string): void;
|
|
4865
5044
|
/**
|
|
@@ -4869,6 +5048,7 @@ declare namespace CodeceptJS {
|
|
|
4869
5048
|
* I.dontSeeInTitle('Error');
|
|
4870
5049
|
* ```
|
|
4871
5050
|
* @param text - value to check.
|
|
5051
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4872
5052
|
*/
|
|
4873
5053
|
dontSeeInTitle(text: string): void;
|
|
4874
5054
|
/**
|
|
@@ -4889,6 +5069,7 @@ declare namespace CodeceptJS {
|
|
|
4889
5069
|
* I.seeElement('#modal');
|
|
4890
5070
|
* ```
|
|
4891
5071
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5072
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4892
5073
|
*/
|
|
4893
5074
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
4894
5075
|
/**
|
|
@@ -4898,6 +5079,7 @@ declare namespace CodeceptJS {
|
|
|
4898
5079
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
4899
5080
|
* ```
|
|
4900
5081
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5082
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4901
5083
|
*/
|
|
4902
5084
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
4903
5085
|
/**
|
|
@@ -4908,6 +5090,7 @@ declare namespace CodeceptJS {
|
|
|
4908
5090
|
* I.seeElementInDOM('#modal');
|
|
4909
5091
|
* ```
|
|
4910
5092
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5093
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4911
5094
|
*/
|
|
4912
5095
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
4913
5096
|
/**
|
|
@@ -4917,6 +5100,7 @@ declare namespace CodeceptJS {
|
|
|
4917
5100
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
4918
5101
|
* ```
|
|
4919
5102
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5103
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4920
5104
|
*/
|
|
4921
5105
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
4922
5106
|
/**
|
|
@@ -4926,6 +5110,7 @@ declare namespace CodeceptJS {
|
|
|
4926
5110
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
4927
5111
|
* ```
|
|
4928
5112
|
* @param text - value to check.
|
|
5113
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4929
5114
|
*/
|
|
4930
5115
|
seeInSource(text: string): void;
|
|
4931
5116
|
/**
|
|
@@ -4945,6 +5130,7 @@ declare namespace CodeceptJS {
|
|
|
4945
5130
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
4946
5131
|
* ```
|
|
4947
5132
|
* @param value - to check.
|
|
5133
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4948
5134
|
*/
|
|
4949
5135
|
dontSeeInSource(value: string): void;
|
|
4950
5136
|
/**
|
|
@@ -4957,6 +5143,7 @@ declare namespace CodeceptJS {
|
|
|
4957
5143
|
* ```
|
|
4958
5144
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4959
5145
|
* @param num - number of elements.
|
|
5146
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4960
5147
|
*/
|
|
4961
5148
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
4962
5149
|
/**
|
|
@@ -4968,6 +5155,7 @@ declare namespace CodeceptJS {
|
|
|
4968
5155
|
* ```
|
|
4969
5156
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4970
5157
|
* @param num - number of elements.
|
|
5158
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4971
5159
|
*/
|
|
4972
5160
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
4973
5161
|
/**
|
|
@@ -4989,6 +5177,7 @@ declare namespace CodeceptJS {
|
|
|
4989
5177
|
* ```
|
|
4990
5178
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4991
5179
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
5180
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
4992
5181
|
*/
|
|
4993
5182
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
4994
5183
|
/**
|
|
@@ -4999,6 +5188,7 @@ declare namespace CodeceptJS {
|
|
|
4999
5188
|
* ```
|
|
5000
5189
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5001
5190
|
* @param attributes - attributes and their values to check.
|
|
5191
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5002
5192
|
*/
|
|
5003
5193
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
5004
5194
|
/**
|
|
@@ -5026,8 +5216,9 @@ declare namespace CodeceptJS {
|
|
|
5026
5216
|
* ```
|
|
5027
5217
|
* @param fn - function to be executed in browser context.
|
|
5028
5218
|
* @param args - to be passed to function.
|
|
5219
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5029
5220
|
*/
|
|
5030
|
-
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
5221
|
+
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
5031
5222
|
/**
|
|
5032
5223
|
* Executes async script on page.
|
|
5033
5224
|
* Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
@@ -5051,8 +5242,9 @@ declare namespace CodeceptJS {
|
|
|
5051
5242
|
* ```
|
|
5052
5243
|
* @param fn - function to be executed in browser context.
|
|
5053
5244
|
* @param args - to be passed to function.
|
|
5245
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5054
5246
|
*/
|
|
5055
|
-
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
5247
|
+
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
5056
5248
|
/**
|
|
5057
5249
|
* Checks that current url contains a provided fragment.
|
|
5058
5250
|
*
|
|
@@ -5060,11 +5252,13 @@ declare namespace CodeceptJS {
|
|
|
5060
5252
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
5061
5253
|
* ```
|
|
5062
5254
|
* @param url - a fragment to check
|
|
5255
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5063
5256
|
*/
|
|
5064
5257
|
seeInCurrentUrl(url: string): void;
|
|
5065
5258
|
/**
|
|
5066
5259
|
* Checks that current url does not contain a provided fragment.
|
|
5067
5260
|
* @param url - value to check.
|
|
5261
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5068
5262
|
*/
|
|
5069
5263
|
dontSeeInCurrentUrl(url: string): void;
|
|
5070
5264
|
/**
|
|
@@ -5077,6 +5271,7 @@ declare namespace CodeceptJS {
|
|
|
5077
5271
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
5078
5272
|
* ```
|
|
5079
5273
|
* @param url - value to check.
|
|
5274
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5080
5275
|
*/
|
|
5081
5276
|
seeCurrentUrlEquals(url: string): void;
|
|
5082
5277
|
/**
|
|
@@ -5088,6 +5283,7 @@ declare namespace CodeceptJS {
|
|
|
5088
5283
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
5089
5284
|
* ```
|
|
5090
5285
|
* @param url - value to check.
|
|
5286
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5091
5287
|
*/
|
|
5092
5288
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
5093
5289
|
/**
|
|
@@ -5099,6 +5295,7 @@ declare namespace CodeceptJS {
|
|
|
5099
5295
|
* ```
|
|
5100
5296
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5101
5297
|
* @param fileName - file name to save.
|
|
5298
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5102
5299
|
*/
|
|
5103
5300
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
5104
5301
|
/**
|
|
@@ -5112,6 +5309,7 @@ declare namespace CodeceptJS {
|
|
|
5112
5309
|
* ```
|
|
5113
5310
|
* @param fileName - file name to save.
|
|
5114
5311
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
5312
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5115
5313
|
*/
|
|
5116
5314
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
5117
5315
|
/**
|
|
@@ -5123,6 +5321,7 @@ declare namespace CodeceptJS {
|
|
|
5123
5321
|
* I.clearCookie('test');
|
|
5124
5322
|
* ```
|
|
5125
5323
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
5324
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5126
5325
|
*/
|
|
5127
5326
|
clearCookie(cookie?: string): void;
|
|
5128
5327
|
/**
|
|
@@ -5132,6 +5331,7 @@ declare namespace CodeceptJS {
|
|
|
5132
5331
|
* I.seeCookie('Auth');
|
|
5133
5332
|
* ```
|
|
5134
5333
|
* @param name - cookie name.
|
|
5334
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5135
5335
|
*/
|
|
5136
5336
|
seeCookie(name: string): void;
|
|
5137
5337
|
/**
|
|
@@ -5141,6 +5341,7 @@ declare namespace CodeceptJS {
|
|
|
5141
5341
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
5142
5342
|
* ```
|
|
5143
5343
|
* @param name - cookie name.
|
|
5344
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5144
5345
|
*/
|
|
5145
5346
|
dontSeeCookie(name: string): void;
|
|
5146
5347
|
/**
|
|
@@ -5177,6 +5378,7 @@ declare namespace CodeceptJS {
|
|
|
5177
5378
|
* I.seeInPopup('Popup text');
|
|
5178
5379
|
* ```
|
|
5179
5380
|
* @param text - value to check.
|
|
5381
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5180
5382
|
*/
|
|
5181
5383
|
seeInPopup(text: string): void;
|
|
5182
5384
|
/**
|
|
@@ -5192,6 +5394,7 @@ declare namespace CodeceptJS {
|
|
|
5192
5394
|
* First parameter can be set to `maximize`.
|
|
5193
5395
|
* @param width - width in pixels or `maximize`.
|
|
5194
5396
|
* @param height - height in pixels.
|
|
5397
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5195
5398
|
*/
|
|
5196
5399
|
resizeWindow(width: number, height: number): void;
|
|
5197
5400
|
/**
|
|
@@ -5202,6 +5405,7 @@ declare namespace CodeceptJS {
|
|
|
5202
5405
|
* ```
|
|
5203
5406
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
5204
5407
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
5408
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5205
5409
|
*/
|
|
5206
5410
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
5207
5411
|
/**
|
|
@@ -5269,6 +5473,7 @@ declare namespace CodeceptJS {
|
|
|
5269
5473
|
* I.switchTo(); // switch back to main page
|
|
5270
5474
|
* ```
|
|
5271
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
|
|
5272
5477
|
*/
|
|
5273
5478
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
5274
5479
|
/**
|
|
@@ -5278,6 +5483,7 @@ declare namespace CodeceptJS {
|
|
|
5278
5483
|
* I.wait(2); // wait 2 secs
|
|
5279
5484
|
* ```
|
|
5280
5485
|
* @param sec - number of second to wait.
|
|
5486
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5281
5487
|
*/
|
|
5282
5488
|
wait(sec: number): void;
|
|
5283
5489
|
/**
|
|
@@ -5290,6 +5496,7 @@ declare namespace CodeceptJS {
|
|
|
5290
5496
|
* ```
|
|
5291
5497
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5292
5498
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5499
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5293
5500
|
*/
|
|
5294
5501
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5295
5502
|
/**
|
|
@@ -5301,6 +5508,7 @@ declare namespace CodeceptJS {
|
|
|
5301
5508
|
* ```
|
|
5302
5509
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5303
5510
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5511
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5304
5512
|
*/
|
|
5305
5513
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5306
5514
|
/**
|
|
@@ -5320,6 +5528,7 @@ declare namespace CodeceptJS {
|
|
|
5320
5528
|
* ```
|
|
5321
5529
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5322
5530
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5531
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5323
5532
|
*/
|
|
5324
5533
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5325
5534
|
/**
|
|
@@ -5331,6 +5540,7 @@ declare namespace CodeceptJS {
|
|
|
5331
5540
|
* ```
|
|
5332
5541
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5333
5542
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5543
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5334
5544
|
*/
|
|
5335
5545
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5336
5546
|
/**
|
|
@@ -5342,6 +5552,7 @@ declare namespace CodeceptJS {
|
|
|
5342
5552
|
* ```
|
|
5343
5553
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5344
5554
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5555
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5345
5556
|
*/
|
|
5346
5557
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5347
5558
|
/**
|
|
@@ -5353,6 +5564,7 @@ declare namespace CodeceptJS {
|
|
|
5353
5564
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5354
5565
|
* @param num - number of elements.
|
|
5355
5566
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5567
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5356
5568
|
*/
|
|
5357
5569
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
5358
5570
|
/**
|
|
@@ -5360,6 +5572,7 @@ declare namespace CodeceptJS {
|
|
|
5360
5572
|
* Element can be located by CSS or XPath.
|
|
5361
5573
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5362
5574
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5575
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5363
5576
|
*/
|
|
5364
5577
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5365
5578
|
/**
|
|
@@ -5371,6 +5584,7 @@ declare namespace CodeceptJS {
|
|
|
5371
5584
|
* @param field - input field.
|
|
5372
5585
|
* @param value - expected value.
|
|
5373
5586
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5587
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5374
5588
|
*/
|
|
5375
5589
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
5376
5590
|
/**
|
|
@@ -5389,6 +5603,7 @@ declare namespace CodeceptJS {
|
|
|
5389
5603
|
* @param fn - to be executed in browser context.
|
|
5390
5604
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
5391
5605
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5606
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5392
5607
|
*/
|
|
5393
5608
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
5394
5609
|
/**
|
|
@@ -5399,6 +5614,7 @@ declare namespace CodeceptJS {
|
|
|
5399
5614
|
* ```
|
|
5400
5615
|
* @param urlPart - value to check.
|
|
5401
5616
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5617
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5402
5618
|
*/
|
|
5403
5619
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
5404
5620
|
/**
|
|
@@ -5410,6 +5626,7 @@ declare namespace CodeceptJS {
|
|
|
5410
5626
|
* ```
|
|
5411
5627
|
* @param urlPart - value to check.
|
|
5412
5628
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5629
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5413
5630
|
*/
|
|
5414
5631
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
5415
5632
|
/**
|
|
@@ -5424,6 +5641,7 @@ declare namespace CodeceptJS {
|
|
|
5424
5641
|
* @param text - to wait for.
|
|
5425
5642
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5426
5643
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
5644
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5427
5645
|
*/
|
|
5428
5646
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
5429
5647
|
/**
|
|
@@ -5436,6 +5654,7 @@ declare namespace CodeceptJS {
|
|
|
5436
5654
|
* ```js
|
|
5437
5655
|
* I.refreshPage();
|
|
5438
5656
|
* ```
|
|
5657
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5439
5658
|
*/
|
|
5440
5659
|
refreshPage(): void;
|
|
5441
5660
|
/**
|
|
@@ -5453,6 +5672,7 @@ declare namespace CodeceptJS {
|
|
|
5453
5672
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5454
5673
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
5455
5674
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
5675
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5456
5676
|
*/
|
|
5457
5677
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
5458
5678
|
/**
|
|
@@ -5461,6 +5681,7 @@ declare namespace CodeceptJS {
|
|
|
5461
5681
|
* ```js
|
|
5462
5682
|
* I.scrollPageToTop();
|
|
5463
5683
|
* ```
|
|
5684
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5464
5685
|
*/
|
|
5465
5686
|
scrollPageToTop(): void;
|
|
5466
5687
|
/**
|
|
@@ -5469,6 +5690,7 @@ declare namespace CodeceptJS {
|
|
|
5469
5690
|
* ```js
|
|
5470
5691
|
* I.scrollPageToBottom();
|
|
5471
5692
|
* ```
|
|
5693
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5472
5694
|
*/
|
|
5473
5695
|
scrollPageToBottom(): void;
|
|
5474
5696
|
/**
|
|
@@ -5515,6 +5737,7 @@ declare namespace CodeceptJS {
|
|
|
5515
5737
|
* ]);
|
|
5516
5738
|
* ```
|
|
5517
5739
|
* @param cookie - a cookie object or array of cookie objects.
|
|
5740
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5518
5741
|
*/
|
|
5519
5742
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
5520
5743
|
}
|
|
@@ -5724,6 +5947,7 @@ declare namespace CodeceptJS {
|
|
|
5724
5947
|
* I.seeInPopup('Popup text');
|
|
5725
5948
|
* ```
|
|
5726
5949
|
* @param text - value to check.
|
|
5950
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5727
5951
|
*/
|
|
5728
5952
|
seeInPopup(text: string): void;
|
|
5729
5953
|
/**
|
|
@@ -5757,6 +5981,7 @@ declare namespace CodeceptJS {
|
|
|
5757
5981
|
* I.amOnPage('/login'); // opens a login page
|
|
5758
5982
|
* ```
|
|
5759
5983
|
* @param url - url path or global url.
|
|
5984
|
+
* @returns automatically synchronized promise with recorder #!
|
|
5760
5985
|
*/
|
|
5761
5986
|
amOnPage(url: string): void;
|
|
5762
5987
|
/**
|
|
@@ -5764,6 +5989,7 @@ declare namespace CodeceptJS {
|
|
|
5764
5989
|
* First parameter can be set to `maximize`.
|
|
5765
5990
|
* @param width - width in pixels or `maximize`.
|
|
5766
5991
|
* @param height - height in pixels.
|
|
5992
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5767
5993
|
*
|
|
5768
5994
|
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
5769
5995
|
* Puppeteer does not control the window of a browser so it can't adjust its real size.
|
|
@@ -5792,7 +6018,7 @@ declare namespace CodeceptJS {
|
|
|
5792
6018
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5793
6019
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
5794
6020
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
5795
|
-
*
|
|
6021
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5796
6022
|
* {{ react }}
|
|
5797
6023
|
*/
|
|
5798
6024
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
@@ -5804,6 +6030,7 @@ declare namespace CodeceptJS {
|
|
|
5804
6030
|
* ```
|
|
5805
6031
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
5806
6032
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
6033
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5807
6034
|
*/
|
|
5808
6035
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
5809
6036
|
/**
|
|
@@ -5812,6 +6039,7 @@ declare namespace CodeceptJS {
|
|
|
5812
6039
|
* ```js
|
|
5813
6040
|
* I.refreshPage();
|
|
5814
6041
|
* ```
|
|
6042
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5815
6043
|
*/
|
|
5816
6044
|
refreshPage(): void;
|
|
5817
6045
|
/**
|
|
@@ -5820,6 +6048,7 @@ declare namespace CodeceptJS {
|
|
|
5820
6048
|
* ```js
|
|
5821
6049
|
* I.scrollPageToTop();
|
|
5822
6050
|
* ```
|
|
6051
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5823
6052
|
*/
|
|
5824
6053
|
scrollPageToTop(): void;
|
|
5825
6054
|
/**
|
|
@@ -5828,6 +6057,7 @@ declare namespace CodeceptJS {
|
|
|
5828
6057
|
* ```js
|
|
5829
6058
|
* I.scrollPageToBottom();
|
|
5830
6059
|
* ```
|
|
6060
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5831
6061
|
*/
|
|
5832
6062
|
scrollPageToBottom(): void;
|
|
5833
6063
|
/**
|
|
@@ -5841,6 +6071,7 @@ declare namespace CodeceptJS {
|
|
|
5841
6071
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5842
6072
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
5843
6073
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6074
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5844
6075
|
*/
|
|
5845
6076
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
5846
6077
|
/**
|
|
@@ -5850,6 +6081,7 @@ declare namespace CodeceptJS {
|
|
|
5850
6081
|
* I.seeInTitle('Home Page');
|
|
5851
6082
|
* ```
|
|
5852
6083
|
* @param text - text value to check.
|
|
6084
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5853
6085
|
*/
|
|
5854
6086
|
seeInTitle(text: string): void;
|
|
5855
6087
|
/**
|
|
@@ -5865,10 +6097,11 @@ declare namespace CodeceptJS {
|
|
|
5865
6097
|
/**
|
|
5866
6098
|
* Checks that title is equal to provided one.
|
|
5867
6099
|
*
|
|
5868
|
-
*
|
|
5869
|
-
*
|
|
5870
|
-
*
|
|
6100
|
+
* ```js
|
|
6101
|
+
* I.seeTitleEquals('Test title.');
|
|
6102
|
+
* ```
|
|
5871
6103
|
* @param text - value to check.
|
|
6104
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5872
6105
|
*/
|
|
5873
6106
|
seeTitleEquals(text: string): void;
|
|
5874
6107
|
/**
|
|
@@ -5878,6 +6111,7 @@ declare namespace CodeceptJS {
|
|
|
5878
6111
|
* I.dontSeeInTitle('Error');
|
|
5879
6112
|
* ```
|
|
5880
6113
|
* @param text - value to check.
|
|
6114
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5881
6115
|
*/
|
|
5882
6116
|
dontSeeInTitle(text: string): void;
|
|
5883
6117
|
/**
|
|
@@ -5986,6 +6220,7 @@ declare namespace CodeceptJS {
|
|
|
5986
6220
|
* I.seeElement('#modal');
|
|
5987
6221
|
* ```
|
|
5988
6222
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6223
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5989
6224
|
* {{ react }}
|
|
5990
6225
|
*/
|
|
5991
6226
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -5996,6 +6231,7 @@ declare namespace CodeceptJS {
|
|
|
5996
6231
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
5997
6232
|
* ```
|
|
5998
6233
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6234
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
5999
6235
|
* {{ react }}
|
|
6000
6236
|
*/
|
|
6001
6237
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -6007,6 +6243,7 @@ declare namespace CodeceptJS {
|
|
|
6007
6243
|
* I.seeElementInDOM('#modal');
|
|
6008
6244
|
* ```
|
|
6009
6245
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6246
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6010
6247
|
*/
|
|
6011
6248
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
6012
6249
|
/**
|
|
@@ -6016,6 +6253,7 @@ declare namespace CodeceptJS {
|
|
|
6016
6253
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
6017
6254
|
* ```
|
|
6018
6255
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6256
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6019
6257
|
*/
|
|
6020
6258
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
6021
6259
|
/**
|
|
@@ -6042,11 +6280,12 @@ declare namespace CodeceptJS {
|
|
|
6042
6280
|
* ```
|
|
6043
6281
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6044
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
|
|
6045
6284
|
*
|
|
6046
6285
|
*
|
|
6047
6286
|
* {{ react }}
|
|
6048
6287
|
*/
|
|
6049
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
6288
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
6050
6289
|
/**
|
|
6051
6290
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
6052
6291
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -6074,6 +6313,7 @@ declare namespace CodeceptJS {
|
|
|
6074
6313
|
* ```
|
|
6075
6314
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6076
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
|
|
6077
6317
|
*
|
|
6078
6318
|
*
|
|
6079
6319
|
* {{ react }}
|
|
@@ -6087,6 +6327,7 @@ declare namespace CodeceptJS {
|
|
|
6087
6327
|
* ```
|
|
6088
6328
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
6089
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
|
|
6090
6331
|
*
|
|
6091
6332
|
* {{ react }}
|
|
6092
6333
|
*/
|
|
@@ -6126,7 +6367,7 @@ declare namespace CodeceptJS {
|
|
|
6126
6367
|
* ```
|
|
6127
6368
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6128
6369
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6129
|
-
*
|
|
6370
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6130
6371
|
*
|
|
6131
6372
|
* {{ react }}
|
|
6132
6373
|
*/
|
|
@@ -6144,7 +6385,7 @@ declare namespace CodeceptJS {
|
|
|
6144
6385
|
* ```
|
|
6145
6386
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
6146
6387
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
6147
|
-
*
|
|
6388
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6148
6389
|
*
|
|
6149
6390
|
* {{ react }}
|
|
6150
6391
|
*/
|
|
@@ -6162,6 +6403,7 @@ declare namespace CodeceptJS {
|
|
|
6162
6403
|
* ```
|
|
6163
6404
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6164
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
|
|
6165
6407
|
*/
|
|
6166
6408
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
6167
6409
|
/**
|
|
@@ -6177,6 +6419,7 @@ declare namespace CodeceptJS {
|
|
|
6177
6419
|
* ```
|
|
6178
6420
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6179
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
|
|
6180
6423
|
*/
|
|
6181
6424
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
6182
6425
|
/**
|
|
@@ -6188,6 +6431,7 @@ declare namespace CodeceptJS {
|
|
|
6188
6431
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
6189
6432
|
* ```
|
|
6190
6433
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6434
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6191
6435
|
*/
|
|
6192
6436
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
6193
6437
|
/**
|
|
@@ -6199,6 +6443,7 @@ declare namespace CodeceptJS {
|
|
|
6199
6443
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
6200
6444
|
* ```
|
|
6201
6445
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6446
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6202
6447
|
*/
|
|
6203
6448
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
6204
6449
|
/**
|
|
@@ -6212,6 +6457,7 @@ declare namespace CodeceptJS {
|
|
|
6212
6457
|
* I.pressKeyUp('Control');
|
|
6213
6458
|
* ```
|
|
6214
6459
|
* @param key - name of key to press down.
|
|
6460
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6215
6461
|
*/
|
|
6216
6462
|
pressKeyDown(key: string): void;
|
|
6217
6463
|
/**
|
|
@@ -6225,6 +6471,7 @@ declare namespace CodeceptJS {
|
|
|
6225
6471
|
* I.pressKeyUp('Control');
|
|
6226
6472
|
* ```
|
|
6227
6473
|
* @param key - name of key to release.
|
|
6474
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6228
6475
|
*/
|
|
6229
6476
|
pressKeyUp(key: string): void;
|
|
6230
6477
|
/**
|
|
@@ -6286,6 +6533,7 @@ declare namespace CodeceptJS {
|
|
|
6286
6533
|
* - `'Space'`
|
|
6287
6534
|
* - `'Tab'`
|
|
6288
6535
|
* @param key - key or array of keys to press.
|
|
6536
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6289
6537
|
*
|
|
6290
6538
|
*
|
|
6291
6539
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
@@ -6308,6 +6556,7 @@ declare namespace CodeceptJS {
|
|
|
6308
6556
|
* ```
|
|
6309
6557
|
* @param key - or array of keys to type.
|
|
6310
6558
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
6559
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6311
6560
|
*/
|
|
6312
6561
|
type(key: string | string[], delay?: number): void;
|
|
6313
6562
|
/**
|
|
@@ -6326,7 +6575,7 @@ declare namespace CodeceptJS {
|
|
|
6326
6575
|
* ```
|
|
6327
6576
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6328
6577
|
* @param value - text value to fill.
|
|
6329
|
-
*
|
|
6578
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6330
6579
|
* {{ react }}
|
|
6331
6580
|
*/
|
|
6332
6581
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
@@ -6339,6 +6588,7 @@ declare namespace CodeceptJS {
|
|
|
6339
6588
|
* I.clearField('#email');
|
|
6340
6589
|
* ```
|
|
6341
6590
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
6591
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6342
6592
|
*/
|
|
6343
6593
|
clearField(editable: LocatorOrString): void;
|
|
6344
6594
|
/**
|
|
@@ -6350,6 +6600,7 @@ declare namespace CodeceptJS {
|
|
|
6350
6600
|
* ```
|
|
6351
6601
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
6352
6602
|
* @param value - text value to append.
|
|
6603
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6353
6604
|
*
|
|
6354
6605
|
* {{ react }}
|
|
6355
6606
|
*/
|
|
@@ -6366,6 +6617,7 @@ declare namespace CodeceptJS {
|
|
|
6366
6617
|
* ```
|
|
6367
6618
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6368
6619
|
* @param value - value to check.
|
|
6620
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6369
6621
|
*/
|
|
6370
6622
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
6371
6623
|
/**
|
|
@@ -6378,6 +6630,7 @@ declare namespace CodeceptJS {
|
|
|
6378
6630
|
* ```
|
|
6379
6631
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6380
6632
|
* @param value - value to check.
|
|
6633
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6381
6634
|
*/
|
|
6382
6635
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
6383
6636
|
/**
|
|
@@ -6391,6 +6644,7 @@ declare namespace CodeceptJS {
|
|
|
6391
6644
|
* ```
|
|
6392
6645
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6393
6646
|
* @param pathToFile - local file path relative to codecept.json config file.
|
|
6647
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6394
6648
|
*
|
|
6395
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.
|
|
6396
6650
|
*/
|
|
@@ -6416,6 +6670,7 @@ declare namespace CodeceptJS {
|
|
|
6416
6670
|
* ```
|
|
6417
6671
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
6418
6672
|
* @param option - visible text or value of option.
|
|
6673
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6419
6674
|
*/
|
|
6420
6675
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
6421
6676
|
/**
|
|
@@ -6437,11 +6692,13 @@ declare namespace CodeceptJS {
|
|
|
6437
6692
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
6438
6693
|
* ```
|
|
6439
6694
|
* @param url - a fragment to check
|
|
6695
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6440
6696
|
*/
|
|
6441
6697
|
seeInCurrentUrl(url: string): void;
|
|
6442
6698
|
/**
|
|
6443
6699
|
* Checks that current url does not contain a provided fragment.
|
|
6444
6700
|
* @param url - value to check.
|
|
6701
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6445
6702
|
*/
|
|
6446
6703
|
dontSeeInCurrentUrl(url: string): void;
|
|
6447
6704
|
/**
|
|
@@ -6454,6 +6711,7 @@ declare namespace CodeceptJS {
|
|
|
6454
6711
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
6455
6712
|
* ```
|
|
6456
6713
|
* @param url - value to check.
|
|
6714
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6457
6715
|
*/
|
|
6458
6716
|
seeCurrentUrlEquals(url: string): void;
|
|
6459
6717
|
/**
|
|
@@ -6465,6 +6723,7 @@ declare namespace CodeceptJS {
|
|
|
6465
6723
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
6466
6724
|
* ```
|
|
6467
6725
|
* @param url - value to check.
|
|
6726
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6468
6727
|
*/
|
|
6469
6728
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
6470
6729
|
/**
|
|
@@ -6478,6 +6737,7 @@ declare namespace CodeceptJS {
|
|
|
6478
6737
|
* ```
|
|
6479
6738
|
* @param text - expected on page.
|
|
6480
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
|
|
6481
6741
|
*
|
|
6482
6742
|
* {{ react }}
|
|
6483
6743
|
*/
|
|
@@ -6490,6 +6750,7 @@ declare namespace CodeceptJS {
|
|
|
6490
6750
|
* ```
|
|
6491
6751
|
* @param text - element value to check.
|
|
6492
6752
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
6753
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6493
6754
|
*/
|
|
6494
6755
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
6495
6756
|
/**
|
|
@@ -6502,7 +6763,7 @@ declare namespace CodeceptJS {
|
|
|
6502
6763
|
* ```
|
|
6503
6764
|
* @param text - which is not present.
|
|
6504
6765
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
6505
|
-
*
|
|
6766
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6506
6767
|
*
|
|
6507
6768
|
* {{ react }}
|
|
6508
6769
|
*/
|
|
@@ -6544,6 +6805,7 @@ declare namespace CodeceptJS {
|
|
|
6544
6805
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
6545
6806
|
* ```
|
|
6546
6807
|
* @param text - value to check.
|
|
6808
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6547
6809
|
*/
|
|
6548
6810
|
seeInSource(text: string): void;
|
|
6549
6811
|
/**
|
|
@@ -6553,6 +6815,7 @@ declare namespace CodeceptJS {
|
|
|
6553
6815
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
6554
6816
|
* ```
|
|
6555
6817
|
* @param value - to check.
|
|
6818
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6556
6819
|
*/
|
|
6557
6820
|
dontSeeInSource(value: string): void;
|
|
6558
6821
|
/**
|
|
@@ -6565,7 +6828,7 @@ declare namespace CodeceptJS {
|
|
|
6565
6828
|
* ```
|
|
6566
6829
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6567
6830
|
* @param num - number of elements.
|
|
6568
|
-
*
|
|
6831
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6569
6832
|
*
|
|
6570
6833
|
* {{ react }}
|
|
6571
6834
|
*/
|
|
@@ -6579,7 +6842,7 @@ declare namespace CodeceptJS {
|
|
|
6579
6842
|
* ```
|
|
6580
6843
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6581
6844
|
* @param num - number of elements.
|
|
6582
|
-
*
|
|
6845
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6583
6846
|
*
|
|
6584
6847
|
* {{ react }}
|
|
6585
6848
|
*/
|
|
@@ -6599,6 +6862,7 @@ declare namespace CodeceptJS {
|
|
|
6599
6862
|
* ]);
|
|
6600
6863
|
* ```
|
|
6601
6864
|
* @param cookie - a cookie object or array of cookie objects.
|
|
6865
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6602
6866
|
*/
|
|
6603
6867
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
6604
6868
|
/**
|
|
@@ -6608,6 +6872,7 @@ declare namespace CodeceptJS {
|
|
|
6608
6872
|
* I.seeCookie('Auth');
|
|
6609
6873
|
* ```
|
|
6610
6874
|
* @param name - cookie name.
|
|
6875
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6611
6876
|
*/
|
|
6612
6877
|
seeCookie(name: string): void;
|
|
6613
6878
|
/**
|
|
@@ -6617,6 +6882,7 @@ declare namespace CodeceptJS {
|
|
|
6617
6882
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
6618
6883
|
* ```
|
|
6619
6884
|
* @param name - cookie name.
|
|
6885
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6620
6886
|
*/
|
|
6621
6887
|
dontSeeCookie(name: string): void;
|
|
6622
6888
|
/**
|
|
@@ -6644,6 +6910,7 @@ declare namespace CodeceptJS {
|
|
|
6644
6910
|
* I.clearCookie('test');
|
|
6645
6911
|
* ```
|
|
6646
6912
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
6913
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6647
6914
|
*/
|
|
6648
6915
|
clearCookie(cookie?: string): void;
|
|
6649
6916
|
/**
|
|
@@ -6671,9 +6938,12 @@ declare namespace CodeceptJS {
|
|
|
6671
6938
|
* ```
|
|
6672
6939
|
* @param fn - function to be executed in browser context.
|
|
6673
6940
|
* @param args - to be passed to function.
|
|
6674
|
-
*
|
|
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.
|
|
6675
6945
|
*/
|
|
6676
|
-
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
6946
|
+
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
6677
6947
|
/**
|
|
6678
6948
|
* Executes async script on page.
|
|
6679
6949
|
* Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
@@ -6697,9 +6967,12 @@ declare namespace CodeceptJS {
|
|
|
6697
6967
|
* ```
|
|
6698
6968
|
* @param fn - function to be executed in browser context.
|
|
6699
6969
|
* @param args - to be passed to function.
|
|
6700
|
-
*
|
|
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.
|
|
6701
6974
|
*/
|
|
6702
|
-
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
6975
|
+
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
6703
6976
|
/**
|
|
6704
6977
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
6705
6978
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -6810,6 +7083,7 @@ declare namespace CodeceptJS {
|
|
|
6810
7083
|
* ```
|
|
6811
7084
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6812
7085
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
7086
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6813
7087
|
* {{ react }}
|
|
6814
7088
|
*/
|
|
6815
7089
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
@@ -6821,6 +7095,7 @@ declare namespace CodeceptJS {
|
|
|
6821
7095
|
* ```
|
|
6822
7096
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6823
7097
|
* @param attributes - attributes and their values to check.
|
|
7098
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6824
7099
|
* {{ react }}
|
|
6825
7100
|
*/
|
|
6826
7101
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
@@ -6834,6 +7109,7 @@ declare namespace CodeceptJS {
|
|
|
6834
7109
|
* ```
|
|
6835
7110
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
6836
7111
|
* @param offsetX - position to drag.
|
|
7112
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6837
7113
|
* {{ react }}
|
|
6838
7114
|
*/
|
|
6839
7115
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
@@ -6875,6 +7151,7 @@ declare namespace CodeceptJS {
|
|
|
6875
7151
|
* ```
|
|
6876
7152
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6877
7153
|
* @param fileName - file name to save.
|
|
7154
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6878
7155
|
*/
|
|
6879
7156
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
6880
7157
|
/**
|
|
@@ -6888,6 +7165,7 @@ declare namespace CodeceptJS {
|
|
|
6888
7165
|
* ```
|
|
6889
7166
|
* @param fileName - file name to save.
|
|
6890
7167
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
7168
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6891
7169
|
*/
|
|
6892
7170
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
6893
7171
|
/**
|
|
@@ -6897,6 +7175,7 @@ declare namespace CodeceptJS {
|
|
|
6897
7175
|
* I.wait(2); // wait 2 secs
|
|
6898
7176
|
* ```
|
|
6899
7177
|
* @param sec - number of second to wait.
|
|
7178
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6900
7179
|
*/
|
|
6901
7180
|
wait(sec: number): void;
|
|
6902
7181
|
/**
|
|
@@ -6904,6 +7183,7 @@ declare namespace CodeceptJS {
|
|
|
6904
7183
|
* Element can be located by CSS or XPath.
|
|
6905
7184
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6906
7185
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
7186
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6907
7187
|
*/
|
|
6908
7188
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
6909
7189
|
/**
|
|
@@ -6915,6 +7195,7 @@ declare namespace CodeceptJS {
|
|
|
6915
7195
|
* @param field - input field.
|
|
6916
7196
|
* @param value - expected value.
|
|
6917
7197
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7198
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6918
7199
|
*/
|
|
6919
7200
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
6920
7201
|
/**
|
|
@@ -6926,6 +7207,7 @@ declare namespace CodeceptJS {
|
|
|
6926
7207
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6927
7208
|
* @param num - number of elements.
|
|
6928
7209
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7210
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6929
7211
|
* {{ react }}
|
|
6930
7212
|
*/
|
|
6931
7213
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
@@ -6939,6 +7221,7 @@ declare namespace CodeceptJS {
|
|
|
6939
7221
|
* ```
|
|
6940
7222
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6941
7223
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7224
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6942
7225
|
*/
|
|
6943
7226
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
6944
7227
|
/**
|
|
@@ -6951,6 +7234,7 @@ declare namespace CodeceptJS {
|
|
|
6951
7234
|
* ```
|
|
6952
7235
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6953
7236
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7237
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6954
7238
|
* {{ react }}
|
|
6955
7239
|
*/
|
|
6956
7240
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
@@ -6963,7 +7247,7 @@ declare namespace CodeceptJS {
|
|
|
6963
7247
|
* ```
|
|
6964
7248
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6965
7249
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6966
|
-
*
|
|
7250
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6967
7251
|
*
|
|
6968
7252
|
* This method accepts [React selectors](https://codecept.io/react).
|
|
6969
7253
|
*/
|
|
@@ -6977,6 +7261,7 @@ declare namespace CodeceptJS {
|
|
|
6977
7261
|
* ```
|
|
6978
7262
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6979
7263
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7264
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6980
7265
|
*/
|
|
6981
7266
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
6982
7267
|
/**
|
|
@@ -6988,6 +7273,7 @@ declare namespace CodeceptJS {
|
|
|
6988
7273
|
* ```
|
|
6989
7274
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6990
7275
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7276
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
6991
7277
|
*/
|
|
6992
7278
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
6993
7279
|
/**
|
|
@@ -6998,6 +7284,7 @@ declare namespace CodeceptJS {
|
|
|
6998
7284
|
* ```
|
|
6999
7285
|
* @param urlPart - value to check.
|
|
7000
7286
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7287
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7001
7288
|
*/
|
|
7002
7289
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
7003
7290
|
/**
|
|
@@ -7009,6 +7296,7 @@ declare namespace CodeceptJS {
|
|
|
7009
7296
|
* ```
|
|
7010
7297
|
* @param urlPart - value to check.
|
|
7011
7298
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7299
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7012
7300
|
*/
|
|
7013
7301
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
7014
7302
|
/**
|
|
@@ -7023,6 +7311,7 @@ declare namespace CodeceptJS {
|
|
|
7023
7311
|
* @param text - to wait for.
|
|
7024
7312
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7025
7313
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
7314
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7026
7315
|
*/
|
|
7027
7316
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
7028
7317
|
/**
|
|
@@ -7053,6 +7342,7 @@ declare namespace CodeceptJS {
|
|
|
7053
7342
|
* I.switchTo(); // switch back to main page
|
|
7054
7343
|
* ```
|
|
7055
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
|
|
7056
7346
|
*/
|
|
7057
7347
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
7058
7348
|
/**
|
|
@@ -7071,6 +7361,7 @@ declare namespace CodeceptJS {
|
|
|
7071
7361
|
* @param fn - to be executed in browser context.
|
|
7072
7362
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
7073
7363
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
7364
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7074
7365
|
*/
|
|
7075
7366
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
7076
7367
|
/**
|
|
@@ -7088,6 +7379,7 @@ declare namespace CodeceptJS {
|
|
|
7088
7379
|
* ```
|
|
7089
7380
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7090
7381
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7382
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7091
7383
|
*/
|
|
7092
7384
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7093
7385
|
/**
|
|
@@ -7110,8 +7402,9 @@ declare namespace CodeceptJS {
|
|
|
7110
7402
|
* loadEventEnd: 241
|
|
7111
7403
|
* }
|
|
7112
7404
|
* ```
|
|
7405
|
+
* @returns automatically synchronized promise through #recorder
|
|
7113
7406
|
*/
|
|
7114
|
-
grabDataFromPerformanceTiming():
|
|
7407
|
+
grabDataFromPerformanceTiming(): Promise<any>;
|
|
7115
7408
|
/**
|
|
7116
7409
|
* Grab the width, height, location of given locator.
|
|
7117
7410
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -7190,7 +7483,7 @@ declare namespace CodeceptJS {
|
|
|
7190
7483
|
* ```
|
|
7191
7484
|
* @param accessToken - Bearer access token
|
|
7192
7485
|
*/
|
|
7193
|
-
amBearerAuthenticated(accessToken: string): void;
|
|
7486
|
+
amBearerAuthenticated(accessToken: string | CodeceptJS.Secret): void;
|
|
7194
7487
|
/**
|
|
7195
7488
|
* Executes axios request
|
|
7196
7489
|
* @returns response
|
|
@@ -7449,6 +7742,7 @@ declare namespace CodeceptJS {
|
|
|
7449
7742
|
* I.amOnPage('/login'); // opens a login page
|
|
7450
7743
|
* ```
|
|
7451
7744
|
* @param url - url path or global url.
|
|
7745
|
+
* @returns automatically synchronized promise with recorder #!
|
|
7452
7746
|
*/
|
|
7453
7747
|
amOnPage(url: string): void;
|
|
7454
7748
|
/**
|
|
@@ -7456,6 +7750,7 @@ declare namespace CodeceptJS {
|
|
|
7456
7750
|
* First parameter can be set to `maximize`.
|
|
7457
7751
|
* @param width - width in pixels or `maximize`.
|
|
7458
7752
|
* @param height - height in pixels.
|
|
7753
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7459
7754
|
*/
|
|
7460
7755
|
resizeWindow(width: number, height: number): void;
|
|
7461
7756
|
/**
|
|
@@ -7482,14 +7777,16 @@ declare namespace CodeceptJS {
|
|
|
7482
7777
|
* ```
|
|
7483
7778
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
7484
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
|
|
7485
7781
|
*/
|
|
7486
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
7782
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
7487
7783
|
/**
|
|
7488
7784
|
* Reload the current page.
|
|
7489
7785
|
*
|
|
7490
7786
|
* ```js
|
|
7491
7787
|
* I.refreshPage();
|
|
7492
7788
|
* ```
|
|
7789
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7493
7790
|
*/
|
|
7494
7791
|
refreshPage(): void;
|
|
7495
7792
|
/**
|
|
@@ -7501,6 +7798,7 @@ declare namespace CodeceptJS {
|
|
|
7501
7798
|
* ```
|
|
7502
7799
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7503
7800
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7801
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7504
7802
|
*/
|
|
7505
7803
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7506
7804
|
/**
|
|
@@ -7519,6 +7817,7 @@ declare namespace CodeceptJS {
|
|
|
7519
7817
|
* ```
|
|
7520
7818
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7521
7819
|
* @param value - text value to fill.
|
|
7820
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7522
7821
|
*/
|
|
7523
7822
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
7524
7823
|
/**
|
|
@@ -7530,6 +7829,7 @@ declare namespace CodeceptJS {
|
|
|
7530
7829
|
* I.clearField('#email');
|
|
7531
7830
|
* ```
|
|
7532
7831
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
7832
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7533
7833
|
*/
|
|
7534
7834
|
clearField(editable: LocatorOrString): void;
|
|
7535
7835
|
/**
|
|
@@ -7541,6 +7841,7 @@ declare namespace CodeceptJS {
|
|
|
7541
7841
|
* ```
|
|
7542
7842
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
7543
7843
|
* @param value - text value to append.
|
|
7844
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7544
7845
|
*/
|
|
7545
7846
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
7546
7847
|
/**
|
|
@@ -7554,6 +7855,7 @@ declare namespace CodeceptJS {
|
|
|
7554
7855
|
* ```
|
|
7555
7856
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
7556
7857
|
* @param pathToFile - local file path relative to codecept.json config file.
|
|
7858
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7557
7859
|
*/
|
|
7558
7860
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
7559
7861
|
/**
|
|
@@ -7567,6 +7869,7 @@ declare namespace CodeceptJS {
|
|
|
7567
7869
|
* I.pressKey(['Control','a']);
|
|
7568
7870
|
* ```
|
|
7569
7871
|
* @param key - key or array of keys to press.
|
|
7872
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7570
7873
|
*
|
|
7571
7874
|
* {{ keys }}
|
|
7572
7875
|
*/
|
|
@@ -7582,6 +7885,7 @@ declare namespace CodeceptJS {
|
|
|
7582
7885
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7583
7886
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
7584
7887
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
7888
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7585
7889
|
*/
|
|
7586
7890
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
7587
7891
|
/**
|
|
@@ -7596,6 +7900,7 @@ declare namespace CodeceptJS {
|
|
|
7596
7900
|
* ```
|
|
7597
7901
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
7598
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
|
|
7599
7904
|
*/
|
|
7600
7905
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
7601
7906
|
/**
|
|
@@ -7611,6 +7916,7 @@ declare namespace CodeceptJS {
|
|
|
7611
7916
|
* ```
|
|
7612
7917
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
7613
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
|
|
7614
7920
|
*/
|
|
7615
7921
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
7616
7922
|
/**
|
|
@@ -7626,6 +7932,7 @@ declare namespace CodeceptJS {
|
|
|
7626
7932
|
* ```
|
|
7627
7933
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
7628
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
|
|
7629
7936
|
*/
|
|
7630
7937
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
7631
7938
|
/**
|
|
@@ -7641,6 +7948,7 @@ declare namespace CodeceptJS {
|
|
|
7641
7948
|
* ```
|
|
7642
7949
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
7643
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
|
|
7644
7952
|
*/
|
|
7645
7953
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
7646
7954
|
/**
|
|
@@ -7652,6 +7960,7 @@ declare namespace CodeceptJS {
|
|
|
7652
7960
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
7653
7961
|
* ```
|
|
7654
7962
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7963
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7655
7964
|
*/
|
|
7656
7965
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
7657
7966
|
/**
|
|
@@ -7663,6 +7972,7 @@ declare namespace CodeceptJS {
|
|
|
7663
7972
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
7664
7973
|
* ```
|
|
7665
7974
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7975
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7666
7976
|
*/
|
|
7667
7977
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
7668
7978
|
/**
|
|
@@ -7686,6 +7996,7 @@ declare namespace CodeceptJS {
|
|
|
7686
7996
|
* ```
|
|
7687
7997
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
7688
7998
|
* @param option - visible text or value of option.
|
|
7999
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7689
8000
|
*/
|
|
7690
8001
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
7691
8002
|
/**
|
|
@@ -7695,11 +8006,13 @@ declare namespace CodeceptJS {
|
|
|
7695
8006
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
7696
8007
|
* ```
|
|
7697
8008
|
* @param url - a fragment to check
|
|
8009
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7698
8010
|
*/
|
|
7699
8011
|
seeInCurrentUrl(url: string): void;
|
|
7700
8012
|
/**
|
|
7701
8013
|
* Checks that current url does not contain a provided fragment.
|
|
7702
8014
|
* @param url - value to check.
|
|
8015
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7703
8016
|
*/
|
|
7704
8017
|
dontSeeInCurrentUrl(url: string): void;
|
|
7705
8018
|
/**
|
|
@@ -7712,6 +8025,7 @@ declare namespace CodeceptJS {
|
|
|
7712
8025
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
7713
8026
|
* ```
|
|
7714
8027
|
* @param url - value to check.
|
|
8028
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7715
8029
|
*/
|
|
7716
8030
|
seeCurrentUrlEquals(url: string): void;
|
|
7717
8031
|
/**
|
|
@@ -7723,6 +8037,7 @@ declare namespace CodeceptJS {
|
|
|
7723
8037
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
7724
8038
|
* ```
|
|
7725
8039
|
* @param url - value to check.
|
|
8040
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7726
8041
|
*/
|
|
7727
8042
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
7728
8043
|
/**
|
|
@@ -7736,6 +8051,7 @@ declare namespace CodeceptJS {
|
|
|
7736
8051
|
* ```
|
|
7737
8052
|
* @param text - expected on page.
|
|
7738
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
|
|
7739
8055
|
*/
|
|
7740
8056
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
7741
8057
|
/**
|
|
@@ -7748,6 +8064,7 @@ declare namespace CodeceptJS {
|
|
|
7748
8064
|
* ```
|
|
7749
8065
|
* @param text - which is not present.
|
|
7750
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
|
|
7751
8068
|
*/
|
|
7752
8069
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
7753
8070
|
/**
|
|
@@ -7758,6 +8075,7 @@ declare namespace CodeceptJS {
|
|
|
7758
8075
|
* I.seeElement('#modal');
|
|
7759
8076
|
* ```
|
|
7760
8077
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8078
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7761
8079
|
*/
|
|
7762
8080
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
7763
8081
|
/**
|
|
@@ -7767,6 +8085,7 @@ declare namespace CodeceptJS {
|
|
|
7767
8085
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
7768
8086
|
* ```
|
|
7769
8087
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8088
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7770
8089
|
*/
|
|
7771
8090
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
7772
8091
|
/**
|
|
@@ -7777,6 +8096,7 @@ declare namespace CodeceptJS {
|
|
|
7777
8096
|
* I.seeElementInDOM('#modal');
|
|
7778
8097
|
* ```
|
|
7779
8098
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8099
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7780
8100
|
*/
|
|
7781
8101
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
7782
8102
|
/**
|
|
@@ -7786,6 +8106,7 @@ declare namespace CodeceptJS {
|
|
|
7786
8106
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
7787
8107
|
* ```
|
|
7788
8108
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8109
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7789
8110
|
*/
|
|
7790
8111
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
7791
8112
|
/**
|
|
@@ -7797,6 +8118,7 @@ declare namespace CodeceptJS {
|
|
|
7797
8118
|
* ```
|
|
7798
8119
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7799
8120
|
* @param num - number of elements.
|
|
8121
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7800
8122
|
*/
|
|
7801
8123
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
7802
8124
|
/**
|
|
@@ -7822,6 +8144,7 @@ declare namespace CodeceptJS {
|
|
|
7822
8144
|
* ```
|
|
7823
8145
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7824
8146
|
* @param value - value to check.
|
|
8147
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7825
8148
|
*/
|
|
7826
8149
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
7827
8150
|
/**
|
|
@@ -7834,6 +8157,7 @@ declare namespace CodeceptJS {
|
|
|
7834
8157
|
* ```
|
|
7835
8158
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7836
8159
|
* @param value - value to check.
|
|
8160
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7837
8161
|
*/
|
|
7838
8162
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
7839
8163
|
/**
|
|
@@ -7851,6 +8175,7 @@ declare namespace CodeceptJS {
|
|
|
7851
8175
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
7852
8176
|
* ```
|
|
7853
8177
|
* @param text - value to check.
|
|
8178
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7854
8179
|
*/
|
|
7855
8180
|
seeInSource(text: string): void;
|
|
7856
8181
|
/**
|
|
@@ -7860,6 +8185,7 @@ declare namespace CodeceptJS {
|
|
|
7860
8185
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
7861
8186
|
* ```
|
|
7862
8187
|
* @param value - to check.
|
|
8188
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7863
8189
|
*/
|
|
7864
8190
|
dontSeeInSource(value: string): void;
|
|
7865
8191
|
/**
|
|
@@ -7871,6 +8197,7 @@ declare namespace CodeceptJS {
|
|
|
7871
8197
|
* ```
|
|
7872
8198
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7873
8199
|
* @param fileName - file name to save.
|
|
8200
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7874
8201
|
*/
|
|
7875
8202
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
7876
8203
|
/**
|
|
@@ -7884,6 +8211,7 @@ declare namespace CodeceptJS {
|
|
|
7884
8211
|
* ```
|
|
7885
8212
|
* @param fileName - file name to save.
|
|
7886
8213
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
8214
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7887
8215
|
*/
|
|
7888
8216
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
7889
8217
|
/**
|
|
@@ -7893,6 +8221,7 @@ declare namespace CodeceptJS {
|
|
|
7893
8221
|
* I.wait(2); // wait 2 secs
|
|
7894
8222
|
* ```
|
|
7895
8223
|
* @param sec - number of second to wait.
|
|
8224
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
7896
8225
|
*/
|
|
7897
8226
|
wait(sec: number): void;
|
|
7898
8227
|
/**
|
|
@@ -7920,9 +8249,12 @@ declare namespace CodeceptJS {
|
|
|
7920
8249
|
* ```
|
|
7921
8250
|
* @param fn - function to be executed in browser context.
|
|
7922
8251
|
* @param args - to be passed to function.
|
|
7923
|
-
*
|
|
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.
|
|
7924
8256
|
*/
|
|
7925
|
-
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
8257
|
+
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
7926
8258
|
/**
|
|
7927
8259
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
7928
8260
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -8041,6 +8373,7 @@ declare namespace CodeceptJS {
|
|
|
8041
8373
|
* ```js
|
|
8042
8374
|
* I.scrollPageToTop();
|
|
8043
8375
|
* ```
|
|
8376
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8044
8377
|
*/
|
|
8045
8378
|
scrollPageToTop(): void;
|
|
8046
8379
|
/**
|
|
@@ -8049,6 +8382,7 @@ declare namespace CodeceptJS {
|
|
|
8049
8382
|
* ```js
|
|
8050
8383
|
* I.scrollPageToBottom();
|
|
8051
8384
|
* ```
|
|
8385
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8052
8386
|
*/
|
|
8053
8387
|
scrollPageToBottom(): void;
|
|
8054
8388
|
/**
|
|
@@ -8062,6 +8396,7 @@ declare namespace CodeceptJS {
|
|
|
8062
8396
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8063
8397
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
8064
8398
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
8399
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8065
8400
|
*/
|
|
8066
8401
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
8067
8402
|
/**
|
|
@@ -8072,6 +8407,7 @@ declare namespace CodeceptJS {
|
|
|
8072
8407
|
* I.switchTo(); // switch back to main page
|
|
8073
8408
|
* ```
|
|
8074
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
|
|
8075
8411
|
*/
|
|
8076
8412
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
8077
8413
|
/**
|
|
@@ -8089,6 +8425,7 @@ declare namespace CodeceptJS {
|
|
|
8089
8425
|
* ]);
|
|
8090
8426
|
* ```
|
|
8091
8427
|
* @param cookie - a cookie object or array of cookie objects.
|
|
8428
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8092
8429
|
*/
|
|
8093
8430
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
8094
8431
|
/**
|
|
@@ -8098,6 +8435,7 @@ declare namespace CodeceptJS {
|
|
|
8098
8435
|
* I.seeCookie('Auth');
|
|
8099
8436
|
* ```
|
|
8100
8437
|
* @param name - cookie name.
|
|
8438
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8101
8439
|
*/
|
|
8102
8440
|
seeCookie(name: string): void;
|
|
8103
8441
|
/**
|
|
@@ -8107,6 +8445,7 @@ declare namespace CodeceptJS {
|
|
|
8107
8445
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
8108
8446
|
* ```
|
|
8109
8447
|
* @param name - cookie name.
|
|
8448
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8110
8449
|
*/
|
|
8111
8450
|
dontSeeCookie(name: string): void;
|
|
8112
8451
|
/**
|
|
@@ -8134,6 +8473,7 @@ declare namespace CodeceptJS {
|
|
|
8134
8473
|
* I.clearCookie('test');
|
|
8135
8474
|
* ```
|
|
8136
8475
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
8476
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8137
8477
|
*/
|
|
8138
8478
|
clearCookie(cookie?: string): void;
|
|
8139
8479
|
/**
|
|
@@ -8144,6 +8484,7 @@ declare namespace CodeceptJS {
|
|
|
8144
8484
|
* ```
|
|
8145
8485
|
* @param urlPart - value to check.
|
|
8146
8486
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8487
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8147
8488
|
*/
|
|
8148
8489
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
8149
8490
|
/**
|
|
@@ -8155,6 +8496,7 @@ declare namespace CodeceptJS {
|
|
|
8155
8496
|
* ```
|
|
8156
8497
|
* @param urlPart - value to check.
|
|
8157
8498
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8499
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8158
8500
|
*/
|
|
8159
8501
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
8160
8502
|
/**
|
|
@@ -8173,6 +8515,7 @@ declare namespace CodeceptJS {
|
|
|
8173
8515
|
* @param fn - to be executed in browser context.
|
|
8174
8516
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
8175
8517
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
8518
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8176
8519
|
*/
|
|
8177
8520
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
8178
8521
|
/**
|
|
@@ -8184,6 +8527,7 @@ declare namespace CodeceptJS {
|
|
|
8184
8527
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8185
8528
|
* @param num - number of elements.
|
|
8186
8529
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8530
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8187
8531
|
*/
|
|
8188
8532
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
8189
8533
|
/**
|
|
@@ -8196,6 +8540,7 @@ declare namespace CodeceptJS {
|
|
|
8196
8540
|
* ```
|
|
8197
8541
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8198
8542
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
8543
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8199
8544
|
*/
|
|
8200
8545
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8201
8546
|
/**
|
|
@@ -8207,6 +8552,7 @@ declare namespace CodeceptJS {
|
|
|
8207
8552
|
* ```
|
|
8208
8553
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8209
8554
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8555
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8210
8556
|
*/
|
|
8211
8557
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8212
8558
|
/**
|
|
@@ -8218,6 +8564,7 @@ declare namespace CodeceptJS {
|
|
|
8218
8564
|
* ```
|
|
8219
8565
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8220
8566
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8567
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8221
8568
|
*/
|
|
8222
8569
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8223
8570
|
/**
|
|
@@ -8232,6 +8579,7 @@ declare namespace CodeceptJS {
|
|
|
8232
8579
|
* @param text - to wait for.
|
|
8233
8580
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8234
8581
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
8582
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8235
8583
|
*/
|
|
8236
8584
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
8237
8585
|
}
|
|
@@ -8669,6 +9017,7 @@ declare namespace CodeceptJS {
|
|
|
8669
9017
|
* I.amOnPage('/login'); // opens a login page
|
|
8670
9018
|
* ```
|
|
8671
9019
|
* @param url - url path or global url.
|
|
9020
|
+
* @returns automatically synchronized promise with recorder #!
|
|
8672
9021
|
*/
|
|
8673
9022
|
amOnPage(url: string): void;
|
|
8674
9023
|
/**
|
|
@@ -8695,11 +9044,12 @@ declare namespace CodeceptJS {
|
|
|
8695
9044
|
* ```
|
|
8696
9045
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8697
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
|
|
8698
9048
|
*
|
|
8699
9049
|
*
|
|
8700
9050
|
* {{ react }}
|
|
8701
9051
|
*/
|
|
8702
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
9052
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
8703
9053
|
/**
|
|
8704
9054
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
8705
9055
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -8727,6 +9077,7 @@ declare namespace CodeceptJS {
|
|
|
8727
9077
|
* ```
|
|
8728
9078
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8729
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
|
|
8730
9081
|
*
|
|
8731
9082
|
*
|
|
8732
9083
|
* {{ react }}
|
|
@@ -8744,7 +9095,7 @@ declare namespace CodeceptJS {
|
|
|
8744
9095
|
* ```
|
|
8745
9096
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8746
9097
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
8747
|
-
*
|
|
9098
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8748
9099
|
*
|
|
8749
9100
|
* {{ react }}
|
|
8750
9101
|
*/
|
|
@@ -8762,7 +9113,7 @@ declare namespace CodeceptJS {
|
|
|
8762
9113
|
* ```
|
|
8763
9114
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
8764
9115
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8765
|
-
*
|
|
9116
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8766
9117
|
*
|
|
8767
9118
|
* {{ react }}
|
|
8768
9119
|
*/
|
|
@@ -8784,7 +9135,7 @@ declare namespace CodeceptJS {
|
|
|
8784
9135
|
* ```
|
|
8785
9136
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8786
9137
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
8787
|
-
*
|
|
9138
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8788
9139
|
*
|
|
8789
9140
|
* {{ react }}
|
|
8790
9141
|
*/
|
|
@@ -8805,7 +9156,7 @@ declare namespace CodeceptJS {
|
|
|
8805
9156
|
* ```
|
|
8806
9157
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8807
9158
|
* @param value - text value to fill.
|
|
8808
|
-
*
|
|
9159
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8809
9160
|
* {{ react }}
|
|
8810
9161
|
* {{ custom }}
|
|
8811
9162
|
*/
|
|
@@ -8819,6 +9170,7 @@ declare namespace CodeceptJS {
|
|
|
8819
9170
|
* ```
|
|
8820
9171
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
8821
9172
|
* @param value - text value to append.
|
|
9173
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8822
9174
|
* {{ react }}
|
|
8823
9175
|
*/
|
|
8824
9176
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
@@ -8831,6 +9183,7 @@ declare namespace CodeceptJS {
|
|
|
8831
9183
|
* I.clearField('#email');
|
|
8832
9184
|
* ```
|
|
8833
9185
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
9186
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8834
9187
|
*/
|
|
8835
9188
|
clearField(editable: LocatorOrString): void;
|
|
8836
9189
|
/**
|
|
@@ -8854,6 +9207,7 @@ declare namespace CodeceptJS {
|
|
|
8854
9207
|
* ```
|
|
8855
9208
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
8856
9209
|
* @param option - visible text or value of option.
|
|
9210
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8857
9211
|
*/
|
|
8858
9212
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
8859
9213
|
/**
|
|
@@ -8867,6 +9221,7 @@ declare namespace CodeceptJS {
|
|
|
8867
9221
|
* ```
|
|
8868
9222
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
8869
9223
|
* @param pathToFile - local file path relative to codecept.json config file.
|
|
9224
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
8870
9225
|
* Appium: not tested
|
|
8871
9226
|
*/
|
|
8872
9227
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
@@ -8883,6 +9238,7 @@ declare namespace CodeceptJS {
|
|
|
8883
9238
|
* ```
|
|
8884
9239
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8885
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
|
|
8886
9242
|
* Appium: not tested
|
|
8887
9243
|
*/
|
|
8888
9244
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
@@ -8899,6 +9255,7 @@ declare namespace CodeceptJS {
|
|
|
8899
9255
|
* ```
|
|
8900
9256
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8901
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
|
|
8902
9259
|
* Appium: not tested
|
|
8903
9260
|
*/
|
|
8904
9261
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
@@ -9028,15 +9385,17 @@ declare namespace CodeceptJS {
|
|
|
9028
9385
|
* I.seeInTitle('Home Page');
|
|
9029
9386
|
* ```
|
|
9030
9387
|
* @param text - text value to check.
|
|
9388
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9031
9389
|
*/
|
|
9032
9390
|
seeInTitle(text: string): void;
|
|
9033
9391
|
/**
|
|
9034
9392
|
* Checks that title is equal to provided one.
|
|
9035
9393
|
*
|
|
9036
|
-
*
|
|
9037
|
-
*
|
|
9038
|
-
*
|
|
9394
|
+
* ```js
|
|
9395
|
+
* I.seeTitleEquals('Test title.');
|
|
9396
|
+
* ```
|
|
9039
9397
|
* @param text - value to check.
|
|
9398
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9040
9399
|
*/
|
|
9041
9400
|
seeTitleEquals(text: string): void;
|
|
9042
9401
|
/**
|
|
@@ -9046,6 +9405,7 @@ declare namespace CodeceptJS {
|
|
|
9046
9405
|
* I.dontSeeInTitle('Error');
|
|
9047
9406
|
* ```
|
|
9048
9407
|
* @param text - value to check.
|
|
9408
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9049
9409
|
*/
|
|
9050
9410
|
dontSeeInTitle(text: string): void;
|
|
9051
9411
|
/**
|
|
@@ -9069,6 +9429,7 @@ declare namespace CodeceptJS {
|
|
|
9069
9429
|
* ```
|
|
9070
9430
|
* @param text - expected on page.
|
|
9071
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
|
|
9072
9433
|
*
|
|
9073
9434
|
* {{ react }}
|
|
9074
9435
|
*/
|
|
@@ -9081,6 +9442,7 @@ declare namespace CodeceptJS {
|
|
|
9081
9442
|
* ```
|
|
9082
9443
|
* @param text - element value to check.
|
|
9083
9444
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
9445
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9084
9446
|
*/
|
|
9085
9447
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
9086
9448
|
/**
|
|
@@ -9093,7 +9455,7 @@ declare namespace CodeceptJS {
|
|
|
9093
9455
|
* ```
|
|
9094
9456
|
* @param text - which is not present.
|
|
9095
9457
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
9096
|
-
*
|
|
9458
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9097
9459
|
*
|
|
9098
9460
|
* {{ react }}
|
|
9099
9461
|
*/
|
|
@@ -9110,6 +9472,7 @@ declare namespace CodeceptJS {
|
|
|
9110
9472
|
* ```
|
|
9111
9473
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9112
9474
|
* @param value - value to check.
|
|
9475
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9113
9476
|
*/
|
|
9114
9477
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
9115
9478
|
/**
|
|
@@ -9122,6 +9485,7 @@ declare namespace CodeceptJS {
|
|
|
9122
9485
|
* ```
|
|
9123
9486
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9124
9487
|
* @param value - value to check.
|
|
9488
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9125
9489
|
*/
|
|
9126
9490
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
9127
9491
|
/**
|
|
@@ -9133,7 +9497,7 @@ declare namespace CodeceptJS {
|
|
|
9133
9497
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
9134
9498
|
* ```
|
|
9135
9499
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9136
|
-
*
|
|
9500
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9137
9501
|
* Appium: not tested
|
|
9138
9502
|
*/
|
|
9139
9503
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
@@ -9146,7 +9510,7 @@ declare namespace CodeceptJS {
|
|
|
9146
9510
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
9147
9511
|
* ```
|
|
9148
9512
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9149
|
-
*
|
|
9513
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9150
9514
|
* Appium: not tested
|
|
9151
9515
|
*/
|
|
9152
9516
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
@@ -9158,6 +9522,7 @@ declare namespace CodeceptJS {
|
|
|
9158
9522
|
* I.seeElement('#modal');
|
|
9159
9523
|
* ```
|
|
9160
9524
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9525
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9161
9526
|
* {{ react }}
|
|
9162
9527
|
*/
|
|
9163
9528
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -9168,6 +9533,7 @@ declare namespace CodeceptJS {
|
|
|
9168
9533
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
9169
9534
|
* ```
|
|
9170
9535
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9536
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9171
9537
|
* {{ react }}
|
|
9172
9538
|
*/
|
|
9173
9539
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -9179,6 +9545,7 @@ declare namespace CodeceptJS {
|
|
|
9179
9545
|
* I.seeElementInDOM('#modal');
|
|
9180
9546
|
* ```
|
|
9181
9547
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9548
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9182
9549
|
*/
|
|
9183
9550
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
9184
9551
|
/**
|
|
@@ -9188,6 +9555,7 @@ declare namespace CodeceptJS {
|
|
|
9188
9555
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
9189
9556
|
* ```
|
|
9190
9557
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9558
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9191
9559
|
*/
|
|
9192
9560
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
9193
9561
|
/**
|
|
@@ -9197,6 +9565,7 @@ declare namespace CodeceptJS {
|
|
|
9197
9565
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
9198
9566
|
* ```
|
|
9199
9567
|
* @param text - value to check.
|
|
9568
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9200
9569
|
*/
|
|
9201
9570
|
seeInSource(text: string): void;
|
|
9202
9571
|
/**
|
|
@@ -9238,6 +9607,7 @@ declare namespace CodeceptJS {
|
|
|
9238
9607
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
9239
9608
|
* ```
|
|
9240
9609
|
* @param value - to check.
|
|
9610
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9241
9611
|
*/
|
|
9242
9612
|
dontSeeInSource(value: string): void;
|
|
9243
9613
|
/**
|
|
@@ -9250,7 +9620,7 @@ declare namespace CodeceptJS {
|
|
|
9250
9620
|
* ```
|
|
9251
9621
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9252
9622
|
* @param num - number of elements.
|
|
9253
|
-
*
|
|
9623
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9254
9624
|
* {{ react }}
|
|
9255
9625
|
*/
|
|
9256
9626
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
@@ -9263,7 +9633,7 @@ declare namespace CodeceptJS {
|
|
|
9263
9633
|
* ```
|
|
9264
9634
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9265
9635
|
* @param num - number of elements.
|
|
9266
|
-
*
|
|
9636
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9267
9637
|
* {{ react }}
|
|
9268
9638
|
*/
|
|
9269
9639
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
@@ -9275,6 +9645,7 @@ declare namespace CodeceptJS {
|
|
|
9275
9645
|
* ```
|
|
9276
9646
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9277
9647
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
9648
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9278
9649
|
*/
|
|
9279
9650
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
9280
9651
|
/**
|
|
@@ -9285,6 +9656,7 @@ declare namespace CodeceptJS {
|
|
|
9285
9656
|
* ```
|
|
9286
9657
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9287
9658
|
* @param attributes - attributes and their values to check.
|
|
9659
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9288
9660
|
*/
|
|
9289
9661
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
9290
9662
|
/**
|
|
@@ -9305,11 +9677,13 @@ declare namespace CodeceptJS {
|
|
|
9305
9677
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
9306
9678
|
* ```
|
|
9307
9679
|
* @param url - a fragment to check
|
|
9680
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9308
9681
|
*/
|
|
9309
9682
|
seeInCurrentUrl(url: string): void;
|
|
9310
9683
|
/**
|
|
9311
9684
|
* Checks that current url does not contain a provided fragment.
|
|
9312
9685
|
* @param url - value to check.
|
|
9686
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9313
9687
|
*/
|
|
9314
9688
|
dontSeeInCurrentUrl(url: string): void;
|
|
9315
9689
|
/**
|
|
@@ -9322,6 +9696,7 @@ declare namespace CodeceptJS {
|
|
|
9322
9696
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
9323
9697
|
* ```
|
|
9324
9698
|
* @param url - value to check.
|
|
9699
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9325
9700
|
*/
|
|
9326
9701
|
seeCurrentUrlEquals(url: string): void;
|
|
9327
9702
|
/**
|
|
@@ -9333,6 +9708,7 @@ declare namespace CodeceptJS {
|
|
|
9333
9708
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
9334
9709
|
* ```
|
|
9335
9710
|
* @param url - value to check.
|
|
9711
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9336
9712
|
*/
|
|
9337
9713
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
9338
9714
|
/**
|
|
@@ -9360,9 +9736,13 @@ declare namespace CodeceptJS {
|
|
|
9360
9736
|
* ```
|
|
9361
9737
|
* @param fn - function to be executed in browser context.
|
|
9362
9738
|
* @param args - to be passed to function.
|
|
9363
|
-
*
|
|
9739
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9740
|
+
*
|
|
9741
|
+
*
|
|
9742
|
+
*
|
|
9743
|
+
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
9364
9744
|
*/
|
|
9365
|
-
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
9745
|
+
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
9366
9746
|
/**
|
|
9367
9747
|
* Executes async script on page.
|
|
9368
9748
|
* Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
@@ -9386,8 +9766,9 @@ declare namespace CodeceptJS {
|
|
|
9386
9766
|
* ```
|
|
9387
9767
|
* @param fn - function to be executed in browser context.
|
|
9388
9768
|
* @param args - to be passed to function.
|
|
9769
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9389
9770
|
*/
|
|
9390
|
-
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]):
|
|
9771
|
+
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
9391
9772
|
/**
|
|
9392
9773
|
* Scroll element into viewport.
|
|
9393
9774
|
*
|
|
@@ -9398,6 +9779,7 @@ declare namespace CodeceptJS {
|
|
|
9398
9779
|
* ```
|
|
9399
9780
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9400
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
|
|
9401
9783
|
*/
|
|
9402
9784
|
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): void;
|
|
9403
9785
|
/**
|
|
@@ -9411,6 +9793,7 @@ declare namespace CodeceptJS {
|
|
|
9411
9793
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9412
9794
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
9413
9795
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
9796
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9414
9797
|
*/
|
|
9415
9798
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
9416
9799
|
/**
|
|
@@ -9424,6 +9807,7 @@ declare namespace CodeceptJS {
|
|
|
9424
9807
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9425
9808
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
9426
9809
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
9810
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9427
9811
|
*/
|
|
9428
9812
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
9429
9813
|
/**
|
|
@@ -9435,6 +9819,7 @@ declare namespace CodeceptJS {
|
|
|
9435
9819
|
* ```
|
|
9436
9820
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9437
9821
|
* @param fileName - file name to save.
|
|
9822
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9438
9823
|
*/
|
|
9439
9824
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
9440
9825
|
/**
|
|
@@ -9448,6 +9833,7 @@ declare namespace CodeceptJS {
|
|
|
9448
9833
|
* ```
|
|
9449
9834
|
* @param fileName - file name to save.
|
|
9450
9835
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
9836
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9451
9837
|
*/
|
|
9452
9838
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
9453
9839
|
/**
|
|
@@ -9465,7 +9851,7 @@ declare namespace CodeceptJS {
|
|
|
9465
9851
|
* ]);
|
|
9466
9852
|
* ```
|
|
9467
9853
|
* @param cookie - a cookie object or array of cookie objects.
|
|
9468
|
-
*
|
|
9854
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9469
9855
|
*
|
|
9470
9856
|
*
|
|
9471
9857
|
* Uses Selenium's JSON [cookie
|
|
@@ -9481,6 +9867,7 @@ declare namespace CodeceptJS {
|
|
|
9481
9867
|
* I.clearCookie('test');
|
|
9482
9868
|
* ```
|
|
9483
9869
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
9870
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9484
9871
|
*/
|
|
9485
9872
|
clearCookie(cookie?: string): void;
|
|
9486
9873
|
/**
|
|
@@ -9490,6 +9877,7 @@ declare namespace CodeceptJS {
|
|
|
9490
9877
|
* I.seeCookie('Auth');
|
|
9491
9878
|
* ```
|
|
9492
9879
|
* @param name - cookie name.
|
|
9880
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9493
9881
|
*/
|
|
9494
9882
|
seeCookie(name: string): void;
|
|
9495
9883
|
/**
|
|
@@ -9499,6 +9887,7 @@ declare namespace CodeceptJS {
|
|
|
9499
9887
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
9500
9888
|
* ```
|
|
9501
9889
|
* @param name - cookie name.
|
|
9890
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9502
9891
|
*/
|
|
9503
9892
|
dontSeeCookie(name: string): void;
|
|
9504
9893
|
/**
|
|
@@ -9548,6 +9937,7 @@ declare namespace CodeceptJS {
|
|
|
9548
9937
|
* I.pressKeyUp('Control');
|
|
9549
9938
|
* ```
|
|
9550
9939
|
* @param key - name of key to press down.
|
|
9940
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9551
9941
|
*/
|
|
9552
9942
|
pressKeyDown(key: string): void;
|
|
9553
9943
|
/**
|
|
@@ -9561,6 +9951,7 @@ declare namespace CodeceptJS {
|
|
|
9561
9951
|
* I.pressKeyUp('Control');
|
|
9562
9952
|
* ```
|
|
9563
9953
|
* @param key - name of key to release.
|
|
9954
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9564
9955
|
*/
|
|
9565
9956
|
pressKeyUp(key: string): void;
|
|
9566
9957
|
/**
|
|
@@ -9622,6 +10013,7 @@ declare namespace CodeceptJS {
|
|
|
9622
10013
|
* - `'Space'`
|
|
9623
10014
|
* - `'Tab'`
|
|
9624
10015
|
* @param key - key or array of keys to press.
|
|
10016
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9625
10017
|
*
|
|
9626
10018
|
*
|
|
9627
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.
|
|
@@ -9644,6 +10036,7 @@ declare namespace CodeceptJS {
|
|
|
9644
10036
|
* ```
|
|
9645
10037
|
* @param key - or array of keys to type.
|
|
9646
10038
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
10039
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9647
10040
|
*/
|
|
9648
10041
|
type(key: string | string[], delay?: number): void;
|
|
9649
10042
|
/**
|
|
@@ -9651,6 +10044,7 @@ declare namespace CodeceptJS {
|
|
|
9651
10044
|
* First parameter can be set to `maximize`.
|
|
9652
10045
|
* @param width - width in pixels or `maximize`.
|
|
9653
10046
|
* @param height - height in pixels.
|
|
10047
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9654
10048
|
* Appium: not tested in web, in apps doesn't work
|
|
9655
10049
|
*/
|
|
9656
10050
|
resizeWindow(width: number, height: number): void;
|
|
@@ -9662,7 +10056,7 @@ declare namespace CodeceptJS {
|
|
|
9662
10056
|
* ```
|
|
9663
10057
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
9664
10058
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
9665
|
-
*
|
|
10059
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9666
10060
|
* Appium: not tested
|
|
9667
10061
|
*/
|
|
9668
10062
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
@@ -9676,6 +10070,7 @@ declare namespace CodeceptJS {
|
|
|
9676
10070
|
* ```
|
|
9677
10071
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
9678
10072
|
* @param offsetX - position to drag.
|
|
10073
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9679
10074
|
*/
|
|
9680
10075
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
9681
10076
|
/**
|
|
@@ -9714,9 +10109,11 @@ declare namespace CodeceptJS {
|
|
|
9714
10109
|
* Close all tabs except for the current one.
|
|
9715
10110
|
*
|
|
9716
10111
|
*
|
|
9717
|
-
*
|
|
9718
|
-
*
|
|
9719
|
-
*
|
|
10112
|
+
* ```js
|
|
10113
|
+
* I.closeOtherTabs();
|
|
10114
|
+
* ```
|
|
10115
|
+
*
|
|
10116
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9720
10117
|
*/
|
|
9721
10118
|
closeOtherTabs(): void;
|
|
9722
10119
|
/**
|
|
@@ -9726,6 +10123,7 @@ declare namespace CodeceptJS {
|
|
|
9726
10123
|
* I.wait(2); // wait 2 secs
|
|
9727
10124
|
* ```
|
|
9728
10125
|
* @param sec - number of second to wait.
|
|
10126
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9729
10127
|
*/
|
|
9730
10128
|
wait(sec: number): void;
|
|
9731
10129
|
/**
|
|
@@ -9733,6 +10131,7 @@ declare namespace CodeceptJS {
|
|
|
9733
10131
|
* Element can be located by CSS or XPath.
|
|
9734
10132
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9735
10133
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
10134
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9736
10135
|
*/
|
|
9737
10136
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9738
10137
|
/**
|
|
@@ -9745,6 +10144,7 @@ declare namespace CodeceptJS {
|
|
|
9745
10144
|
* ```
|
|
9746
10145
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9747
10146
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10147
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9748
10148
|
*/
|
|
9749
10149
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9750
10150
|
/**
|
|
@@ -9757,6 +10157,7 @@ declare namespace CodeceptJS {
|
|
|
9757
10157
|
* ```
|
|
9758
10158
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9759
10159
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
10160
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9760
10161
|
*/
|
|
9761
10162
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9762
10163
|
/**
|
|
@@ -9767,6 +10168,7 @@ declare namespace CodeceptJS {
|
|
|
9767
10168
|
* ```
|
|
9768
10169
|
* @param urlPart - value to check.
|
|
9769
10170
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10171
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9770
10172
|
*/
|
|
9771
10173
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
9772
10174
|
/**
|
|
@@ -9778,6 +10180,7 @@ declare namespace CodeceptJS {
|
|
|
9778
10180
|
* ```
|
|
9779
10181
|
* @param urlPart - value to check.
|
|
9780
10182
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10183
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9781
10184
|
*/
|
|
9782
10185
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
9783
10186
|
/**
|
|
@@ -9792,6 +10195,7 @@ declare namespace CodeceptJS {
|
|
|
9792
10195
|
* @param text - to wait for.
|
|
9793
10196
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
9794
10197
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
10198
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9795
10199
|
*/
|
|
9796
10200
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
9797
10201
|
/**
|
|
@@ -9803,6 +10207,7 @@ declare namespace CodeceptJS {
|
|
|
9803
10207
|
* @param field - input field.
|
|
9804
10208
|
* @param value - expected value.
|
|
9805
10209
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10210
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9806
10211
|
*/
|
|
9807
10212
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
9808
10213
|
/**
|
|
@@ -9814,6 +10219,7 @@ declare namespace CodeceptJS {
|
|
|
9814
10219
|
* ```
|
|
9815
10220
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9816
10221
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10222
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9817
10223
|
*/
|
|
9818
10224
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9819
10225
|
/**
|
|
@@ -9825,6 +10231,7 @@ declare namespace CodeceptJS {
|
|
|
9825
10231
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9826
10232
|
* @param num - number of elements.
|
|
9827
10233
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10234
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9828
10235
|
*/
|
|
9829
10236
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
9830
10237
|
/**
|
|
@@ -9836,6 +10243,7 @@ declare namespace CodeceptJS {
|
|
|
9836
10243
|
* ```
|
|
9837
10244
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9838
10245
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10246
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9839
10247
|
*/
|
|
9840
10248
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9841
10249
|
/**
|
|
@@ -9847,6 +10255,7 @@ declare namespace CodeceptJS {
|
|
|
9847
10255
|
* ```
|
|
9848
10256
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9849
10257
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10258
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9850
10259
|
*/
|
|
9851
10260
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9852
10261
|
/**
|
|
@@ -9858,6 +10267,7 @@ declare namespace CodeceptJS {
|
|
|
9858
10267
|
* ```
|
|
9859
10268
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9860
10269
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10270
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9861
10271
|
*/
|
|
9862
10272
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
9863
10273
|
/**
|
|
@@ -9876,6 +10286,7 @@ declare namespace CodeceptJS {
|
|
|
9876
10286
|
* @param fn - to be executed in browser context.
|
|
9877
10287
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
9878
10288
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10289
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9879
10290
|
*/
|
|
9880
10291
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
9881
10292
|
/**
|
|
@@ -9886,44 +10297,51 @@ declare namespace CodeceptJS {
|
|
|
9886
10297
|
* I.switchTo(); // switch back to main page
|
|
9887
10298
|
* ```
|
|
9888
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
|
|
9889
10301
|
*/
|
|
9890
10302
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
9891
10303
|
/**
|
|
9892
10304
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
9893
10305
|
*
|
|
9894
|
-
*
|
|
9895
|
-
*
|
|
9896
|
-
*
|
|
9897
|
-
*
|
|
10306
|
+
* ```js
|
|
10307
|
+
* I.switchToNextTab();
|
|
10308
|
+
* I.switchToNextTab(2);
|
|
10309
|
+
* ```
|
|
9898
10310
|
* @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
|
|
9899
10311
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10312
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9900
10313
|
*/
|
|
9901
10314
|
switchToNextTab(num?: number, sec?: number | null): void;
|
|
9902
10315
|
/**
|
|
9903
10316
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
9904
10317
|
*
|
|
9905
|
-
*
|
|
9906
|
-
*
|
|
9907
|
-
*
|
|
9908
|
-
*
|
|
10318
|
+
* ```js
|
|
10319
|
+
* I.switchToPreviousTab();
|
|
10320
|
+
* I.switchToPreviousTab(2);
|
|
10321
|
+
* ```
|
|
9909
10322
|
* @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
|
|
9910
10323
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10324
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9911
10325
|
*/
|
|
9912
10326
|
switchToPreviousTab(num?: number, sec?: number): void;
|
|
9913
10327
|
/**
|
|
9914
10328
|
* Close current tab.
|
|
9915
10329
|
*
|
|
9916
|
-
*
|
|
9917
|
-
*
|
|
9918
|
-
*
|
|
10330
|
+
* ```js
|
|
10331
|
+
* I.closeCurrentTab();
|
|
10332
|
+
* ```
|
|
10333
|
+
*
|
|
10334
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9919
10335
|
*/
|
|
9920
10336
|
closeCurrentTab(): void;
|
|
9921
10337
|
/**
|
|
9922
10338
|
* Open new tab and switch to it.
|
|
9923
10339
|
*
|
|
9924
|
-
*
|
|
9925
|
-
*
|
|
9926
|
-
*
|
|
10340
|
+
* ```js
|
|
10341
|
+
* I.openNewTab();
|
|
10342
|
+
* ```
|
|
10343
|
+
*
|
|
10344
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9927
10345
|
*/
|
|
9928
10346
|
openNewTab(): void;
|
|
9929
10347
|
/**
|
|
@@ -9942,6 +10360,7 @@ declare namespace CodeceptJS {
|
|
|
9942
10360
|
* ```js
|
|
9943
10361
|
* I.refreshPage();
|
|
9944
10362
|
* ```
|
|
10363
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9945
10364
|
*/
|
|
9946
10365
|
refreshPage(): void;
|
|
9947
10366
|
/**
|
|
@@ -9950,6 +10369,7 @@ declare namespace CodeceptJS {
|
|
|
9950
10369
|
* ```js
|
|
9951
10370
|
* I.scrollPageToTop();
|
|
9952
10371
|
* ```
|
|
10372
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9953
10373
|
*/
|
|
9954
10374
|
scrollPageToTop(): void;
|
|
9955
10375
|
/**
|
|
@@ -9958,6 +10378,7 @@ declare namespace CodeceptJS {
|
|
|
9958
10378
|
* ```js
|
|
9959
10379
|
* I.scrollPageToBottom();
|
|
9960
10380
|
* ```
|
|
10381
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9961
10382
|
*/
|
|
9962
10383
|
scrollPageToBottom(): void;
|
|
9963
10384
|
/**
|
|
@@ -9981,6 +10402,7 @@ declare namespace CodeceptJS {
|
|
|
9981
10402
|
* @param latitude - to set.
|
|
9982
10403
|
* @param longitude - to set
|
|
9983
10404
|
* @param [altitude = null] - (optional, null by default) to set
|
|
10405
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
9984
10406
|
*/
|
|
9985
10407
|
setGeoLocation(latitude: number, longitude: number, altitude?: number): void;
|
|
9986
10408
|
/**
|
|
@@ -10018,7 +10440,7 @@ declare namespace CodeceptJS {
|
|
|
10018
10440
|
/**
|
|
10019
10441
|
* Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
|
|
10020
10442
|
*/
|
|
10021
|
-
runOnAndroid(): void;
|
|
10443
|
+
runOnAndroid(caps: any, fn: any): void;
|
|
10022
10444
|
/**
|
|
10023
10445
|
* Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
|
|
10024
10446
|
*/
|