codeceptjs 4.2.3 → 4.2.4
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/docs/element-selection.md +27 -4
- package/docs/helpers/Appium.md +54 -54
- package/docs/helpers/Kitesurf.md +64 -64
- package/docs/helpers/Lightpanda.md +64 -64
- package/docs/helpers/Moli.md +64 -64
- package/docs/helpers/Obscura.md +64 -64
- package/docs/helpers/Playwright.md +125 -125
- package/docs/helpers/Puppeteer.md +85 -85
- package/docs/helpers/WebDriver.md +86 -86
- package/docs/locators.md +5 -7
- package/docs/migration-4.md +7 -3
- package/docs/retry.md +1 -1
- package/docs/timeouts.md +2 -2
- package/lib/actor.js +20 -2
- package/lib/data/context.js +24 -0
- package/lib/element/WebElement.js +5 -5
- package/lib/helper/Appium.js +1 -1
- package/lib/helper/Playwright.js +21 -11
- package/lib/helper/Puppeteer.js +2 -8
- package/lib/recorder.js +2 -1
- package/lib/step/base.js +8 -1
- package/lib/step/record.js +22 -17
- package/lib/step/retry.js +13 -6
- package/lib/utils/typescript.js +86 -12
- package/package.json +2 -1
- package/typings/index.d.ts +12 -0
- package/typings/promiseBasedTypes.d.ts +690 -345
- package/typings/types.d.ts +479 -346
|
@@ -777,8 +777,12 @@ declare namespace CodeceptJS {
|
|
|
777
777
|
* I.clearClipboard();
|
|
778
778
|
* I.seeClipboardEquals('');
|
|
779
779
|
* ```
|
|
780
|
+
* @returns automatically synchronized promise through #recorder
|
|
781
|
+
*
|
|
782
|
+
*
|
|
783
|
+
* Appium: support both Android and iOS
|
|
780
784
|
*/
|
|
781
|
-
clearClipboard():
|
|
785
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
782
786
|
/**
|
|
783
787
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
784
788
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -812,8 +816,9 @@ declare namespace CodeceptJS {
|
|
|
812
816
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
813
817
|
* @param value - text value to append.
|
|
814
818
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
819
|
+
* @returns automatically synchronized promise through #recorder
|
|
815
820
|
*/
|
|
816
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
821
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
817
822
|
/**
|
|
818
823
|
* Selects a checkbox or radio button.
|
|
819
824
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -827,8 +832,9 @@ declare namespace CodeceptJS {
|
|
|
827
832
|
* ```
|
|
828
833
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
829
834
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
835
|
+
* @returns automatically synchronized promise through #recorder
|
|
830
836
|
*/
|
|
831
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
837
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
832
838
|
/**
|
|
833
839
|
* Perform a click on a link or a button, given by a locator.
|
|
834
840
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -861,8 +867,9 @@ declare namespace CodeceptJS {
|
|
|
861
867
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
862
868
|
* @param [locator = '//body'] - (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
863
869
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
870
|
+
* @returns automatically synchronized promise through #recorder
|
|
864
871
|
*/
|
|
865
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
872
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
866
873
|
/**
|
|
867
874
|
* Verifies that the specified checkbox is not checked.
|
|
868
875
|
*
|
|
@@ -872,8 +879,9 @@ declare namespace CodeceptJS {
|
|
|
872
879
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
873
880
|
* ```
|
|
874
881
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
882
|
+
* @returns automatically synchronized promise through #recorder
|
|
875
883
|
*/
|
|
876
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
884
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
877
885
|
/**
|
|
878
886
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
879
887
|
*
|
|
@@ -885,8 +893,9 @@ declare namespace CodeceptJS {
|
|
|
885
893
|
* ```
|
|
886
894
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
887
895
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
896
|
+
* @returns automatically synchronized promise through #recorder
|
|
888
897
|
*/
|
|
889
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
898
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
890
899
|
/**
|
|
891
900
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
892
901
|
* Opposite to `seeInField`.
|
|
@@ -902,8 +911,9 @@ declare namespace CodeceptJS {
|
|
|
902
911
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
903
912
|
* @param value - value to check.
|
|
904
913
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
914
|
+
* @returns automatically synchronized promise through #recorder
|
|
905
915
|
*/
|
|
906
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
916
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
907
917
|
/**
|
|
908
918
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
909
919
|
* Use context parameter to narrow down the search.
|
|
@@ -914,8 +924,9 @@ declare namespace CodeceptJS {
|
|
|
914
924
|
* ```
|
|
915
925
|
* @param text - which is not present.
|
|
916
926
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
927
|
+
* @returns automatically synchronized promise through #recorder
|
|
917
928
|
*/
|
|
918
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
929
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
919
930
|
/**
|
|
920
931
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
921
932
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -941,8 +952,9 @@ declare namespace CodeceptJS {
|
|
|
941
952
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
942
953
|
* @param value - text value to fill.
|
|
943
954
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
955
|
+
* @returns automatically synchronized promise through #recorder
|
|
944
956
|
*/
|
|
945
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
957
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
946
958
|
/**
|
|
947
959
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
948
960
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1037,7 +1049,7 @@ declare namespace CodeceptJS {
|
|
|
1037
1049
|
* ```
|
|
1038
1050
|
* @param fileName - file name to save.
|
|
1039
1051
|
*/
|
|
1040
|
-
saveScreenshot(fileName: string):
|
|
1052
|
+
saveScreenshot(fileName: string): CodeceptJS.StepPromise;
|
|
1041
1053
|
/**
|
|
1042
1054
|
* Scroll element into viewport.
|
|
1043
1055
|
*
|
|
@@ -1048,8 +1060,12 @@ declare namespace CodeceptJS {
|
|
|
1048
1060
|
* ```
|
|
1049
1061
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1050
1062
|
* @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
1063
|
+
* @returns automatically synchronized promise through #recorder
|
|
1064
|
+
*
|
|
1065
|
+
*
|
|
1066
|
+
* Supported only for web testing
|
|
1051
1067
|
*/
|
|
1052
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean):
|
|
1068
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): CodeceptJS.StepPromise;
|
|
1053
1069
|
/**
|
|
1054
1070
|
* Verifies that the specified checkbox is checked.
|
|
1055
1071
|
*
|
|
@@ -1059,8 +1075,9 @@ declare namespace CodeceptJS {
|
|
|
1059
1075
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1060
1076
|
* ```
|
|
1061
1077
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1078
|
+
* @returns automatically synchronized promise through #recorder
|
|
1062
1079
|
*/
|
|
1063
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1080
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1064
1081
|
/**
|
|
1065
1082
|
* Checks that a given Element is visible
|
|
1066
1083
|
* Element is located by CSS or XPath.
|
|
@@ -1077,8 +1094,9 @@ declare namespace CodeceptJS {
|
|
|
1077
1094
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
1078
1095
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1079
1096
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1097
|
+
* @returns automatically synchronized promise through #recorder
|
|
1080
1098
|
*/
|
|
1081
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1099
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1082
1100
|
/**
|
|
1083
1101
|
* Checks that the given input field or textarea equals to given value.
|
|
1084
1102
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -1096,8 +1114,9 @@ declare namespace CodeceptJS {
|
|
|
1096
1114
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1097
1115
|
* @param value - value to check.
|
|
1098
1116
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1117
|
+
* @returns automatically synchronized promise through #recorder
|
|
1099
1118
|
*/
|
|
1100
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
1119
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1101
1120
|
/**
|
|
1102
1121
|
* Checks that a page contains a visible text.
|
|
1103
1122
|
* Use context parameter to narrow down the search.
|
|
@@ -1109,8 +1128,9 @@ declare namespace CodeceptJS {
|
|
|
1109
1128
|
* ```
|
|
1110
1129
|
* @param text - expected on page.
|
|
1111
1130
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1131
|
+
* @returns automatically synchronized promise through #recorder
|
|
1112
1132
|
*/
|
|
1113
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1133
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1114
1134
|
/**
|
|
1115
1135
|
* Selects an option in a drop-down select.
|
|
1116
1136
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -1137,8 +1157,12 @@ declare namespace CodeceptJS {
|
|
|
1137
1157
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
1138
1158
|
* @param option - visible text or value of option.
|
|
1139
1159
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1160
|
+
* @returns automatically synchronized promise through #recorder
|
|
1161
|
+
*
|
|
1162
|
+
*
|
|
1163
|
+
* Supported only for web testing
|
|
1140
1164
|
*/
|
|
1141
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
1165
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1142
1166
|
/**
|
|
1143
1167
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
1144
1168
|
* Element can be located by CSS or XPath.
|
|
@@ -1149,8 +1173,9 @@ declare namespace CodeceptJS {
|
|
|
1149
1173
|
* ```
|
|
1150
1174
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1151
1175
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1176
|
+
* @returns automatically synchronized promise through #recorder
|
|
1152
1177
|
*/
|
|
1153
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1178
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1154
1179
|
/**
|
|
1155
1180
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
1156
1181
|
* Element can be located by CSS or XPath.
|
|
@@ -1160,8 +1185,9 @@ declare namespace CodeceptJS {
|
|
|
1160
1185
|
* ```
|
|
1161
1186
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1162
1187
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1188
|
+
* @returns automatically synchronized promise through #recorder
|
|
1163
1189
|
*/
|
|
1164
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1190
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1165
1191
|
/**
|
|
1166
1192
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
1167
1193
|
* Element can be located by CSS or XPath.
|
|
@@ -1171,8 +1197,9 @@ declare namespace CodeceptJS {
|
|
|
1171
1197
|
* ```
|
|
1172
1198
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1173
1199
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1200
|
+
* @returns automatically synchronized promise through #recorder
|
|
1174
1201
|
*/
|
|
1175
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1202
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1176
1203
|
/**
|
|
1177
1204
|
* Waits for a text to appear (by default waits for 1sec).
|
|
1178
1205
|
* Element can be located by CSS or XPath.
|
|
@@ -1185,8 +1212,9 @@ declare namespace CodeceptJS {
|
|
|
1185
1212
|
* @param text - to wait for.
|
|
1186
1213
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1187
1214
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1215
|
+
* @returns automatically synchronized promise through #recorder
|
|
1188
1216
|
*/
|
|
1189
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
1217
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1190
1218
|
}
|
|
1191
1219
|
/**
|
|
1192
1220
|
* ## Configuration
|
|
@@ -1336,16 +1364,18 @@ declare namespace CodeceptJS {
|
|
|
1336
1364
|
* I.amOnPage('/login'); // opens a login page
|
|
1337
1365
|
* ```
|
|
1338
1366
|
* @param url - url path or global url.
|
|
1367
|
+
* @returns automatically synchronized promise through #recorder
|
|
1339
1368
|
*/
|
|
1340
|
-
amOnPage(url: string):
|
|
1369
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
1341
1370
|
/**
|
|
1342
1371
|
* Reload the current page.
|
|
1343
1372
|
*
|
|
1344
1373
|
* ```js
|
|
1345
1374
|
* I.refreshPage();
|
|
1346
1375
|
* ```
|
|
1376
|
+
* @returns automatically synchronized promise through #recorder
|
|
1347
1377
|
*/
|
|
1348
|
-
refreshPage():
|
|
1378
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
1349
1379
|
/**
|
|
1350
1380
|
* Executes sync script on a page.
|
|
1351
1381
|
* Pass arguments to function as additional parameters.
|
|
@@ -1428,8 +1458,9 @@ declare namespace CodeceptJS {
|
|
|
1428
1458
|
* ```
|
|
1429
1459
|
* @param text - expected on page.
|
|
1430
1460
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1461
|
+
* @returns automatically synchronized promise through #recorder
|
|
1431
1462
|
*/
|
|
1432
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1463
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1433
1464
|
/**
|
|
1434
1465
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
1435
1466
|
* Use context parameter to narrow down the search.
|
|
@@ -1440,8 +1471,9 @@ declare namespace CodeceptJS {
|
|
|
1440
1471
|
* ```
|
|
1441
1472
|
* @param text - which is not present.
|
|
1442
1473
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1474
|
+
* @returns automatically synchronized promise through #recorder
|
|
1443
1475
|
*/
|
|
1444
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1476
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1445
1477
|
/**
|
|
1446
1478
|
* Checks that the current page contains the given string in its raw source code.
|
|
1447
1479
|
*
|
|
@@ -1449,8 +1481,9 @@ declare namespace CodeceptJS {
|
|
|
1449
1481
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1450
1482
|
* ```
|
|
1451
1483
|
* @param text - value to check.
|
|
1484
|
+
* @returns automatically synchronized promise through #recorder
|
|
1452
1485
|
*/
|
|
1453
|
-
seeInSource(text: string):
|
|
1486
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
1454
1487
|
/**
|
|
1455
1488
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
1456
1489
|
*
|
|
@@ -1458,8 +1491,9 @@ declare namespace CodeceptJS {
|
|
|
1458
1491
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
1459
1492
|
* ```
|
|
1460
1493
|
* @param value - to check.
|
|
1494
|
+
* @returns automatically synchronized promise through #recorder
|
|
1461
1495
|
*/
|
|
1462
|
-
dontSeeInSource(value: string):
|
|
1496
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
1463
1497
|
/**
|
|
1464
1498
|
* Checks that current url contains a provided fragment.
|
|
1465
1499
|
*
|
|
@@ -1467,13 +1501,15 @@ declare namespace CodeceptJS {
|
|
|
1467
1501
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
1468
1502
|
* ```
|
|
1469
1503
|
* @param url - a fragment to check
|
|
1504
|
+
* @returns automatically synchronized promise through #recorder
|
|
1470
1505
|
*/
|
|
1471
|
-
seeInCurrentUrl(url: string):
|
|
1506
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
1472
1507
|
/**
|
|
1473
1508
|
* Checks that current url does not contain a provided fragment.
|
|
1474
1509
|
* @param url - value to check.
|
|
1510
|
+
* @returns automatically synchronized promise through #recorder
|
|
1475
1511
|
*/
|
|
1476
|
-
dontSeeInCurrentUrl(url: string):
|
|
1512
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
1477
1513
|
/**
|
|
1478
1514
|
* Checks that title contains text.
|
|
1479
1515
|
*
|
|
@@ -1481,8 +1517,9 @@ declare namespace CodeceptJS {
|
|
|
1481
1517
|
* I.seeInTitle('Home Page');
|
|
1482
1518
|
* ```
|
|
1483
1519
|
* @param text - text value to check.
|
|
1520
|
+
* @returns automatically synchronized promise through #recorder
|
|
1484
1521
|
*/
|
|
1485
|
-
seeInTitle(text: string):
|
|
1522
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
1486
1523
|
/**
|
|
1487
1524
|
* Checks that a given Element is present in the DOM
|
|
1488
1525
|
* Element is located by CSS or XPath.
|
|
@@ -1491,8 +1528,9 @@ declare namespace CodeceptJS {
|
|
|
1491
1528
|
* I.seeElementInDOM('#modal');
|
|
1492
1529
|
* ```
|
|
1493
1530
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1531
|
+
* @returns automatically synchronized promise through #recorder
|
|
1494
1532
|
*/
|
|
1495
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
1533
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1496
1534
|
/**
|
|
1497
1535
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
1498
1536
|
*
|
|
@@ -1500,8 +1538,9 @@ declare namespace CodeceptJS {
|
|
|
1500
1538
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
1501
1539
|
* ```
|
|
1502
1540
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1541
|
+
* @returns automatically synchronized promise through #recorder
|
|
1503
1542
|
*/
|
|
1504
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
1543
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1505
1544
|
/**
|
|
1506
1545
|
* Checks that a given Element is visible
|
|
1507
1546
|
* Element is located by CSS or XPath.
|
|
@@ -1518,8 +1557,9 @@ declare namespace CodeceptJS {
|
|
|
1518
1557
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
1519
1558
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1520
1559
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1560
|
+
* @returns automatically synchronized promise through #recorder
|
|
1521
1561
|
*/
|
|
1522
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1562
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1523
1563
|
/**
|
|
1524
1564
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
1525
1565
|
*
|
|
@@ -1531,8 +1571,9 @@ declare namespace CodeceptJS {
|
|
|
1531
1571
|
* ```
|
|
1532
1572
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1533
1573
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1574
|
+
* @returns automatically synchronized promise through #recorder
|
|
1534
1575
|
*/
|
|
1535
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1576
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1536
1577
|
/**
|
|
1537
1578
|
* Verifies that the specified checkbox is checked.
|
|
1538
1579
|
*
|
|
@@ -1542,8 +1583,9 @@ declare namespace CodeceptJS {
|
|
|
1542
1583
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1543
1584
|
* ```
|
|
1544
1585
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1586
|
+
* @returns automatically synchronized promise through #recorder
|
|
1545
1587
|
*/
|
|
1546
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1588
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1547
1589
|
/**
|
|
1548
1590
|
* Verifies that the specified checkbox is not checked.
|
|
1549
1591
|
*
|
|
@@ -1553,8 +1595,9 @@ declare namespace CodeceptJS {
|
|
|
1553
1595
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
1554
1596
|
* ```
|
|
1555
1597
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1598
|
+
* @returns automatically synchronized promise through #recorder
|
|
1556
1599
|
*/
|
|
1557
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1600
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1558
1601
|
/**
|
|
1559
1602
|
* Retrieves a text from an element located by CSS or XPath and returns it to test.
|
|
1560
1603
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1586,9 +1629,9 @@ declare namespace CodeceptJS {
|
|
|
1586
1629
|
* const webElements = await I.grabWebElements('#button');
|
|
1587
1630
|
* ```
|
|
1588
1631
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1589
|
-
* @returns
|
|
1632
|
+
* @returns WebElements of being used Web helper
|
|
1590
1633
|
*/
|
|
1591
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1634
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
1592
1635
|
/**
|
|
1593
1636
|
* Grab WebElement for given locator
|
|
1594
1637
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -1599,7 +1642,7 @@ declare namespace CodeceptJS {
|
|
|
1599
1642
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1600
1643
|
* @returns WebElement of being used Web helper
|
|
1601
1644
|
*/
|
|
1602
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1645
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
1603
1646
|
/**
|
|
1604
1647
|
* Retrieves a value from a form element located by CSS or XPath and returns it to test.
|
|
1605
1648
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -1691,8 +1734,9 @@ declare namespace CodeceptJS {
|
|
|
1691
1734
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
1692
1735
|
* @param [locator = '//body'] - (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1693
1736
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1737
|
+
* @returns automatically synchronized promise through #recorder
|
|
1694
1738
|
*/
|
|
1695
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
1739
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
1696
1740
|
/**
|
|
1697
1741
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
1698
1742
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -1720,8 +1764,9 @@ declare namespace CodeceptJS {
|
|
|
1720
1764
|
* ```
|
|
1721
1765
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1722
1766
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1767
|
+
* @returns automatically synchronized promise through #recorder
|
|
1723
1768
|
*/
|
|
1724
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1769
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1725
1770
|
/**
|
|
1726
1771
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
1727
1772
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -1747,8 +1792,9 @@ declare namespace CodeceptJS {
|
|
|
1747
1792
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1748
1793
|
* @param value - text value to fill.
|
|
1749
1794
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1795
|
+
* @returns automatically synchronized promise through #recorder
|
|
1750
1796
|
*/
|
|
1751
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
1797
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1752
1798
|
/**
|
|
1753
1799
|
* Appends text to a input field or textarea.
|
|
1754
1800
|
* Field is located by name, label, CSS or XPath
|
|
@@ -1765,8 +1811,9 @@ declare namespace CodeceptJS {
|
|
|
1765
1811
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
1766
1812
|
* @param value - text value to append.
|
|
1767
1813
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1814
|
+
* @returns automatically synchronized promise through #recorder
|
|
1768
1815
|
*/
|
|
1769
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
1816
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1770
1817
|
/**
|
|
1771
1818
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
1772
1819
|
*
|
|
@@ -1781,8 +1828,9 @@ declare namespace CodeceptJS {
|
|
|
1781
1828
|
* ```
|
|
1782
1829
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
1783
1830
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1831
|
+
* @returns automatically synchronized promise through #recorder.
|
|
1784
1832
|
*/
|
|
1785
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1833
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1786
1834
|
/**
|
|
1787
1835
|
* Selects an option in a drop-down select.
|
|
1788
1836
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -1809,8 +1857,9 @@ declare namespace CodeceptJS {
|
|
|
1809
1857
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
1810
1858
|
* @param option - visible text or value of option.
|
|
1811
1859
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1860
|
+
* @returns automatically synchronized promise through #recorder
|
|
1812
1861
|
*/
|
|
1813
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
1862
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1814
1863
|
/**
|
|
1815
1864
|
* Selects a checkbox or radio button.
|
|
1816
1865
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -1824,8 +1873,9 @@ declare namespace CodeceptJS {
|
|
|
1824
1873
|
* ```
|
|
1825
1874
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
1826
1875
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1876
|
+
* @returns automatically synchronized promise through #recorder
|
|
1827
1877
|
*/
|
|
1828
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1878
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1829
1879
|
/**
|
|
1830
1880
|
* Unselects a checkbox or radio button.
|
|
1831
1881
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -1839,8 +1889,9 @@ declare namespace CodeceptJS {
|
|
|
1839
1889
|
* ```
|
|
1840
1890
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
1841
1891
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1892
|
+
* @returns automatically synchronized promise through #recorder
|
|
1842
1893
|
*/
|
|
1843
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1894
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1844
1895
|
/**
|
|
1845
1896
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
1846
1897
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -1864,8 +1915,9 @@ declare namespace CodeceptJS {
|
|
|
1864
1915
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
1865
1916
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
1866
1917
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1918
|
+
* @returns automatically synchronized promise through #recorder
|
|
1867
1919
|
*/
|
|
1868
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
1920
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1869
1921
|
/**
|
|
1870
1922
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
1871
1923
|
* Element can be located by CSS or XPath.
|
|
@@ -1876,8 +1928,9 @@ declare namespace CodeceptJS {
|
|
|
1876
1928
|
* ```
|
|
1877
1929
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1878
1930
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1931
|
+
* @returns automatically synchronized promise through #recorder
|
|
1879
1932
|
*/
|
|
1880
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1933
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1881
1934
|
/**
|
|
1882
1935
|
* Waits for a text to appear (by default waits for 1sec).
|
|
1883
1936
|
* Element can be located by CSS or XPath.
|
|
@@ -1890,8 +1943,9 @@ declare namespace CodeceptJS {
|
|
|
1890
1943
|
* @param text - to wait for.
|
|
1891
1944
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1892
1945
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1946
|
+
* @returns automatically synchronized promise through #recorder
|
|
1893
1947
|
*/
|
|
1894
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
1948
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1895
1949
|
/**
|
|
1896
1950
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
1897
1951
|
*
|
|
@@ -1900,8 +1954,9 @@ declare namespace CodeceptJS {
|
|
|
1900
1954
|
* ```
|
|
1901
1955
|
* @param urlPart - value to check.
|
|
1902
1956
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1957
|
+
* @returns automatically synchronized promise through #recorder
|
|
1903
1958
|
*/
|
|
1904
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
1959
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
1905
1960
|
/**
|
|
1906
1961
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
1907
1962
|
* Running in browser context.
|
|
@@ -1918,8 +1973,9 @@ declare namespace CodeceptJS {
|
|
|
1918
1973
|
* @param fn - to be executed in browser context.
|
|
1919
1974
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
1920
1975
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1976
|
+
* @returns automatically synchronized promise through #recorder
|
|
1921
1977
|
*/
|
|
1922
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
1978
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
1923
1979
|
/**
|
|
1924
1980
|
* Sets cookie(s).
|
|
1925
1981
|
*
|
|
@@ -1935,8 +1991,9 @@ declare namespace CodeceptJS {
|
|
|
1935
1991
|
* ]);
|
|
1936
1992
|
* ```
|
|
1937
1993
|
* @param cookie - a cookie object or array of cookie objects.
|
|
1994
|
+
* @returns automatically synchronized promise through #recorder
|
|
1938
1995
|
*/
|
|
1939
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
1996
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
1940
1997
|
/**
|
|
1941
1998
|
* Retrieves all cookies visible to the current page.
|
|
1942
1999
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -1981,8 +2038,9 @@ declare namespace CodeceptJS {
|
|
|
1981
2038
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
1982
2039
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
1983
2040
|
* @param text - value to check.
|
|
2041
|
+
* @returns automatically synchronized promise through #recorder
|
|
1984
2042
|
*/
|
|
1985
|
-
seeInClipboard(text: string):
|
|
2043
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
1986
2044
|
/**
|
|
1987
2045
|
* Checks that the system clipboard is equal to the given text.
|
|
1988
2046
|
*
|
|
@@ -1994,8 +2052,9 @@ declare namespace CodeceptJS {
|
|
|
1994
2052
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
1995
2053
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
1996
2054
|
* @param text - value to check.
|
|
2055
|
+
* @returns automatically synchronized promise through #recorder
|
|
1997
2056
|
*/
|
|
1998
|
-
seeClipboardEquals(text: string):
|
|
2057
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
1999
2058
|
/**
|
|
2000
2059
|
* Clears the system clipboard.
|
|
2001
2060
|
*
|
|
@@ -2003,8 +2062,9 @@ declare namespace CodeceptJS {
|
|
|
2003
2062
|
* I.clearClipboard();
|
|
2004
2063
|
* I.seeClipboardEquals('');
|
|
2005
2064
|
* ```
|
|
2065
|
+
* @returns automatically synchronized promise through #recorder
|
|
2006
2066
|
*/
|
|
2007
|
-
clearClipboard():
|
|
2067
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
2008
2068
|
/**
|
|
2009
2069
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
2010
2070
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2038,8 +2098,9 @@ declare namespace CodeceptJS {
|
|
|
2038
2098
|
* ```
|
|
2039
2099
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2040
2100
|
* @param fileName - file name to save.
|
|
2101
|
+
* @returns automatically synchronized promise through #recorder
|
|
2041
2102
|
*/
|
|
2042
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
2103
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
2043
2104
|
/**
|
|
2044
2105
|
* Pauses execution for a number of seconds.
|
|
2045
2106
|
*
|
|
@@ -2047,8 +2108,9 @@ declare namespace CodeceptJS {
|
|
|
2047
2108
|
* I.wait(2); // wait 2 secs
|
|
2048
2109
|
* ```
|
|
2049
2110
|
* @param sec - number of second to wait.
|
|
2111
|
+
* @returns automatically synchronized promise through #recorder
|
|
2050
2112
|
*/
|
|
2051
|
-
wait(sec: number):
|
|
2113
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
2052
2114
|
/**
|
|
2053
2115
|
* Checks that title does not contain text.
|
|
2054
2116
|
*
|
|
@@ -2056,8 +2118,9 @@ declare namespace CodeceptJS {
|
|
|
2056
2118
|
* I.dontSeeInTitle('Error');
|
|
2057
2119
|
* ```
|
|
2058
2120
|
* @param text - value to check.
|
|
2121
|
+
* @returns automatically synchronized promise through #recorder
|
|
2059
2122
|
*/
|
|
2060
|
-
dontSeeInTitle(text: string):
|
|
2123
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
2061
2124
|
/**
|
|
2062
2125
|
* Checks that current url is equal to provided one.
|
|
2063
2126
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -2068,8 +2131,9 @@ declare namespace CodeceptJS {
|
|
|
2068
2131
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
2069
2132
|
* ```
|
|
2070
2133
|
* @param url - value to check.
|
|
2134
|
+
* @returns automatically synchronized promise through #recorder
|
|
2071
2135
|
*/
|
|
2072
|
-
seeCurrentUrlEquals(url: string):
|
|
2136
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
2073
2137
|
/**
|
|
2074
2138
|
* Checks that current url is not equal to provided one.
|
|
2075
2139
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -2079,8 +2143,9 @@ declare namespace CodeceptJS {
|
|
|
2079
2143
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
2080
2144
|
* ```
|
|
2081
2145
|
* @param url - value to check.
|
|
2146
|
+
* @returns automatically synchronized promise through #recorder
|
|
2082
2147
|
*/
|
|
2083
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
2148
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
2084
2149
|
/**
|
|
2085
2150
|
* Checks that current URL path matches the expected path.
|
|
2086
2151
|
* Query strings and URL fragments are ignored.
|
|
@@ -2090,8 +2155,9 @@ declare namespace CodeceptJS {
|
|
|
2090
2155
|
* I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
2091
2156
|
* ```
|
|
2092
2157
|
* @param path - value to check.
|
|
2158
|
+
* @returns automatically synchronized promise through #recorder
|
|
2093
2159
|
*/
|
|
2094
|
-
seeCurrentPathEquals(path: string):
|
|
2160
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
2095
2161
|
/**
|
|
2096
2162
|
* Checks that current URL path does NOT match the expected path.
|
|
2097
2163
|
* Query strings and URL fragments are ignored.
|
|
@@ -2101,8 +2167,9 @@ declare namespace CodeceptJS {
|
|
|
2101
2167
|
* I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
2102
2168
|
* ```
|
|
2103
2169
|
* @param path - value to check.
|
|
2170
|
+
* @returns automatically synchronized promise through #recorder
|
|
2104
2171
|
*/
|
|
2105
|
-
dontSeeCurrentPathEquals(path: string):
|
|
2172
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
2106
2173
|
/**
|
|
2107
2174
|
* Waits for the entire URL to match the expected
|
|
2108
2175
|
*
|
|
@@ -2112,8 +2179,9 @@ declare namespace CodeceptJS {
|
|
|
2112
2179
|
* ```
|
|
2113
2180
|
* @param urlPart - value to check.
|
|
2114
2181
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2182
|
+
* @returns automatically synchronized promise through #recorder
|
|
2115
2183
|
*/
|
|
2116
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
2184
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
2117
2185
|
/**
|
|
2118
2186
|
* Waits for the current URL path to match the expected path.
|
|
2119
2187
|
* Query strings and URL fragments are ignored.
|
|
@@ -2142,8 +2210,9 @@ declare namespace CodeceptJS {
|
|
|
2142
2210
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2143
2211
|
* @param value - value to check.
|
|
2144
2212
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2213
|
+
* @returns automatically synchronized promise through #recorder
|
|
2145
2214
|
*/
|
|
2146
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
2215
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
2147
2216
|
/**
|
|
2148
2217
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
2149
2218
|
* Opposite to `seeInField`.
|
|
@@ -2159,8 +2228,9 @@ declare namespace CodeceptJS {
|
|
|
2159
2228
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2160
2229
|
* @param value - value to check.
|
|
2161
2230
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2231
|
+
* @returns automatically synchronized promise through #recorder
|
|
2162
2232
|
*/
|
|
2163
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
2233
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
2164
2234
|
/**
|
|
2165
2235
|
* Grab number of visible elements by locator.
|
|
2166
2236
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2181,8 +2251,9 @@ declare namespace CodeceptJS {
|
|
|
2181
2251
|
* ```
|
|
2182
2252
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2183
2253
|
* @param num - number of elements.
|
|
2254
|
+
* @returns automatically synchronized promise through #recorder
|
|
2184
2255
|
*/
|
|
2185
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
2256
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
2186
2257
|
/**
|
|
2187
2258
|
* Retrieves a page scroll position and returns it to test.
|
|
2188
2259
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -2199,16 +2270,18 @@ declare namespace CodeceptJS {
|
|
|
2199
2270
|
* ```js
|
|
2200
2271
|
* I.scrollPageToTop();
|
|
2201
2272
|
* ```
|
|
2273
|
+
* @returns automatically synchronized promise through #recorder
|
|
2202
2274
|
*/
|
|
2203
|
-
scrollPageToTop():
|
|
2275
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
2204
2276
|
/**
|
|
2205
2277
|
* Scroll page to the bottom.
|
|
2206
2278
|
*
|
|
2207
2279
|
* ```js
|
|
2208
2280
|
* I.scrollPageToBottom();
|
|
2209
2281
|
* ```
|
|
2282
|
+
* @returns automatically synchronized promise through #recorder
|
|
2210
2283
|
*/
|
|
2211
|
-
scrollPageToBottom():
|
|
2284
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
2212
2285
|
/**
|
|
2213
2286
|
* Scrolls to element matched by locator.
|
|
2214
2287
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -2220,8 +2293,9 @@ declare namespace CodeceptJS {
|
|
|
2220
2293
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2221
2294
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2222
2295
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2296
|
+
* @returns automatically synchronized promise through #recorder
|
|
2223
2297
|
*/
|
|
2224
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
2298
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
2225
2299
|
/**
|
|
2226
2300
|
* Grab CSS property for given locator
|
|
2227
2301
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -2255,8 +2329,9 @@ declare namespace CodeceptJS {
|
|
|
2255
2329
|
* ```
|
|
2256
2330
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2257
2331
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
2332
|
+
* @returns automatically synchronized promise through #recorder
|
|
2258
2333
|
*/
|
|
2259
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
2334
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
2260
2335
|
/**
|
|
2261
2336
|
* Checks that all elements with given locator have given attributes.
|
|
2262
2337
|
*
|
|
@@ -2265,8 +2340,9 @@ declare namespace CodeceptJS {
|
|
|
2265
2340
|
* ```
|
|
2266
2341
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2267
2342
|
* @param attributes - attributes and their values to check.
|
|
2343
|
+
* @returns automatically synchronized promise through #recorder
|
|
2268
2344
|
*/
|
|
2269
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
2345
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
2270
2346
|
/**
|
|
2271
2347
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
2272
2348
|
*
|
|
@@ -2279,8 +2355,9 @@ declare namespace CodeceptJS {
|
|
|
2279
2355
|
* ```
|
|
2280
2356
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
2281
2357
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
2358
|
+
* @returns automatically synchronized promise through #recorder
|
|
2282
2359
|
*/
|
|
2283
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
2360
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
2284
2361
|
/**
|
|
2285
2362
|
* Remove focus from a text input, button, etc.
|
|
2286
2363
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -2298,8 +2375,9 @@ declare namespace CodeceptJS {
|
|
|
2298
2375
|
* ```
|
|
2299
2376
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
2300
2377
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
2378
|
+
* @returns automatically synchronized promise through #recorder
|
|
2301
2379
|
*/
|
|
2302
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
2380
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
2303
2381
|
/**
|
|
2304
2382
|
* Types out the given text into an active field.
|
|
2305
2383
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -2320,8 +2398,9 @@ declare namespace CodeceptJS {
|
|
|
2320
2398
|
* ```
|
|
2321
2399
|
* @param key - or array of keys to type.
|
|
2322
2400
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
2401
|
+
* @returns automatically synchronized promise through #recorder
|
|
2323
2402
|
*/
|
|
2324
|
-
type(key: string | string[], delay?: number):
|
|
2403
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
2325
2404
|
/**
|
|
2326
2405
|
* Presses a key or a key combination on the focused element.
|
|
2327
2406
|
*
|
|
@@ -2337,8 +2416,9 @@ declare namespace CodeceptJS {
|
|
|
2337
2416
|
* First parameter can be set to `maximize`.
|
|
2338
2417
|
* @param width - width in pixels or `maximize`.
|
|
2339
2418
|
* @param height - height in pixels.
|
|
2419
|
+
* @returns automatically synchronized promise through #recorder
|
|
2340
2420
|
*/
|
|
2341
|
-
resizeWindow(width: number, height: number):
|
|
2421
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
2342
2422
|
/**
|
|
2343
2423
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
2344
2424
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -2351,8 +2431,9 @@ declare namespace CodeceptJS {
|
|
|
2351
2431
|
* ```
|
|
2352
2432
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
2353
2433
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
2434
|
+
* @returns automatically synchronized promise through #recorder
|
|
2354
2435
|
*/
|
|
2355
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
2436
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
2356
2437
|
/**
|
|
2357
2438
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
2358
2439
|
*
|
|
@@ -2366,8 +2447,9 @@ declare namespace CodeceptJS {
|
|
|
2366
2447
|
* ```
|
|
2367
2448
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
2368
2449
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
2450
|
+
* @returns automatically synchronized promise through #recorder
|
|
2369
2451
|
*/
|
|
2370
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
2452
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
2371
2453
|
/**
|
|
2372
2454
|
* Clicks at page coordinates, or at coordinates relative to an element.
|
|
2373
2455
|
* Requires a browser that renders layout.
|
|
@@ -2390,8 +2472,9 @@ declare namespace CodeceptJS {
|
|
|
2390
2472
|
* ```
|
|
2391
2473
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2392
2474
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2475
|
+
* @returns automatically synchronized promise through #recorder
|
|
2393
2476
|
*/
|
|
2394
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2477
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2395
2478
|
/**
|
|
2396
2479
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
2397
2480
|
* Element can be located by CSS or XPath.
|
|
@@ -2401,8 +2484,9 @@ declare namespace CodeceptJS {
|
|
|
2401
2484
|
* ```
|
|
2402
2485
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2403
2486
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2487
|
+
* @returns automatically synchronized promise through #recorder
|
|
2404
2488
|
*/
|
|
2405
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2489
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2406
2490
|
/**
|
|
2407
2491
|
* Waits for an element to hide (by default waits for 1sec).
|
|
2408
2492
|
* Element can be located by CSS or XPath.
|
|
@@ -2412,8 +2496,9 @@ declare namespace CodeceptJS {
|
|
|
2412
2496
|
* ```
|
|
2413
2497
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2414
2498
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2499
|
+
* @returns automatically synchronized promise through #recorder
|
|
2415
2500
|
*/
|
|
2416
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2501
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2417
2502
|
/**
|
|
2418
2503
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
2419
2504
|
* Element can be located by CSS or XPath.
|
|
@@ -2423,8 +2508,9 @@ declare namespace CodeceptJS {
|
|
|
2423
2508
|
* ```
|
|
2424
2509
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2425
2510
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2511
|
+
* @returns automatically synchronized promise through #recorder
|
|
2426
2512
|
*/
|
|
2427
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2513
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2428
2514
|
/**
|
|
2429
2515
|
* Checks that cookie with given name exists.
|
|
2430
2516
|
*
|
|
@@ -2432,8 +2518,9 @@ declare namespace CodeceptJS {
|
|
|
2432
2518
|
* I.seeCookie('Auth');
|
|
2433
2519
|
* ```
|
|
2434
2520
|
* @param name - cookie name.
|
|
2521
|
+
* @returns automatically synchronized promise through #recorder
|
|
2435
2522
|
*/
|
|
2436
|
-
seeCookie(name: string):
|
|
2523
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
2437
2524
|
/**
|
|
2438
2525
|
* Checks that cookie with given name does not exist.
|
|
2439
2526
|
*
|
|
@@ -2441,8 +2528,9 @@ declare namespace CodeceptJS {
|
|
|
2441
2528
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
2442
2529
|
* ```
|
|
2443
2530
|
* @param name - cookie name.
|
|
2531
|
+
* @returns automatically synchronized promise through #recorder
|
|
2444
2532
|
*/
|
|
2445
|
-
dontSeeCookie(name: string):
|
|
2533
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
2446
2534
|
/**
|
|
2447
2535
|
* Waits for the specified cookie in the cookies.
|
|
2448
2536
|
*
|
|
@@ -2451,8 +2539,9 @@ declare namespace CodeceptJS {
|
|
|
2451
2539
|
* ```
|
|
2452
2540
|
* @param name - expected cookie name.
|
|
2453
2541
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
2542
|
+
* @returns automatically synchronized promise through #recorder
|
|
2454
2543
|
*/
|
|
2455
|
-
waitForCookie(name: string, sec?: number):
|
|
2544
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
2456
2545
|
/**
|
|
2457
2546
|
* Retrieves the innerHTML from an element located by CSS or XPath and returns it to test.
|
|
2458
2547
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2509,8 +2598,9 @@ declare namespace CodeceptJS {
|
|
|
2509
2598
|
* ```js
|
|
2510
2599
|
* I.startRecordingTraffic();
|
|
2511
2600
|
* ```
|
|
2601
|
+
* @returns automatically synchronized promise through #recorder
|
|
2512
2602
|
*/
|
|
2513
|
-
startRecordingTraffic():
|
|
2603
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
2514
2604
|
/**
|
|
2515
2605
|
* Grab the recording network traffics
|
|
2516
2606
|
*
|
|
@@ -4101,8 +4191,9 @@ declare namespace CodeceptJS {
|
|
|
4101
4191
|
* I.seeInPopup('Popup text');
|
|
4102
4192
|
* ```
|
|
4103
4193
|
* @param text - value to check.
|
|
4194
|
+
* @returns automatically synchronized promise through #recorder
|
|
4104
4195
|
*/
|
|
4105
|
-
seeInPopup(text: string):
|
|
4196
|
+
seeInPopup(text: string): CodeceptJS.StepPromise;
|
|
4106
4197
|
/**
|
|
4107
4198
|
* Set current page
|
|
4108
4199
|
* @param page - page to set
|
|
@@ -4140,8 +4231,9 @@ declare namespace CodeceptJS {
|
|
|
4140
4231
|
* I.amOnPage('/login'); // opens a login page
|
|
4141
4232
|
* ```
|
|
4142
4233
|
* @param url - url path or global url.
|
|
4234
|
+
* @returns automatically synchronized promise through #recorder
|
|
4143
4235
|
*/
|
|
4144
|
-
amOnPage(url: string):
|
|
4236
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
4145
4237
|
/**
|
|
4146
4238
|
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
4147
4239
|
* Playwright does not control the window of a browser, so it can't adjust its real size.
|
|
@@ -4159,8 +4251,9 @@ declare namespace CodeceptJS {
|
|
|
4159
4251
|
* First parameter can be set to `maximize`.
|
|
4160
4252
|
* @param width - width in pixels or `maximize`.
|
|
4161
4253
|
* @param height - height in pixels.
|
|
4254
|
+
* @returns automatically synchronized promise through #recorder
|
|
4162
4255
|
*/
|
|
4163
|
-
resizeWindow(width: number, height: number):
|
|
4256
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
4164
4257
|
/**
|
|
4165
4258
|
* Set headers for all next requests
|
|
4166
4259
|
*
|
|
@@ -4187,8 +4280,9 @@ declare namespace CodeceptJS {
|
|
|
4187
4280
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4188
4281
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset or context locator.
|
|
4189
4282
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4283
|
+
* @returns automatically synchronized promise through #recorder
|
|
4190
4284
|
*/
|
|
4191
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
4285
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
4192
4286
|
/**
|
|
4193
4287
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
4194
4288
|
*
|
|
@@ -4201,8 +4295,9 @@ declare namespace CodeceptJS {
|
|
|
4201
4295
|
* ```
|
|
4202
4296
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
4203
4297
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
4298
|
+
* @returns automatically synchronized promise through #recorder
|
|
4204
4299
|
*/
|
|
4205
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
4300
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4206
4301
|
/**
|
|
4207
4302
|
* Remove focus from a text input, button, etc.
|
|
4208
4303
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -4220,8 +4315,9 @@ declare namespace CodeceptJS {
|
|
|
4220
4315
|
* ```
|
|
4221
4316
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
4222
4317
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
4318
|
+
* @returns automatically synchronized promise through #recorder
|
|
4223
4319
|
*/
|
|
4224
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
4320
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4225
4321
|
/**
|
|
4226
4322
|
* Return the checked status of given element.
|
|
4227
4323
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
@@ -4250,16 +4346,18 @@ declare namespace CodeceptJS {
|
|
|
4250
4346
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
4251
4347
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
4252
4348
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
4349
|
+
* @returns automatically synchronized promise through #recorder
|
|
4253
4350
|
*/
|
|
4254
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any):
|
|
4351
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4255
4352
|
/**
|
|
4256
4353
|
* Reload the current page.
|
|
4257
4354
|
*
|
|
4258
4355
|
* ```js
|
|
4259
4356
|
* I.refreshPage();
|
|
4260
4357
|
* ```
|
|
4358
|
+
* @returns automatically synchronized promise through #recorder
|
|
4261
4359
|
*/
|
|
4262
|
-
refreshPage():
|
|
4360
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
4263
4361
|
/**
|
|
4264
4362
|
* Replaying from HAR
|
|
4265
4363
|
*
|
|
@@ -4281,16 +4379,18 @@ declare namespace CodeceptJS {
|
|
|
4281
4379
|
* ```js
|
|
4282
4380
|
* I.scrollPageToTop();
|
|
4283
4381
|
* ```
|
|
4382
|
+
* @returns automatically synchronized promise through #recorder
|
|
4284
4383
|
*/
|
|
4285
|
-
scrollPageToTop():
|
|
4384
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
4286
4385
|
/**
|
|
4287
4386
|
* Scroll page to the bottom.
|
|
4288
4387
|
*
|
|
4289
4388
|
* ```js
|
|
4290
4389
|
* I.scrollPageToBottom();
|
|
4291
4390
|
* ```
|
|
4391
|
+
* @returns automatically synchronized promise through #recorder
|
|
4292
4392
|
*/
|
|
4293
|
-
scrollPageToBottom():
|
|
4393
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
4294
4394
|
/**
|
|
4295
4395
|
* Scrolls to element matched by locator.
|
|
4296
4396
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -4302,8 +4402,9 @@ declare namespace CodeceptJS {
|
|
|
4302
4402
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4303
4403
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
4304
4404
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4405
|
+
* @returns automatically synchronized promise through #recorder
|
|
4305
4406
|
*/
|
|
4306
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
4407
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
4307
4408
|
/**
|
|
4308
4409
|
* Checks that title contains text.
|
|
4309
4410
|
*
|
|
@@ -4311,8 +4412,9 @@ declare namespace CodeceptJS {
|
|
|
4311
4412
|
* I.seeInTitle('Home Page');
|
|
4312
4413
|
* ```
|
|
4313
4414
|
* @param text - text value to check.
|
|
4415
|
+
* @returns automatically synchronized promise through #recorder
|
|
4314
4416
|
*/
|
|
4315
|
-
seeInTitle(text: string):
|
|
4417
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
4316
4418
|
/**
|
|
4317
4419
|
* Retrieves a page scroll position and returns it to test.
|
|
4318
4420
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -4330,8 +4432,9 @@ declare namespace CodeceptJS {
|
|
|
4330
4432
|
* I.seeTitleEquals('Test title.');
|
|
4331
4433
|
* ```
|
|
4332
4434
|
* @param text - value to check.
|
|
4435
|
+
* @returns automatically synchronized promise through #recorder
|
|
4333
4436
|
*/
|
|
4334
|
-
seeTitleEquals(text: string):
|
|
4437
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
4335
4438
|
/**
|
|
4336
4439
|
* Checks that title does not contain text.
|
|
4337
4440
|
*
|
|
@@ -4339,8 +4442,9 @@ declare namespace CodeceptJS {
|
|
|
4339
4442
|
* I.dontSeeInTitle('Error');
|
|
4340
4443
|
* ```
|
|
4341
4444
|
* @param text - value to check.
|
|
4445
|
+
* @returns automatically synchronized promise through #recorder
|
|
4342
4446
|
*/
|
|
4343
|
-
dontSeeInTitle(text: string):
|
|
4447
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
4344
4448
|
/**
|
|
4345
4449
|
* Retrieves a page title and returns it to test.
|
|
4346
4450
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -4402,9 +4506,9 @@ declare namespace CodeceptJS {
|
|
|
4402
4506
|
* const webElements = await I.grabWebElements('#button');
|
|
4403
4507
|
* ```
|
|
4404
4508
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4405
|
-
* @returns
|
|
4509
|
+
* @returns WebElements of being used Web helper
|
|
4406
4510
|
*/
|
|
4407
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
4511
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
4408
4512
|
/**
|
|
4409
4513
|
* Grab WebElement for given locator
|
|
4410
4514
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -4415,7 +4519,7 @@ declare namespace CodeceptJS {
|
|
|
4415
4519
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4416
4520
|
* @returns WebElement of being used Web helper
|
|
4417
4521
|
*/
|
|
4418
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
4522
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
4419
4523
|
/**
|
|
4420
4524
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
4421
4525
|
*
|
|
@@ -4491,8 +4595,9 @@ declare namespace CodeceptJS {
|
|
|
4491
4595
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
4492
4596
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4493
4597
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4598
|
+
* @returns automatically synchronized promise through #recorder
|
|
4494
4599
|
*/
|
|
4495
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4600
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4496
4601
|
/**
|
|
4497
4602
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
4498
4603
|
*
|
|
@@ -4504,8 +4609,9 @@ declare namespace CodeceptJS {
|
|
|
4504
4609
|
* ```
|
|
4505
4610
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
4506
4611
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4612
|
+
* @returns automatically synchronized promise through #recorder
|
|
4507
4613
|
*/
|
|
4508
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4614
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4509
4615
|
/**
|
|
4510
4616
|
* Checks that a given Element is present in the DOM
|
|
4511
4617
|
* Element is located by CSS or XPath.
|
|
@@ -4514,8 +4620,9 @@ declare namespace CodeceptJS {
|
|
|
4514
4620
|
* I.seeElementInDOM('#modal');
|
|
4515
4621
|
* ```
|
|
4516
4622
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4623
|
+
* @returns automatically synchronized promise through #recorder
|
|
4517
4624
|
*/
|
|
4518
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
4625
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4519
4626
|
/**
|
|
4520
4627
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
4521
4628
|
*
|
|
@@ -4523,8 +4630,9 @@ declare namespace CodeceptJS {
|
|
|
4523
4630
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
4524
4631
|
* ```
|
|
4525
4632
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
4633
|
+
* @returns automatically synchronized promise through #recorder
|
|
4526
4634
|
*/
|
|
4527
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
4635
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4528
4636
|
/**
|
|
4529
4637
|
* Handles a file download. A file name is required to save the file on disk.
|
|
4530
4638
|
* Files are saved to "output" directory.
|
|
@@ -4582,8 +4690,9 @@ declare namespace CodeceptJS {
|
|
|
4582
4690
|
* @param [locator = '//body'] - (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4583
4691
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4584
4692
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
4693
|
+
* @returns automatically synchronized promise through #recorder
|
|
4585
4694
|
*/
|
|
4586
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any):
|
|
4695
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): CodeceptJS.ElementStepPromise;
|
|
4587
4696
|
/**
|
|
4588
4697
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
4589
4698
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -4611,8 +4720,9 @@ declare namespace CodeceptJS {
|
|
|
4611
4720
|
* ```
|
|
4612
4721
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4613
4722
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4723
|
+
* @returns automatically synchronized promise through #recorder
|
|
4614
4724
|
*/
|
|
4615
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4725
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4616
4726
|
/**
|
|
4617
4727
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
4618
4728
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -4625,8 +4735,9 @@ declare namespace CodeceptJS {
|
|
|
4625
4735
|
* ```
|
|
4626
4736
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4627
4737
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4738
|
+
* @returns automatically synchronized promise through #recorder
|
|
4628
4739
|
*/
|
|
4629
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4740
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4630
4741
|
/**
|
|
4631
4742
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
4632
4743
|
*
|
|
@@ -4640,8 +4751,9 @@ declare namespace CodeceptJS {
|
|
|
4640
4751
|
* ```
|
|
4641
4752
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
4642
4753
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
4754
|
+
* @returns automatically synchronized promise through #recorder
|
|
4643
4755
|
*/
|
|
4644
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4756
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4645
4757
|
/**
|
|
4646
4758
|
* Performs click at specific coordinates.
|
|
4647
4759
|
* If locator is provided, the coordinates are relative to the element.
|
|
@@ -4658,7 +4770,7 @@ declare namespace CodeceptJS {
|
|
|
4658
4770
|
* @param [x] - X coordinate relative to element, or Y coordinate if locator is a number.
|
|
4659
4771
|
* @param [y] - Y coordinate relative to element.
|
|
4660
4772
|
*/
|
|
4661
|
-
clickXY(locator: CodeceptJS.LocatorOrString | number, x?: number, y?: number):
|
|
4773
|
+
clickXY(locator: CodeceptJS.LocatorOrString | number, x?: number, y?: number): CodeceptJS.ElementStepPromise;
|
|
4662
4774
|
/**
|
|
4663
4775
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
4664
4776
|
*
|
|
@@ -4682,8 +4794,9 @@ declare namespace CodeceptJS {
|
|
|
4682
4794
|
* ```
|
|
4683
4795
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4684
4796
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4797
|
+
* @returns automatically synchronized promise through #recorder
|
|
4685
4798
|
*/
|
|
4686
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4799
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4687
4800
|
/**
|
|
4688
4801
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
4689
4802
|
*
|
|
@@ -4707,8 +4820,9 @@ declare namespace CodeceptJS {
|
|
|
4707
4820
|
* ```
|
|
4708
4821
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4709
4822
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4823
|
+
* @returns automatically synchronized promise through #recorder
|
|
4710
4824
|
*/
|
|
4711
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4825
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4712
4826
|
/**
|
|
4713
4827
|
* Verifies that the specified checkbox is checked.
|
|
4714
4828
|
*
|
|
@@ -4718,8 +4832,9 @@ declare namespace CodeceptJS {
|
|
|
4718
4832
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
4719
4833
|
* ```
|
|
4720
4834
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4835
|
+
* @returns automatically synchronized promise through #recorder
|
|
4721
4836
|
*/
|
|
4722
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
4837
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4723
4838
|
/**
|
|
4724
4839
|
* Verifies that the specified checkbox is not checked.
|
|
4725
4840
|
*
|
|
@@ -4729,8 +4844,9 @@ declare namespace CodeceptJS {
|
|
|
4729
4844
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
4730
4845
|
* ```
|
|
4731
4846
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4847
|
+
* @returns automatically synchronized promise through #recorder
|
|
4732
4848
|
*/
|
|
4733
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
4849
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4734
4850
|
/**
|
|
4735
4851
|
* Presses a key in the browser and leaves it in a down state.
|
|
4736
4852
|
*
|
|
@@ -4742,8 +4858,9 @@ declare namespace CodeceptJS {
|
|
|
4742
4858
|
* I.pressKeyUp('Control');
|
|
4743
4859
|
* ```
|
|
4744
4860
|
* @param key - name of key to press down.
|
|
4861
|
+
* @returns automatically synchronized promise through #recorder
|
|
4745
4862
|
*/
|
|
4746
|
-
pressKeyDown(key: string):
|
|
4863
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
4747
4864
|
/**
|
|
4748
4865
|
* Releases a key in the browser which was previously set to a down state.
|
|
4749
4866
|
*
|
|
@@ -4755,8 +4872,9 @@ declare namespace CodeceptJS {
|
|
|
4755
4872
|
* I.pressKeyUp('Control');
|
|
4756
4873
|
* ```
|
|
4757
4874
|
* @param key - name of key to release.
|
|
4875
|
+
* @returns automatically synchronized promise through #recorder
|
|
4758
4876
|
*/
|
|
4759
|
-
pressKeyUp(key: string):
|
|
4877
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
4760
4878
|
/**
|
|
4761
4879
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([puppeteer/puppeteer#1313](https://github.com/puppeteer/puppeteer/issues/1313)).
|
|
4762
4880
|
*
|
|
@@ -4818,8 +4936,9 @@ declare namespace CodeceptJS {
|
|
|
4818
4936
|
* - `'Space'`
|
|
4819
4937
|
* - `'Tab'`
|
|
4820
4938
|
* @param key - key or array of keys to press.
|
|
4939
|
+
* @returns automatically synchronized promise through #recorder
|
|
4821
4940
|
*/
|
|
4822
|
-
pressKey(key: string | string[]):
|
|
4941
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
4823
4942
|
/**
|
|
4824
4943
|
* Types out the given text into an active field.
|
|
4825
4944
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -4840,8 +4959,9 @@ declare namespace CodeceptJS {
|
|
|
4840
4959
|
* ```
|
|
4841
4960
|
* @param key - or array of keys to type.
|
|
4842
4961
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
4962
|
+
* @returns automatically synchronized promise through #recorder
|
|
4843
4963
|
*/
|
|
4844
|
-
type(key: string | string[], delay?: number):
|
|
4964
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
4845
4965
|
/**
|
|
4846
4966
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
4847
4967
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -4867,8 +4987,9 @@ declare namespace CodeceptJS {
|
|
|
4867
4987
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4868
4988
|
* @param value - text value to fill.
|
|
4869
4989
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4990
|
+
* @returns automatically synchronized promise through #recorder
|
|
4870
4991
|
*/
|
|
4871
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
4992
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4872
4993
|
/**
|
|
4873
4994
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
4874
4995
|
*
|
|
@@ -4883,8 +5004,9 @@ declare namespace CodeceptJS {
|
|
|
4883
5004
|
* ```
|
|
4884
5005
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
4885
5006
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5007
|
+
* @returns automatically synchronized promise through #recorder.
|
|
4886
5008
|
*/
|
|
4887
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
5009
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4888
5010
|
/**
|
|
4889
5011
|
* Appends text to a input field or textarea.
|
|
4890
5012
|
* Field is located by name, label, CSS or XPath
|
|
@@ -4901,8 +5023,9 @@ declare namespace CodeceptJS {
|
|
|
4901
5023
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
4902
5024
|
* @param value - text value to append.
|
|
4903
5025
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5026
|
+
* @returns automatically synchronized promise through #recorder
|
|
4904
5027
|
*/
|
|
4905
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
5028
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4906
5029
|
/**
|
|
4907
5030
|
* Checks that the given input field or textarea equals to given value.
|
|
4908
5031
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -4920,8 +5043,9 @@ declare namespace CodeceptJS {
|
|
|
4920
5043
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4921
5044
|
* @param value - value to check.
|
|
4922
5045
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5046
|
+
* @returns automatically synchronized promise through #recorder
|
|
4923
5047
|
*/
|
|
4924
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
5048
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4925
5049
|
/**
|
|
4926
5050
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
4927
5051
|
* Opposite to `seeInField`.
|
|
@@ -4937,8 +5061,9 @@ declare namespace CodeceptJS {
|
|
|
4937
5061
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4938
5062
|
* @param value - value to check.
|
|
4939
5063
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5064
|
+
* @returns automatically synchronized promise through #recorder
|
|
4940
5065
|
*/
|
|
4941
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
5066
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4942
5067
|
/**
|
|
4943
5068
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
4944
5069
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -4962,8 +5087,9 @@ declare namespace CodeceptJS {
|
|
|
4962
5087
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
4963
5088
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
4964
5089
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5090
|
+
* @returns automatically synchronized promise through #recorder
|
|
4965
5091
|
*/
|
|
4966
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
5092
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4967
5093
|
/**
|
|
4968
5094
|
* Selects an option in a drop-down select.
|
|
4969
5095
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -4990,8 +5116,9 @@ declare namespace CodeceptJS {
|
|
|
4990
5116
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
4991
5117
|
* @param option - visible text or value of option.
|
|
4992
5118
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5119
|
+
* @returns automatically synchronized promise through #recorder
|
|
4993
5120
|
*/
|
|
4994
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
5121
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4995
5122
|
/**
|
|
4996
5123
|
* Grab number of visible elements by locator.
|
|
4997
5124
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5010,13 +5137,15 @@ declare namespace CodeceptJS {
|
|
|
5010
5137
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
5011
5138
|
* ```
|
|
5012
5139
|
* @param url - a fragment to check
|
|
5140
|
+
* @returns automatically synchronized promise through #recorder
|
|
5013
5141
|
*/
|
|
5014
|
-
seeInCurrentUrl(url: string):
|
|
5142
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
5015
5143
|
/**
|
|
5016
5144
|
* Checks that current url does not contain a provided fragment.
|
|
5017
5145
|
* @param url - value to check.
|
|
5146
|
+
* @returns automatically synchronized promise through #recorder
|
|
5018
5147
|
*/
|
|
5019
|
-
dontSeeInCurrentUrl(url: string):
|
|
5148
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
5020
5149
|
/**
|
|
5021
5150
|
* Checks that current url is equal to provided one.
|
|
5022
5151
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5027,8 +5156,9 @@ declare namespace CodeceptJS {
|
|
|
5027
5156
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
5028
5157
|
* ```
|
|
5029
5158
|
* @param url - value to check.
|
|
5159
|
+
* @returns automatically synchronized promise through #recorder
|
|
5030
5160
|
*/
|
|
5031
|
-
seeCurrentUrlEquals(url: string):
|
|
5161
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
5032
5162
|
/**
|
|
5033
5163
|
* Checks that current url is not equal to provided one.
|
|
5034
5164
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5038,8 +5168,9 @@ declare namespace CodeceptJS {
|
|
|
5038
5168
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
5039
5169
|
* ```
|
|
5040
5170
|
* @param url - value to check.
|
|
5171
|
+
* @returns automatically synchronized promise through #recorder
|
|
5041
5172
|
*/
|
|
5042
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
5173
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
5043
5174
|
/**
|
|
5044
5175
|
* Checks that current URL path matches the expected path.
|
|
5045
5176
|
* Query strings and URL fragments are ignored.
|
|
@@ -5049,8 +5180,9 @@ declare namespace CodeceptJS {
|
|
|
5049
5180
|
* I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
5050
5181
|
* ```
|
|
5051
5182
|
* @param path - value to check.
|
|
5183
|
+
* @returns automatically synchronized promise through #recorder
|
|
5052
5184
|
*/
|
|
5053
|
-
seeCurrentPathEquals(path: string):
|
|
5185
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
5054
5186
|
/**
|
|
5055
5187
|
* Checks that current URL path does NOT match the expected path.
|
|
5056
5188
|
* Query strings and URL fragments are ignored.
|
|
@@ -5060,8 +5192,9 @@ declare namespace CodeceptJS {
|
|
|
5060
5192
|
* I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
5061
5193
|
* ```
|
|
5062
5194
|
* @param path - value to check.
|
|
5195
|
+
* @returns automatically synchronized promise through #recorder
|
|
5063
5196
|
*/
|
|
5064
|
-
dontSeeCurrentPathEquals(path: string):
|
|
5197
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
5065
5198
|
/**
|
|
5066
5199
|
* Checks that a page contains a visible text.
|
|
5067
5200
|
* Use context parameter to narrow down the search.
|
|
@@ -5073,8 +5206,9 @@ declare namespace CodeceptJS {
|
|
|
5073
5206
|
* ```
|
|
5074
5207
|
* @param text - expected on page.
|
|
5075
5208
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
5209
|
+
* @returns automatically synchronized promise through #recorder
|
|
5076
5210
|
*/
|
|
5077
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5211
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5078
5212
|
/**
|
|
5079
5213
|
* Checks that text is equal to provided one.
|
|
5080
5214
|
*
|
|
@@ -5083,8 +5217,9 @@ declare namespace CodeceptJS {
|
|
|
5083
5217
|
* ```
|
|
5084
5218
|
* @param text - element value to check.
|
|
5085
5219
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
5220
|
+
* @returns automatically synchronized promise through #recorder
|
|
5086
5221
|
*/
|
|
5087
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5222
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5088
5223
|
/**
|
|
5089
5224
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
5090
5225
|
* Use context parameter to narrow down the search.
|
|
@@ -5095,8 +5230,9 @@ declare namespace CodeceptJS {
|
|
|
5095
5230
|
* ```
|
|
5096
5231
|
* @param text - which is not present.
|
|
5097
5232
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
5233
|
+
* @returns automatically synchronized promise through #recorder
|
|
5098
5234
|
*/
|
|
5099
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5235
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5100
5236
|
/**
|
|
5101
5237
|
* Retrieves page source and returns it to test.
|
|
5102
5238
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5136,8 +5272,9 @@ declare namespace CodeceptJS {
|
|
|
5136
5272
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
5137
5273
|
* ```
|
|
5138
5274
|
* @param text - value to check.
|
|
5275
|
+
* @returns automatically synchronized promise through #recorder
|
|
5139
5276
|
*/
|
|
5140
|
-
seeInSource(text: string):
|
|
5277
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
5141
5278
|
/**
|
|
5142
5279
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
5143
5280
|
*
|
|
@@ -5145,8 +5282,9 @@ declare namespace CodeceptJS {
|
|
|
5145
5282
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
5146
5283
|
* ```
|
|
5147
5284
|
* @param value - to check.
|
|
5285
|
+
* @returns automatically synchronized promise through #recorder
|
|
5148
5286
|
*/
|
|
5149
|
-
dontSeeInSource(value: string):
|
|
5287
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
5150
5288
|
/**
|
|
5151
5289
|
* Asserts that an element appears a given number of times in the DOM.
|
|
5152
5290
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -5157,8 +5295,9 @@ declare namespace CodeceptJS {
|
|
|
5157
5295
|
* ```
|
|
5158
5296
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5159
5297
|
* @param num - number of elements.
|
|
5298
|
+
* @returns automatically synchronized promise through #recorder
|
|
5160
5299
|
*/
|
|
5161
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
5300
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
5162
5301
|
/**
|
|
5163
5302
|
* Asserts that an element is visible a given number of times.
|
|
5164
5303
|
* Element is located by CSS or XPath.
|
|
@@ -5168,8 +5307,9 @@ declare namespace CodeceptJS {
|
|
|
5168
5307
|
* ```
|
|
5169
5308
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5170
5309
|
* @param num - number of elements.
|
|
5310
|
+
* @returns automatically synchronized promise through #recorder
|
|
5171
5311
|
*/
|
|
5172
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
5312
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
5173
5313
|
/**
|
|
5174
5314
|
* Sets cookie(s).
|
|
5175
5315
|
*
|
|
@@ -5185,8 +5325,9 @@ declare namespace CodeceptJS {
|
|
|
5185
5325
|
* ]);
|
|
5186
5326
|
* ```
|
|
5187
5327
|
* @param cookie - a cookie object or array of cookie objects.
|
|
5328
|
+
* @returns automatically synchronized promise through #recorder
|
|
5188
5329
|
*/
|
|
5189
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
5330
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
5190
5331
|
/**
|
|
5191
5332
|
* Checks that cookie with given name exists.
|
|
5192
5333
|
*
|
|
@@ -5194,8 +5335,9 @@ declare namespace CodeceptJS {
|
|
|
5194
5335
|
* I.seeCookie('Auth');
|
|
5195
5336
|
* ```
|
|
5196
5337
|
* @param name - cookie name.
|
|
5338
|
+
* @returns automatically synchronized promise through #recorder
|
|
5197
5339
|
*/
|
|
5198
|
-
seeCookie(name: string):
|
|
5340
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
5199
5341
|
/**
|
|
5200
5342
|
* Checks that cookie with given name does not exist.
|
|
5201
5343
|
*
|
|
@@ -5203,8 +5345,9 @@ declare namespace CodeceptJS {
|
|
|
5203
5345
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
5204
5346
|
* ```
|
|
5205
5347
|
* @param name - cookie name.
|
|
5348
|
+
* @returns automatically synchronized promise through #recorder
|
|
5206
5349
|
*/
|
|
5207
|
-
dontSeeCookie(name: string):
|
|
5350
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
5208
5351
|
/**
|
|
5209
5352
|
* Returns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
5210
5353
|
*
|
|
@@ -5262,8 +5405,9 @@ declare namespace CodeceptJS {
|
|
|
5262
5405
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
5263
5406
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
5264
5407
|
* @param text - value to check.
|
|
5408
|
+
* @returns automatically synchronized promise through #recorder
|
|
5265
5409
|
*/
|
|
5266
|
-
seeInClipboard(text: string):
|
|
5410
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
5267
5411
|
/**
|
|
5268
5412
|
* Checks that the system clipboard is equal to the given text.
|
|
5269
5413
|
*
|
|
@@ -5275,8 +5419,9 @@ declare namespace CodeceptJS {
|
|
|
5275
5419
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
5276
5420
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
5277
5421
|
* @param text - value to check.
|
|
5422
|
+
* @returns automatically synchronized promise through #recorder
|
|
5278
5423
|
*/
|
|
5279
|
-
seeClipboardEquals(text: string):
|
|
5424
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
5280
5425
|
/**
|
|
5281
5426
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
5282
5427
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5298,8 +5443,9 @@ declare namespace CodeceptJS {
|
|
|
5298
5443
|
* I.clearClipboard();
|
|
5299
5444
|
* I.seeClipboardEquals('');
|
|
5300
5445
|
* ```
|
|
5446
|
+
* @returns automatically synchronized promise through #recorder
|
|
5301
5447
|
*/
|
|
5302
|
-
clearClipboard():
|
|
5448
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
5303
5449
|
/**
|
|
5304
5450
|
* Executes a script on the page:
|
|
5305
5451
|
*
|
|
@@ -5429,8 +5575,9 @@ declare namespace CodeceptJS {
|
|
|
5429
5575
|
* ```
|
|
5430
5576
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5431
5577
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
5578
|
+
* @returns automatically synchronized promise through #recorder
|
|
5432
5579
|
*/
|
|
5433
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
5580
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
5434
5581
|
/**
|
|
5435
5582
|
* Checks that all elements with given locator have given attributes.
|
|
5436
5583
|
*
|
|
@@ -5439,8 +5586,9 @@ declare namespace CodeceptJS {
|
|
|
5439
5586
|
* ```
|
|
5440
5587
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5441
5588
|
* @param attributes - attributes and their values to check.
|
|
5589
|
+
* @returns automatically synchronized promise through #recorder
|
|
5442
5590
|
*/
|
|
5443
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
5591
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
5444
5592
|
/**
|
|
5445
5593
|
* Drag the scrubber of a slider to a given position
|
|
5446
5594
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -5451,8 +5599,9 @@ declare namespace CodeceptJS {
|
|
|
5451
5599
|
* ```
|
|
5452
5600
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
5453
5601
|
* @param offsetX - position to drag.
|
|
5602
|
+
* @returns automatically synchronized promise through #recorder
|
|
5454
5603
|
*/
|
|
5455
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
5604
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
5456
5605
|
/**
|
|
5457
5606
|
* Retrieves an attribute from an element located by CSS or XPath and returns it to test.
|
|
5458
5607
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -5505,8 +5654,9 @@ declare namespace CodeceptJS {
|
|
|
5505
5654
|
* ```
|
|
5506
5655
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5507
5656
|
* @param fileName - file name to save.
|
|
5657
|
+
* @returns automatically synchronized promise through #recorder
|
|
5508
5658
|
*/
|
|
5509
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
5659
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
5510
5660
|
/**
|
|
5511
5661
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5512
5662
|
* Filename is relative to output folder.
|
|
@@ -5518,8 +5668,9 @@ declare namespace CodeceptJS {
|
|
|
5518
5668
|
* ```
|
|
5519
5669
|
* @param fileName - file name to save.
|
|
5520
5670
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
5671
|
+
* @returns automatically synchronized promise through #recorder
|
|
5521
5672
|
*/
|
|
5522
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
5673
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
5523
5674
|
/**
|
|
5524
5675
|
* Performs [api request](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get) using
|
|
5525
5676
|
* the cookies from the current browser session.
|
|
@@ -5544,22 +5695,25 @@ declare namespace CodeceptJS {
|
|
|
5544
5695
|
* I.wait(2); // wait 2 secs
|
|
5545
5696
|
* ```
|
|
5546
5697
|
* @param sec - number of second to wait.
|
|
5698
|
+
* @returns automatically synchronized promise through #recorder
|
|
5547
5699
|
*/
|
|
5548
|
-
wait(sec: number):
|
|
5700
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
5549
5701
|
/**
|
|
5550
5702
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
5551
5703
|
* Element can be located by CSS or XPath.
|
|
5552
5704
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5553
5705
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5706
|
+
* @returns automatically synchronized promise through #recorder
|
|
5554
5707
|
*/
|
|
5555
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5708
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5556
5709
|
/**
|
|
5557
5710
|
* Waits for element to become disabled (by default waits for 1sec).
|
|
5558
5711
|
* Element can be located by CSS or XPath.
|
|
5559
5712
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5560
5713
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5714
|
+
* @returns automatically synchronized promise through #recorder
|
|
5561
5715
|
*/
|
|
5562
|
-
waitForDisabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5716
|
+
waitForDisabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5563
5717
|
/**
|
|
5564
5718
|
* Waits for the specified value to be in value attribute.
|
|
5565
5719
|
*
|
|
@@ -5569,8 +5723,9 @@ declare namespace CodeceptJS {
|
|
|
5569
5723
|
* @param field - input field.
|
|
5570
5724
|
* @param value - expected value.
|
|
5571
5725
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5726
|
+
* @returns automatically synchronized promise through #recorder
|
|
5572
5727
|
*/
|
|
5573
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
5728
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
5574
5729
|
/**
|
|
5575
5730
|
* Waits for a specified number of elements on the page.
|
|
5576
5731
|
*
|
|
@@ -5580,8 +5735,9 @@ declare namespace CodeceptJS {
|
|
|
5580
5735
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5581
5736
|
* @param num - number of elements.
|
|
5582
5737
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5738
|
+
* @returns automatically synchronized promise through #recorder
|
|
5583
5739
|
*/
|
|
5584
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
5740
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
5585
5741
|
/**
|
|
5586
5742
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
5587
5743
|
* Element can be located by CSS or XPath.
|
|
@@ -5592,8 +5748,9 @@ declare namespace CodeceptJS {
|
|
|
5592
5748
|
* ```
|
|
5593
5749
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5594
5750
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
5751
|
+
* @returns automatically synchronized promise through #recorder
|
|
5595
5752
|
*/
|
|
5596
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5753
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5597
5754
|
/**
|
|
5598
5755
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
5599
5756
|
* Element can be located by CSS or XPath.
|
|
@@ -5604,8 +5761,9 @@ declare namespace CodeceptJS {
|
|
|
5604
5761
|
* ```
|
|
5605
5762
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5606
5763
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
5764
|
+
* @returns automatically synchronized promise through #recorder
|
|
5607
5765
|
*/
|
|
5608
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5766
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5609
5767
|
/**
|
|
5610
5768
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
5611
5769
|
* Element can be located by CSS or XPath.
|
|
@@ -5615,8 +5773,9 @@ declare namespace CodeceptJS {
|
|
|
5615
5773
|
* ```
|
|
5616
5774
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5617
5775
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5776
|
+
* @returns automatically synchronized promise through #recorder
|
|
5618
5777
|
*/
|
|
5619
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5778
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5620
5779
|
/**
|
|
5621
5780
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
5622
5781
|
* Element can be located by CSS or XPath.
|
|
@@ -5626,8 +5785,9 @@ declare namespace CodeceptJS {
|
|
|
5626
5785
|
* ```
|
|
5627
5786
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5628
5787
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5788
|
+
* @returns automatically synchronized promise through #recorder
|
|
5629
5789
|
*/
|
|
5630
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5790
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5631
5791
|
/**
|
|
5632
5792
|
* Waits for an element to hide (by default waits for 1sec).
|
|
5633
5793
|
* Element can be located by CSS or XPath.
|
|
@@ -5637,8 +5797,9 @@ declare namespace CodeceptJS {
|
|
|
5637
5797
|
* ```
|
|
5638
5798
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5639
5799
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5800
|
+
* @returns automatically synchronized promise through #recorder
|
|
5640
5801
|
*/
|
|
5641
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5802
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5642
5803
|
/**
|
|
5643
5804
|
* Waits for number of tabs.
|
|
5644
5805
|
*
|
|
@@ -5647,8 +5808,9 @@ declare namespace CodeceptJS {
|
|
|
5647
5808
|
* ```
|
|
5648
5809
|
* @param expectedTabs - expecting the number of tabs.
|
|
5649
5810
|
* @param sec - number of secs to wait.
|
|
5811
|
+
* @returns automatically synchronized promise through #recorder
|
|
5650
5812
|
*/
|
|
5651
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
5813
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
5652
5814
|
/**
|
|
5653
5815
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
5654
5816
|
*
|
|
@@ -5657,8 +5819,9 @@ declare namespace CodeceptJS {
|
|
|
5657
5819
|
* ```
|
|
5658
5820
|
* @param urlPart - value to check.
|
|
5659
5821
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5822
|
+
* @returns automatically synchronized promise through #recorder
|
|
5660
5823
|
*/
|
|
5661
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
5824
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
5662
5825
|
/**
|
|
5663
5826
|
* Waits for the entire URL to match the expected
|
|
5664
5827
|
*
|
|
@@ -5668,8 +5831,9 @@ declare namespace CodeceptJS {
|
|
|
5668
5831
|
* ```
|
|
5669
5832
|
* @param urlPart - value to check.
|
|
5670
5833
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5834
|
+
* @returns automatically synchronized promise through #recorder
|
|
5671
5835
|
*/
|
|
5672
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
5836
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
5673
5837
|
/**
|
|
5674
5838
|
* {{> waitCurrentPathEquals }}
|
|
5675
5839
|
*/
|
|
@@ -5686,8 +5850,12 @@ declare namespace CodeceptJS {
|
|
|
5686
5850
|
* @param text - to wait for.
|
|
5687
5851
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5688
5852
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
5853
|
+
* @returns automatically synchronized promise through #recorder
|
|
5854
|
+
*
|
|
5855
|
+
*
|
|
5856
|
+
* . **Note:** Text matching is case-sensitive. For case-insensitive matching, use XPath or CSS locators with normalized text.
|
|
5689
5857
|
*/
|
|
5690
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
5858
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5691
5859
|
/**
|
|
5692
5860
|
* Waits for a network request.
|
|
5693
5861
|
*
|
|
@@ -5716,8 +5884,9 @@ declare namespace CodeceptJS {
|
|
|
5716
5884
|
* I.switchTo(); // switch back to main page
|
|
5717
5885
|
* ```
|
|
5718
5886
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
5887
|
+
* @returns automatically synchronized promise through #recorder
|
|
5719
5888
|
*/
|
|
5720
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
5889
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5721
5890
|
/**
|
|
5722
5891
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
5723
5892
|
* Running in browser context.
|
|
@@ -5734,8 +5903,9 @@ declare namespace CodeceptJS {
|
|
|
5734
5903
|
* @param fn - to be executed in browser context.
|
|
5735
5904
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
5736
5905
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5906
|
+
* @returns automatically synchronized promise through #recorder
|
|
5737
5907
|
*/
|
|
5738
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
5908
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
5739
5909
|
/**
|
|
5740
5910
|
* Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
|
|
5741
5911
|
*
|
|
@@ -5758,8 +5928,9 @@ declare namespace CodeceptJS {
|
|
|
5758
5928
|
* ```
|
|
5759
5929
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5760
5930
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5931
|
+
* @returns automatically synchronized promise through #recorder
|
|
5761
5932
|
*/
|
|
5762
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5933
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5763
5934
|
/**
|
|
5764
5935
|
* Waits for the specified cookie in the cookies.
|
|
5765
5936
|
*
|
|
@@ -5768,8 +5939,9 @@ declare namespace CodeceptJS {
|
|
|
5768
5939
|
* ```
|
|
5769
5940
|
* @param name - expected cookie name.
|
|
5770
5941
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
5942
|
+
* @returns automatically synchronized promise through #recorder
|
|
5771
5943
|
*/
|
|
5772
|
-
waitForCookie(name: string, sec?: number):
|
|
5944
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
5773
5945
|
/**
|
|
5774
5946
|
* Grab the data from performance timing using Navigation Timing API.
|
|
5775
5947
|
* The returned data will contain following things in ms:
|
|
@@ -5790,8 +5962,9 @@ declare namespace CodeceptJS {
|
|
|
5790
5962
|
* loadEventEnd: 241
|
|
5791
5963
|
* }
|
|
5792
5964
|
* ```
|
|
5965
|
+
* @returns automatically synchronized promise through #recorder
|
|
5793
5966
|
*/
|
|
5794
|
-
grabDataFromPerformanceTiming():
|
|
5967
|
+
grabDataFromPerformanceTiming(): CodeceptJS.StepPromise;
|
|
5795
5968
|
/**
|
|
5796
5969
|
* Grab the width, height, location of given locator.
|
|
5797
5970
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -5845,8 +6018,9 @@ declare namespace CodeceptJS {
|
|
|
5845
6018
|
* ```js
|
|
5846
6019
|
* I.startRecordingTraffic();
|
|
5847
6020
|
* ```
|
|
6021
|
+
* @returns automatically synchronized promise through #recorder
|
|
5848
6022
|
*/
|
|
5849
|
-
startRecordingTraffic():
|
|
6023
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
5850
6024
|
/**
|
|
5851
6025
|
* Blocks traffic of a given URL or a list of URLs.
|
|
5852
6026
|
*
|
|
@@ -5987,16 +6161,18 @@ declare namespace CodeceptJS {
|
|
|
5987
6161
|
* ```js
|
|
5988
6162
|
* await I.startRecordingWebSocketMessages();
|
|
5989
6163
|
* ```
|
|
6164
|
+
* @returns automatically synchronized promise through #recorder
|
|
5990
6165
|
*/
|
|
5991
|
-
startRecordingWebSocketMessages():
|
|
6166
|
+
startRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
5992
6167
|
/**
|
|
5993
6168
|
* Stops recording WS messages. Recorded WS messages is not flashed.
|
|
5994
6169
|
*
|
|
5995
6170
|
* ```js
|
|
5996
6171
|
* await I.stopRecordingWebSocketMessages();
|
|
5997
6172
|
* ```
|
|
6173
|
+
* @returns automatically synchronized promise through #recorder
|
|
5998
6174
|
*/
|
|
5999
|
-
stopRecordingWebSocketMessages():
|
|
6175
|
+
stopRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
6000
6176
|
/**
|
|
6001
6177
|
* Grab the recording WS messages
|
|
6002
6178
|
*/
|
|
@@ -6313,8 +6489,9 @@ declare namespace CodeceptJS {
|
|
|
6313
6489
|
* I.seeInPopup('Popup text');
|
|
6314
6490
|
* ```
|
|
6315
6491
|
* @param text - value to check.
|
|
6492
|
+
* @returns automatically synchronized promise through #recorder
|
|
6316
6493
|
*/
|
|
6317
|
-
seeInPopup(text: string):
|
|
6494
|
+
seeInPopup(text: string): CodeceptJS.StepPromise;
|
|
6318
6495
|
/**
|
|
6319
6496
|
* Set current page
|
|
6320
6497
|
* @param page - page to set
|
|
@@ -6346,8 +6523,9 @@ declare namespace CodeceptJS {
|
|
|
6346
6523
|
* I.amOnPage('/login'); // opens a login page
|
|
6347
6524
|
* ```
|
|
6348
6525
|
* @param url - url path or global url.
|
|
6526
|
+
* @returns automatically synchronized promise through #recorder
|
|
6349
6527
|
*/
|
|
6350
|
-
amOnPage(url: string):
|
|
6528
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
6351
6529
|
/**
|
|
6352
6530
|
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
6353
6531
|
* Puppeteer does not control the window of a browser, so it can't adjust its real size.
|
|
@@ -6357,8 +6535,9 @@ declare namespace CodeceptJS {
|
|
|
6357
6535
|
* First parameter can be set to `maximize`.
|
|
6358
6536
|
* @param width - width in pixels or `maximize`.
|
|
6359
6537
|
* @param height - height in pixels.
|
|
6538
|
+
* @returns automatically synchronized promise through #recorder
|
|
6360
6539
|
*/
|
|
6361
|
-
resizeWindow(width: number, height: number):
|
|
6540
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
6362
6541
|
/**
|
|
6363
6542
|
* Set headers for all next requests
|
|
6364
6543
|
*
|
|
@@ -6385,8 +6564,9 @@ declare namespace CodeceptJS {
|
|
|
6385
6564
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6386
6565
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset or context locator.
|
|
6387
6566
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6567
|
+
* @returns automatically synchronized promise through #recorder
|
|
6388
6568
|
*/
|
|
6389
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
6569
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
6390
6570
|
/**
|
|
6391
6571
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
6392
6572
|
*
|
|
@@ -6399,8 +6579,9 @@ declare namespace CodeceptJS {
|
|
|
6399
6579
|
* ```
|
|
6400
6580
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6401
6581
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
6582
|
+
* @returns automatically synchronized promise through #recorder
|
|
6402
6583
|
*/
|
|
6403
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
6584
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
6404
6585
|
/**
|
|
6405
6586
|
* Remove focus from a text input, button, etc.
|
|
6406
6587
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -6418,8 +6599,9 @@ declare namespace CodeceptJS {
|
|
|
6418
6599
|
* ```
|
|
6419
6600
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6420
6601
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
6602
|
+
* @returns automatically synchronized promise through #recorder
|
|
6421
6603
|
*/
|
|
6422
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
6604
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
6423
6605
|
/**
|
|
6424
6606
|
* Drag an item to a destination element.
|
|
6425
6607
|
*
|
|
@@ -6428,32 +6610,36 @@ declare namespace CodeceptJS {
|
|
|
6428
6610
|
* ```
|
|
6429
6611
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
6430
6612
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
6613
|
+
* @returns automatically synchronized promise through #recorder
|
|
6431
6614
|
*/
|
|
6432
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString):
|
|
6615
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6433
6616
|
/**
|
|
6434
6617
|
* Reload the current page.
|
|
6435
6618
|
*
|
|
6436
6619
|
* ```js
|
|
6437
6620
|
* I.refreshPage();
|
|
6438
6621
|
* ```
|
|
6622
|
+
* @returns automatically synchronized promise through #recorder
|
|
6439
6623
|
*/
|
|
6440
|
-
refreshPage():
|
|
6624
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
6441
6625
|
/**
|
|
6442
6626
|
* Scroll page to the top.
|
|
6443
6627
|
*
|
|
6444
6628
|
* ```js
|
|
6445
6629
|
* I.scrollPageToTop();
|
|
6446
6630
|
* ```
|
|
6631
|
+
* @returns automatically synchronized promise through #recorder
|
|
6447
6632
|
*/
|
|
6448
|
-
scrollPageToTop():
|
|
6633
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
6449
6634
|
/**
|
|
6450
6635
|
* Scroll page to the bottom.
|
|
6451
6636
|
*
|
|
6452
6637
|
* ```js
|
|
6453
6638
|
* I.scrollPageToBottom();
|
|
6454
6639
|
* ```
|
|
6640
|
+
* @returns automatically synchronized promise through #recorder
|
|
6455
6641
|
*/
|
|
6456
|
-
scrollPageToBottom():
|
|
6642
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
6457
6643
|
/**
|
|
6458
6644
|
* Scrolls to element matched by locator.
|
|
6459
6645
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -6465,8 +6651,9 @@ declare namespace CodeceptJS {
|
|
|
6465
6651
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6466
6652
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6467
6653
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6654
|
+
* @returns automatically synchronized promise through #recorder
|
|
6468
6655
|
*/
|
|
6469
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
6656
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
6470
6657
|
/**
|
|
6471
6658
|
* Checks that title contains text.
|
|
6472
6659
|
*
|
|
@@ -6474,8 +6661,9 @@ declare namespace CodeceptJS {
|
|
|
6474
6661
|
* I.seeInTitle('Home Page');
|
|
6475
6662
|
* ```
|
|
6476
6663
|
* @param text - text value to check.
|
|
6664
|
+
* @returns automatically synchronized promise through #recorder
|
|
6477
6665
|
*/
|
|
6478
|
-
seeInTitle(text: string):
|
|
6666
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
6479
6667
|
/**
|
|
6480
6668
|
* Retrieves a page scroll position and returns it to test.
|
|
6481
6669
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6493,8 +6681,9 @@ declare namespace CodeceptJS {
|
|
|
6493
6681
|
* I.seeTitleEquals('Test title.');
|
|
6494
6682
|
* ```
|
|
6495
6683
|
* @param text - value to check.
|
|
6684
|
+
* @returns automatically synchronized promise through #recorder
|
|
6496
6685
|
*/
|
|
6497
|
-
seeTitleEquals(text: string):
|
|
6686
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
6498
6687
|
/**
|
|
6499
6688
|
* Checks that title does not contain text.
|
|
6500
6689
|
*
|
|
@@ -6502,8 +6691,9 @@ declare namespace CodeceptJS {
|
|
|
6502
6691
|
* I.dontSeeInTitle('Error');
|
|
6503
6692
|
* ```
|
|
6504
6693
|
* @param text - value to check.
|
|
6694
|
+
* @returns automatically synchronized promise through #recorder
|
|
6505
6695
|
*/
|
|
6506
|
-
dontSeeInTitle(text: string):
|
|
6696
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
6507
6697
|
/**
|
|
6508
6698
|
* Retrieves a page title and returns it to test.
|
|
6509
6699
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -6565,9 +6755,9 @@ declare namespace CodeceptJS {
|
|
|
6565
6755
|
* const webElements = await I.grabWebElements('#button');
|
|
6566
6756
|
* ```
|
|
6567
6757
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6568
|
-
* @returns
|
|
6758
|
+
* @returns WebElements of being used Web helper
|
|
6569
6759
|
*/
|
|
6570
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6760
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
6571
6761
|
/**
|
|
6572
6762
|
* Grab WebElement for given locator
|
|
6573
6763
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6578,7 +6768,7 @@ declare namespace CodeceptJS {
|
|
|
6578
6768
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6579
6769
|
* @returns WebElement of being used Web helper
|
|
6580
6770
|
*/
|
|
6581
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6771
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
6582
6772
|
/**
|
|
6583
6773
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
6584
6774
|
*
|
|
@@ -6647,8 +6837,9 @@ declare namespace CodeceptJS {
|
|
|
6647
6837
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
6648
6838
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6649
6839
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6840
|
+
* @returns automatically synchronized promise through #recorder
|
|
6650
6841
|
*/
|
|
6651
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6842
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6652
6843
|
/**
|
|
6653
6844
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
6654
6845
|
*
|
|
@@ -6660,8 +6851,9 @@ declare namespace CodeceptJS {
|
|
|
6660
6851
|
* ```
|
|
6661
6852
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6662
6853
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6854
|
+
* @returns automatically synchronized promise through #recorder
|
|
6663
6855
|
*/
|
|
6664
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6856
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6665
6857
|
/**
|
|
6666
6858
|
* Checks that a given Element is present in the DOM
|
|
6667
6859
|
* Element is located by CSS or XPath.
|
|
@@ -6670,8 +6862,9 @@ declare namespace CodeceptJS {
|
|
|
6670
6862
|
* I.seeElementInDOM('#modal');
|
|
6671
6863
|
* ```
|
|
6672
6864
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6865
|
+
* @returns automatically synchronized promise through #recorder
|
|
6673
6866
|
*/
|
|
6674
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
6867
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6675
6868
|
/**
|
|
6676
6869
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
6677
6870
|
*
|
|
@@ -6679,8 +6872,9 @@ declare namespace CodeceptJS {
|
|
|
6679
6872
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
6680
6873
|
* ```
|
|
6681
6874
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6875
|
+
* @returns automatically synchronized promise through #recorder
|
|
6682
6876
|
*/
|
|
6683
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
6877
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6684
6878
|
/**
|
|
6685
6879
|
* Perform a click on a link or a button, given by a locator.
|
|
6686
6880
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -6713,8 +6907,9 @@ declare namespace CodeceptJS {
|
|
|
6713
6907
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
6714
6908
|
* @param [locator = '//body'] - (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6715
6909
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6910
|
+
* @returns automatically synchronized promise through #recorder
|
|
6716
6911
|
*/
|
|
6717
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
6912
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
6718
6913
|
/**
|
|
6719
6914
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
6720
6915
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -6742,8 +6937,9 @@ declare namespace CodeceptJS {
|
|
|
6742
6937
|
* ```
|
|
6743
6938
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6744
6939
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6940
|
+
* @returns automatically synchronized promise through #recorder
|
|
6745
6941
|
*/
|
|
6746
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6942
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6747
6943
|
/**
|
|
6748
6944
|
* Performs a click on a link and waits for navigation before moving on.
|
|
6749
6945
|
*
|
|
@@ -6752,8 +6948,9 @@ declare namespace CodeceptJS {
|
|
|
6752
6948
|
* ```
|
|
6753
6949
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
6754
6950
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
6951
|
+
* @returns automatically synchronized promise through #recorder
|
|
6755
6952
|
*/
|
|
6756
|
-
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6953
|
+
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6757
6954
|
/**
|
|
6758
6955
|
* Sets a directory to where save files. Allows to test file downloads.
|
|
6759
6956
|
* Should be used with [FileSystem helper](https://codecept.io/helpers/file-system) to check that file were downloaded correctly.
|
|
@@ -6789,8 +6986,9 @@ declare namespace CodeceptJS {
|
|
|
6789
6986
|
* ```
|
|
6790
6987
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6791
6988
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6989
|
+
* @returns automatically synchronized promise through #recorder
|
|
6792
6990
|
*/
|
|
6793
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6991
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6794
6992
|
/**
|
|
6795
6993
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
6796
6994
|
*
|
|
@@ -6804,8 +7002,9 @@ declare namespace CodeceptJS {
|
|
|
6804
7002
|
* ```
|
|
6805
7003
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
6806
7004
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
7005
|
+
* @returns automatically synchronized promise through #recorder
|
|
6807
7006
|
*/
|
|
6808
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7007
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6809
7008
|
/**
|
|
6810
7009
|
* Performs click at specific coordinates.
|
|
6811
7010
|
* If locator is provided, the coordinates are relative to the element.
|
|
@@ -6836,8 +7035,9 @@ declare namespace CodeceptJS {
|
|
|
6836
7035
|
* ```
|
|
6837
7036
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6838
7037
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7038
|
+
* @returns automatically synchronized promise through #recorder
|
|
6839
7039
|
*/
|
|
6840
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7040
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6841
7041
|
/**
|
|
6842
7042
|
* Unselects a checkbox or radio button.
|
|
6843
7043
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -6851,8 +7051,9 @@ declare namespace CodeceptJS {
|
|
|
6851
7051
|
* ```
|
|
6852
7052
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6853
7053
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7054
|
+
* @returns automatically synchronized promise through #recorder
|
|
6854
7055
|
*/
|
|
6855
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7056
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6856
7057
|
/**
|
|
6857
7058
|
* Verifies that the specified checkbox is checked.
|
|
6858
7059
|
*
|
|
@@ -6862,8 +7063,9 @@ declare namespace CodeceptJS {
|
|
|
6862
7063
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
6863
7064
|
* ```
|
|
6864
7065
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7066
|
+
* @returns automatically synchronized promise through #recorder
|
|
6865
7067
|
*/
|
|
6866
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
7068
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6867
7069
|
/**
|
|
6868
7070
|
* Verifies that the specified checkbox is not checked.
|
|
6869
7071
|
*
|
|
@@ -6873,8 +7075,9 @@ declare namespace CodeceptJS {
|
|
|
6873
7075
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
6874
7076
|
* ```
|
|
6875
7077
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7078
|
+
* @returns automatically synchronized promise through #recorder
|
|
6876
7079
|
*/
|
|
6877
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
7080
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6878
7081
|
/**
|
|
6879
7082
|
* Presses a key in the browser and leaves it in a down state.
|
|
6880
7083
|
*
|
|
@@ -6886,8 +7089,9 @@ declare namespace CodeceptJS {
|
|
|
6886
7089
|
* I.pressKeyUp('Control');
|
|
6887
7090
|
* ```
|
|
6888
7091
|
* @param key - name of key to press down.
|
|
7092
|
+
* @returns automatically synchronized promise through #recorder
|
|
6889
7093
|
*/
|
|
6890
|
-
pressKeyDown(key: string):
|
|
7094
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
6891
7095
|
/**
|
|
6892
7096
|
* Releases a key in the browser which was previously set to a down state.
|
|
6893
7097
|
*
|
|
@@ -6899,8 +7103,9 @@ declare namespace CodeceptJS {
|
|
|
6899
7103
|
* I.pressKeyUp('Control');
|
|
6900
7104
|
* ```
|
|
6901
7105
|
* @param key - name of key to release.
|
|
7106
|
+
* @returns automatically synchronized promise through #recorder
|
|
6902
7107
|
*/
|
|
6903
|
-
pressKeyUp(key: string):
|
|
7108
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
6904
7109
|
/**
|
|
6905
7110
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([puppeteer/puppeteer#1313](https://github.com/puppeteer/puppeteer/issues/1313)).
|
|
6906
7111
|
*
|
|
@@ -6962,8 +7167,9 @@ declare namespace CodeceptJS {
|
|
|
6962
7167
|
* - `'Space'`
|
|
6963
7168
|
* - `'Tab'`
|
|
6964
7169
|
* @param key - key or array of keys to press.
|
|
7170
|
+
* @returns automatically synchronized promise through #recorder
|
|
6965
7171
|
*/
|
|
6966
|
-
pressKey(key: string | string[]):
|
|
7172
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
6967
7173
|
/**
|
|
6968
7174
|
* Types out the given text into an active field.
|
|
6969
7175
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -6984,8 +7190,9 @@ declare namespace CodeceptJS {
|
|
|
6984
7190
|
* ```
|
|
6985
7191
|
* @param key - or array of keys to type.
|
|
6986
7192
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
7193
|
+
* @returns automatically synchronized promise through #recorder
|
|
6987
7194
|
*/
|
|
6988
|
-
type(key: string | string[], delay?: number):
|
|
7195
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
6989
7196
|
/**
|
|
6990
7197
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
6991
7198
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -7011,8 +7218,9 @@ declare namespace CodeceptJS {
|
|
|
7011
7218
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7012
7219
|
* @param value - text value to fill.
|
|
7013
7220
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7221
|
+
* @returns automatically synchronized promise through #recorder
|
|
7014
7222
|
*/
|
|
7015
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7223
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7016
7224
|
/**
|
|
7017
7225
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
7018
7226
|
*
|
|
@@ -7027,8 +7235,9 @@ declare namespace CodeceptJS {
|
|
|
7027
7235
|
* ```
|
|
7028
7236
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
7029
7237
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7238
|
+
* @returns automatically synchronized promise through #recorder.
|
|
7030
7239
|
*/
|
|
7031
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7240
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7032
7241
|
/**
|
|
7033
7242
|
* Appends text to a input field or textarea.
|
|
7034
7243
|
* Field is located by name, label, CSS or XPath
|
|
@@ -7045,8 +7254,9 @@ declare namespace CodeceptJS {
|
|
|
7045
7254
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
7046
7255
|
* @param value - text value to append.
|
|
7047
7256
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7257
|
+
* @returns automatically synchronized promise through #recorder
|
|
7048
7258
|
*/
|
|
7049
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
7259
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7050
7260
|
/**
|
|
7051
7261
|
* Checks that the given input field or textarea equals to given value.
|
|
7052
7262
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7064,8 +7274,9 @@ declare namespace CodeceptJS {
|
|
|
7064
7274
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7065
7275
|
* @param value - value to check.
|
|
7066
7276
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7277
|
+
* @returns automatically synchronized promise through #recorder
|
|
7067
7278
|
*/
|
|
7068
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7279
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7069
7280
|
/**
|
|
7070
7281
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
7071
7282
|
* Opposite to `seeInField`.
|
|
@@ -7081,8 +7292,9 @@ declare namespace CodeceptJS {
|
|
|
7081
7292
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7082
7293
|
* @param value - value to check.
|
|
7083
7294
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7295
|
+
* @returns automatically synchronized promise through #recorder
|
|
7084
7296
|
*/
|
|
7085
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7297
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7086
7298
|
/**
|
|
7087
7299
|
* > ⚠ 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.
|
|
7088
7300
|
*
|
|
@@ -7108,8 +7320,9 @@ declare namespace CodeceptJS {
|
|
|
7108
7320
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
7109
7321
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
7110
7322
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7323
|
+
* @returns automatically synchronized promise through #recorder
|
|
7111
7324
|
*/
|
|
7112
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
7325
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7113
7326
|
/**
|
|
7114
7327
|
* Selects an option in a drop-down select.
|
|
7115
7328
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -7136,8 +7349,9 @@ declare namespace CodeceptJS {
|
|
|
7136
7349
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
7137
7350
|
* @param option - visible text or value of option.
|
|
7138
7351
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7352
|
+
* @returns automatically synchronized promise through #recorder
|
|
7139
7353
|
*/
|
|
7140
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
7354
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7141
7355
|
/**
|
|
7142
7356
|
* Grab number of visible elements by locator.
|
|
7143
7357
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7156,13 +7370,15 @@ declare namespace CodeceptJS {
|
|
|
7156
7370
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
7157
7371
|
* ```
|
|
7158
7372
|
* @param url - a fragment to check
|
|
7373
|
+
* @returns automatically synchronized promise through #recorder
|
|
7159
7374
|
*/
|
|
7160
|
-
seeInCurrentUrl(url: string):
|
|
7375
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
7161
7376
|
/**
|
|
7162
7377
|
* Checks that current url does not contain a provided fragment.
|
|
7163
7378
|
* @param url - value to check.
|
|
7379
|
+
* @returns automatically synchronized promise through #recorder
|
|
7164
7380
|
*/
|
|
7165
|
-
dontSeeInCurrentUrl(url: string):
|
|
7381
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
7166
7382
|
/**
|
|
7167
7383
|
* Checks that current url is equal to provided one.
|
|
7168
7384
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7173,8 +7389,9 @@ declare namespace CodeceptJS {
|
|
|
7173
7389
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
7174
7390
|
* ```
|
|
7175
7391
|
* @param url - value to check.
|
|
7392
|
+
* @returns automatically synchronized promise through #recorder
|
|
7176
7393
|
*/
|
|
7177
|
-
seeCurrentUrlEquals(url: string):
|
|
7394
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
7178
7395
|
/**
|
|
7179
7396
|
* Checks that current url is not equal to provided one.
|
|
7180
7397
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7184,8 +7401,9 @@ declare namespace CodeceptJS {
|
|
|
7184
7401
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
7185
7402
|
* ```
|
|
7186
7403
|
* @param url - value to check.
|
|
7404
|
+
* @returns automatically synchronized promise through #recorder
|
|
7187
7405
|
*/
|
|
7188
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
7406
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
7189
7407
|
/**
|
|
7190
7408
|
* Checks that current URL path matches the expected path.
|
|
7191
7409
|
* Query strings and URL fragments are ignored.
|
|
@@ -7195,8 +7413,9 @@ declare namespace CodeceptJS {
|
|
|
7195
7413
|
* I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
7196
7414
|
* ```
|
|
7197
7415
|
* @param path - value to check.
|
|
7416
|
+
* @returns automatically synchronized promise through #recorder
|
|
7198
7417
|
*/
|
|
7199
|
-
seeCurrentPathEquals(path: string):
|
|
7418
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
7200
7419
|
/**
|
|
7201
7420
|
* Checks that current URL path does NOT match the expected path.
|
|
7202
7421
|
* Query strings and URL fragments are ignored.
|
|
@@ -7206,8 +7425,9 @@ declare namespace CodeceptJS {
|
|
|
7206
7425
|
* I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
7207
7426
|
* ```
|
|
7208
7427
|
* @param path - value to check.
|
|
7428
|
+
* @returns automatically synchronized promise through #recorder
|
|
7209
7429
|
*/
|
|
7210
|
-
dontSeeCurrentPathEquals(path: string):
|
|
7430
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
7211
7431
|
/**
|
|
7212
7432
|
* Checks that a page contains a visible text.
|
|
7213
7433
|
* Use context parameter to narrow down the search.
|
|
@@ -7219,8 +7439,9 @@ declare namespace CodeceptJS {
|
|
|
7219
7439
|
* ```
|
|
7220
7440
|
* @param text - expected on page.
|
|
7221
7441
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
7442
|
+
* @returns automatically synchronized promise through #recorder
|
|
7222
7443
|
*/
|
|
7223
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7444
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7224
7445
|
/**
|
|
7225
7446
|
* Checks that text is equal to provided one.
|
|
7226
7447
|
*
|
|
@@ -7229,8 +7450,9 @@ declare namespace CodeceptJS {
|
|
|
7229
7450
|
* ```
|
|
7230
7451
|
* @param text - element value to check.
|
|
7231
7452
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
7453
|
+
* @returns automatically synchronized promise through #recorder
|
|
7232
7454
|
*/
|
|
7233
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7455
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7234
7456
|
/**
|
|
7235
7457
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
7236
7458
|
* Use context parameter to narrow down the search.
|
|
@@ -7241,8 +7463,9 @@ declare namespace CodeceptJS {
|
|
|
7241
7463
|
* ```
|
|
7242
7464
|
* @param text - which is not present.
|
|
7243
7465
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
7466
|
+
* @returns automatically synchronized promise through #recorder
|
|
7244
7467
|
*/
|
|
7245
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7468
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7246
7469
|
/**
|
|
7247
7470
|
* Retrieves page source and returns it to test.
|
|
7248
7471
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7292,8 +7515,9 @@ declare namespace CodeceptJS {
|
|
|
7292
7515
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
7293
7516
|
* ```
|
|
7294
7517
|
* @param text - value to check.
|
|
7518
|
+
* @returns automatically synchronized promise through #recorder
|
|
7295
7519
|
*/
|
|
7296
|
-
seeInSource(text: string):
|
|
7520
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
7297
7521
|
/**
|
|
7298
7522
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
7299
7523
|
*
|
|
@@ -7301,8 +7525,9 @@ declare namespace CodeceptJS {
|
|
|
7301
7525
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
7302
7526
|
* ```
|
|
7303
7527
|
* @param value - to check.
|
|
7528
|
+
* @returns automatically synchronized promise through #recorder
|
|
7304
7529
|
*/
|
|
7305
|
-
dontSeeInSource(value: string):
|
|
7530
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
7306
7531
|
/**
|
|
7307
7532
|
* Asserts that an element appears a given number of times in the DOM.
|
|
7308
7533
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -7313,8 +7538,9 @@ declare namespace CodeceptJS {
|
|
|
7313
7538
|
* ```
|
|
7314
7539
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7315
7540
|
* @param num - number of elements.
|
|
7541
|
+
* @returns automatically synchronized promise through #recorder
|
|
7316
7542
|
*/
|
|
7317
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
7543
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
7318
7544
|
/**
|
|
7319
7545
|
* Asserts that an element is visible a given number of times.
|
|
7320
7546
|
* Element is located by CSS or XPath.
|
|
@@ -7324,8 +7550,9 @@ declare namespace CodeceptJS {
|
|
|
7324
7550
|
* ```
|
|
7325
7551
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7326
7552
|
* @param num - number of elements.
|
|
7553
|
+
* @returns automatically synchronized promise through #recorder
|
|
7327
7554
|
*/
|
|
7328
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
7555
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
7329
7556
|
/**
|
|
7330
7557
|
* Sets cookie(s).
|
|
7331
7558
|
*
|
|
@@ -7341,8 +7568,9 @@ declare namespace CodeceptJS {
|
|
|
7341
7568
|
* ]);
|
|
7342
7569
|
* ```
|
|
7343
7570
|
* @param cookie - a cookie object or array of cookie objects.
|
|
7571
|
+
* @returns automatically synchronized promise through #recorder
|
|
7344
7572
|
*/
|
|
7345
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
7573
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
7346
7574
|
/**
|
|
7347
7575
|
* Checks that cookie with given name exists.
|
|
7348
7576
|
*
|
|
@@ -7350,8 +7578,9 @@ declare namespace CodeceptJS {
|
|
|
7350
7578
|
* I.seeCookie('Auth');
|
|
7351
7579
|
* ```
|
|
7352
7580
|
* @param name - cookie name.
|
|
7581
|
+
* @returns automatically synchronized promise through #recorder
|
|
7353
7582
|
*/
|
|
7354
|
-
seeCookie(name: string):
|
|
7583
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
7355
7584
|
/**
|
|
7356
7585
|
* Checks that cookie with given name does not exist.
|
|
7357
7586
|
*
|
|
@@ -7359,8 +7588,9 @@ declare namespace CodeceptJS {
|
|
|
7359
7588
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
7360
7589
|
* ```
|
|
7361
7590
|
* @param name - cookie name.
|
|
7591
|
+
* @returns automatically synchronized promise through #recorder
|
|
7362
7592
|
*/
|
|
7363
|
-
dontSeeCookie(name: string):
|
|
7593
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
7364
7594
|
/**
|
|
7365
7595
|
* Gets a cookie object by name.
|
|
7366
7596
|
* If none provided gets all cookies.
|
|
@@ -7381,8 +7611,9 @@ declare namespace CodeceptJS {
|
|
|
7381
7611
|
* ```
|
|
7382
7612
|
* @param name - expected cookie name.
|
|
7383
7613
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
7614
|
+
* @returns automatically synchronized promise through #recorder
|
|
7384
7615
|
*/
|
|
7385
|
-
waitForCookie(name: string, sec?: number):
|
|
7616
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
7386
7617
|
/**
|
|
7387
7618
|
* Clears a cookie by name,
|
|
7388
7619
|
* if none provided clears all cookies.
|
|
@@ -7405,8 +7636,9 @@ declare namespace CodeceptJS {
|
|
|
7405
7636
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
7406
7637
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
7407
7638
|
* @param text - value to check.
|
|
7639
|
+
* @returns automatically synchronized promise through #recorder
|
|
7408
7640
|
*/
|
|
7409
|
-
seeInClipboard(text: string):
|
|
7641
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
7410
7642
|
/**
|
|
7411
7643
|
* Checks that the system clipboard is equal to the given text.
|
|
7412
7644
|
*
|
|
@@ -7418,8 +7650,9 @@ declare namespace CodeceptJS {
|
|
|
7418
7650
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
7419
7651
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
7420
7652
|
* @param text - value to check.
|
|
7653
|
+
* @returns automatically synchronized promise through #recorder
|
|
7421
7654
|
*/
|
|
7422
|
-
seeClipboardEquals(text: string):
|
|
7655
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
7423
7656
|
/**
|
|
7424
7657
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
7425
7658
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7441,8 +7674,9 @@ declare namespace CodeceptJS {
|
|
|
7441
7674
|
* I.clearClipboard();
|
|
7442
7675
|
* I.seeClipboardEquals('');
|
|
7443
7676
|
* ```
|
|
7677
|
+
* @returns automatically synchronized promise through #recorder
|
|
7444
7678
|
*/
|
|
7445
|
-
clearClipboard():
|
|
7679
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
7446
7680
|
/**
|
|
7447
7681
|
* If a function returns a Promise, tt will wait for its resolution.
|
|
7448
7682
|
*
|
|
@@ -7602,8 +7836,9 @@ declare namespace CodeceptJS {
|
|
|
7602
7836
|
* ```
|
|
7603
7837
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7604
7838
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
7839
|
+
* @returns automatically synchronized promise through #recorder
|
|
7605
7840
|
*/
|
|
7606
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
7841
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
7607
7842
|
/**
|
|
7608
7843
|
* Checks that all elements with given locator have given attributes.
|
|
7609
7844
|
*
|
|
@@ -7612,8 +7847,9 @@ declare namespace CodeceptJS {
|
|
|
7612
7847
|
* ```
|
|
7613
7848
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7614
7849
|
* @param attributes - attributes and their values to check.
|
|
7850
|
+
* @returns automatically synchronized promise through #recorder
|
|
7615
7851
|
*/
|
|
7616
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
7852
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
7617
7853
|
/**
|
|
7618
7854
|
* Drag the scrubber of a slider to a given position
|
|
7619
7855
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7624,8 +7860,9 @@ declare namespace CodeceptJS {
|
|
|
7624
7860
|
* ```
|
|
7625
7861
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
7626
7862
|
* @param offsetX - position to drag.
|
|
7863
|
+
* @returns automatically synchronized promise through #recorder
|
|
7627
7864
|
*/
|
|
7628
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
7865
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
7629
7866
|
/**
|
|
7630
7867
|
* Retrieves an array of attributes from elements located by CSS or XPath and returns it to test.
|
|
7631
7868
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -7660,8 +7897,9 @@ declare namespace CodeceptJS {
|
|
|
7660
7897
|
* ```
|
|
7661
7898
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7662
7899
|
* @param fileName - file name to save.
|
|
7900
|
+
* @returns automatically synchronized promise through #recorder
|
|
7663
7901
|
*/
|
|
7664
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
7902
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
7665
7903
|
/**
|
|
7666
7904
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
7667
7905
|
* Filename is relative to output folder.
|
|
@@ -7673,8 +7911,9 @@ declare namespace CodeceptJS {
|
|
|
7673
7911
|
* ```
|
|
7674
7912
|
* @param fileName - file name to save.
|
|
7675
7913
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
7914
|
+
* @returns automatically synchronized promise through #recorder
|
|
7676
7915
|
*/
|
|
7677
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
7916
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
7678
7917
|
/**
|
|
7679
7918
|
* Pauses execution for a number of seconds.
|
|
7680
7919
|
*
|
|
@@ -7682,15 +7921,17 @@ declare namespace CodeceptJS {
|
|
|
7682
7921
|
* I.wait(2); // wait 2 secs
|
|
7683
7922
|
* ```
|
|
7684
7923
|
* @param sec - number of second to wait.
|
|
7924
|
+
* @returns automatically synchronized promise through #recorder
|
|
7685
7925
|
*/
|
|
7686
|
-
wait(sec: number):
|
|
7926
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
7687
7927
|
/**
|
|
7688
7928
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
7689
7929
|
* Element can be located by CSS or XPath.
|
|
7690
7930
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7691
7931
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
7932
|
+
* @returns automatically synchronized promise through #recorder
|
|
7692
7933
|
*/
|
|
7693
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7934
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7694
7935
|
/**
|
|
7695
7936
|
* Waits for the specified value to be in value attribute.
|
|
7696
7937
|
*
|
|
@@ -7700,8 +7941,9 @@ declare namespace CodeceptJS {
|
|
|
7700
7941
|
* @param field - input field.
|
|
7701
7942
|
* @param value - expected value.
|
|
7702
7943
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7944
|
+
* @returns automatically synchronized promise through #recorder
|
|
7703
7945
|
*/
|
|
7704
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
7946
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
7705
7947
|
/**
|
|
7706
7948
|
* Waits for a specified number of elements on the page.
|
|
7707
7949
|
*
|
|
@@ -7711,8 +7953,9 @@ declare namespace CodeceptJS {
|
|
|
7711
7953
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7712
7954
|
* @param num - number of elements.
|
|
7713
7955
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7956
|
+
* @returns automatically synchronized promise through #recorder
|
|
7714
7957
|
*/
|
|
7715
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
7958
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
7716
7959
|
/**
|
|
7717
7960
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
7718
7961
|
* Element can be located by CSS or XPath.
|
|
@@ -7723,8 +7966,9 @@ declare namespace CodeceptJS {
|
|
|
7723
7966
|
* ```
|
|
7724
7967
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7725
7968
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7969
|
+
* @returns automatically synchronized promise through #recorder
|
|
7726
7970
|
*/
|
|
7727
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7971
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7728
7972
|
/**
|
|
7729
7973
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
7730
7974
|
* Element can be located by CSS or XPath.
|
|
@@ -7735,8 +7979,9 @@ declare namespace CodeceptJS {
|
|
|
7735
7979
|
* ```
|
|
7736
7980
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7737
7981
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7982
|
+
* @returns automatically synchronized promise through #recorder
|
|
7738
7983
|
*/
|
|
7739
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7984
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7740
7985
|
/**
|
|
7741
7986
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
7742
7987
|
* Element can be located by CSS or XPath.
|
|
@@ -7746,8 +7991,9 @@ declare namespace CodeceptJS {
|
|
|
7746
7991
|
* ```
|
|
7747
7992
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7748
7993
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7994
|
+
* @returns automatically synchronized promise through #recorder
|
|
7749
7995
|
*/
|
|
7750
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7996
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7751
7997
|
/**
|
|
7752
7998
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
7753
7999
|
* Element can be located by CSS or XPath.
|
|
@@ -7757,8 +8003,9 @@ declare namespace CodeceptJS {
|
|
|
7757
8003
|
* ```
|
|
7758
8004
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7759
8005
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8006
|
+
* @returns automatically synchronized promise through #recorder
|
|
7760
8007
|
*/
|
|
7761
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8008
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7762
8009
|
/**
|
|
7763
8010
|
* Waits for an element to hide (by default waits for 1sec).
|
|
7764
8011
|
* Element can be located by CSS or XPath.
|
|
@@ -7768,8 +8015,9 @@ declare namespace CodeceptJS {
|
|
|
7768
8015
|
* ```
|
|
7769
8016
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7770
8017
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8018
|
+
* @returns automatically synchronized promise through #recorder
|
|
7771
8019
|
*/
|
|
7772
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8020
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7773
8021
|
/**
|
|
7774
8022
|
* Waits for number of tabs.
|
|
7775
8023
|
*
|
|
@@ -7778,8 +8026,9 @@ declare namespace CodeceptJS {
|
|
|
7778
8026
|
* ```
|
|
7779
8027
|
* @param expectedTabs - expecting the number of tabs.
|
|
7780
8028
|
* @param sec - number of secs to wait.
|
|
8029
|
+
* @returns automatically synchronized promise through #recorder
|
|
7781
8030
|
*/
|
|
7782
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
8031
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
7783
8032
|
/**
|
|
7784
8033
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
7785
8034
|
*
|
|
@@ -7788,8 +8037,9 @@ declare namespace CodeceptJS {
|
|
|
7788
8037
|
* ```
|
|
7789
8038
|
* @param urlPart - value to check.
|
|
7790
8039
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8040
|
+
* @returns automatically synchronized promise through #recorder
|
|
7791
8041
|
*/
|
|
7792
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
8042
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
7793
8043
|
/**
|
|
7794
8044
|
* Waits for the entire URL to match the expected
|
|
7795
8045
|
*
|
|
@@ -7799,8 +8049,9 @@ declare namespace CodeceptJS {
|
|
|
7799
8049
|
* ```
|
|
7800
8050
|
* @param urlPart - value to check.
|
|
7801
8051
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8052
|
+
* @returns automatically synchronized promise through #recorder
|
|
7802
8053
|
*/
|
|
7803
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
8054
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
7804
8055
|
/**
|
|
7805
8056
|
* {{> waitCurrentPathEquals }}
|
|
7806
8057
|
*/
|
|
@@ -7817,8 +8068,9 @@ declare namespace CodeceptJS {
|
|
|
7817
8068
|
* @param text - to wait for.
|
|
7818
8069
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7819
8070
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
8071
|
+
* @returns automatically synchronized promise through #recorder
|
|
7820
8072
|
*/
|
|
7821
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
8073
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7822
8074
|
/**
|
|
7823
8075
|
* Waits for a network request.
|
|
7824
8076
|
*
|
|
@@ -7847,8 +8099,9 @@ declare namespace CodeceptJS {
|
|
|
7847
8099
|
* I.switchTo(); // switch back to main page
|
|
7848
8100
|
* ```
|
|
7849
8101
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8102
|
+
* @returns automatically synchronized promise through #recorder
|
|
7850
8103
|
*/
|
|
7851
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
8104
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7852
8105
|
/**
|
|
7853
8106
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
7854
8107
|
* Running in browser context.
|
|
@@ -7865,8 +8118,9 @@ declare namespace CodeceptJS {
|
|
|
7865
8118
|
* @param fn - to be executed in browser context.
|
|
7866
8119
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
7867
8120
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
8121
|
+
* @returns automatically synchronized promise through #recorder
|
|
7868
8122
|
*/
|
|
7869
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
8123
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
7870
8124
|
/**
|
|
7871
8125
|
* Waits for navigation to finish. By default, takes configured `waitForNavigation` option.
|
|
7872
8126
|
*
|
|
@@ -7882,8 +8136,9 @@ declare namespace CodeceptJS {
|
|
|
7882
8136
|
* ```
|
|
7883
8137
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7884
8138
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8139
|
+
* @returns automatically synchronized promise through #recorder
|
|
7885
8140
|
*/
|
|
7886
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8141
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7887
8142
|
/**
|
|
7888
8143
|
* Grab the data from performance timing using Navigation Timing API.
|
|
7889
8144
|
* The returned data will contain following things in ms:
|
|
@@ -7904,8 +8159,9 @@ declare namespace CodeceptJS {
|
|
|
7904
8159
|
* loadEventEnd: 241
|
|
7905
8160
|
* }
|
|
7906
8161
|
* ```
|
|
8162
|
+
* @returns automatically synchronized promise through #recorder
|
|
7907
8163
|
*/
|
|
7908
|
-
grabDataFromPerformanceTiming():
|
|
8164
|
+
grabDataFromPerformanceTiming(): CodeceptJS.StepPromise;
|
|
7909
8165
|
/**
|
|
7910
8166
|
* Grab the width, height, location of given locator.
|
|
7911
8167
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -7972,8 +8228,9 @@ declare namespace CodeceptJS {
|
|
|
7972
8228
|
* ```js
|
|
7973
8229
|
* I.startRecordingTraffic();
|
|
7974
8230
|
* ```
|
|
8231
|
+
* @returns automatically synchronized promise through #recorder
|
|
7975
8232
|
*/
|
|
7976
|
-
startRecordingTraffic():
|
|
8233
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
7977
8234
|
/**
|
|
7978
8235
|
* Grab the recording network traffics
|
|
7979
8236
|
*
|
|
@@ -8052,16 +8309,18 @@ declare namespace CodeceptJS {
|
|
|
8052
8309
|
* ```js
|
|
8053
8310
|
* await I.startRecordingWebSocketMessages();
|
|
8054
8311
|
* ```
|
|
8312
|
+
* @returns automatically synchronized promise through #recorder
|
|
8055
8313
|
*/
|
|
8056
|
-
startRecordingWebSocketMessages():
|
|
8314
|
+
startRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
8057
8315
|
/**
|
|
8058
8316
|
* Stops recording WS messages. Recorded WS messages is not flashed.
|
|
8059
8317
|
*
|
|
8060
8318
|
* ```js
|
|
8061
8319
|
* await I.stopRecordingWebSocketMessages();
|
|
8062
8320
|
* ```
|
|
8321
|
+
* @returns automatically synchronized promise through #recorder
|
|
8063
8322
|
*/
|
|
8064
|
-
stopRecordingWebSocketMessages():
|
|
8323
|
+
stopRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
8065
8324
|
/**
|
|
8066
8325
|
* Grab the recording WS messages
|
|
8067
8326
|
*/
|
|
@@ -8802,9 +9061,9 @@ declare namespace CodeceptJS {
|
|
|
8802
9061
|
* const webElements = await I.grabWebElements('#button');
|
|
8803
9062
|
* ```
|
|
8804
9063
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8805
|
-
* @returns
|
|
9064
|
+
* @returns WebElements of being used Web helper
|
|
8806
9065
|
*/
|
|
8807
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9066
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
8808
9067
|
/**
|
|
8809
9068
|
* Grab WebElement for given locator
|
|
8810
9069
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -8815,7 +9074,7 @@ declare namespace CodeceptJS {
|
|
|
8815
9074
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8816
9075
|
* @returns WebElement of being used Web helper
|
|
8817
9076
|
*/
|
|
8818
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9077
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
8819
9078
|
/**
|
|
8820
9079
|
* Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime.
|
|
8821
9080
|
*
|
|
@@ -8838,8 +9097,9 @@ declare namespace CodeceptJS {
|
|
|
8838
9097
|
* I.amOnPage('/login'); // opens a login page
|
|
8839
9098
|
* ```
|
|
8840
9099
|
* @param url - url path or global url.
|
|
9100
|
+
* @returns automatically synchronized promise through #recorder
|
|
8841
9101
|
*/
|
|
8842
|
-
amOnPage(url: string):
|
|
9102
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
8843
9103
|
/**
|
|
8844
9104
|
* Perform a click on a link or a button, given by a locator.
|
|
8845
9105
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -8872,8 +9132,9 @@ declare namespace CodeceptJS {
|
|
|
8872
9132
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
8873
9133
|
* @param [locator = '//body'] - (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8874
9134
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9135
|
+
* @returns automatically synchronized promise through #recorder
|
|
8875
9136
|
*/
|
|
8876
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
9137
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
8877
9138
|
/**
|
|
8878
9139
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
8879
9140
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -8901,8 +9162,9 @@ declare namespace CodeceptJS {
|
|
|
8901
9162
|
* ```
|
|
8902
9163
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8903
9164
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9165
|
+
* @returns automatically synchronized promise through #recorder
|
|
8904
9166
|
*/
|
|
8905
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9167
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
8906
9168
|
/**
|
|
8907
9169
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
8908
9170
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -8915,8 +9177,9 @@ declare namespace CodeceptJS {
|
|
|
8915
9177
|
* ```
|
|
8916
9178
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8917
9179
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9180
|
+
* @returns automatically synchronized promise through #recorder
|
|
8918
9181
|
*/
|
|
8919
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9182
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
8920
9183
|
/**
|
|
8921
9184
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
8922
9185
|
*
|
|
@@ -8930,8 +9193,9 @@ declare namespace CodeceptJS {
|
|
|
8930
9193
|
* ```
|
|
8931
9194
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
8932
9195
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
9196
|
+
* @returns automatically synchronized promise through #recorder
|
|
8933
9197
|
*/
|
|
8934
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9198
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
8935
9199
|
/**
|
|
8936
9200
|
* Performs click at specific coordinates.
|
|
8937
9201
|
* If locator is provided, the coordinates are relative to the element's top-left corner.
|
|
@@ -8966,8 +9230,9 @@ declare namespace CodeceptJS {
|
|
|
8966
9230
|
* ```
|
|
8967
9231
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8968
9232
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9233
|
+
* @returns automatically synchronized promise through #recorder
|
|
8969
9234
|
*/
|
|
8970
|
-
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9235
|
+
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
8971
9236
|
/**
|
|
8972
9237
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
8973
9238
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -8993,8 +9258,11 @@ declare namespace CodeceptJS {
|
|
|
8993
9258
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8994
9259
|
* @param value - text value to fill.
|
|
8995
9260
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9261
|
+
* @returns automatically synchronized promise through #recorder
|
|
9262
|
+
*
|
|
9263
|
+
* {{ custom }}
|
|
8996
9264
|
*/
|
|
8997
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9265
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
8998
9266
|
/**
|
|
8999
9267
|
* Appends text to a input field or textarea.
|
|
9000
9268
|
* Field is located by name, label, CSS or XPath
|
|
@@ -9011,8 +9279,9 @@ declare namespace CodeceptJS {
|
|
|
9011
9279
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
9012
9280
|
* @param value - text value to append.
|
|
9013
9281
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9282
|
+
* @returns automatically synchronized promise through #recorder
|
|
9014
9283
|
*/
|
|
9015
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
9284
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9016
9285
|
/**
|
|
9017
9286
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
9018
9287
|
*
|
|
@@ -9027,8 +9296,9 @@ declare namespace CodeceptJS {
|
|
|
9027
9296
|
* ```
|
|
9028
9297
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
9029
9298
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9299
|
+
* @returns automatically synchronized promise through #recorder.
|
|
9030
9300
|
*/
|
|
9031
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9301
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9032
9302
|
/**
|
|
9033
9303
|
* Selects an option in a drop-down select.
|
|
9034
9304
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -9055,8 +9325,9 @@ declare namespace CodeceptJS {
|
|
|
9055
9325
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
9056
9326
|
* @param option - visible text or value of option.
|
|
9057
9327
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9328
|
+
* @returns automatically synchronized promise through #recorder
|
|
9058
9329
|
*/
|
|
9059
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
9330
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9060
9331
|
/**
|
|
9061
9332
|
* Appium: not tested
|
|
9062
9333
|
*
|
|
@@ -9082,8 +9353,9 @@ declare namespace CodeceptJS {
|
|
|
9082
9353
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
9083
9354
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
9084
9355
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9356
|
+
* @returns automatically synchronized promise through #recorder
|
|
9085
9357
|
*/
|
|
9086
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
9358
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9087
9359
|
/**
|
|
9088
9360
|
* Appium: not tested
|
|
9089
9361
|
* Selects a checkbox or radio button.
|
|
@@ -9098,8 +9370,9 @@ declare namespace CodeceptJS {
|
|
|
9098
9370
|
* ```
|
|
9099
9371
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9100
9372
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9373
|
+
* @returns automatically synchronized promise through #recorder
|
|
9101
9374
|
*/
|
|
9102
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9375
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9103
9376
|
/**
|
|
9104
9377
|
* Appium: not tested
|
|
9105
9378
|
* Unselects a checkbox or radio button.
|
|
@@ -9114,8 +9387,9 @@ declare namespace CodeceptJS {
|
|
|
9114
9387
|
* ```
|
|
9115
9388
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9116
9389
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9390
|
+
* @returns automatically synchronized promise through #recorder
|
|
9117
9391
|
*/
|
|
9118
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9392
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9119
9393
|
/**
|
|
9120
9394
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
9121
9395
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9242,8 +9516,9 @@ declare namespace CodeceptJS {
|
|
|
9242
9516
|
* I.seeInTitle('Home Page');
|
|
9243
9517
|
* ```
|
|
9244
9518
|
* @param text - text value to check.
|
|
9519
|
+
* @returns automatically synchronized promise through #recorder
|
|
9245
9520
|
*/
|
|
9246
|
-
seeInTitle(text: string):
|
|
9521
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
9247
9522
|
/**
|
|
9248
9523
|
* Checks that title is equal to provided one.
|
|
9249
9524
|
*
|
|
@@ -9251,8 +9526,9 @@ declare namespace CodeceptJS {
|
|
|
9251
9526
|
* I.seeTitleEquals('Test title.');
|
|
9252
9527
|
* ```
|
|
9253
9528
|
* @param text - value to check.
|
|
9529
|
+
* @returns automatically synchronized promise through #recorder
|
|
9254
9530
|
*/
|
|
9255
|
-
seeTitleEquals(text: string):
|
|
9531
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
9256
9532
|
/**
|
|
9257
9533
|
* Checks that title does not contain text.
|
|
9258
9534
|
*
|
|
@@ -9260,8 +9536,9 @@ declare namespace CodeceptJS {
|
|
|
9260
9536
|
* I.dontSeeInTitle('Error');
|
|
9261
9537
|
* ```
|
|
9262
9538
|
* @param text - value to check.
|
|
9539
|
+
* @returns automatically synchronized promise through #recorder
|
|
9263
9540
|
*/
|
|
9264
|
-
dontSeeInTitle(text: string):
|
|
9541
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
9265
9542
|
/**
|
|
9266
9543
|
* Retrieves a page title and returns it to test.
|
|
9267
9544
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9283,8 +9560,9 @@ declare namespace CodeceptJS {
|
|
|
9283
9560
|
* ```
|
|
9284
9561
|
* @param text - expected on page.
|
|
9285
9562
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
9563
|
+
* @returns automatically synchronized promise through #recorder
|
|
9286
9564
|
*/
|
|
9287
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9565
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9288
9566
|
/**
|
|
9289
9567
|
* Checks that text is equal to provided one.
|
|
9290
9568
|
*
|
|
@@ -9293,8 +9571,9 @@ declare namespace CodeceptJS {
|
|
|
9293
9571
|
* ```
|
|
9294
9572
|
* @param text - element value to check.
|
|
9295
9573
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
9574
|
+
* @returns automatically synchronized promise through #recorder
|
|
9296
9575
|
*/
|
|
9297
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9576
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9298
9577
|
/**
|
|
9299
9578
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
9300
9579
|
* Use context parameter to narrow down the search.
|
|
@@ -9305,8 +9584,9 @@ declare namespace CodeceptJS {
|
|
|
9305
9584
|
* ```
|
|
9306
9585
|
* @param text - which is not present.
|
|
9307
9586
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
9587
|
+
* @returns automatically synchronized promise through #recorder
|
|
9308
9588
|
*/
|
|
9309
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9589
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9310
9590
|
/**
|
|
9311
9591
|
* Checks that the given input field or textarea equals to given value.
|
|
9312
9592
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -9324,8 +9604,9 @@ declare namespace CodeceptJS {
|
|
|
9324
9604
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9325
9605
|
* @param value - value to check.
|
|
9326
9606
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9607
|
+
* @returns automatically synchronized promise through #recorder
|
|
9327
9608
|
*/
|
|
9328
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9609
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9329
9610
|
/**
|
|
9330
9611
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
9331
9612
|
* Opposite to `seeInField`.
|
|
@@ -9341,8 +9622,9 @@ declare namespace CodeceptJS {
|
|
|
9341
9622
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9342
9623
|
* @param value - value to check.
|
|
9343
9624
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9625
|
+
* @returns automatically synchronized promise through #recorder
|
|
9344
9626
|
*/
|
|
9345
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9627
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9346
9628
|
/**
|
|
9347
9629
|
* Appium: not tested
|
|
9348
9630
|
* Verifies that the specified checkbox is checked.
|
|
@@ -9353,8 +9635,9 @@ declare namespace CodeceptJS {
|
|
|
9353
9635
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
9354
9636
|
* ```
|
|
9355
9637
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9638
|
+
* @returns automatically synchronized promise through #recorder
|
|
9356
9639
|
*/
|
|
9357
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
9640
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9358
9641
|
/**
|
|
9359
9642
|
* Appium: not tested
|
|
9360
9643
|
* Verifies that the specified checkbox is not checked.
|
|
@@ -9365,8 +9648,9 @@ declare namespace CodeceptJS {
|
|
|
9365
9648
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
9366
9649
|
* ```
|
|
9367
9650
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9651
|
+
* @returns automatically synchronized promise through #recorder
|
|
9368
9652
|
*/
|
|
9369
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
9653
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9370
9654
|
/**
|
|
9371
9655
|
* Checks that a given Element is visible
|
|
9372
9656
|
* Element is located by CSS or XPath.
|
|
@@ -9383,8 +9667,9 @@ declare namespace CodeceptJS {
|
|
|
9383
9667
|
* > ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators](/locators#aria-locators).
|
|
9384
9668
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9385
9669
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9670
|
+
* @returns automatically synchronized promise through #recorder
|
|
9386
9671
|
*/
|
|
9387
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9672
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9388
9673
|
/**
|
|
9389
9674
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
9390
9675
|
*
|
|
@@ -9396,8 +9681,9 @@ declare namespace CodeceptJS {
|
|
|
9396
9681
|
* ```
|
|
9397
9682
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9398
9683
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9684
|
+
* @returns automatically synchronized promise through #recorder
|
|
9399
9685
|
*/
|
|
9400
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9686
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9401
9687
|
/**
|
|
9402
9688
|
* Checks that a given Element is present in the DOM
|
|
9403
9689
|
* Element is located by CSS or XPath.
|
|
@@ -9406,8 +9692,9 @@ declare namespace CodeceptJS {
|
|
|
9406
9692
|
* I.seeElementInDOM('#modal');
|
|
9407
9693
|
* ```
|
|
9408
9694
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9695
|
+
* @returns automatically synchronized promise through #recorder
|
|
9409
9696
|
*/
|
|
9410
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
9697
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9411
9698
|
/**
|
|
9412
9699
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
9413
9700
|
*
|
|
@@ -9415,8 +9702,9 @@ declare namespace CodeceptJS {
|
|
|
9415
9702
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
9416
9703
|
* ```
|
|
9417
9704
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9705
|
+
* @returns automatically synchronized promise through #recorder
|
|
9418
9706
|
*/
|
|
9419
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
9707
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9420
9708
|
/**
|
|
9421
9709
|
* Checks that the current page contains the given string in its raw source code.
|
|
9422
9710
|
*
|
|
@@ -9424,8 +9712,9 @@ declare namespace CodeceptJS {
|
|
|
9424
9712
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
9425
9713
|
* ```
|
|
9426
9714
|
* @param text - value to check.
|
|
9715
|
+
* @returns automatically synchronized promise through #recorder
|
|
9427
9716
|
*/
|
|
9428
|
-
seeInSource(text: string):
|
|
9717
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
9429
9718
|
/**
|
|
9430
9719
|
* Retrieves page source and returns it to test.
|
|
9431
9720
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -9465,8 +9754,9 @@ declare namespace CodeceptJS {
|
|
|
9465
9754
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
9466
9755
|
* ```
|
|
9467
9756
|
* @param value - to check.
|
|
9757
|
+
* @returns automatically synchronized promise through #recorder
|
|
9468
9758
|
*/
|
|
9469
|
-
dontSeeInSource(value: string):
|
|
9759
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
9470
9760
|
/**
|
|
9471
9761
|
* Asserts that an element appears a given number of times in the DOM.
|
|
9472
9762
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -9477,8 +9767,9 @@ declare namespace CodeceptJS {
|
|
|
9477
9767
|
* ```
|
|
9478
9768
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9479
9769
|
* @param num - number of elements.
|
|
9770
|
+
* @returns automatically synchronized promise through #recorder
|
|
9480
9771
|
*/
|
|
9481
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
9772
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
9482
9773
|
/**
|
|
9483
9774
|
* Asserts that an element is visible a given number of times.
|
|
9484
9775
|
* Element is located by CSS or XPath.
|
|
@@ -9488,8 +9779,9 @@ declare namespace CodeceptJS {
|
|
|
9488
9779
|
* ```
|
|
9489
9780
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9490
9781
|
* @param num - number of elements.
|
|
9782
|
+
* @returns automatically synchronized promise through #recorder
|
|
9491
9783
|
*/
|
|
9492
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
9784
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
9493
9785
|
/**
|
|
9494
9786
|
* Checks that all elements with given locator have given CSS properties.
|
|
9495
9787
|
*
|
|
@@ -9498,8 +9790,9 @@ declare namespace CodeceptJS {
|
|
|
9498
9790
|
* ```
|
|
9499
9791
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9500
9792
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
9793
|
+
* @returns automatically synchronized promise through #recorder
|
|
9501
9794
|
*/
|
|
9502
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
9795
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
9503
9796
|
/**
|
|
9504
9797
|
* Checks that all elements with given locator have given attributes.
|
|
9505
9798
|
*
|
|
@@ -9508,8 +9801,9 @@ declare namespace CodeceptJS {
|
|
|
9508
9801
|
* ```
|
|
9509
9802
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9510
9803
|
* @param attributes - attributes and their values to check.
|
|
9804
|
+
* @returns automatically synchronized promise through #recorder
|
|
9511
9805
|
*/
|
|
9512
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
9806
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
9513
9807
|
/**
|
|
9514
9808
|
* Grab number of visible elements by locator.
|
|
9515
9809
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -9528,13 +9822,15 @@ declare namespace CodeceptJS {
|
|
|
9528
9822
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
9529
9823
|
* ```
|
|
9530
9824
|
* @param url - a fragment to check
|
|
9825
|
+
* @returns automatically synchronized promise through #recorder
|
|
9531
9826
|
*/
|
|
9532
|
-
seeInCurrentUrl(url: string):
|
|
9827
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
9533
9828
|
/**
|
|
9534
9829
|
* Checks that current url does not contain a provided fragment.
|
|
9535
9830
|
* @param url - value to check.
|
|
9831
|
+
* @returns automatically synchronized promise through #recorder
|
|
9536
9832
|
*/
|
|
9537
|
-
dontSeeInCurrentUrl(url: string):
|
|
9833
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
9538
9834
|
/**
|
|
9539
9835
|
* Checks that current url is equal to provided one.
|
|
9540
9836
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -9545,8 +9841,9 @@ declare namespace CodeceptJS {
|
|
|
9545
9841
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
9546
9842
|
* ```
|
|
9547
9843
|
* @param url - value to check.
|
|
9844
|
+
* @returns automatically synchronized promise through #recorder
|
|
9548
9845
|
*/
|
|
9549
|
-
seeCurrentUrlEquals(url: string):
|
|
9846
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
9550
9847
|
/**
|
|
9551
9848
|
* Checks that current url is not equal to provided one.
|
|
9552
9849
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -9556,8 +9853,9 @@ declare namespace CodeceptJS {
|
|
|
9556
9853
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
9557
9854
|
* ```
|
|
9558
9855
|
* @param url - value to check.
|
|
9856
|
+
* @returns automatically synchronized promise through #recorder
|
|
9559
9857
|
*/
|
|
9560
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
9858
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
9561
9859
|
/**
|
|
9562
9860
|
* Checks that current URL path matches the expected path.
|
|
9563
9861
|
* Query strings and URL fragments are ignored.
|
|
@@ -9567,8 +9865,9 @@ declare namespace CodeceptJS {
|
|
|
9567
9865
|
* I.seeCurrentPathEquals('/'); // passes for '/', '/?user=ok', '/#top'
|
|
9568
9866
|
* ```
|
|
9569
9867
|
* @param path - value to check.
|
|
9868
|
+
* @returns automatically synchronized promise through #recorder
|
|
9570
9869
|
*/
|
|
9571
|
-
seeCurrentPathEquals(path: string):
|
|
9870
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
9572
9871
|
/**
|
|
9573
9872
|
* Checks that current URL path does NOT match the expected path.
|
|
9574
9873
|
* Query strings and URL fragments are ignored.
|
|
@@ -9578,8 +9877,9 @@ declare namespace CodeceptJS {
|
|
|
9578
9877
|
* I.dontSeeCurrentPathEquals('/'); // fails for '/', '/?user=ok', '/#top'
|
|
9579
9878
|
* ```
|
|
9580
9879
|
* @param path - value to check.
|
|
9880
|
+
* @returns automatically synchronized promise through #recorder
|
|
9581
9881
|
*/
|
|
9582
|
-
dontSeeCurrentPathEquals(path: string):
|
|
9882
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
9583
9883
|
/**
|
|
9584
9884
|
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
9585
9885
|
*
|
|
@@ -9646,8 +9946,9 @@ declare namespace CodeceptJS {
|
|
|
9646
9946
|
* ```
|
|
9647
9947
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9648
9948
|
* @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
9949
|
+
* @returns automatically synchronized promise through #recorder
|
|
9649
9950
|
*/
|
|
9650
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean):
|
|
9951
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): CodeceptJS.StepPromise;
|
|
9651
9952
|
/**
|
|
9652
9953
|
* Scrolls to element matched by locator.
|
|
9653
9954
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -9659,8 +9960,9 @@ declare namespace CodeceptJS {
|
|
|
9659
9960
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9660
9961
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
9661
9962
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
9963
|
+
* @returns automatically synchronized promise through #recorder
|
|
9662
9964
|
*/
|
|
9663
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
9965
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
9664
9966
|
/**
|
|
9665
9967
|
* Moves cursor to element matched by locator.
|
|
9666
9968
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -9676,8 +9978,9 @@ declare namespace CodeceptJS {
|
|
|
9676
9978
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9677
9979
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset or context locator.
|
|
9678
9980
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
9981
|
+
* @returns automatically synchronized promise through #recorder
|
|
9679
9982
|
*/
|
|
9680
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
9983
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
9681
9984
|
/**
|
|
9682
9985
|
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
9683
9986
|
* Filename is relative to output folder.
|
|
@@ -9687,8 +9990,9 @@ declare namespace CodeceptJS {
|
|
|
9687
9990
|
* ```
|
|
9688
9991
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9689
9992
|
* @param fileName - file name to save.
|
|
9993
|
+
* @returns automatically synchronized promise through #recorder
|
|
9690
9994
|
*/
|
|
9691
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
9995
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
9692
9996
|
/**
|
|
9693
9997
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
9694
9998
|
* Filename is relative to output folder.
|
|
@@ -9700,8 +10004,9 @@ declare namespace CodeceptJS {
|
|
|
9700
10004
|
* ```
|
|
9701
10005
|
* @param fileName - file name to save.
|
|
9702
10006
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
10007
|
+
* @returns automatically synchronized promise through #recorder
|
|
9703
10008
|
*/
|
|
9704
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
10009
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
9705
10010
|
/**
|
|
9706
10011
|
* Uses Selenium's JSON [cookie format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
|
|
9707
10012
|
* Sets cookie(s).
|
|
@@ -9718,8 +10023,9 @@ declare namespace CodeceptJS {
|
|
|
9718
10023
|
* ]);
|
|
9719
10024
|
* ```
|
|
9720
10025
|
* @param cookie - a cookie object or array of cookie objects.
|
|
10026
|
+
* @returns automatically synchronized promise through #recorder
|
|
9721
10027
|
*/
|
|
9722
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
10028
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
9723
10029
|
/**
|
|
9724
10030
|
* Clears a cookie by name,
|
|
9725
10031
|
* if none provided clears all cookies.
|
|
@@ -9738,8 +10044,9 @@ declare namespace CodeceptJS {
|
|
|
9738
10044
|
* I.seeCookie('Auth');
|
|
9739
10045
|
* ```
|
|
9740
10046
|
* @param name - cookie name.
|
|
10047
|
+
* @returns automatically synchronized promise through #recorder
|
|
9741
10048
|
*/
|
|
9742
|
-
seeCookie(name: string):
|
|
10049
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
9743
10050
|
/**
|
|
9744
10051
|
* Checks that cookie with given name does not exist.
|
|
9745
10052
|
*
|
|
@@ -9747,8 +10054,9 @@ declare namespace CodeceptJS {
|
|
|
9747
10054
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
9748
10055
|
* ```
|
|
9749
10056
|
* @param name - cookie name.
|
|
10057
|
+
* @returns automatically synchronized promise through #recorder
|
|
9750
10058
|
*/
|
|
9751
|
-
dontSeeCookie(name: string):
|
|
10059
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
9752
10060
|
/**
|
|
9753
10061
|
* Gets a cookie object by name.
|
|
9754
10062
|
* If none provided gets all cookies.
|
|
@@ -9772,8 +10080,9 @@ declare namespace CodeceptJS {
|
|
|
9772
10080
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
9773
10081
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
9774
10082
|
* @param text - value to check.
|
|
10083
|
+
* @returns automatically synchronized promise through #recorder
|
|
9775
10084
|
*/
|
|
9776
|
-
seeInClipboard(text: string):
|
|
10085
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
9777
10086
|
/**
|
|
9778
10087
|
* Checks that the system clipboard is equal to the given text.
|
|
9779
10088
|
*
|
|
@@ -9785,8 +10094,9 @@ declare namespace CodeceptJS {
|
|
|
9785
10094
|
* Reading the clipboard requires a secure context (`https` or `localhost`) and is supported
|
|
9786
10095
|
* in Chromium-based browsers, where read access is granted automatically.
|
|
9787
10096
|
* @param text - value to check.
|
|
10097
|
+
* @returns automatically synchronized promise through #recorder
|
|
9788
10098
|
*/
|
|
9789
|
-
seeClipboardEquals(text: string):
|
|
10099
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
9790
10100
|
/**
|
|
9791
10101
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
9792
10102
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -9808,8 +10118,9 @@ declare namespace CodeceptJS {
|
|
|
9808
10118
|
* I.clearClipboard();
|
|
9809
10119
|
* I.seeClipboardEquals('');
|
|
9810
10120
|
* ```
|
|
10121
|
+
* @returns automatically synchronized promise through #recorder
|
|
9811
10122
|
*/
|
|
9812
|
-
clearClipboard():
|
|
10123
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
9813
10124
|
/**
|
|
9814
10125
|
* Waits for the specified cookie in the cookies.
|
|
9815
10126
|
*
|
|
@@ -9818,8 +10129,9 @@ declare namespace CodeceptJS {
|
|
|
9818
10129
|
* ```
|
|
9819
10130
|
* @param name - expected cookie name.
|
|
9820
10131
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
10132
|
+
* @returns automatically synchronized promise through #recorder
|
|
9821
10133
|
*/
|
|
9822
|
-
waitForCookie(name: string, sec?: number):
|
|
10134
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
9823
10135
|
/**
|
|
9824
10136
|
* Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
|
|
9825
10137
|
* Don't confuse popups with modal windows, as created by [various
|
|
@@ -9854,8 +10166,9 @@ declare namespace CodeceptJS {
|
|
|
9854
10166
|
* I.pressKeyUp('Control');
|
|
9855
10167
|
* ```
|
|
9856
10168
|
* @param key - name of key to press down.
|
|
10169
|
+
* @returns automatically synchronized promise through #recorder
|
|
9857
10170
|
*/
|
|
9858
|
-
pressKeyDown(key: string):
|
|
10171
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
9859
10172
|
/**
|
|
9860
10173
|
* Releases a key in the browser which was previously set to a down state.
|
|
9861
10174
|
*
|
|
@@ -9867,8 +10180,9 @@ declare namespace CodeceptJS {
|
|
|
9867
10180
|
* I.pressKeyUp('Control');
|
|
9868
10181
|
* ```
|
|
9869
10182
|
* @param key - name of key to release.
|
|
10183
|
+
* @returns automatically synchronized promise through #recorder
|
|
9870
10184
|
*/
|
|
9871
|
-
pressKeyUp(key: string):
|
|
10185
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
9872
10186
|
/**
|
|
9873
10187
|
* _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.
|
|
9874
10188
|
*
|
|
@@ -9930,8 +10244,9 @@ declare namespace CodeceptJS {
|
|
|
9930
10244
|
* - `'Space'`
|
|
9931
10245
|
* - `'Tab'`
|
|
9932
10246
|
* @param key - key or array of keys to press.
|
|
10247
|
+
* @returns automatically synchronized promise through #recorder
|
|
9933
10248
|
*/
|
|
9934
|
-
pressKey(key: string | string[]):
|
|
10249
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
9935
10250
|
/**
|
|
9936
10251
|
* Types out the given text into an active field.
|
|
9937
10252
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -9952,8 +10267,9 @@ declare namespace CodeceptJS {
|
|
|
9952
10267
|
* ```
|
|
9953
10268
|
* @param key - or array of keys to type.
|
|
9954
10269
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
10270
|
+
* @returns automatically synchronized promise through #recorder
|
|
9955
10271
|
*/
|
|
9956
|
-
type(key: string | string[], delay?: number):
|
|
10272
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
9957
10273
|
/**
|
|
9958
10274
|
* Appium: not tested in web, in apps doesn't work
|
|
9959
10275
|
*
|
|
@@ -9961,8 +10277,9 @@ declare namespace CodeceptJS {
|
|
|
9961
10277
|
* First parameter can be set to `maximize`.
|
|
9962
10278
|
* @param width - width in pixels or `maximize`.
|
|
9963
10279
|
* @param height - height in pixels.
|
|
10280
|
+
* @returns automatically synchronized promise through #recorder
|
|
9964
10281
|
*/
|
|
9965
|
-
resizeWindow(width: number, height: number):
|
|
10282
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
9966
10283
|
/**
|
|
9967
10284
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
9968
10285
|
*
|
|
@@ -9975,8 +10292,9 @@ declare namespace CodeceptJS {
|
|
|
9975
10292
|
* ```
|
|
9976
10293
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
9977
10294
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
10295
|
+
* @returns automatically synchronized promise through #recorder
|
|
9978
10296
|
*/
|
|
9979
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
10297
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
9980
10298
|
/**
|
|
9981
10299
|
* Remove focus from a text input, button, etc.
|
|
9982
10300
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -9994,8 +10312,9 @@ declare namespace CodeceptJS {
|
|
|
9994
10312
|
* ```
|
|
9995
10313
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
9996
10314
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
10315
|
+
* @returns automatically synchronized promise through #recorder
|
|
9997
10316
|
*/
|
|
9998
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
10317
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
9999
10318
|
/**
|
|
10000
10319
|
* Appium: not tested
|
|
10001
10320
|
* Drag an item to a destination element.
|
|
@@ -10005,8 +10324,9 @@ declare namespace CodeceptJS {
|
|
|
10005
10324
|
* ```
|
|
10006
10325
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
10007
10326
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
10327
|
+
* @returns automatically synchronized promise through #recorder
|
|
10008
10328
|
*/
|
|
10009
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString):
|
|
10329
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
10010
10330
|
/**
|
|
10011
10331
|
* Drag the scrubber of a slider to a given position
|
|
10012
10332
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -10017,8 +10337,9 @@ declare namespace CodeceptJS {
|
|
|
10017
10337
|
* ```
|
|
10018
10338
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
10019
10339
|
* @param offsetX - position to drag.
|
|
10340
|
+
* @returns automatically synchronized promise through #recorder
|
|
10020
10341
|
*/
|
|
10021
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
10342
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
10022
10343
|
/**
|
|
10023
10344
|
* Get all Window Handles.
|
|
10024
10345
|
* Useful for referencing a specific handle when calling `I.switchToWindow(handle)`
|
|
@@ -10058,8 +10379,9 @@ declare namespace CodeceptJS {
|
|
|
10058
10379
|
* ```js
|
|
10059
10380
|
* I.closeOtherTabs();
|
|
10060
10381
|
* ```
|
|
10382
|
+
* @returns automatically synchronized promise through #recorder
|
|
10061
10383
|
*/
|
|
10062
|
-
closeOtherTabs():
|
|
10384
|
+
closeOtherTabs(): CodeceptJS.StepPromise;
|
|
10063
10385
|
/**
|
|
10064
10386
|
* Pauses execution for a number of seconds.
|
|
10065
10387
|
*
|
|
@@ -10067,15 +10389,17 @@ declare namespace CodeceptJS {
|
|
|
10067
10389
|
* I.wait(2); // wait 2 secs
|
|
10068
10390
|
* ```
|
|
10069
10391
|
* @param sec - number of second to wait.
|
|
10392
|
+
* @returns automatically synchronized promise through #recorder
|
|
10070
10393
|
*/
|
|
10071
|
-
wait(sec: number):
|
|
10394
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
10072
10395
|
/**
|
|
10073
10396
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
10074
10397
|
* Element can be located by CSS or XPath.
|
|
10075
10398
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10076
10399
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
10400
|
+
* @returns automatically synchronized promise through #recorder
|
|
10077
10401
|
*/
|
|
10078
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10402
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10079
10403
|
/**
|
|
10080
10404
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
10081
10405
|
* Element can be located by CSS or XPath.
|
|
@@ -10086,8 +10410,9 @@ declare namespace CodeceptJS {
|
|
|
10086
10410
|
* ```
|
|
10087
10411
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10088
10412
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10413
|
+
* @returns automatically synchronized promise through #recorder
|
|
10089
10414
|
*/
|
|
10090
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10415
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10091
10416
|
/**
|
|
10092
10417
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
10093
10418
|
* Element can be located by CSS or XPath.
|
|
@@ -10098,8 +10423,9 @@ declare namespace CodeceptJS {
|
|
|
10098
10423
|
* ```
|
|
10099
10424
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10100
10425
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
10426
|
+
* @returns automatically synchronized promise through #recorder
|
|
10101
10427
|
*/
|
|
10102
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10428
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10103
10429
|
/**
|
|
10104
10430
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
10105
10431
|
*
|
|
@@ -10108,8 +10434,9 @@ declare namespace CodeceptJS {
|
|
|
10108
10434
|
* ```
|
|
10109
10435
|
* @param urlPart - value to check.
|
|
10110
10436
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10437
|
+
* @returns automatically synchronized promise through #recorder
|
|
10111
10438
|
*/
|
|
10112
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
10439
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
10113
10440
|
/**
|
|
10114
10441
|
* Waits for the entire URL to match the expected
|
|
10115
10442
|
*
|
|
@@ -10119,8 +10446,9 @@ declare namespace CodeceptJS {
|
|
|
10119
10446
|
* ```
|
|
10120
10447
|
* @param urlPart - value to check.
|
|
10121
10448
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10449
|
+
* @returns automatically synchronized promise through #recorder
|
|
10122
10450
|
*/
|
|
10123
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
10451
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
10124
10452
|
/**
|
|
10125
10453
|
* {{> waitCurrentPathEquals }}
|
|
10126
10454
|
*/
|
|
@@ -10137,8 +10465,9 @@ declare namespace CodeceptJS {
|
|
|
10137
10465
|
* @param text - to wait for.
|
|
10138
10466
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10139
10467
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
10468
|
+
* @returns automatically synchronized promise through #recorder
|
|
10140
10469
|
*/
|
|
10141
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
10470
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
10142
10471
|
/**
|
|
10143
10472
|
* Waits for the specified value to be in value attribute.
|
|
10144
10473
|
*
|
|
@@ -10148,8 +10477,9 @@ declare namespace CodeceptJS {
|
|
|
10148
10477
|
* @param field - input field.
|
|
10149
10478
|
* @param value - expected value.
|
|
10150
10479
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10480
|
+
* @returns automatically synchronized promise through #recorder
|
|
10151
10481
|
*/
|
|
10152
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
10482
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
10153
10483
|
/**
|
|
10154
10484
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
10155
10485
|
* Element can be located by CSS or XPath.
|
|
@@ -10159,8 +10489,9 @@ declare namespace CodeceptJS {
|
|
|
10159
10489
|
* ```
|
|
10160
10490
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10161
10491
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10492
|
+
* @returns automatically synchronized promise through #recorder
|
|
10162
10493
|
*/
|
|
10163
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10494
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10164
10495
|
/**
|
|
10165
10496
|
* Waits for a specified number of elements on the page.
|
|
10166
10497
|
*
|
|
@@ -10170,8 +10501,9 @@ declare namespace CodeceptJS {
|
|
|
10170
10501
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10171
10502
|
* @param num - number of elements.
|
|
10172
10503
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10504
|
+
* @returns automatically synchronized promise through #recorder
|
|
10173
10505
|
*/
|
|
10174
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
10506
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
10175
10507
|
/**
|
|
10176
10508
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
10177
10509
|
* Element can be located by CSS or XPath.
|
|
@@ -10181,8 +10513,9 @@ declare namespace CodeceptJS {
|
|
|
10181
10513
|
* ```
|
|
10182
10514
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10183
10515
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10516
|
+
* @returns automatically synchronized promise through #recorder
|
|
10184
10517
|
*/
|
|
10185
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10518
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10186
10519
|
/**
|
|
10187
10520
|
* Waits for an element to hide (by default waits for 1sec).
|
|
10188
10521
|
* Element can be located by CSS or XPath.
|
|
@@ -10192,8 +10525,9 @@ declare namespace CodeceptJS {
|
|
|
10192
10525
|
* ```
|
|
10193
10526
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10194
10527
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10528
|
+
* @returns automatically synchronized promise through #recorder
|
|
10195
10529
|
*/
|
|
10196
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10530
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10197
10531
|
/**
|
|
10198
10532
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
10199
10533
|
* Element can be located by CSS or XPath.
|
|
@@ -10203,8 +10537,9 @@ declare namespace CodeceptJS {
|
|
|
10203
10537
|
* ```
|
|
10204
10538
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10205
10539
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10540
|
+
* @returns automatically synchronized promise through #recorder
|
|
10206
10541
|
*/
|
|
10207
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10542
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10208
10543
|
/**
|
|
10209
10544
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
10210
10545
|
* Running in browser context.
|
|
@@ -10221,8 +10556,9 @@ declare namespace CodeceptJS {
|
|
|
10221
10556
|
* @param fn - to be executed in browser context.
|
|
10222
10557
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
10223
10558
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10559
|
+
* @returns automatically synchronized promise through #recorder
|
|
10224
10560
|
*/
|
|
10225
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
10561
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
10226
10562
|
/**
|
|
10227
10563
|
* Waits for number of tabs.
|
|
10228
10564
|
*
|
|
@@ -10231,8 +10567,9 @@ declare namespace CodeceptJS {
|
|
|
10231
10567
|
* ```
|
|
10232
10568
|
* @param expectedTabs - expecting the number of tabs.
|
|
10233
10569
|
* @param sec - number of secs to wait.
|
|
10570
|
+
* @returns automatically synchronized promise through #recorder
|
|
10234
10571
|
*/
|
|
10235
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
10572
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
10236
10573
|
/**
|
|
10237
10574
|
* Switches frame or in case of null locator reverts to parent.
|
|
10238
10575
|
*
|
|
@@ -10241,8 +10578,9 @@ declare namespace CodeceptJS {
|
|
|
10241
10578
|
* I.switchTo(); // switch back to main page
|
|
10242
10579
|
* ```
|
|
10243
10580
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
10581
|
+
* @returns automatically synchronized promise through #recorder
|
|
10244
10582
|
*/
|
|
10245
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
10583
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
10246
10584
|
/**
|
|
10247
10585
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10248
10586
|
*
|
|
@@ -10252,8 +10590,9 @@ declare namespace CodeceptJS {
|
|
|
10252
10590
|
* ```
|
|
10253
10591
|
* @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
|
|
10254
10592
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10593
|
+
* @returns automatically synchronized promise through #recorder
|
|
10255
10594
|
*/
|
|
10256
|
-
switchToNextTab(num?: number, sec?: number | null):
|
|
10595
|
+
switchToNextTab(num?: number, sec?: number | null): CodeceptJS.StepPromise;
|
|
10257
10596
|
/**
|
|
10258
10597
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10259
10598
|
*
|
|
@@ -10263,24 +10602,27 @@ declare namespace CodeceptJS {
|
|
|
10263
10602
|
* ```
|
|
10264
10603
|
* @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
|
|
10265
10604
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10605
|
+
* @returns automatically synchronized promise through #recorder
|
|
10266
10606
|
*/
|
|
10267
|
-
switchToPreviousTab(num?: number, sec?: number):
|
|
10607
|
+
switchToPreviousTab(num?: number, sec?: number): CodeceptJS.StepPromise;
|
|
10268
10608
|
/**
|
|
10269
10609
|
* Close current tab.
|
|
10270
10610
|
*
|
|
10271
10611
|
* ```js
|
|
10272
10612
|
* I.closeCurrentTab();
|
|
10273
10613
|
* ```
|
|
10614
|
+
* @returns automatically synchronized promise through #recorder
|
|
10274
10615
|
*/
|
|
10275
|
-
closeCurrentTab():
|
|
10616
|
+
closeCurrentTab(): CodeceptJS.StepPromise;
|
|
10276
10617
|
/**
|
|
10277
10618
|
* Open new tab and switch to it.
|
|
10278
10619
|
*
|
|
10279
10620
|
* ```js
|
|
10280
10621
|
* I.openNewTab();
|
|
10281
10622
|
* ```
|
|
10623
|
+
* @returns automatically synchronized promise through #recorder
|
|
10282
10624
|
*/
|
|
10283
|
-
openNewTab():
|
|
10625
|
+
openNewTab(): CodeceptJS.StepPromise;
|
|
10284
10626
|
/**
|
|
10285
10627
|
* Grab number of open tabs.
|
|
10286
10628
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10297,24 +10639,27 @@ declare namespace CodeceptJS {
|
|
|
10297
10639
|
* ```js
|
|
10298
10640
|
* I.refreshPage();
|
|
10299
10641
|
* ```
|
|
10642
|
+
* @returns automatically synchronized promise through #recorder
|
|
10300
10643
|
*/
|
|
10301
|
-
refreshPage():
|
|
10644
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
10302
10645
|
/**
|
|
10303
10646
|
* Scroll page to the top.
|
|
10304
10647
|
*
|
|
10305
10648
|
* ```js
|
|
10306
10649
|
* I.scrollPageToTop();
|
|
10307
10650
|
* ```
|
|
10651
|
+
* @returns automatically synchronized promise through #recorder
|
|
10308
10652
|
*/
|
|
10309
|
-
scrollPageToTop():
|
|
10653
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
10310
10654
|
/**
|
|
10311
10655
|
* Scroll page to the bottom.
|
|
10312
10656
|
*
|
|
10313
10657
|
* ```js
|
|
10314
10658
|
* I.scrollPageToBottom();
|
|
10315
10659
|
* ```
|
|
10660
|
+
* @returns automatically synchronized promise through #recorder
|
|
10316
10661
|
*/
|
|
10317
|
-
scrollPageToBottom():
|
|
10662
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
10318
10663
|
/**
|
|
10319
10664
|
* Retrieves a page scroll position and returns it to test.
|
|
10320
10665
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|