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
package/typings/types.d.ts
CHANGED
|
@@ -782,7 +782,7 @@ declare namespace CodeceptJS {
|
|
|
782
782
|
*
|
|
783
783
|
* Appium: support both Android and iOS
|
|
784
784
|
*/
|
|
785
|
-
clearClipboard():
|
|
785
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
786
786
|
/**
|
|
787
787
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
788
788
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -818,7 +818,7 @@ declare namespace CodeceptJS {
|
|
|
818
818
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
819
819
|
* @returns automatically synchronized promise through #recorder
|
|
820
820
|
*/
|
|
821
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
821
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
822
822
|
/**
|
|
823
823
|
* Selects a checkbox or radio button.
|
|
824
824
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -834,7 +834,7 @@ declare namespace CodeceptJS {
|
|
|
834
834
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
835
835
|
* @returns automatically synchronized promise through #recorder
|
|
836
836
|
*/
|
|
837
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
837
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
838
838
|
/**
|
|
839
839
|
* Perform a click on a link or a button, given by a locator.
|
|
840
840
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -869,7 +869,7 @@ declare namespace CodeceptJS {
|
|
|
869
869
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
870
870
|
* @returns automatically synchronized promise through #recorder
|
|
871
871
|
*/
|
|
872
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
872
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
873
873
|
/**
|
|
874
874
|
* Verifies that the specified checkbox is not checked.
|
|
875
875
|
*
|
|
@@ -881,7 +881,7 @@ declare namespace CodeceptJS {
|
|
|
881
881
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
882
882
|
* @returns automatically synchronized promise through #recorder
|
|
883
883
|
*/
|
|
884
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
884
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
885
885
|
/**
|
|
886
886
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
887
887
|
*
|
|
@@ -895,7 +895,7 @@ declare namespace CodeceptJS {
|
|
|
895
895
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
896
896
|
* @returns automatically synchronized promise through #recorder
|
|
897
897
|
*/
|
|
898
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
898
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
899
899
|
/**
|
|
900
900
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
901
901
|
* Opposite to `seeInField`.
|
|
@@ -913,7 +913,7 @@ declare namespace CodeceptJS {
|
|
|
913
913
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
914
914
|
* @returns automatically synchronized promise through #recorder
|
|
915
915
|
*/
|
|
916
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
916
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
917
917
|
/**
|
|
918
918
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
919
919
|
* Use context parameter to narrow down the search.
|
|
@@ -926,7 +926,7 @@ declare namespace CodeceptJS {
|
|
|
926
926
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
927
927
|
* @returns automatically synchronized promise through #recorder
|
|
928
928
|
*/
|
|
929
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
929
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
930
930
|
/**
|
|
931
931
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
932
932
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -954,7 +954,7 @@ declare namespace CodeceptJS {
|
|
|
954
954
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
955
955
|
* @returns automatically synchronized promise through #recorder
|
|
956
956
|
*/
|
|
957
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
957
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
958
958
|
/**
|
|
959
959
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
960
960
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1049,7 +1049,7 @@ declare namespace CodeceptJS {
|
|
|
1049
1049
|
* ```
|
|
1050
1050
|
* @param fileName - file name to save.
|
|
1051
1051
|
*/
|
|
1052
|
-
saveScreenshot(fileName: string):
|
|
1052
|
+
saveScreenshot(fileName: string): CodeceptJS.StepPromise;
|
|
1053
1053
|
/**
|
|
1054
1054
|
* Scroll element into viewport.
|
|
1055
1055
|
*
|
|
@@ -1065,7 +1065,7 @@ declare namespace CodeceptJS {
|
|
|
1065
1065
|
*
|
|
1066
1066
|
* Supported only for web testing
|
|
1067
1067
|
*/
|
|
1068
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean):
|
|
1068
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): CodeceptJS.StepPromise;
|
|
1069
1069
|
/**
|
|
1070
1070
|
* Verifies that the specified checkbox is checked.
|
|
1071
1071
|
*
|
|
@@ -1077,7 +1077,7 @@ declare namespace CodeceptJS {
|
|
|
1077
1077
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1078
1078
|
* @returns automatically synchronized promise through #recorder
|
|
1079
1079
|
*/
|
|
1080
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1080
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1081
1081
|
/**
|
|
1082
1082
|
* Checks that a given Element is visible
|
|
1083
1083
|
* Element is located by CSS or XPath.
|
|
@@ -1096,7 +1096,7 @@ declare namespace CodeceptJS {
|
|
|
1096
1096
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1097
1097
|
* @returns automatically synchronized promise through #recorder
|
|
1098
1098
|
*/
|
|
1099
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1099
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1100
1100
|
/**
|
|
1101
1101
|
* Checks that the given input field or textarea equals to given value.
|
|
1102
1102
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -1116,7 +1116,7 @@ declare namespace CodeceptJS {
|
|
|
1116
1116
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1117
1117
|
* @returns automatically synchronized promise through #recorder
|
|
1118
1118
|
*/
|
|
1119
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
1119
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1120
1120
|
/**
|
|
1121
1121
|
* Checks that a page contains a visible text.
|
|
1122
1122
|
* Use context parameter to narrow down the search.
|
|
@@ -1130,7 +1130,7 @@ declare namespace CodeceptJS {
|
|
|
1130
1130
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1131
1131
|
* @returns automatically synchronized promise through #recorder
|
|
1132
1132
|
*/
|
|
1133
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1133
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1134
1134
|
/**
|
|
1135
1135
|
* Selects an option in a drop-down select.
|
|
1136
1136
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -1162,7 +1162,7 @@ declare namespace CodeceptJS {
|
|
|
1162
1162
|
*
|
|
1163
1163
|
* Supported only for web testing
|
|
1164
1164
|
*/
|
|
1165
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
1165
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1166
1166
|
/**
|
|
1167
1167
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
1168
1168
|
* Element can be located by CSS or XPath.
|
|
@@ -1175,7 +1175,7 @@ declare namespace CodeceptJS {
|
|
|
1175
1175
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1176
1176
|
* @returns automatically synchronized promise through #recorder
|
|
1177
1177
|
*/
|
|
1178
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1178
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
1181
1181
|
* Element can be located by CSS or XPath.
|
|
@@ -1187,7 +1187,7 @@ declare namespace CodeceptJS {
|
|
|
1187
1187
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1188
1188
|
* @returns automatically synchronized promise through #recorder
|
|
1189
1189
|
*/
|
|
1190
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1190
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
1193
1193
|
* Element can be located by CSS or XPath.
|
|
@@ -1199,7 +1199,7 @@ declare namespace CodeceptJS {
|
|
|
1199
1199
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1200
1200
|
* @returns automatically synchronized promise through #recorder
|
|
1201
1201
|
*/
|
|
1202
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1202
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1203
1203
|
/**
|
|
1204
1204
|
* Waits for a text to appear (by default waits for 1sec).
|
|
1205
1205
|
* Element can be located by CSS or XPath.
|
|
@@ -1214,7 +1214,7 @@ declare namespace CodeceptJS {
|
|
|
1214
1214
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1215
1215
|
* @returns automatically synchronized promise through #recorder
|
|
1216
1216
|
*/
|
|
1217
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
1217
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1218
1218
|
}
|
|
1219
1219
|
/**
|
|
1220
1220
|
* ## Configuration
|
|
@@ -1367,7 +1367,7 @@ declare namespace CodeceptJS {
|
|
|
1367
1367
|
* @param url - url path or global url.
|
|
1368
1368
|
* @returns automatically synchronized promise through #recorder
|
|
1369
1369
|
*/
|
|
1370
|
-
amOnPage(url: string):
|
|
1370
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Reload the current page.
|
|
1373
1373
|
*
|
|
@@ -1376,7 +1376,7 @@ declare namespace CodeceptJS {
|
|
|
1376
1376
|
* ```
|
|
1377
1377
|
* @returns automatically synchronized promise through #recorder
|
|
1378
1378
|
*/
|
|
1379
|
-
refreshPage():
|
|
1379
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
1380
1380
|
/**
|
|
1381
1381
|
* Executes sync script on a page.
|
|
1382
1382
|
* Pass arguments to function as additional parameters.
|
|
@@ -1461,7 +1461,7 @@ declare namespace CodeceptJS {
|
|
|
1461
1461
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1462
1462
|
* @returns automatically synchronized promise through #recorder
|
|
1463
1463
|
*/
|
|
1464
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1464
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1465
1465
|
/**
|
|
1466
1466
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
1467
1467
|
* Use context parameter to narrow down the search.
|
|
@@ -1474,7 +1474,7 @@ declare namespace CodeceptJS {
|
|
|
1474
1474
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1475
1475
|
* @returns automatically synchronized promise through #recorder
|
|
1476
1476
|
*/
|
|
1477
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
1477
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1478
1478
|
/**
|
|
1479
1479
|
* Checks that the current page contains the given string in its raw source code.
|
|
1480
1480
|
*
|
|
@@ -1484,7 +1484,7 @@ declare namespace CodeceptJS {
|
|
|
1484
1484
|
* @param text - value to check.
|
|
1485
1485
|
* @returns automatically synchronized promise through #recorder
|
|
1486
1486
|
*/
|
|
1487
|
-
seeInSource(text: string):
|
|
1487
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
1488
1488
|
/**
|
|
1489
1489
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
1490
1490
|
*
|
|
@@ -1494,7 +1494,7 @@ declare namespace CodeceptJS {
|
|
|
1494
1494
|
* @param value - to check.
|
|
1495
1495
|
* @returns automatically synchronized promise through #recorder
|
|
1496
1496
|
*/
|
|
1497
|
-
dontSeeInSource(value: string):
|
|
1497
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
1498
1498
|
/**
|
|
1499
1499
|
* Checks that current url contains a provided fragment.
|
|
1500
1500
|
*
|
|
@@ -1504,13 +1504,13 @@ declare namespace CodeceptJS {
|
|
|
1504
1504
|
* @param url - a fragment to check
|
|
1505
1505
|
* @returns automatically synchronized promise through #recorder
|
|
1506
1506
|
*/
|
|
1507
|
-
seeInCurrentUrl(url: string):
|
|
1507
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
1508
1508
|
/**
|
|
1509
1509
|
* Checks that current url does not contain a provided fragment.
|
|
1510
1510
|
* @param url - value to check.
|
|
1511
1511
|
* @returns automatically synchronized promise through #recorder
|
|
1512
1512
|
*/
|
|
1513
|
-
dontSeeInCurrentUrl(url: string):
|
|
1513
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
1514
1514
|
/**
|
|
1515
1515
|
* Checks that title contains text.
|
|
1516
1516
|
*
|
|
@@ -1520,7 +1520,7 @@ declare namespace CodeceptJS {
|
|
|
1520
1520
|
* @param text - text value to check.
|
|
1521
1521
|
* @returns automatically synchronized promise through #recorder
|
|
1522
1522
|
*/
|
|
1523
|
-
seeInTitle(text: string):
|
|
1523
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
1524
1524
|
/**
|
|
1525
1525
|
* Checks that a given Element is present in the DOM
|
|
1526
1526
|
* Element is located by CSS or XPath.
|
|
@@ -1531,7 +1531,7 @@ declare namespace CodeceptJS {
|
|
|
1531
1531
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1532
1532
|
* @returns automatically synchronized promise through #recorder
|
|
1533
1533
|
*/
|
|
1534
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
1534
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1535
1535
|
/**
|
|
1536
1536
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
1537
1537
|
*
|
|
@@ -1541,7 +1541,7 @@ declare namespace CodeceptJS {
|
|
|
1541
1541
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1542
1542
|
* @returns automatically synchronized promise through #recorder
|
|
1543
1543
|
*/
|
|
1544
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
1544
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1545
1545
|
/**
|
|
1546
1546
|
* Checks that a given Element is visible
|
|
1547
1547
|
* Element is located by CSS or XPath.
|
|
@@ -1560,7 +1560,7 @@ declare namespace CodeceptJS {
|
|
|
1560
1560
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1561
1561
|
* @returns automatically synchronized promise through #recorder
|
|
1562
1562
|
*/
|
|
1563
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1563
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1564
1564
|
/**
|
|
1565
1565
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
1566
1566
|
*
|
|
@@ -1574,7 +1574,7 @@ declare namespace CodeceptJS {
|
|
|
1574
1574
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1575
1575
|
* @returns automatically synchronized promise through #recorder
|
|
1576
1576
|
*/
|
|
1577
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1577
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1578
1578
|
/**
|
|
1579
1579
|
* Verifies that the specified checkbox is checked.
|
|
1580
1580
|
*
|
|
@@ -1586,7 +1586,7 @@ declare namespace CodeceptJS {
|
|
|
1586
1586
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1587
1587
|
* @returns automatically synchronized promise through #recorder
|
|
1588
1588
|
*/
|
|
1589
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1589
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1590
1590
|
/**
|
|
1591
1591
|
* Verifies that the specified checkbox is not checked.
|
|
1592
1592
|
*
|
|
@@ -1598,7 +1598,7 @@ declare namespace CodeceptJS {
|
|
|
1598
1598
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1599
1599
|
* @returns automatically synchronized promise through #recorder
|
|
1600
1600
|
*/
|
|
1601
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
1601
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1602
1602
|
/**
|
|
1603
1603
|
* Retrieves a text from an element located by CSS or XPath and returns it to test.
|
|
1604
1604
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1630,9 +1630,9 @@ declare namespace CodeceptJS {
|
|
|
1630
1630
|
* const webElements = await I.grabWebElements('#button');
|
|
1631
1631
|
* ```
|
|
1632
1632
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1633
|
-
* @returns
|
|
1633
|
+
* @returns WebElements of being used Web helper
|
|
1634
1634
|
*/
|
|
1635
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1635
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
1636
1636
|
/**
|
|
1637
1637
|
* Grab WebElement for given locator
|
|
1638
1638
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -1643,7 +1643,7 @@ declare namespace CodeceptJS {
|
|
|
1643
1643
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1644
1644
|
* @returns WebElement of being used Web helper
|
|
1645
1645
|
*/
|
|
1646
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1646
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
1647
1647
|
/**
|
|
1648
1648
|
* Retrieves a value from a form element located by CSS or XPath and returns it to test.
|
|
1649
1649
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -1737,7 +1737,7 @@ declare namespace CodeceptJS {
|
|
|
1737
1737
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1738
1738
|
* @returns automatically synchronized promise through #recorder
|
|
1739
1739
|
*/
|
|
1740
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
1740
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
1741
1741
|
/**
|
|
1742
1742
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
1743
1743
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -1767,7 +1767,7 @@ declare namespace CodeceptJS {
|
|
|
1767
1767
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1768
1768
|
* @returns automatically synchronized promise through #recorder
|
|
1769
1769
|
*/
|
|
1770
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1770
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1771
1771
|
/**
|
|
1772
1772
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
1773
1773
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -1795,7 +1795,7 @@ declare namespace CodeceptJS {
|
|
|
1795
1795
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1796
1796
|
* @returns automatically synchronized promise through #recorder
|
|
1797
1797
|
*/
|
|
1798
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
1798
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Appends text to a input field or textarea.
|
|
1801
1801
|
* Field is located by name, label, CSS or XPath
|
|
@@ -1814,7 +1814,7 @@ declare namespace CodeceptJS {
|
|
|
1814
1814
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1815
1815
|
* @returns automatically synchronized promise through #recorder
|
|
1816
1816
|
*/
|
|
1817
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
1817
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1818
1818
|
/**
|
|
1819
1819
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
1820
1820
|
*
|
|
@@ -1831,7 +1831,7 @@ declare namespace CodeceptJS {
|
|
|
1831
1831
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1832
1832
|
* @returns automatically synchronized promise through #recorder.
|
|
1833
1833
|
*/
|
|
1834
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1834
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1835
1835
|
/**
|
|
1836
1836
|
* Selects an option in a drop-down select.
|
|
1837
1837
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -1860,7 +1860,7 @@ declare namespace CodeceptJS {
|
|
|
1860
1860
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1861
1861
|
* @returns automatically synchronized promise through #recorder
|
|
1862
1862
|
*/
|
|
1863
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
1863
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1864
1864
|
/**
|
|
1865
1865
|
* Selects a checkbox or radio button.
|
|
1866
1866
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -1876,7 +1876,7 @@ declare namespace CodeceptJS {
|
|
|
1876
1876
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1877
1877
|
* @returns automatically synchronized promise through #recorder
|
|
1878
1878
|
*/
|
|
1879
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1879
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1880
1880
|
/**
|
|
1881
1881
|
* Unselects a checkbox or radio button.
|
|
1882
1882
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -1892,7 +1892,7 @@ declare namespace CodeceptJS {
|
|
|
1892
1892
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1893
1893
|
* @returns automatically synchronized promise through #recorder
|
|
1894
1894
|
*/
|
|
1895
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
1895
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1896
1896
|
/**
|
|
1897
1897
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
1898
1898
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -1918,7 +1918,7 @@ declare namespace CodeceptJS {
|
|
|
1918
1918
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1919
1919
|
* @returns automatically synchronized promise through #recorder
|
|
1920
1920
|
*/
|
|
1921
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
1921
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
1922
1922
|
/**
|
|
1923
1923
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
1924
1924
|
* Element can be located by CSS or XPath.
|
|
@@ -1931,7 +1931,7 @@ declare namespace CodeceptJS {
|
|
|
1931
1931
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1932
1932
|
* @returns automatically synchronized promise through #recorder
|
|
1933
1933
|
*/
|
|
1934
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
1934
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
1935
1935
|
/**
|
|
1936
1936
|
* Waits for a text to appear (by default waits for 1sec).
|
|
1937
1937
|
* Element can be located by CSS or XPath.
|
|
@@ -1946,7 +1946,7 @@ declare namespace CodeceptJS {
|
|
|
1946
1946
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1947
1947
|
* @returns automatically synchronized promise through #recorder
|
|
1948
1948
|
*/
|
|
1949
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
1949
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
1950
1950
|
/**
|
|
1951
1951
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
1952
1952
|
*
|
|
@@ -1957,7 +1957,7 @@ declare namespace CodeceptJS {
|
|
|
1957
1957
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1958
1958
|
* @returns automatically synchronized promise through #recorder
|
|
1959
1959
|
*/
|
|
1960
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
1960
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
1961
1961
|
/**
|
|
1962
1962
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
1963
1963
|
* Running in browser context.
|
|
@@ -1976,7 +1976,7 @@ declare namespace CodeceptJS {
|
|
|
1976
1976
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1977
1977
|
* @returns automatically synchronized promise through #recorder
|
|
1978
1978
|
*/
|
|
1979
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
1979
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
1980
1980
|
/**
|
|
1981
1981
|
* Sets cookie(s).
|
|
1982
1982
|
*
|
|
@@ -1994,7 +1994,7 @@ declare namespace CodeceptJS {
|
|
|
1994
1994
|
* @param cookie - a cookie object or array of cookie objects.
|
|
1995
1995
|
* @returns automatically synchronized promise through #recorder
|
|
1996
1996
|
*/
|
|
1997
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
1997
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
1998
1998
|
/**
|
|
1999
1999
|
* Retrieves all cookies visible to the current page.
|
|
2000
2000
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2042,7 +2042,7 @@ declare namespace CodeceptJS {
|
|
|
2042
2042
|
* @param text - value to check.
|
|
2043
2043
|
* @returns automatically synchronized promise through #recorder
|
|
2044
2044
|
*/
|
|
2045
|
-
seeInClipboard(text: string):
|
|
2045
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Checks that the system clipboard is equal to the given text.
|
|
2048
2048
|
*
|
|
@@ -2056,7 +2056,7 @@ declare namespace CodeceptJS {
|
|
|
2056
2056
|
* @param text - value to check.
|
|
2057
2057
|
* @returns automatically synchronized promise through #recorder
|
|
2058
2058
|
*/
|
|
2059
|
-
seeClipboardEquals(text: string):
|
|
2059
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
2060
2060
|
/**
|
|
2061
2061
|
* Clears the system clipboard.
|
|
2062
2062
|
*
|
|
@@ -2066,7 +2066,7 @@ declare namespace CodeceptJS {
|
|
|
2066
2066
|
* ```
|
|
2067
2067
|
* @returns automatically synchronized promise through #recorder
|
|
2068
2068
|
*/
|
|
2069
|
-
clearClipboard():
|
|
2069
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
2070
2070
|
/**
|
|
2071
2071
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
2072
2072
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2103,7 +2103,7 @@ declare namespace CodeceptJS {
|
|
|
2103
2103
|
* @param fileName - file name to save.
|
|
2104
2104
|
* @returns automatically synchronized promise through #recorder
|
|
2105
2105
|
*/
|
|
2106
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
2106
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
2107
2107
|
/**
|
|
2108
2108
|
* Pauses execution for a number of seconds.
|
|
2109
2109
|
*
|
|
@@ -2113,7 +2113,7 @@ declare namespace CodeceptJS {
|
|
|
2113
2113
|
* @param sec - number of second to wait.
|
|
2114
2114
|
* @returns automatically synchronized promise through #recorder
|
|
2115
2115
|
*/
|
|
2116
|
-
wait(sec: number):
|
|
2116
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
2117
2117
|
/**
|
|
2118
2118
|
* Checks that title does not contain text.
|
|
2119
2119
|
*
|
|
@@ -2123,7 +2123,7 @@ declare namespace CodeceptJS {
|
|
|
2123
2123
|
* @param text - value to check.
|
|
2124
2124
|
* @returns automatically synchronized promise through #recorder
|
|
2125
2125
|
*/
|
|
2126
|
-
dontSeeInTitle(text: string):
|
|
2126
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
2127
2127
|
/**
|
|
2128
2128
|
* Checks that current url is equal to provided one.
|
|
2129
2129
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -2136,7 +2136,7 @@ declare namespace CodeceptJS {
|
|
|
2136
2136
|
* @param url - value to check.
|
|
2137
2137
|
* @returns automatically synchronized promise through #recorder
|
|
2138
2138
|
*/
|
|
2139
|
-
seeCurrentUrlEquals(url: string):
|
|
2139
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
2140
2140
|
/**
|
|
2141
2141
|
* Checks that current url is not equal to provided one.
|
|
2142
2142
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -2148,7 +2148,7 @@ declare namespace CodeceptJS {
|
|
|
2148
2148
|
* @param url - value to check.
|
|
2149
2149
|
* @returns automatically synchronized promise through #recorder
|
|
2150
2150
|
*/
|
|
2151
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
2151
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
2152
2152
|
/**
|
|
2153
2153
|
* Checks that current URL path matches the expected path.
|
|
2154
2154
|
* Query strings and URL fragments are ignored.
|
|
@@ -2160,7 +2160,7 @@ declare namespace CodeceptJS {
|
|
|
2160
2160
|
* @param path - value to check.
|
|
2161
2161
|
* @returns automatically synchronized promise through #recorder
|
|
2162
2162
|
*/
|
|
2163
|
-
seeCurrentPathEquals(path: string):
|
|
2163
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
2164
2164
|
/**
|
|
2165
2165
|
* Checks that current URL path does NOT match the expected path.
|
|
2166
2166
|
* Query strings and URL fragments are ignored.
|
|
@@ -2172,7 +2172,7 @@ declare namespace CodeceptJS {
|
|
|
2172
2172
|
* @param path - value to check.
|
|
2173
2173
|
* @returns automatically synchronized promise through #recorder
|
|
2174
2174
|
*/
|
|
2175
|
-
dontSeeCurrentPathEquals(path: string):
|
|
2175
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
2176
2176
|
/**
|
|
2177
2177
|
* Waits for the entire URL to match the expected
|
|
2178
2178
|
*
|
|
@@ -2184,7 +2184,7 @@ declare namespace CodeceptJS {
|
|
|
2184
2184
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2185
2185
|
* @returns automatically synchronized promise through #recorder
|
|
2186
2186
|
*/
|
|
2187
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
2187
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
2188
2188
|
/**
|
|
2189
2189
|
* Waits for the current URL path to match the expected path.
|
|
2190
2190
|
* Query strings and URL fragments are ignored.
|
|
@@ -2216,7 +2216,7 @@ declare namespace CodeceptJS {
|
|
|
2216
2216
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2217
2217
|
* @returns automatically synchronized promise through #recorder
|
|
2218
2218
|
*/
|
|
2219
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
2219
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
2220
2220
|
/**
|
|
2221
2221
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
2222
2222
|
* Opposite to `seeInField`.
|
|
@@ -2234,7 +2234,7 @@ declare namespace CodeceptJS {
|
|
|
2234
2234
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2235
2235
|
* @returns automatically synchronized promise through #recorder
|
|
2236
2236
|
*/
|
|
2237
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
2237
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
2238
2238
|
/**
|
|
2239
2239
|
* Grab number of visible elements by locator.
|
|
2240
2240
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2257,7 +2257,7 @@ declare namespace CodeceptJS {
|
|
|
2257
2257
|
* @param num - number of elements.
|
|
2258
2258
|
* @returns automatically synchronized promise through #recorder
|
|
2259
2259
|
*/
|
|
2260
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
2260
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
2261
2261
|
/**
|
|
2262
2262
|
* Retrieves a page scroll position and returns it to test.
|
|
2263
2263
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -2276,7 +2276,7 @@ declare namespace CodeceptJS {
|
|
|
2276
2276
|
* ```
|
|
2277
2277
|
* @returns automatically synchronized promise through #recorder
|
|
2278
2278
|
*/
|
|
2279
|
-
scrollPageToTop():
|
|
2279
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
2280
2280
|
/**
|
|
2281
2281
|
* Scroll page to the bottom.
|
|
2282
2282
|
*
|
|
@@ -2285,7 +2285,7 @@ declare namespace CodeceptJS {
|
|
|
2285
2285
|
* ```
|
|
2286
2286
|
* @returns automatically synchronized promise through #recorder
|
|
2287
2287
|
*/
|
|
2288
|
-
scrollPageToBottom():
|
|
2288
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
2289
2289
|
/**
|
|
2290
2290
|
* Scrolls to element matched by locator.
|
|
2291
2291
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -2299,7 +2299,7 @@ declare namespace CodeceptJS {
|
|
|
2299
2299
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2300
2300
|
* @returns automatically synchronized promise through #recorder
|
|
2301
2301
|
*/
|
|
2302
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
2302
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
2303
2303
|
/**
|
|
2304
2304
|
* Grab CSS property for given locator
|
|
2305
2305
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -2335,7 +2335,7 @@ declare namespace CodeceptJS {
|
|
|
2335
2335
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
2336
2336
|
* @returns automatically synchronized promise through #recorder
|
|
2337
2337
|
*/
|
|
2338
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
2338
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
2339
2339
|
/**
|
|
2340
2340
|
* Checks that all elements with given locator have given attributes.
|
|
2341
2341
|
*
|
|
@@ -2346,7 +2346,7 @@ declare namespace CodeceptJS {
|
|
|
2346
2346
|
* @param attributes - attributes and their values to check.
|
|
2347
2347
|
* @returns automatically synchronized promise through #recorder
|
|
2348
2348
|
*/
|
|
2349
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
2349
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
2350
2350
|
/**
|
|
2351
2351
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
2352
2352
|
*
|
|
@@ -2361,7 +2361,7 @@ declare namespace CodeceptJS {
|
|
|
2361
2361
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
2362
2362
|
* @returns automatically synchronized promise through #recorder
|
|
2363
2363
|
*/
|
|
2364
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
2364
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
2365
2365
|
/**
|
|
2366
2366
|
* Remove focus from a text input, button, etc.
|
|
2367
2367
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -2381,7 +2381,7 @@ declare namespace CodeceptJS {
|
|
|
2381
2381
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
2382
2382
|
* @returns automatically synchronized promise through #recorder
|
|
2383
2383
|
*/
|
|
2384
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
2384
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
2385
2385
|
/**
|
|
2386
2386
|
* Types out the given text into an active field.
|
|
2387
2387
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -2404,7 +2404,7 @@ declare namespace CodeceptJS {
|
|
|
2404
2404
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
2405
2405
|
* @returns automatically synchronized promise through #recorder
|
|
2406
2406
|
*/
|
|
2407
|
-
type(key: string | string[], delay?: number):
|
|
2407
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
2408
2408
|
/**
|
|
2409
2409
|
* Presses a key or a key combination on the focused element.
|
|
2410
2410
|
*
|
|
@@ -2423,7 +2423,7 @@ declare namespace CodeceptJS {
|
|
|
2423
2423
|
* @param height - height in pixels.
|
|
2424
2424
|
* @returns automatically synchronized promise through #recorder
|
|
2425
2425
|
*/
|
|
2426
|
-
resizeWindow(width: number, height: number):
|
|
2426
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
2427
2427
|
/**
|
|
2428
2428
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
2429
2429
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -2438,7 +2438,7 @@ declare namespace CodeceptJS {
|
|
|
2438
2438
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
2439
2439
|
* @returns automatically synchronized promise through #recorder
|
|
2440
2440
|
*/
|
|
2441
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
2441
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
2442
2442
|
/**
|
|
2443
2443
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
2444
2444
|
*
|
|
@@ -2454,7 +2454,7 @@ declare namespace CodeceptJS {
|
|
|
2454
2454
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
2455
2455
|
* @returns automatically synchronized promise through #recorder
|
|
2456
2456
|
*/
|
|
2457
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
2457
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
2458
2458
|
/**
|
|
2459
2459
|
* Clicks at page coordinates, or at coordinates relative to an element.
|
|
2460
2460
|
* Requires a browser that renders layout.
|
|
@@ -2480,7 +2480,7 @@ declare namespace CodeceptJS {
|
|
|
2480
2480
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2481
2481
|
* @returns automatically synchronized promise through #recorder
|
|
2482
2482
|
*/
|
|
2483
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2483
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2484
2484
|
/**
|
|
2485
2485
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
2486
2486
|
* Element can be located by CSS or XPath.
|
|
@@ -2492,7 +2492,7 @@ declare namespace CodeceptJS {
|
|
|
2492
2492
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2493
2493
|
* @returns automatically synchronized promise through #recorder
|
|
2494
2494
|
*/
|
|
2495
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2495
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2496
2496
|
/**
|
|
2497
2497
|
* Waits for an element to hide (by default waits for 1sec).
|
|
2498
2498
|
* Element can be located by CSS or XPath.
|
|
@@ -2504,7 +2504,7 @@ declare namespace CodeceptJS {
|
|
|
2504
2504
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2505
2505
|
* @returns automatically synchronized promise through #recorder
|
|
2506
2506
|
*/
|
|
2507
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2507
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2508
2508
|
/**
|
|
2509
2509
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
2510
2510
|
* Element can be located by CSS or XPath.
|
|
@@ -2516,7 +2516,7 @@ declare namespace CodeceptJS {
|
|
|
2516
2516
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2517
2517
|
* @returns automatically synchronized promise through #recorder
|
|
2518
2518
|
*/
|
|
2519
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
2519
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
2520
2520
|
/**
|
|
2521
2521
|
* Checks that cookie with given name exists.
|
|
2522
2522
|
*
|
|
@@ -2526,7 +2526,7 @@ declare namespace CodeceptJS {
|
|
|
2526
2526
|
* @param name - cookie name.
|
|
2527
2527
|
* @returns automatically synchronized promise through #recorder
|
|
2528
2528
|
*/
|
|
2529
|
-
seeCookie(name: string):
|
|
2529
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
2530
2530
|
/**
|
|
2531
2531
|
* Checks that cookie with given name does not exist.
|
|
2532
2532
|
*
|
|
@@ -2536,7 +2536,7 @@ declare namespace CodeceptJS {
|
|
|
2536
2536
|
* @param name - cookie name.
|
|
2537
2537
|
* @returns automatically synchronized promise through #recorder
|
|
2538
2538
|
*/
|
|
2539
|
-
dontSeeCookie(name: string):
|
|
2539
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
2540
2540
|
/**
|
|
2541
2541
|
* Waits for the specified cookie in the cookies.
|
|
2542
2542
|
*
|
|
@@ -2547,7 +2547,7 @@ declare namespace CodeceptJS {
|
|
|
2547
2547
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
2548
2548
|
* @returns automatically synchronized promise through #recorder
|
|
2549
2549
|
*/
|
|
2550
|
-
waitForCookie(name: string, sec?: number):
|
|
2550
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
2551
2551
|
/**
|
|
2552
2552
|
* Retrieves the innerHTML from an element located by CSS or XPath and returns it to test.
|
|
2553
2553
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2606,7 +2606,7 @@ declare namespace CodeceptJS {
|
|
|
2606
2606
|
* ```
|
|
2607
2607
|
* @returns automatically synchronized promise through #recorder
|
|
2608
2608
|
*/
|
|
2609
|
-
startRecordingTraffic():
|
|
2609
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
2610
2610
|
/**
|
|
2611
2611
|
* Grab the recording network traffics
|
|
2612
2612
|
*
|
|
@@ -4206,7 +4206,7 @@ declare namespace CodeceptJS {
|
|
|
4206
4206
|
* @param text - value to check.
|
|
4207
4207
|
* @returns automatically synchronized promise through #recorder
|
|
4208
4208
|
*/
|
|
4209
|
-
seeInPopup(text: string):
|
|
4209
|
+
seeInPopup(text: string): CodeceptJS.StepPromise;
|
|
4210
4210
|
/**
|
|
4211
4211
|
* Set current page
|
|
4212
4212
|
* @param page - page to set
|
|
@@ -4246,7 +4246,7 @@ declare namespace CodeceptJS {
|
|
|
4246
4246
|
* @param url - url path or global url.
|
|
4247
4247
|
* @returns automatically synchronized promise through #recorder
|
|
4248
4248
|
*/
|
|
4249
|
-
amOnPage(url: string):
|
|
4249
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
4250
4250
|
/**
|
|
4251
4251
|
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
4252
4252
|
* Playwright does not control the window of a browser, so it can't adjust its real size.
|
|
@@ -4266,7 +4266,7 @@ declare namespace CodeceptJS {
|
|
|
4266
4266
|
* @param height - height in pixels.
|
|
4267
4267
|
* @returns automatically synchronized promise through #recorder
|
|
4268
4268
|
*/
|
|
4269
|
-
resizeWindow(width: number, height: number):
|
|
4269
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
4270
4270
|
/**
|
|
4271
4271
|
* Set headers for all next requests
|
|
4272
4272
|
*
|
|
@@ -4295,7 +4295,7 @@ declare namespace CodeceptJS {
|
|
|
4295
4295
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4296
4296
|
* @returns automatically synchronized promise through #recorder
|
|
4297
4297
|
*/
|
|
4298
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
4298
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
4299
4299
|
/**
|
|
4300
4300
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
4301
4301
|
*
|
|
@@ -4310,7 +4310,7 @@ declare namespace CodeceptJS {
|
|
|
4310
4310
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
4311
4311
|
* @returns automatically synchronized promise through #recorder
|
|
4312
4312
|
*/
|
|
4313
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
4313
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4314
4314
|
/**
|
|
4315
4315
|
* Remove focus from a text input, button, etc.
|
|
4316
4316
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -4330,7 +4330,7 @@ declare namespace CodeceptJS {
|
|
|
4330
4330
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
4331
4331
|
* @returns automatically synchronized promise through #recorder
|
|
4332
4332
|
*/
|
|
4333
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
4333
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4334
4334
|
/**
|
|
4335
4335
|
* Return the checked status of given element.
|
|
4336
4336
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
@@ -4361,7 +4361,7 @@ declare namespace CodeceptJS {
|
|
|
4361
4361
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
4362
4362
|
* @returns automatically synchronized promise through #recorder
|
|
4363
4363
|
*/
|
|
4364
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any):
|
|
4364
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
4365
4365
|
/**
|
|
4366
4366
|
* Reload the current page.
|
|
4367
4367
|
*
|
|
@@ -4370,7 +4370,7 @@ declare namespace CodeceptJS {
|
|
|
4370
4370
|
* ```
|
|
4371
4371
|
* @returns automatically synchronized promise through #recorder
|
|
4372
4372
|
*/
|
|
4373
|
-
refreshPage():
|
|
4373
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
4374
4374
|
/**
|
|
4375
4375
|
* Replaying from HAR
|
|
4376
4376
|
*
|
|
@@ -4395,7 +4395,7 @@ declare namespace CodeceptJS {
|
|
|
4395
4395
|
* ```
|
|
4396
4396
|
* @returns automatically synchronized promise through #recorder
|
|
4397
4397
|
*/
|
|
4398
|
-
scrollPageToTop():
|
|
4398
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
4399
4399
|
/**
|
|
4400
4400
|
* Scroll page to the bottom.
|
|
4401
4401
|
*
|
|
@@ -4404,7 +4404,7 @@ declare namespace CodeceptJS {
|
|
|
4404
4404
|
* ```
|
|
4405
4405
|
* @returns automatically synchronized promise through #recorder
|
|
4406
4406
|
*/
|
|
4407
|
-
scrollPageToBottom():
|
|
4407
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
4408
4408
|
/**
|
|
4409
4409
|
* Scrolls to element matched by locator.
|
|
4410
4410
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -4418,7 +4418,7 @@ declare namespace CodeceptJS {
|
|
|
4418
4418
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4419
4419
|
* @returns automatically synchronized promise through #recorder
|
|
4420
4420
|
*/
|
|
4421
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
4421
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
4422
4422
|
/**
|
|
4423
4423
|
* Checks that title contains text.
|
|
4424
4424
|
*
|
|
@@ -4428,7 +4428,7 @@ declare namespace CodeceptJS {
|
|
|
4428
4428
|
* @param text - text value to check.
|
|
4429
4429
|
* @returns automatically synchronized promise through #recorder
|
|
4430
4430
|
*/
|
|
4431
|
-
seeInTitle(text: string):
|
|
4431
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
4432
4432
|
/**
|
|
4433
4433
|
* Retrieves a page scroll position and returns it to test.
|
|
4434
4434
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -4448,7 +4448,7 @@ declare namespace CodeceptJS {
|
|
|
4448
4448
|
* @param text - value to check.
|
|
4449
4449
|
* @returns automatically synchronized promise through #recorder
|
|
4450
4450
|
*/
|
|
4451
|
-
seeTitleEquals(text: string):
|
|
4451
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
4452
4452
|
/**
|
|
4453
4453
|
* Checks that title does not contain text.
|
|
4454
4454
|
*
|
|
@@ -4458,7 +4458,7 @@ declare namespace CodeceptJS {
|
|
|
4458
4458
|
* @param text - value to check.
|
|
4459
4459
|
* @returns automatically synchronized promise through #recorder
|
|
4460
4460
|
*/
|
|
4461
|
-
dontSeeInTitle(text: string):
|
|
4461
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
4462
4462
|
/**
|
|
4463
4463
|
* Retrieves a page title and returns it to test.
|
|
4464
4464
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -4520,9 +4520,9 @@ declare namespace CodeceptJS {
|
|
|
4520
4520
|
* const webElements = await I.grabWebElements('#button');
|
|
4521
4521
|
* ```
|
|
4522
4522
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4523
|
-
* @returns
|
|
4523
|
+
* @returns WebElements of being used Web helper
|
|
4524
4524
|
*/
|
|
4525
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
4525
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
4526
4526
|
/**
|
|
4527
4527
|
* Grab WebElement for given locator
|
|
4528
4528
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -4533,7 +4533,7 @@ declare namespace CodeceptJS {
|
|
|
4533
4533
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4534
4534
|
* @returns WebElement of being used Web helper
|
|
4535
4535
|
*/
|
|
4536
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
4536
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
4537
4537
|
/**
|
|
4538
4538
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
4539
4539
|
*
|
|
@@ -4611,7 +4611,7 @@ declare namespace CodeceptJS {
|
|
|
4611
4611
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4612
4612
|
* @returns automatically synchronized promise through #recorder
|
|
4613
4613
|
*/
|
|
4614
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4614
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4615
4615
|
/**
|
|
4616
4616
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
4617
4617
|
*
|
|
@@ -4625,7 +4625,7 @@ declare namespace CodeceptJS {
|
|
|
4625
4625
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4626
4626
|
* @returns automatically synchronized promise through #recorder
|
|
4627
4627
|
*/
|
|
4628
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4628
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4629
4629
|
/**
|
|
4630
4630
|
* Checks that a given Element is present in the DOM
|
|
4631
4631
|
* Element is located by CSS or XPath.
|
|
@@ -4636,7 +4636,7 @@ declare namespace CodeceptJS {
|
|
|
4636
4636
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4637
4637
|
* @returns automatically synchronized promise through #recorder
|
|
4638
4638
|
*/
|
|
4639
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
4639
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4640
4640
|
/**
|
|
4641
4641
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
4642
4642
|
*
|
|
@@ -4646,7 +4646,7 @@ declare namespace CodeceptJS {
|
|
|
4646
4646
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
4647
4647
|
* @returns automatically synchronized promise through #recorder
|
|
4648
4648
|
*/
|
|
4649
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
4649
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4650
4650
|
/**
|
|
4651
4651
|
* Handles a file download. A file name is required to save the file on disk.
|
|
4652
4652
|
* Files are saved to "output" directory.
|
|
@@ -4706,7 +4706,7 @@ declare namespace CodeceptJS {
|
|
|
4706
4706
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
4707
4707
|
* @returns automatically synchronized promise through #recorder
|
|
4708
4708
|
*/
|
|
4709
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any):
|
|
4709
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): CodeceptJS.ElementStepPromise;
|
|
4710
4710
|
/**
|
|
4711
4711
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
4712
4712
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -4736,7 +4736,7 @@ declare namespace CodeceptJS {
|
|
|
4736
4736
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4737
4737
|
* @returns automatically synchronized promise through #recorder
|
|
4738
4738
|
*/
|
|
4739
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4739
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4740
4740
|
/**
|
|
4741
4741
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
4742
4742
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -4751,7 +4751,7 @@ declare namespace CodeceptJS {
|
|
|
4751
4751
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4752
4752
|
* @returns automatically synchronized promise through #recorder
|
|
4753
4753
|
*/
|
|
4754
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4754
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4755
4755
|
/**
|
|
4756
4756
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
4757
4757
|
*
|
|
@@ -4767,7 +4767,7 @@ declare namespace CodeceptJS {
|
|
|
4767
4767
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
4768
4768
|
* @returns automatically synchronized promise through #recorder
|
|
4769
4769
|
*/
|
|
4770
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4770
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4771
4771
|
/**
|
|
4772
4772
|
* Performs click at specific coordinates.
|
|
4773
4773
|
* If locator is provided, the coordinates are relative to the element.
|
|
@@ -4784,7 +4784,7 @@ declare namespace CodeceptJS {
|
|
|
4784
4784
|
* @param [x] - X coordinate relative to element, or Y coordinate if locator is a number.
|
|
4785
4785
|
* @param [y] - Y coordinate relative to element.
|
|
4786
4786
|
*/
|
|
4787
|
-
clickXY(locator: CodeceptJS.LocatorOrString | number, x?: number, y?: number):
|
|
4787
|
+
clickXY(locator: CodeceptJS.LocatorOrString | number, x?: number, y?: number): CodeceptJS.ElementStepPromise;
|
|
4788
4788
|
/**
|
|
4789
4789
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
4790
4790
|
*
|
|
@@ -4810,7 +4810,7 @@ declare namespace CodeceptJS {
|
|
|
4810
4810
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4811
4811
|
* @returns automatically synchronized promise through #recorder
|
|
4812
4812
|
*/
|
|
4813
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4813
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4814
4814
|
/**
|
|
4815
4815
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
4816
4816
|
*
|
|
@@ -4836,7 +4836,7 @@ declare namespace CodeceptJS {
|
|
|
4836
4836
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4837
4837
|
* @returns automatically synchronized promise through #recorder
|
|
4838
4838
|
*/
|
|
4839
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
4839
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
4840
4840
|
/**
|
|
4841
4841
|
* Verifies that the specified checkbox is checked.
|
|
4842
4842
|
*
|
|
@@ -4848,7 +4848,7 @@ declare namespace CodeceptJS {
|
|
|
4848
4848
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4849
4849
|
* @returns automatically synchronized promise through #recorder
|
|
4850
4850
|
*/
|
|
4851
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
4851
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4852
4852
|
/**
|
|
4853
4853
|
* Verifies that the specified checkbox is not checked.
|
|
4854
4854
|
*
|
|
@@ -4860,7 +4860,7 @@ declare namespace CodeceptJS {
|
|
|
4860
4860
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4861
4861
|
* @returns automatically synchronized promise through #recorder
|
|
4862
4862
|
*/
|
|
4863
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
4863
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
4864
4864
|
/**
|
|
4865
4865
|
* Presses a key in the browser and leaves it in a down state.
|
|
4866
4866
|
*
|
|
@@ -4874,7 +4874,7 @@ declare namespace CodeceptJS {
|
|
|
4874
4874
|
* @param key - name of key to press down.
|
|
4875
4875
|
* @returns automatically synchronized promise through #recorder
|
|
4876
4876
|
*/
|
|
4877
|
-
pressKeyDown(key: string):
|
|
4877
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
4878
4878
|
/**
|
|
4879
4879
|
* Releases a key in the browser which was previously set to a down state.
|
|
4880
4880
|
*
|
|
@@ -4888,7 +4888,7 @@ declare namespace CodeceptJS {
|
|
|
4888
4888
|
* @param key - name of key to release.
|
|
4889
4889
|
* @returns automatically synchronized promise through #recorder
|
|
4890
4890
|
*/
|
|
4891
|
-
pressKeyUp(key: string):
|
|
4891
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
4892
4892
|
/**
|
|
4893
4893
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([puppeteer/puppeteer#1313](https://github.com/puppeteer/puppeteer/issues/1313)).
|
|
4894
4894
|
*
|
|
@@ -4952,7 +4952,7 @@ declare namespace CodeceptJS {
|
|
|
4952
4952
|
* @param key - key or array of keys to press.
|
|
4953
4953
|
* @returns automatically synchronized promise through #recorder
|
|
4954
4954
|
*/
|
|
4955
|
-
pressKey(key: string | string[]):
|
|
4955
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
4956
4956
|
/**
|
|
4957
4957
|
* Types out the given text into an active field.
|
|
4958
4958
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -4975,7 +4975,7 @@ declare namespace CodeceptJS {
|
|
|
4975
4975
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
4976
4976
|
* @returns automatically synchronized promise through #recorder
|
|
4977
4977
|
*/
|
|
4978
|
-
type(key: string | string[], delay?: number):
|
|
4978
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
4979
4979
|
/**
|
|
4980
4980
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
4981
4981
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -5003,7 +5003,7 @@ declare namespace CodeceptJS {
|
|
|
5003
5003
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5004
5004
|
* @returns automatically synchronized promise through #recorder
|
|
5005
5005
|
*/
|
|
5006
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
5006
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
5007
5007
|
/**
|
|
5008
5008
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
5009
5009
|
*
|
|
@@ -5020,7 +5020,7 @@ declare namespace CodeceptJS {
|
|
|
5020
5020
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5021
5021
|
* @returns automatically synchronized promise through #recorder.
|
|
5022
5022
|
*/
|
|
5023
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
5023
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
5024
5024
|
/**
|
|
5025
5025
|
* Appends text to a input field or textarea.
|
|
5026
5026
|
* Field is located by name, label, CSS or XPath
|
|
@@ -5039,7 +5039,7 @@ declare namespace CodeceptJS {
|
|
|
5039
5039
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5040
5040
|
* @returns automatically synchronized promise through #recorder
|
|
5041
5041
|
*/
|
|
5042
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
5042
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
5043
5043
|
/**
|
|
5044
5044
|
* Checks that the given input field or textarea equals to given value.
|
|
5045
5045
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -5059,7 +5059,7 @@ declare namespace CodeceptJS {
|
|
|
5059
5059
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5060
5060
|
* @returns automatically synchronized promise through #recorder
|
|
5061
5061
|
*/
|
|
5062
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
5062
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5063
5063
|
/**
|
|
5064
5064
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
5065
5065
|
* Opposite to `seeInField`.
|
|
@@ -5077,7 +5077,7 @@ declare namespace CodeceptJS {
|
|
|
5077
5077
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5078
5078
|
* @returns automatically synchronized promise through #recorder
|
|
5079
5079
|
*/
|
|
5080
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
5080
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5081
5081
|
/**
|
|
5082
5082
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
5083
5083
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -5103,7 +5103,7 @@ declare namespace CodeceptJS {
|
|
|
5103
5103
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5104
5104
|
* @returns automatically synchronized promise through #recorder
|
|
5105
5105
|
*/
|
|
5106
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
5106
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
5107
5107
|
/**
|
|
5108
5108
|
* Selects an option in a drop-down select.
|
|
5109
5109
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -5132,7 +5132,7 @@ declare namespace CodeceptJS {
|
|
|
5132
5132
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5133
5133
|
* @returns automatically synchronized promise through #recorder
|
|
5134
5134
|
*/
|
|
5135
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
5135
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
5136
5136
|
/**
|
|
5137
5137
|
* Grab number of visible elements by locator.
|
|
5138
5138
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5153,13 +5153,13 @@ declare namespace CodeceptJS {
|
|
|
5153
5153
|
* @param url - a fragment to check
|
|
5154
5154
|
* @returns automatically synchronized promise through #recorder
|
|
5155
5155
|
*/
|
|
5156
|
-
seeInCurrentUrl(url: string):
|
|
5156
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
5157
5157
|
/**
|
|
5158
5158
|
* Checks that current url does not contain a provided fragment.
|
|
5159
5159
|
* @param url - value to check.
|
|
5160
5160
|
* @returns automatically synchronized promise through #recorder
|
|
5161
5161
|
*/
|
|
5162
|
-
dontSeeInCurrentUrl(url: string):
|
|
5162
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
5163
5163
|
/**
|
|
5164
5164
|
* Checks that current url is equal to provided one.
|
|
5165
5165
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5172,7 +5172,7 @@ declare namespace CodeceptJS {
|
|
|
5172
5172
|
* @param url - value to check.
|
|
5173
5173
|
* @returns automatically synchronized promise through #recorder
|
|
5174
5174
|
*/
|
|
5175
|
-
seeCurrentUrlEquals(url: string):
|
|
5175
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
5176
5176
|
/**
|
|
5177
5177
|
* Checks that current url is not equal to provided one.
|
|
5178
5178
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5184,7 +5184,7 @@ declare namespace CodeceptJS {
|
|
|
5184
5184
|
* @param url - value to check.
|
|
5185
5185
|
* @returns automatically synchronized promise through #recorder
|
|
5186
5186
|
*/
|
|
5187
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
5187
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
5188
5188
|
/**
|
|
5189
5189
|
* Checks that current URL path matches the expected path.
|
|
5190
5190
|
* Query strings and URL fragments are ignored.
|
|
@@ -5196,7 +5196,7 @@ declare namespace CodeceptJS {
|
|
|
5196
5196
|
* @param path - value to check.
|
|
5197
5197
|
* @returns automatically synchronized promise through #recorder
|
|
5198
5198
|
*/
|
|
5199
|
-
seeCurrentPathEquals(path: string):
|
|
5199
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
5200
5200
|
/**
|
|
5201
5201
|
* Checks that current URL path does NOT match the expected path.
|
|
5202
5202
|
* Query strings and URL fragments are ignored.
|
|
@@ -5208,7 +5208,7 @@ declare namespace CodeceptJS {
|
|
|
5208
5208
|
* @param path - value to check.
|
|
5209
5209
|
* @returns automatically synchronized promise through #recorder
|
|
5210
5210
|
*/
|
|
5211
|
-
dontSeeCurrentPathEquals(path: string):
|
|
5211
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
5212
5212
|
/**
|
|
5213
5213
|
* Checks that a page contains a visible text.
|
|
5214
5214
|
* Use context parameter to narrow down the search.
|
|
@@ -5222,7 +5222,7 @@ declare namespace CodeceptJS {
|
|
|
5222
5222
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
5223
5223
|
* @returns automatically synchronized promise through #recorder
|
|
5224
5224
|
*/
|
|
5225
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5225
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5226
5226
|
/**
|
|
5227
5227
|
* Checks that text is equal to provided one.
|
|
5228
5228
|
*
|
|
@@ -5233,7 +5233,7 @@ declare namespace CodeceptJS {
|
|
|
5233
5233
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
5234
5234
|
* @returns automatically synchronized promise through #recorder
|
|
5235
5235
|
*/
|
|
5236
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5236
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5237
5237
|
/**
|
|
5238
5238
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
5239
5239
|
* Use context parameter to narrow down the search.
|
|
@@ -5246,7 +5246,7 @@ declare namespace CodeceptJS {
|
|
|
5246
5246
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
5247
5247
|
* @returns automatically synchronized promise through #recorder
|
|
5248
5248
|
*/
|
|
5249
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
5249
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5250
5250
|
/**
|
|
5251
5251
|
* Retrieves page source and returns it to test.
|
|
5252
5252
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5288,7 +5288,7 @@ declare namespace CodeceptJS {
|
|
|
5288
5288
|
* @param text - value to check.
|
|
5289
5289
|
* @returns automatically synchronized promise through #recorder
|
|
5290
5290
|
*/
|
|
5291
|
-
seeInSource(text: string):
|
|
5291
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
5292
5292
|
/**
|
|
5293
5293
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
5294
5294
|
*
|
|
@@ -5298,7 +5298,7 @@ declare namespace CodeceptJS {
|
|
|
5298
5298
|
* @param value - to check.
|
|
5299
5299
|
* @returns automatically synchronized promise through #recorder
|
|
5300
5300
|
*/
|
|
5301
|
-
dontSeeInSource(value: string):
|
|
5301
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
5302
5302
|
/**
|
|
5303
5303
|
* Asserts that an element appears a given number of times in the DOM.
|
|
5304
5304
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -5311,7 +5311,7 @@ declare namespace CodeceptJS {
|
|
|
5311
5311
|
* @param num - number of elements.
|
|
5312
5312
|
* @returns automatically synchronized promise through #recorder
|
|
5313
5313
|
*/
|
|
5314
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
5314
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
5315
5315
|
/**
|
|
5316
5316
|
* Asserts that an element is visible a given number of times.
|
|
5317
5317
|
* Element is located by CSS or XPath.
|
|
@@ -5323,7 +5323,7 @@ declare namespace CodeceptJS {
|
|
|
5323
5323
|
* @param num - number of elements.
|
|
5324
5324
|
* @returns automatically synchronized promise through #recorder
|
|
5325
5325
|
*/
|
|
5326
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
5326
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
5327
5327
|
/**
|
|
5328
5328
|
* Sets cookie(s).
|
|
5329
5329
|
*
|
|
@@ -5341,7 +5341,7 @@ declare namespace CodeceptJS {
|
|
|
5341
5341
|
* @param cookie - a cookie object or array of cookie objects.
|
|
5342
5342
|
* @returns automatically synchronized promise through #recorder
|
|
5343
5343
|
*/
|
|
5344
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
5344
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
5345
5345
|
/**
|
|
5346
5346
|
* Checks that cookie with given name exists.
|
|
5347
5347
|
*
|
|
@@ -5351,7 +5351,7 @@ declare namespace CodeceptJS {
|
|
|
5351
5351
|
* @param name - cookie name.
|
|
5352
5352
|
* @returns automatically synchronized promise through #recorder
|
|
5353
5353
|
*/
|
|
5354
|
-
seeCookie(name: string):
|
|
5354
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
5355
5355
|
/**
|
|
5356
5356
|
* Checks that cookie with given name does not exist.
|
|
5357
5357
|
*
|
|
@@ -5361,7 +5361,7 @@ declare namespace CodeceptJS {
|
|
|
5361
5361
|
* @param name - cookie name.
|
|
5362
5362
|
* @returns automatically synchronized promise through #recorder
|
|
5363
5363
|
*/
|
|
5364
|
-
dontSeeCookie(name: string):
|
|
5364
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
5365
5365
|
/**
|
|
5366
5366
|
* Returns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
5367
5367
|
*
|
|
@@ -5422,7 +5422,7 @@ declare namespace CodeceptJS {
|
|
|
5422
5422
|
* @param text - value to check.
|
|
5423
5423
|
* @returns automatically synchronized promise through #recorder
|
|
5424
5424
|
*/
|
|
5425
|
-
seeInClipboard(text: string):
|
|
5425
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
5426
5426
|
/**
|
|
5427
5427
|
* Checks that the system clipboard is equal to the given text.
|
|
5428
5428
|
*
|
|
@@ -5436,7 +5436,7 @@ declare namespace CodeceptJS {
|
|
|
5436
5436
|
* @param text - value to check.
|
|
5437
5437
|
* @returns automatically synchronized promise through #recorder
|
|
5438
5438
|
*/
|
|
5439
|
-
seeClipboardEquals(text: string):
|
|
5439
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
5440
5440
|
/**
|
|
5441
5441
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
5442
5442
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5460,7 +5460,7 @@ declare namespace CodeceptJS {
|
|
|
5460
5460
|
* ```
|
|
5461
5461
|
* @returns automatically synchronized promise through #recorder
|
|
5462
5462
|
*/
|
|
5463
|
-
clearClipboard():
|
|
5463
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
5464
5464
|
/**
|
|
5465
5465
|
* Executes a script on the page:
|
|
5466
5466
|
*
|
|
@@ -5592,7 +5592,7 @@ declare namespace CodeceptJS {
|
|
|
5592
5592
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
5593
5593
|
* @returns automatically synchronized promise through #recorder
|
|
5594
5594
|
*/
|
|
5595
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
5595
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
5596
5596
|
/**
|
|
5597
5597
|
* Checks that all elements with given locator have given attributes.
|
|
5598
5598
|
*
|
|
@@ -5603,7 +5603,7 @@ declare namespace CodeceptJS {
|
|
|
5603
5603
|
* @param attributes - attributes and their values to check.
|
|
5604
5604
|
* @returns automatically synchronized promise through #recorder
|
|
5605
5605
|
*/
|
|
5606
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
5606
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
5607
5607
|
/**
|
|
5608
5608
|
* Drag the scrubber of a slider to a given position
|
|
5609
5609
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -5616,7 +5616,7 @@ declare namespace CodeceptJS {
|
|
|
5616
5616
|
* @param offsetX - position to drag.
|
|
5617
5617
|
* @returns automatically synchronized promise through #recorder
|
|
5618
5618
|
*/
|
|
5619
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
5619
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
5620
5620
|
/**
|
|
5621
5621
|
* Retrieves an attribute from an element located by CSS or XPath and returns it to test.
|
|
5622
5622
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -5671,7 +5671,7 @@ declare namespace CodeceptJS {
|
|
|
5671
5671
|
* @param fileName - file name to save.
|
|
5672
5672
|
* @returns automatically synchronized promise through #recorder
|
|
5673
5673
|
*/
|
|
5674
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
5674
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
5675
5675
|
/**
|
|
5676
5676
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5677
5677
|
* Filename is relative to output folder.
|
|
@@ -5685,7 +5685,7 @@ declare namespace CodeceptJS {
|
|
|
5685
5685
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
5686
5686
|
* @returns automatically synchronized promise through #recorder
|
|
5687
5687
|
*/
|
|
5688
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
5688
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
5689
5689
|
/**
|
|
5690
5690
|
* Performs [api request](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get) using
|
|
5691
5691
|
* the cookies from the current browser session.
|
|
@@ -5712,7 +5712,7 @@ declare namespace CodeceptJS {
|
|
|
5712
5712
|
* @param sec - number of second to wait.
|
|
5713
5713
|
* @returns automatically synchronized promise through #recorder
|
|
5714
5714
|
*/
|
|
5715
|
-
wait(sec: number):
|
|
5715
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
5716
5716
|
/**
|
|
5717
5717
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
5718
5718
|
* Element can be located by CSS or XPath.
|
|
@@ -5720,7 +5720,7 @@ declare namespace CodeceptJS {
|
|
|
5720
5720
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5721
5721
|
* @returns automatically synchronized promise through #recorder
|
|
5722
5722
|
*/
|
|
5723
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5723
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5724
5724
|
/**
|
|
5725
5725
|
* Waits for element to become disabled (by default waits for 1sec).
|
|
5726
5726
|
* Element can be located by CSS or XPath.
|
|
@@ -5728,7 +5728,7 @@ declare namespace CodeceptJS {
|
|
|
5728
5728
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5729
5729
|
* @returns automatically synchronized promise through #recorder
|
|
5730
5730
|
*/
|
|
5731
|
-
waitForDisabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5731
|
+
waitForDisabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5732
5732
|
/**
|
|
5733
5733
|
* Waits for the specified value to be in value attribute.
|
|
5734
5734
|
*
|
|
@@ -5740,7 +5740,7 @@ declare namespace CodeceptJS {
|
|
|
5740
5740
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5741
5741
|
* @returns automatically synchronized promise through #recorder
|
|
5742
5742
|
*/
|
|
5743
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
5743
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
5744
5744
|
/**
|
|
5745
5745
|
* Waits for a specified number of elements on the page.
|
|
5746
5746
|
*
|
|
@@ -5752,7 +5752,7 @@ declare namespace CodeceptJS {
|
|
|
5752
5752
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5753
5753
|
* @returns automatically synchronized promise through #recorder
|
|
5754
5754
|
*/
|
|
5755
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
5755
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
5756
5756
|
/**
|
|
5757
5757
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
5758
5758
|
* Element can be located by CSS or XPath.
|
|
@@ -5765,7 +5765,7 @@ declare namespace CodeceptJS {
|
|
|
5765
5765
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
5766
5766
|
* @returns automatically synchronized promise through #recorder
|
|
5767
5767
|
*/
|
|
5768
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5768
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5769
5769
|
/**
|
|
5770
5770
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
5771
5771
|
* Element can be located by CSS or XPath.
|
|
@@ -5778,7 +5778,7 @@ declare namespace CodeceptJS {
|
|
|
5778
5778
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
5779
5779
|
* @returns automatically synchronized promise through #recorder
|
|
5780
5780
|
*/
|
|
5781
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5781
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5782
5782
|
/**
|
|
5783
5783
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
5784
5784
|
* Element can be located by CSS or XPath.
|
|
@@ -5790,7 +5790,7 @@ declare namespace CodeceptJS {
|
|
|
5790
5790
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5791
5791
|
* @returns automatically synchronized promise through #recorder
|
|
5792
5792
|
*/
|
|
5793
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5793
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5794
5794
|
/**
|
|
5795
5795
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
5796
5796
|
* Element can be located by CSS or XPath.
|
|
@@ -5802,7 +5802,7 @@ declare namespace CodeceptJS {
|
|
|
5802
5802
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5803
5803
|
* @returns automatically synchronized promise through #recorder
|
|
5804
5804
|
*/
|
|
5805
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5805
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5806
5806
|
/**
|
|
5807
5807
|
* Waits for an element to hide (by default waits for 1sec).
|
|
5808
5808
|
* Element can be located by CSS or XPath.
|
|
@@ -5814,7 +5814,7 @@ declare namespace CodeceptJS {
|
|
|
5814
5814
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5815
5815
|
* @returns automatically synchronized promise through #recorder
|
|
5816
5816
|
*/
|
|
5817
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5817
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5818
5818
|
/**
|
|
5819
5819
|
* Waits for number of tabs.
|
|
5820
5820
|
*
|
|
@@ -5825,7 +5825,7 @@ declare namespace CodeceptJS {
|
|
|
5825
5825
|
* @param sec - number of secs to wait.
|
|
5826
5826
|
* @returns automatically synchronized promise through #recorder
|
|
5827
5827
|
*/
|
|
5828
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
5828
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
5829
5829
|
/**
|
|
5830
5830
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
5831
5831
|
*
|
|
@@ -5836,7 +5836,7 @@ declare namespace CodeceptJS {
|
|
|
5836
5836
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5837
5837
|
* @returns automatically synchronized promise through #recorder
|
|
5838
5838
|
*/
|
|
5839
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
5839
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
5840
5840
|
/**
|
|
5841
5841
|
* Waits for the entire URL to match the expected
|
|
5842
5842
|
*
|
|
@@ -5848,7 +5848,7 @@ declare namespace CodeceptJS {
|
|
|
5848
5848
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5849
5849
|
* @returns automatically synchronized promise through #recorder
|
|
5850
5850
|
*/
|
|
5851
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
5851
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
5852
5852
|
/**
|
|
5853
5853
|
* {{> waitCurrentPathEquals }}
|
|
5854
5854
|
*/
|
|
@@ -5866,8 +5866,11 @@ declare namespace CodeceptJS {
|
|
|
5866
5866
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5867
5867
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
5868
5868
|
* @returns automatically synchronized promise through #recorder
|
|
5869
|
+
*
|
|
5870
|
+
*
|
|
5871
|
+
* . **Note:** Text matching is case-sensitive. For case-insensitive matching, use XPath or CSS locators with normalized text.
|
|
5869
5872
|
*/
|
|
5870
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
5873
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5871
5874
|
/**
|
|
5872
5875
|
* Waits for a network request.
|
|
5873
5876
|
*
|
|
@@ -5898,7 +5901,7 @@ declare namespace CodeceptJS {
|
|
|
5898
5901
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
5899
5902
|
* @returns automatically synchronized promise through #recorder
|
|
5900
5903
|
*/
|
|
5901
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
5904
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
5902
5905
|
/**
|
|
5903
5906
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
5904
5907
|
* Running in browser context.
|
|
@@ -5917,7 +5920,7 @@ declare namespace CodeceptJS {
|
|
|
5917
5920
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5918
5921
|
* @returns automatically synchronized promise through #recorder
|
|
5919
5922
|
*/
|
|
5920
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
5923
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
5921
5924
|
/**
|
|
5922
5925
|
* Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
|
|
5923
5926
|
*
|
|
@@ -5942,7 +5945,7 @@ declare namespace CodeceptJS {
|
|
|
5942
5945
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5943
5946
|
* @returns automatically synchronized promise through #recorder
|
|
5944
5947
|
*/
|
|
5945
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
5948
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
5946
5949
|
/**
|
|
5947
5950
|
* Waits for the specified cookie in the cookies.
|
|
5948
5951
|
*
|
|
@@ -5953,7 +5956,7 @@ declare namespace CodeceptJS {
|
|
|
5953
5956
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
5954
5957
|
* @returns automatically synchronized promise through #recorder
|
|
5955
5958
|
*/
|
|
5956
|
-
waitForCookie(name: string, sec?: number):
|
|
5959
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
5957
5960
|
/**
|
|
5958
5961
|
* Grab the data from performance timing using Navigation Timing API.
|
|
5959
5962
|
* The returned data will contain following things in ms:
|
|
@@ -5976,7 +5979,7 @@ declare namespace CodeceptJS {
|
|
|
5976
5979
|
* ```
|
|
5977
5980
|
* @returns automatically synchronized promise through #recorder
|
|
5978
5981
|
*/
|
|
5979
|
-
grabDataFromPerformanceTiming():
|
|
5982
|
+
grabDataFromPerformanceTiming(): CodeceptJS.StepPromise;
|
|
5980
5983
|
/**
|
|
5981
5984
|
* Grab the width, height, location of given locator.
|
|
5982
5985
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -6032,7 +6035,7 @@ declare namespace CodeceptJS {
|
|
|
6032
6035
|
* ```
|
|
6033
6036
|
* @returns automatically synchronized promise through #recorder
|
|
6034
6037
|
*/
|
|
6035
|
-
startRecordingTraffic():
|
|
6038
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
6036
6039
|
/**
|
|
6037
6040
|
* Blocks traffic of a given URL or a list of URLs.
|
|
6038
6041
|
*
|
|
@@ -6178,7 +6181,7 @@ declare namespace CodeceptJS {
|
|
|
6178
6181
|
* ```
|
|
6179
6182
|
* @returns automatically synchronized promise through #recorder
|
|
6180
6183
|
*/
|
|
6181
|
-
startRecordingWebSocketMessages():
|
|
6184
|
+
startRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
6182
6185
|
/**
|
|
6183
6186
|
* Stops recording WS messages. Recorded WS messages is not flashed.
|
|
6184
6187
|
*
|
|
@@ -6187,7 +6190,7 @@ declare namespace CodeceptJS {
|
|
|
6187
6190
|
* ```
|
|
6188
6191
|
* @returns automatically synchronized promise through #recorder
|
|
6189
6192
|
*/
|
|
6190
|
-
stopRecordingWebSocketMessages():
|
|
6193
|
+
stopRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
6191
6194
|
/**
|
|
6192
6195
|
* Grab the recording WS messages
|
|
6193
6196
|
*/
|
|
@@ -6506,7 +6509,7 @@ declare namespace CodeceptJS {
|
|
|
6506
6509
|
* @param text - value to check.
|
|
6507
6510
|
* @returns automatically synchronized promise through #recorder
|
|
6508
6511
|
*/
|
|
6509
|
-
seeInPopup(text: string):
|
|
6512
|
+
seeInPopup(text: string): CodeceptJS.StepPromise;
|
|
6510
6513
|
/**
|
|
6511
6514
|
* Set current page
|
|
6512
6515
|
* @param page - page to set
|
|
@@ -6540,7 +6543,7 @@ declare namespace CodeceptJS {
|
|
|
6540
6543
|
* @param url - url path or global url.
|
|
6541
6544
|
* @returns automatically synchronized promise through #recorder
|
|
6542
6545
|
*/
|
|
6543
|
-
amOnPage(url: string):
|
|
6546
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
6544
6547
|
/**
|
|
6545
6548
|
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
6546
6549
|
* Puppeteer does not control the window of a browser, so it can't adjust its real size.
|
|
@@ -6552,7 +6555,7 @@ declare namespace CodeceptJS {
|
|
|
6552
6555
|
* @param height - height in pixels.
|
|
6553
6556
|
* @returns automatically synchronized promise through #recorder
|
|
6554
6557
|
*/
|
|
6555
|
-
resizeWindow(width: number, height: number):
|
|
6558
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
6556
6559
|
/**
|
|
6557
6560
|
* Set headers for all next requests
|
|
6558
6561
|
*
|
|
@@ -6581,7 +6584,7 @@ declare namespace CodeceptJS {
|
|
|
6581
6584
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6582
6585
|
* @returns automatically synchronized promise through #recorder
|
|
6583
6586
|
*/
|
|
6584
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
6587
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
6585
6588
|
/**
|
|
6586
6589
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
6587
6590
|
*
|
|
@@ -6596,7 +6599,7 @@ declare namespace CodeceptJS {
|
|
|
6596
6599
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
6597
6600
|
* @returns automatically synchronized promise through #recorder
|
|
6598
6601
|
*/
|
|
6599
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
6602
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
6600
6603
|
/**
|
|
6601
6604
|
* Remove focus from a text input, button, etc.
|
|
6602
6605
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -6616,7 +6619,7 @@ declare namespace CodeceptJS {
|
|
|
6616
6619
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
6617
6620
|
* @returns automatically synchronized promise through #recorder
|
|
6618
6621
|
*/
|
|
6619
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
6622
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
6620
6623
|
/**
|
|
6621
6624
|
* Drag an item to a destination element.
|
|
6622
6625
|
*
|
|
@@ -6627,7 +6630,7 @@ declare namespace CodeceptJS {
|
|
|
6627
6630
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
6628
6631
|
* @returns automatically synchronized promise through #recorder
|
|
6629
6632
|
*/
|
|
6630
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString):
|
|
6633
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6631
6634
|
/**
|
|
6632
6635
|
* Reload the current page.
|
|
6633
6636
|
*
|
|
@@ -6636,7 +6639,7 @@ declare namespace CodeceptJS {
|
|
|
6636
6639
|
* ```
|
|
6637
6640
|
* @returns automatically synchronized promise through #recorder
|
|
6638
6641
|
*/
|
|
6639
|
-
refreshPage():
|
|
6642
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
6640
6643
|
/**
|
|
6641
6644
|
* Scroll page to the top.
|
|
6642
6645
|
*
|
|
@@ -6645,7 +6648,7 @@ declare namespace CodeceptJS {
|
|
|
6645
6648
|
* ```
|
|
6646
6649
|
* @returns automatically synchronized promise through #recorder
|
|
6647
6650
|
*/
|
|
6648
|
-
scrollPageToTop():
|
|
6651
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
6649
6652
|
/**
|
|
6650
6653
|
* Scroll page to the bottom.
|
|
6651
6654
|
*
|
|
@@ -6654,7 +6657,7 @@ declare namespace CodeceptJS {
|
|
|
6654
6657
|
* ```
|
|
6655
6658
|
* @returns automatically synchronized promise through #recorder
|
|
6656
6659
|
*/
|
|
6657
|
-
scrollPageToBottom():
|
|
6660
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
6658
6661
|
/**
|
|
6659
6662
|
* Scrolls to element matched by locator.
|
|
6660
6663
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -6668,7 +6671,7 @@ declare namespace CodeceptJS {
|
|
|
6668
6671
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6669
6672
|
* @returns automatically synchronized promise through #recorder
|
|
6670
6673
|
*/
|
|
6671
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
6674
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
6672
6675
|
/**
|
|
6673
6676
|
* Checks that title contains text.
|
|
6674
6677
|
*
|
|
@@ -6678,7 +6681,7 @@ declare namespace CodeceptJS {
|
|
|
6678
6681
|
* @param text - text value to check.
|
|
6679
6682
|
* @returns automatically synchronized promise through #recorder
|
|
6680
6683
|
*/
|
|
6681
|
-
seeInTitle(text: string):
|
|
6684
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
6682
6685
|
/**
|
|
6683
6686
|
* Retrieves a page scroll position and returns it to test.
|
|
6684
6687
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6698,7 +6701,7 @@ declare namespace CodeceptJS {
|
|
|
6698
6701
|
* @param text - value to check.
|
|
6699
6702
|
* @returns automatically synchronized promise through #recorder
|
|
6700
6703
|
*/
|
|
6701
|
-
seeTitleEquals(text: string):
|
|
6704
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
6702
6705
|
/**
|
|
6703
6706
|
* Checks that title does not contain text.
|
|
6704
6707
|
*
|
|
@@ -6708,7 +6711,7 @@ declare namespace CodeceptJS {
|
|
|
6708
6711
|
* @param text - value to check.
|
|
6709
6712
|
* @returns automatically synchronized promise through #recorder
|
|
6710
6713
|
*/
|
|
6711
|
-
dontSeeInTitle(text: string):
|
|
6714
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
6712
6715
|
/**
|
|
6713
6716
|
* Retrieves a page title and returns it to test.
|
|
6714
6717
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -6770,9 +6773,9 @@ declare namespace CodeceptJS {
|
|
|
6770
6773
|
* const webElements = await I.grabWebElements('#button');
|
|
6771
6774
|
* ```
|
|
6772
6775
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6773
|
-
* @returns
|
|
6776
|
+
* @returns WebElements of being used Web helper
|
|
6774
6777
|
*/
|
|
6775
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6778
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
6776
6779
|
/**
|
|
6777
6780
|
* Grab WebElement for given locator
|
|
6778
6781
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6783,7 +6786,7 @@ declare namespace CodeceptJS {
|
|
|
6783
6786
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6784
6787
|
* @returns WebElement of being used Web helper
|
|
6785
6788
|
*/
|
|
6786
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6789
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
6787
6790
|
/**
|
|
6788
6791
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
6789
6792
|
*
|
|
@@ -6854,7 +6857,7 @@ declare namespace CodeceptJS {
|
|
|
6854
6857
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6855
6858
|
* @returns automatically synchronized promise through #recorder
|
|
6856
6859
|
*/
|
|
6857
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6860
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6858
6861
|
/**
|
|
6859
6862
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
6860
6863
|
*
|
|
@@ -6868,7 +6871,7 @@ declare namespace CodeceptJS {
|
|
|
6868
6871
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6869
6872
|
* @returns automatically synchronized promise through #recorder
|
|
6870
6873
|
*/
|
|
6871
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6874
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6872
6875
|
/**
|
|
6873
6876
|
* Checks that a given Element is present in the DOM
|
|
6874
6877
|
* Element is located by CSS or XPath.
|
|
@@ -6879,7 +6882,7 @@ declare namespace CodeceptJS {
|
|
|
6879
6882
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6880
6883
|
* @returns automatically synchronized promise through #recorder
|
|
6881
6884
|
*/
|
|
6882
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
6885
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6883
6886
|
/**
|
|
6884
6887
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
6885
6888
|
*
|
|
@@ -6889,7 +6892,7 @@ declare namespace CodeceptJS {
|
|
|
6889
6892
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6890
6893
|
* @returns automatically synchronized promise through #recorder
|
|
6891
6894
|
*/
|
|
6892
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
6895
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
6893
6896
|
/**
|
|
6894
6897
|
* Perform a click on a link or a button, given by a locator.
|
|
6895
6898
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -6924,7 +6927,7 @@ declare namespace CodeceptJS {
|
|
|
6924
6927
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6925
6928
|
* @returns automatically synchronized promise through #recorder
|
|
6926
6929
|
*/
|
|
6927
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
6930
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
6928
6931
|
/**
|
|
6929
6932
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
6930
6933
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -6954,7 +6957,7 @@ declare namespace CodeceptJS {
|
|
|
6954
6957
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6955
6958
|
* @returns automatically synchronized promise through #recorder
|
|
6956
6959
|
*/
|
|
6957
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6960
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6958
6961
|
/**
|
|
6959
6962
|
* Performs a click on a link and waits for navigation before moving on.
|
|
6960
6963
|
*
|
|
@@ -6965,7 +6968,7 @@ declare namespace CodeceptJS {
|
|
|
6965
6968
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
6966
6969
|
* @returns automatically synchronized promise through #recorder
|
|
6967
6970
|
*/
|
|
6968
|
-
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
6971
|
+
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
6969
6972
|
/**
|
|
6970
6973
|
* Sets a directory to where save files. Allows to test file downloads.
|
|
6971
6974
|
* Should be used with [FileSystem helper](https://codecept.io/helpers/file-system) to check that file were downloaded correctly.
|
|
@@ -7003,7 +7006,7 @@ declare namespace CodeceptJS {
|
|
|
7003
7006
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
7004
7007
|
* @returns automatically synchronized promise through #recorder
|
|
7005
7008
|
*/
|
|
7006
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7009
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7007
7010
|
/**
|
|
7008
7011
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
7009
7012
|
*
|
|
@@ -7019,7 +7022,7 @@ declare namespace CodeceptJS {
|
|
|
7019
7022
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
7020
7023
|
* @returns automatically synchronized promise through #recorder
|
|
7021
7024
|
*/
|
|
7022
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7025
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7023
7026
|
/**
|
|
7024
7027
|
* Performs click at specific coordinates.
|
|
7025
7028
|
* If locator is provided, the coordinates are relative to the element.
|
|
@@ -7052,7 +7055,7 @@ declare namespace CodeceptJS {
|
|
|
7052
7055
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7053
7056
|
* @returns automatically synchronized promise through #recorder
|
|
7054
7057
|
*/
|
|
7055
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7058
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7056
7059
|
/**
|
|
7057
7060
|
* Unselects a checkbox or radio button.
|
|
7058
7061
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -7068,7 +7071,7 @@ declare namespace CodeceptJS {
|
|
|
7068
7071
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7069
7072
|
* @returns automatically synchronized promise through #recorder
|
|
7070
7073
|
*/
|
|
7071
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7074
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7072
7075
|
/**
|
|
7073
7076
|
* Verifies that the specified checkbox is checked.
|
|
7074
7077
|
*
|
|
@@ -7080,7 +7083,7 @@ declare namespace CodeceptJS {
|
|
|
7080
7083
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7081
7084
|
* @returns automatically synchronized promise through #recorder
|
|
7082
7085
|
*/
|
|
7083
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
7086
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7084
7087
|
/**
|
|
7085
7088
|
* Verifies that the specified checkbox is not checked.
|
|
7086
7089
|
*
|
|
@@ -7092,7 +7095,7 @@ declare namespace CodeceptJS {
|
|
|
7092
7095
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7093
7096
|
* @returns automatically synchronized promise through #recorder
|
|
7094
7097
|
*/
|
|
7095
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
7098
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7096
7099
|
/**
|
|
7097
7100
|
* Presses a key in the browser and leaves it in a down state.
|
|
7098
7101
|
*
|
|
@@ -7106,7 +7109,7 @@ declare namespace CodeceptJS {
|
|
|
7106
7109
|
* @param key - name of key to press down.
|
|
7107
7110
|
* @returns automatically synchronized promise through #recorder
|
|
7108
7111
|
*/
|
|
7109
|
-
pressKeyDown(key: string):
|
|
7112
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
7110
7113
|
/**
|
|
7111
7114
|
* Releases a key in the browser which was previously set to a down state.
|
|
7112
7115
|
*
|
|
@@ -7120,7 +7123,7 @@ declare namespace CodeceptJS {
|
|
|
7120
7123
|
* @param key - name of key to release.
|
|
7121
7124
|
* @returns automatically synchronized promise through #recorder
|
|
7122
7125
|
*/
|
|
7123
|
-
pressKeyUp(key: string):
|
|
7126
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
7124
7127
|
/**
|
|
7125
7128
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([puppeteer/puppeteer#1313](https://github.com/puppeteer/puppeteer/issues/1313)).
|
|
7126
7129
|
*
|
|
@@ -7184,7 +7187,7 @@ declare namespace CodeceptJS {
|
|
|
7184
7187
|
* @param key - key or array of keys to press.
|
|
7185
7188
|
* @returns automatically synchronized promise through #recorder
|
|
7186
7189
|
*/
|
|
7187
|
-
pressKey(key: string | string[]):
|
|
7190
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
7188
7191
|
/**
|
|
7189
7192
|
* Types out the given text into an active field.
|
|
7190
7193
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -7207,7 +7210,7 @@ declare namespace CodeceptJS {
|
|
|
7207
7210
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
7208
7211
|
* @returns automatically synchronized promise through #recorder
|
|
7209
7212
|
*/
|
|
7210
|
-
type(key: string | string[], delay?: number):
|
|
7213
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
7211
7214
|
/**
|
|
7212
7215
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
7213
7216
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -7235,7 +7238,7 @@ declare namespace CodeceptJS {
|
|
|
7235
7238
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7236
7239
|
* @returns automatically synchronized promise through #recorder
|
|
7237
7240
|
*/
|
|
7238
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7241
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7239
7242
|
/**
|
|
7240
7243
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
7241
7244
|
*
|
|
@@ -7252,7 +7255,7 @@ declare namespace CodeceptJS {
|
|
|
7252
7255
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7253
7256
|
* @returns automatically synchronized promise through #recorder.
|
|
7254
7257
|
*/
|
|
7255
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
7258
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7256
7259
|
/**
|
|
7257
7260
|
* Appends text to a input field or textarea.
|
|
7258
7261
|
* Field is located by name, label, CSS or XPath
|
|
@@ -7271,7 +7274,7 @@ declare namespace CodeceptJS {
|
|
|
7271
7274
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7272
7275
|
* @returns automatically synchronized promise through #recorder
|
|
7273
7276
|
*/
|
|
7274
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
7277
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7275
7278
|
/**
|
|
7276
7279
|
* Checks that the given input field or textarea equals to given value.
|
|
7277
7280
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7291,7 +7294,7 @@ declare namespace CodeceptJS {
|
|
|
7291
7294
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7292
7295
|
* @returns automatically synchronized promise through #recorder
|
|
7293
7296
|
*/
|
|
7294
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7297
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7295
7298
|
/**
|
|
7296
7299
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
7297
7300
|
* Opposite to `seeInField`.
|
|
@@ -7309,7 +7312,7 @@ declare namespace CodeceptJS {
|
|
|
7309
7312
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7310
7313
|
* @returns automatically synchronized promise through #recorder
|
|
7311
7314
|
*/
|
|
7312
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
7315
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7313
7316
|
/**
|
|
7314
7317
|
* > ⚠ 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.
|
|
7315
7318
|
*
|
|
@@ -7337,7 +7340,7 @@ declare namespace CodeceptJS {
|
|
|
7337
7340
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7338
7341
|
* @returns automatically synchronized promise through #recorder
|
|
7339
7342
|
*/
|
|
7340
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
7343
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7341
7344
|
/**
|
|
7342
7345
|
* Selects an option in a drop-down select.
|
|
7343
7346
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -7366,7 +7369,7 @@ declare namespace CodeceptJS {
|
|
|
7366
7369
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
7367
7370
|
* @returns automatically synchronized promise through #recorder
|
|
7368
7371
|
*/
|
|
7369
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
7372
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
7370
7373
|
/**
|
|
7371
7374
|
* Grab number of visible elements by locator.
|
|
7372
7375
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7387,13 +7390,13 @@ declare namespace CodeceptJS {
|
|
|
7387
7390
|
* @param url - a fragment to check
|
|
7388
7391
|
* @returns automatically synchronized promise through #recorder
|
|
7389
7392
|
*/
|
|
7390
|
-
seeInCurrentUrl(url: string):
|
|
7393
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
7391
7394
|
/**
|
|
7392
7395
|
* Checks that current url does not contain a provided fragment.
|
|
7393
7396
|
* @param url - value to check.
|
|
7394
7397
|
* @returns automatically synchronized promise through #recorder
|
|
7395
7398
|
*/
|
|
7396
|
-
dontSeeInCurrentUrl(url: string):
|
|
7399
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
7397
7400
|
/**
|
|
7398
7401
|
* Checks that current url is equal to provided one.
|
|
7399
7402
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7406,7 +7409,7 @@ declare namespace CodeceptJS {
|
|
|
7406
7409
|
* @param url - value to check.
|
|
7407
7410
|
* @returns automatically synchronized promise through #recorder
|
|
7408
7411
|
*/
|
|
7409
|
-
seeCurrentUrlEquals(url: string):
|
|
7412
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
7410
7413
|
/**
|
|
7411
7414
|
* Checks that current url is not equal to provided one.
|
|
7412
7415
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7418,7 +7421,7 @@ declare namespace CodeceptJS {
|
|
|
7418
7421
|
* @param url - value to check.
|
|
7419
7422
|
* @returns automatically synchronized promise through #recorder
|
|
7420
7423
|
*/
|
|
7421
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
7424
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
7422
7425
|
/**
|
|
7423
7426
|
* Checks that current URL path matches the expected path.
|
|
7424
7427
|
* Query strings and URL fragments are ignored.
|
|
@@ -7430,7 +7433,7 @@ declare namespace CodeceptJS {
|
|
|
7430
7433
|
* @param path - value to check.
|
|
7431
7434
|
* @returns automatically synchronized promise through #recorder
|
|
7432
7435
|
*/
|
|
7433
|
-
seeCurrentPathEquals(path: string):
|
|
7436
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
7434
7437
|
/**
|
|
7435
7438
|
* Checks that current URL path does NOT match the expected path.
|
|
7436
7439
|
* Query strings and URL fragments are ignored.
|
|
@@ -7442,7 +7445,7 @@ declare namespace CodeceptJS {
|
|
|
7442
7445
|
* @param path - value to check.
|
|
7443
7446
|
* @returns automatically synchronized promise through #recorder
|
|
7444
7447
|
*/
|
|
7445
|
-
dontSeeCurrentPathEquals(path: string):
|
|
7448
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
7446
7449
|
/**
|
|
7447
7450
|
* Checks that a page contains a visible text.
|
|
7448
7451
|
* Use context parameter to narrow down the search.
|
|
@@ -7456,7 +7459,7 @@ declare namespace CodeceptJS {
|
|
|
7456
7459
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
7457
7460
|
* @returns automatically synchronized promise through #recorder
|
|
7458
7461
|
*/
|
|
7459
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7462
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7460
7463
|
/**
|
|
7461
7464
|
* Checks that text is equal to provided one.
|
|
7462
7465
|
*
|
|
@@ -7467,7 +7470,7 @@ declare namespace CodeceptJS {
|
|
|
7467
7470
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
7468
7471
|
* @returns automatically synchronized promise through #recorder
|
|
7469
7472
|
*/
|
|
7470
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7473
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7471
7474
|
/**
|
|
7472
7475
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
7473
7476
|
* Use context parameter to narrow down the search.
|
|
@@ -7480,7 +7483,7 @@ declare namespace CodeceptJS {
|
|
|
7480
7483
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
7481
7484
|
* @returns automatically synchronized promise through #recorder
|
|
7482
7485
|
*/
|
|
7483
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
7486
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
7484
7487
|
/**
|
|
7485
7488
|
* Retrieves page source and returns it to test.
|
|
7486
7489
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7532,7 +7535,7 @@ declare namespace CodeceptJS {
|
|
|
7532
7535
|
* @param text - value to check.
|
|
7533
7536
|
* @returns automatically synchronized promise through #recorder
|
|
7534
7537
|
*/
|
|
7535
|
-
seeInSource(text: string):
|
|
7538
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
7536
7539
|
/**
|
|
7537
7540
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
7538
7541
|
*
|
|
@@ -7542,7 +7545,7 @@ declare namespace CodeceptJS {
|
|
|
7542
7545
|
* @param value - to check.
|
|
7543
7546
|
* @returns automatically synchronized promise through #recorder
|
|
7544
7547
|
*/
|
|
7545
|
-
dontSeeInSource(value: string):
|
|
7548
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
7546
7549
|
/**
|
|
7547
7550
|
* Asserts that an element appears a given number of times in the DOM.
|
|
7548
7551
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -7555,7 +7558,7 @@ declare namespace CodeceptJS {
|
|
|
7555
7558
|
* @param num - number of elements.
|
|
7556
7559
|
* @returns automatically synchronized promise through #recorder
|
|
7557
7560
|
*/
|
|
7558
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
7561
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
7559
7562
|
/**
|
|
7560
7563
|
* Asserts that an element is visible a given number of times.
|
|
7561
7564
|
* Element is located by CSS or XPath.
|
|
@@ -7567,7 +7570,7 @@ declare namespace CodeceptJS {
|
|
|
7567
7570
|
* @param num - number of elements.
|
|
7568
7571
|
* @returns automatically synchronized promise through #recorder
|
|
7569
7572
|
*/
|
|
7570
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
7573
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
7571
7574
|
/**
|
|
7572
7575
|
* Sets cookie(s).
|
|
7573
7576
|
*
|
|
@@ -7585,7 +7588,7 @@ declare namespace CodeceptJS {
|
|
|
7585
7588
|
* @param cookie - a cookie object or array of cookie objects.
|
|
7586
7589
|
* @returns automatically synchronized promise through #recorder
|
|
7587
7590
|
*/
|
|
7588
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
7591
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
7589
7592
|
/**
|
|
7590
7593
|
* Checks that cookie with given name exists.
|
|
7591
7594
|
*
|
|
@@ -7595,7 +7598,7 @@ declare namespace CodeceptJS {
|
|
|
7595
7598
|
* @param name - cookie name.
|
|
7596
7599
|
* @returns automatically synchronized promise through #recorder
|
|
7597
7600
|
*/
|
|
7598
|
-
seeCookie(name: string):
|
|
7601
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
7599
7602
|
/**
|
|
7600
7603
|
* Checks that cookie with given name does not exist.
|
|
7601
7604
|
*
|
|
@@ -7605,7 +7608,7 @@ declare namespace CodeceptJS {
|
|
|
7605
7608
|
* @param name - cookie name.
|
|
7606
7609
|
* @returns automatically synchronized promise through #recorder
|
|
7607
7610
|
*/
|
|
7608
|
-
dontSeeCookie(name: string):
|
|
7611
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
7609
7612
|
/**
|
|
7610
7613
|
* Gets a cookie object by name.
|
|
7611
7614
|
* If none provided gets all cookies.
|
|
@@ -7632,7 +7635,7 @@ declare namespace CodeceptJS {
|
|
|
7632
7635
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
7633
7636
|
* @returns automatically synchronized promise through #recorder
|
|
7634
7637
|
*/
|
|
7635
|
-
waitForCookie(name: string, sec?: number):
|
|
7638
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
7636
7639
|
/**
|
|
7637
7640
|
* Clears a cookie by name,
|
|
7638
7641
|
* if none provided clears all cookies.
|
|
@@ -7657,7 +7660,7 @@ declare namespace CodeceptJS {
|
|
|
7657
7660
|
* @param text - value to check.
|
|
7658
7661
|
* @returns automatically synchronized promise through #recorder
|
|
7659
7662
|
*/
|
|
7660
|
-
seeInClipboard(text: string):
|
|
7663
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
7661
7664
|
/**
|
|
7662
7665
|
* Checks that the system clipboard is equal to the given text.
|
|
7663
7666
|
*
|
|
@@ -7671,7 +7674,7 @@ declare namespace CodeceptJS {
|
|
|
7671
7674
|
* @param text - value to check.
|
|
7672
7675
|
* @returns automatically synchronized promise through #recorder
|
|
7673
7676
|
*/
|
|
7674
|
-
seeClipboardEquals(text: string):
|
|
7677
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
7675
7678
|
/**
|
|
7676
7679
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
7677
7680
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7695,7 +7698,7 @@ declare namespace CodeceptJS {
|
|
|
7695
7698
|
* ```
|
|
7696
7699
|
* @returns automatically synchronized promise through #recorder
|
|
7697
7700
|
*/
|
|
7698
|
-
clearClipboard():
|
|
7701
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
7699
7702
|
/**
|
|
7700
7703
|
* If a function returns a Promise, tt will wait for its resolution.
|
|
7701
7704
|
*
|
|
@@ -7857,7 +7860,7 @@ declare namespace CodeceptJS {
|
|
|
7857
7860
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
7858
7861
|
* @returns automatically synchronized promise through #recorder
|
|
7859
7862
|
*/
|
|
7860
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
7863
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
7861
7864
|
/**
|
|
7862
7865
|
* Checks that all elements with given locator have given attributes.
|
|
7863
7866
|
*
|
|
@@ -7868,7 +7871,7 @@ declare namespace CodeceptJS {
|
|
|
7868
7871
|
* @param attributes - attributes and their values to check.
|
|
7869
7872
|
* @returns automatically synchronized promise through #recorder
|
|
7870
7873
|
*/
|
|
7871
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
7874
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
7872
7875
|
/**
|
|
7873
7876
|
* Drag the scrubber of a slider to a given position
|
|
7874
7877
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7881,7 +7884,7 @@ declare namespace CodeceptJS {
|
|
|
7881
7884
|
* @param offsetX - position to drag.
|
|
7882
7885
|
* @returns automatically synchronized promise through #recorder
|
|
7883
7886
|
*/
|
|
7884
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
7887
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
7885
7888
|
/**
|
|
7886
7889
|
* Retrieves an array of attributes from elements located by CSS or XPath and returns it to test.
|
|
7887
7890
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -7918,7 +7921,7 @@ declare namespace CodeceptJS {
|
|
|
7918
7921
|
* @param fileName - file name to save.
|
|
7919
7922
|
* @returns automatically synchronized promise through #recorder
|
|
7920
7923
|
*/
|
|
7921
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
7924
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
7922
7925
|
/**
|
|
7923
7926
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
7924
7927
|
* Filename is relative to output folder.
|
|
@@ -7932,7 +7935,7 @@ declare namespace CodeceptJS {
|
|
|
7932
7935
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
7933
7936
|
* @returns automatically synchronized promise through #recorder
|
|
7934
7937
|
*/
|
|
7935
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
7938
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
7936
7939
|
/**
|
|
7937
7940
|
* Pauses execution for a number of seconds.
|
|
7938
7941
|
*
|
|
@@ -7942,7 +7945,7 @@ declare namespace CodeceptJS {
|
|
|
7942
7945
|
* @param sec - number of second to wait.
|
|
7943
7946
|
* @returns automatically synchronized promise through #recorder
|
|
7944
7947
|
*/
|
|
7945
|
-
wait(sec: number):
|
|
7948
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
7946
7949
|
/**
|
|
7947
7950
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
7948
7951
|
* Element can be located by CSS or XPath.
|
|
@@ -7950,7 +7953,7 @@ declare namespace CodeceptJS {
|
|
|
7950
7953
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
7951
7954
|
* @returns automatically synchronized promise through #recorder
|
|
7952
7955
|
*/
|
|
7953
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7956
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7954
7957
|
/**
|
|
7955
7958
|
* Waits for the specified value to be in value attribute.
|
|
7956
7959
|
*
|
|
@@ -7962,7 +7965,7 @@ declare namespace CodeceptJS {
|
|
|
7962
7965
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7963
7966
|
* @returns automatically synchronized promise through #recorder
|
|
7964
7967
|
*/
|
|
7965
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
7968
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
7966
7969
|
/**
|
|
7967
7970
|
* Waits for a specified number of elements on the page.
|
|
7968
7971
|
*
|
|
@@ -7974,7 +7977,7 @@ declare namespace CodeceptJS {
|
|
|
7974
7977
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7975
7978
|
* @returns automatically synchronized promise through #recorder
|
|
7976
7979
|
*/
|
|
7977
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
7980
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
7978
7981
|
/**
|
|
7979
7982
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
7980
7983
|
* Element can be located by CSS or XPath.
|
|
@@ -7987,7 +7990,7 @@ declare namespace CodeceptJS {
|
|
|
7987
7990
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7988
7991
|
* @returns automatically synchronized promise through #recorder
|
|
7989
7992
|
*/
|
|
7990
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
7993
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
7991
7994
|
/**
|
|
7992
7995
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
7993
7996
|
* Element can be located by CSS or XPath.
|
|
@@ -8000,7 +8003,7 @@ declare namespace CodeceptJS {
|
|
|
8000
8003
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
8001
8004
|
* @returns automatically synchronized promise through #recorder
|
|
8002
8005
|
*/
|
|
8003
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8006
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
8004
8007
|
/**
|
|
8005
8008
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
8006
8009
|
* Element can be located by CSS or XPath.
|
|
@@ -8012,7 +8015,7 @@ declare namespace CodeceptJS {
|
|
|
8012
8015
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8013
8016
|
* @returns automatically synchronized promise through #recorder
|
|
8014
8017
|
*/
|
|
8015
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8018
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
8016
8019
|
/**
|
|
8017
8020
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
8018
8021
|
* Element can be located by CSS or XPath.
|
|
@@ -8024,7 +8027,7 @@ declare namespace CodeceptJS {
|
|
|
8024
8027
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8025
8028
|
* @returns automatically synchronized promise through #recorder
|
|
8026
8029
|
*/
|
|
8027
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8030
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
8028
8031
|
/**
|
|
8029
8032
|
* Waits for an element to hide (by default waits for 1sec).
|
|
8030
8033
|
* Element can be located by CSS or XPath.
|
|
@@ -8036,7 +8039,7 @@ declare namespace CodeceptJS {
|
|
|
8036
8039
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8037
8040
|
* @returns automatically synchronized promise through #recorder
|
|
8038
8041
|
*/
|
|
8039
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8042
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
8040
8043
|
/**
|
|
8041
8044
|
* Waits for number of tabs.
|
|
8042
8045
|
*
|
|
@@ -8047,7 +8050,7 @@ declare namespace CodeceptJS {
|
|
|
8047
8050
|
* @param sec - number of secs to wait.
|
|
8048
8051
|
* @returns automatically synchronized promise through #recorder
|
|
8049
8052
|
*/
|
|
8050
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
8053
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
8051
8054
|
/**
|
|
8052
8055
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
8053
8056
|
*
|
|
@@ -8058,7 +8061,7 @@ declare namespace CodeceptJS {
|
|
|
8058
8061
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8059
8062
|
* @returns automatically synchronized promise through #recorder
|
|
8060
8063
|
*/
|
|
8061
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
8064
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
8062
8065
|
/**
|
|
8063
8066
|
* Waits for the entire URL to match the expected
|
|
8064
8067
|
*
|
|
@@ -8070,7 +8073,7 @@ declare namespace CodeceptJS {
|
|
|
8070
8073
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8071
8074
|
* @returns automatically synchronized promise through #recorder
|
|
8072
8075
|
*/
|
|
8073
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
8076
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
8074
8077
|
/**
|
|
8075
8078
|
* {{> waitCurrentPathEquals }}
|
|
8076
8079
|
*/
|
|
@@ -8089,7 +8092,7 @@ declare namespace CodeceptJS {
|
|
|
8089
8092
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
8090
8093
|
* @returns automatically synchronized promise through #recorder
|
|
8091
8094
|
*/
|
|
8092
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
8095
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
8093
8096
|
/**
|
|
8094
8097
|
* Waits for a network request.
|
|
8095
8098
|
*
|
|
@@ -8120,7 +8123,7 @@ declare namespace CodeceptJS {
|
|
|
8120
8123
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8121
8124
|
* @returns automatically synchronized promise through #recorder
|
|
8122
8125
|
*/
|
|
8123
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
8126
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
8124
8127
|
/**
|
|
8125
8128
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
8126
8129
|
* Running in browser context.
|
|
@@ -8139,7 +8142,7 @@ declare namespace CodeceptJS {
|
|
|
8139
8142
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
8140
8143
|
* @returns automatically synchronized promise through #recorder
|
|
8141
8144
|
*/
|
|
8142
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
8145
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
8143
8146
|
/**
|
|
8144
8147
|
* Waits for navigation to finish. By default, takes configured `waitForNavigation` option.
|
|
8145
8148
|
*
|
|
@@ -8157,7 +8160,7 @@ declare namespace CodeceptJS {
|
|
|
8157
8160
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8158
8161
|
* @returns automatically synchronized promise through #recorder
|
|
8159
8162
|
*/
|
|
8160
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
8163
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
8161
8164
|
/**
|
|
8162
8165
|
* Grab the data from performance timing using Navigation Timing API.
|
|
8163
8166
|
* The returned data will contain following things in ms:
|
|
@@ -8180,7 +8183,7 @@ declare namespace CodeceptJS {
|
|
|
8180
8183
|
* ```
|
|
8181
8184
|
* @returns automatically synchronized promise through #recorder
|
|
8182
8185
|
*/
|
|
8183
|
-
grabDataFromPerformanceTiming():
|
|
8186
|
+
grabDataFromPerformanceTiming(): CodeceptJS.StepPromise;
|
|
8184
8187
|
/**
|
|
8185
8188
|
* Grab the width, height, location of given locator.
|
|
8186
8189
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -8249,7 +8252,7 @@ declare namespace CodeceptJS {
|
|
|
8249
8252
|
* ```
|
|
8250
8253
|
* @returns automatically synchronized promise through #recorder
|
|
8251
8254
|
*/
|
|
8252
|
-
startRecordingTraffic():
|
|
8255
|
+
startRecordingTraffic(): CodeceptJS.StepPromise;
|
|
8253
8256
|
/**
|
|
8254
8257
|
* Grab the recording network traffics
|
|
8255
8258
|
*
|
|
@@ -8333,7 +8336,7 @@ declare namespace CodeceptJS {
|
|
|
8333
8336
|
* ```
|
|
8334
8337
|
* @returns automatically synchronized promise through #recorder
|
|
8335
8338
|
*/
|
|
8336
|
-
startRecordingWebSocketMessages():
|
|
8339
|
+
startRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
8337
8340
|
/**
|
|
8338
8341
|
* Stops recording WS messages. Recorded WS messages is not flashed.
|
|
8339
8342
|
*
|
|
@@ -8342,7 +8345,7 @@ declare namespace CodeceptJS {
|
|
|
8342
8345
|
* ```
|
|
8343
8346
|
* @returns automatically synchronized promise through #recorder
|
|
8344
8347
|
*/
|
|
8345
|
-
stopRecordingWebSocketMessages():
|
|
8348
|
+
stopRecordingWebSocketMessages(): CodeceptJS.StepPromise;
|
|
8346
8349
|
/**
|
|
8347
8350
|
* Grab the recording WS messages
|
|
8348
8351
|
*/
|
|
@@ -9083,9 +9086,9 @@ declare namespace CodeceptJS {
|
|
|
9083
9086
|
* const webElements = await I.grabWebElements('#button');
|
|
9084
9087
|
* ```
|
|
9085
9088
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9086
|
-
* @returns
|
|
9089
|
+
* @returns WebElements of being used Web helper
|
|
9087
9090
|
*/
|
|
9088
|
-
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9091
|
+
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement[]>;
|
|
9089
9092
|
/**
|
|
9090
9093
|
* Grab WebElement for given locator
|
|
9091
9094
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -9096,7 +9099,7 @@ declare namespace CodeceptJS {
|
|
|
9096
9099
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9097
9100
|
* @returns WebElement of being used Web helper
|
|
9098
9101
|
*/
|
|
9099
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9102
|
+
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<CodeceptJS.WebElement>;
|
|
9100
9103
|
/**
|
|
9101
9104
|
* Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime.
|
|
9102
9105
|
*
|
|
@@ -9121,7 +9124,7 @@ declare namespace CodeceptJS {
|
|
|
9121
9124
|
* @param url - url path or global url.
|
|
9122
9125
|
* @returns automatically synchronized promise through #recorder
|
|
9123
9126
|
*/
|
|
9124
|
-
amOnPage(url: string):
|
|
9127
|
+
amOnPage(url: string): CodeceptJS.StepPromise;
|
|
9125
9128
|
/**
|
|
9126
9129
|
* Perform a click on a link or a button, given by a locator.
|
|
9127
9130
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -9156,7 +9159,7 @@ declare namespace CodeceptJS {
|
|
|
9156
9159
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9157
9160
|
* @returns automatically synchronized promise through #recorder
|
|
9158
9161
|
*/
|
|
9159
|
-
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null):
|
|
9162
|
+
click(locator?: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): CodeceptJS.ElementStepPromise;
|
|
9160
9163
|
/**
|
|
9161
9164
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
9162
9165
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -9186,7 +9189,7 @@ declare namespace CodeceptJS {
|
|
|
9186
9189
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9187
9190
|
* @returns automatically synchronized promise through #recorder
|
|
9188
9191
|
*/
|
|
9189
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9192
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9190
9193
|
/**
|
|
9191
9194
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
9192
9195
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -9201,7 +9204,7 @@ declare namespace CodeceptJS {
|
|
|
9201
9204
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9202
9205
|
* @returns automatically synchronized promise through #recorder
|
|
9203
9206
|
*/
|
|
9204
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9207
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9205
9208
|
/**
|
|
9206
9209
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
9207
9210
|
*
|
|
@@ -9217,7 +9220,7 @@ declare namespace CodeceptJS {
|
|
|
9217
9220
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
9218
9221
|
* @returns automatically synchronized promise through #recorder
|
|
9219
9222
|
*/
|
|
9220
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9223
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9221
9224
|
/**
|
|
9222
9225
|
* Performs click at specific coordinates.
|
|
9223
9226
|
* If locator is provided, the coordinates are relative to the element's top-left corner.
|
|
@@ -9254,7 +9257,7 @@ declare namespace CodeceptJS {
|
|
|
9254
9257
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9255
9258
|
* @returns automatically synchronized promise through #recorder
|
|
9256
9259
|
*/
|
|
9257
|
-
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9260
|
+
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9258
9261
|
/**
|
|
9259
9262
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
9260
9263
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -9284,7 +9287,7 @@ declare namespace CodeceptJS {
|
|
|
9284
9287
|
*
|
|
9285
9288
|
* {{ custom }}
|
|
9286
9289
|
*/
|
|
9287
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9290
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9288
9291
|
/**
|
|
9289
9292
|
* Appends text to a input field or textarea.
|
|
9290
9293
|
* Field is located by name, label, CSS or XPath
|
|
@@ -9303,7 +9306,7 @@ declare namespace CodeceptJS {
|
|
|
9303
9306
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9304
9307
|
* @returns automatically synchronized promise through #recorder
|
|
9305
9308
|
*/
|
|
9306
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString):
|
|
9309
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9307
9310
|
/**
|
|
9308
9311
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
9309
9312
|
*
|
|
@@ -9320,7 +9323,7 @@ declare namespace CodeceptJS {
|
|
|
9320
9323
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9321
9324
|
* @returns automatically synchronized promise through #recorder.
|
|
9322
9325
|
*/
|
|
9323
|
-
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9326
|
+
clearField(editable: LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9324
9327
|
/**
|
|
9325
9328
|
* Selects an option in a drop-down select.
|
|
9326
9329
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -9349,7 +9352,7 @@ declare namespace CodeceptJS {
|
|
|
9349
9352
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9350
9353
|
* @returns automatically synchronized promise through #recorder
|
|
9351
9354
|
*/
|
|
9352
|
-
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString):
|
|
9355
|
+
selectOption(select: LocatorOrString, option: string | any[], context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9353
9356
|
/**
|
|
9354
9357
|
* Appium: not tested
|
|
9355
9358
|
*
|
|
@@ -9377,7 +9380,7 @@ declare namespace CodeceptJS {
|
|
|
9377
9380
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9378
9381
|
* @returns automatically synchronized promise through #recorder
|
|
9379
9382
|
*/
|
|
9380
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString):
|
|
9383
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9381
9384
|
/**
|
|
9382
9385
|
* Appium: not tested
|
|
9383
9386
|
* Selects a checkbox or radio button.
|
|
@@ -9394,7 +9397,7 @@ declare namespace CodeceptJS {
|
|
|
9394
9397
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9395
9398
|
* @returns automatically synchronized promise through #recorder
|
|
9396
9399
|
*/
|
|
9397
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9400
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9398
9401
|
/**
|
|
9399
9402
|
* Appium: not tested
|
|
9400
9403
|
* Unselects a checkbox or radio button.
|
|
@@ -9411,7 +9414,7 @@ declare namespace CodeceptJS {
|
|
|
9411
9414
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9412
9415
|
* @returns automatically synchronized promise through #recorder
|
|
9413
9416
|
*/
|
|
9414
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9417
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
9415
9418
|
/**
|
|
9416
9419
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
9417
9420
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9540,7 +9543,7 @@ declare namespace CodeceptJS {
|
|
|
9540
9543
|
* @param text - text value to check.
|
|
9541
9544
|
* @returns automatically synchronized promise through #recorder
|
|
9542
9545
|
*/
|
|
9543
|
-
seeInTitle(text: string):
|
|
9546
|
+
seeInTitle(text: string): CodeceptJS.StepPromise;
|
|
9544
9547
|
/**
|
|
9545
9548
|
* Checks that title is equal to provided one.
|
|
9546
9549
|
*
|
|
@@ -9550,7 +9553,7 @@ declare namespace CodeceptJS {
|
|
|
9550
9553
|
* @param text - value to check.
|
|
9551
9554
|
* @returns automatically synchronized promise through #recorder
|
|
9552
9555
|
*/
|
|
9553
|
-
seeTitleEquals(text: string):
|
|
9556
|
+
seeTitleEquals(text: string): CodeceptJS.StepPromise;
|
|
9554
9557
|
/**
|
|
9555
9558
|
* Checks that title does not contain text.
|
|
9556
9559
|
*
|
|
@@ -9560,7 +9563,7 @@ declare namespace CodeceptJS {
|
|
|
9560
9563
|
* @param text - value to check.
|
|
9561
9564
|
* @returns automatically synchronized promise through #recorder
|
|
9562
9565
|
*/
|
|
9563
|
-
dontSeeInTitle(text: string):
|
|
9566
|
+
dontSeeInTitle(text: string): CodeceptJS.StepPromise;
|
|
9564
9567
|
/**
|
|
9565
9568
|
* Retrieves a page title and returns it to test.
|
|
9566
9569
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9584,7 +9587,7 @@ declare namespace CodeceptJS {
|
|
|
9584
9587
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
9585
9588
|
* @returns automatically synchronized promise through #recorder
|
|
9586
9589
|
*/
|
|
9587
|
-
see(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9590
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9588
9591
|
/**
|
|
9589
9592
|
* Checks that text is equal to provided one.
|
|
9590
9593
|
*
|
|
@@ -9595,7 +9598,7 @@ declare namespace CodeceptJS {
|
|
|
9595
9598
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
9596
9599
|
* @returns automatically synchronized promise through #recorder
|
|
9597
9600
|
*/
|
|
9598
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9601
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9599
9602
|
/**
|
|
9600
9603
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
9601
9604
|
* Use context parameter to narrow down the search.
|
|
@@ -9608,7 +9611,7 @@ declare namespace CodeceptJS {
|
|
|
9608
9611
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
9609
9612
|
* @returns automatically synchronized promise through #recorder
|
|
9610
9613
|
*/
|
|
9611
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString):
|
|
9614
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9612
9615
|
/**
|
|
9613
9616
|
* Checks that the given input field or textarea equals to given value.
|
|
9614
9617
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -9628,7 +9631,7 @@ declare namespace CodeceptJS {
|
|
|
9628
9631
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9629
9632
|
* @returns automatically synchronized promise through #recorder
|
|
9630
9633
|
*/
|
|
9631
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9634
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9632
9635
|
/**
|
|
9633
9636
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
9634
9637
|
* Opposite to `seeInField`.
|
|
@@ -9646,7 +9649,7 @@ declare namespace CodeceptJS {
|
|
|
9646
9649
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9647
9650
|
* @returns automatically synchronized promise through #recorder
|
|
9648
9651
|
*/
|
|
9649
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString):
|
|
9652
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9650
9653
|
/**
|
|
9651
9654
|
* Appium: not tested
|
|
9652
9655
|
* Verifies that the specified checkbox is checked.
|
|
@@ -9659,7 +9662,7 @@ declare namespace CodeceptJS {
|
|
|
9659
9662
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9660
9663
|
* @returns automatically synchronized promise through #recorder
|
|
9661
9664
|
*/
|
|
9662
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
9665
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9663
9666
|
/**
|
|
9664
9667
|
* Appium: not tested
|
|
9665
9668
|
* Verifies that the specified checkbox is not checked.
|
|
@@ -9672,7 +9675,7 @@ declare namespace CodeceptJS {
|
|
|
9672
9675
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9673
9676
|
* @returns automatically synchronized promise through #recorder
|
|
9674
9677
|
*/
|
|
9675
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString):
|
|
9678
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9676
9679
|
/**
|
|
9677
9680
|
* Checks that a given Element is visible
|
|
9678
9681
|
* Element is located by CSS or XPath.
|
|
@@ -9691,7 +9694,7 @@ declare namespace CodeceptJS {
|
|
|
9691
9694
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9692
9695
|
* @returns automatically synchronized promise through #recorder
|
|
9693
9696
|
*/
|
|
9694
|
-
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9697
|
+
seeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9695
9698
|
/**
|
|
9696
9699
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
9697
9700
|
*
|
|
@@ -9705,7 +9708,7 @@ declare namespace CodeceptJS {
|
|
|
9705
9708
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9706
9709
|
* @returns automatically synchronized promise through #recorder
|
|
9707
9710
|
*/
|
|
9708
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString):
|
|
9711
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9709
9712
|
/**
|
|
9710
9713
|
* Checks that a given Element is present in the DOM
|
|
9711
9714
|
* Element is located by CSS or XPath.
|
|
@@ -9716,7 +9719,7 @@ declare namespace CodeceptJS {
|
|
|
9716
9719
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9717
9720
|
* @returns automatically synchronized promise through #recorder
|
|
9718
9721
|
*/
|
|
9719
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
9722
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9720
9723
|
/**
|
|
9721
9724
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
9722
9725
|
*
|
|
@@ -9726,7 +9729,7 @@ declare namespace CodeceptJS {
|
|
|
9726
9729
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9727
9730
|
* @returns automatically synchronized promise through #recorder
|
|
9728
9731
|
*/
|
|
9729
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString):
|
|
9732
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
9730
9733
|
/**
|
|
9731
9734
|
* Checks that the current page contains the given string in its raw source code.
|
|
9732
9735
|
*
|
|
@@ -9736,7 +9739,7 @@ declare namespace CodeceptJS {
|
|
|
9736
9739
|
* @param text - value to check.
|
|
9737
9740
|
* @returns automatically synchronized promise through #recorder
|
|
9738
9741
|
*/
|
|
9739
|
-
seeInSource(text: string):
|
|
9742
|
+
seeInSource(text: string): CodeceptJS.StepPromise;
|
|
9740
9743
|
/**
|
|
9741
9744
|
* Retrieves page source and returns it to test.
|
|
9742
9745
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -9778,7 +9781,7 @@ declare namespace CodeceptJS {
|
|
|
9778
9781
|
* @param value - to check.
|
|
9779
9782
|
* @returns automatically synchronized promise through #recorder
|
|
9780
9783
|
*/
|
|
9781
|
-
dontSeeInSource(value: string):
|
|
9784
|
+
dontSeeInSource(value: string): CodeceptJS.StepPromise;
|
|
9782
9785
|
/**
|
|
9783
9786
|
* Asserts that an element appears a given number of times in the DOM.
|
|
9784
9787
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -9791,7 +9794,7 @@ declare namespace CodeceptJS {
|
|
|
9791
9794
|
* @param num - number of elements.
|
|
9792
9795
|
* @returns automatically synchronized promise through #recorder
|
|
9793
9796
|
*/
|
|
9794
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
9797
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
9795
9798
|
/**
|
|
9796
9799
|
* Asserts that an element is visible a given number of times.
|
|
9797
9800
|
* Element is located by CSS or XPath.
|
|
@@ -9803,7 +9806,7 @@ declare namespace CodeceptJS {
|
|
|
9803
9806
|
* @param num - number of elements.
|
|
9804
9807
|
* @returns automatically synchronized promise through #recorder
|
|
9805
9808
|
*/
|
|
9806
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number):
|
|
9809
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): CodeceptJS.StepPromise;
|
|
9807
9810
|
/**
|
|
9808
9811
|
* Checks that all elements with given locator have given CSS properties.
|
|
9809
9812
|
*
|
|
@@ -9814,7 +9817,7 @@ declare namespace CodeceptJS {
|
|
|
9814
9817
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
9815
9818
|
* @returns automatically synchronized promise through #recorder
|
|
9816
9819
|
*/
|
|
9817
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any):
|
|
9820
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): CodeceptJS.StepPromise;
|
|
9818
9821
|
/**
|
|
9819
9822
|
* Checks that all elements with given locator have given attributes.
|
|
9820
9823
|
*
|
|
@@ -9825,7 +9828,7 @@ declare namespace CodeceptJS {
|
|
|
9825
9828
|
* @param attributes - attributes and their values to check.
|
|
9826
9829
|
* @returns automatically synchronized promise through #recorder
|
|
9827
9830
|
*/
|
|
9828
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any):
|
|
9831
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): CodeceptJS.StepPromise;
|
|
9829
9832
|
/**
|
|
9830
9833
|
* Grab number of visible elements by locator.
|
|
9831
9834
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -9846,13 +9849,13 @@ declare namespace CodeceptJS {
|
|
|
9846
9849
|
* @param url - a fragment to check
|
|
9847
9850
|
* @returns automatically synchronized promise through #recorder
|
|
9848
9851
|
*/
|
|
9849
|
-
seeInCurrentUrl(url: string):
|
|
9852
|
+
seeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
9850
9853
|
/**
|
|
9851
9854
|
* Checks that current url does not contain a provided fragment.
|
|
9852
9855
|
* @param url - value to check.
|
|
9853
9856
|
* @returns automatically synchronized promise through #recorder
|
|
9854
9857
|
*/
|
|
9855
|
-
dontSeeInCurrentUrl(url: string):
|
|
9858
|
+
dontSeeInCurrentUrl(url: string): CodeceptJS.StepPromise;
|
|
9856
9859
|
/**
|
|
9857
9860
|
* Checks that current url is equal to provided one.
|
|
9858
9861
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -9865,7 +9868,7 @@ declare namespace CodeceptJS {
|
|
|
9865
9868
|
* @param url - value to check.
|
|
9866
9869
|
* @returns automatically synchronized promise through #recorder
|
|
9867
9870
|
*/
|
|
9868
|
-
seeCurrentUrlEquals(url: string):
|
|
9871
|
+
seeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
9869
9872
|
/**
|
|
9870
9873
|
* Checks that current url is not equal to provided one.
|
|
9871
9874
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -9877,7 +9880,7 @@ declare namespace CodeceptJS {
|
|
|
9877
9880
|
* @param url - value to check.
|
|
9878
9881
|
* @returns automatically synchronized promise through #recorder
|
|
9879
9882
|
*/
|
|
9880
|
-
dontSeeCurrentUrlEquals(url: string):
|
|
9883
|
+
dontSeeCurrentUrlEquals(url: string): CodeceptJS.StepPromise;
|
|
9881
9884
|
/**
|
|
9882
9885
|
* Checks that current URL path matches the expected path.
|
|
9883
9886
|
* Query strings and URL fragments are ignored.
|
|
@@ -9889,7 +9892,7 @@ declare namespace CodeceptJS {
|
|
|
9889
9892
|
* @param path - value to check.
|
|
9890
9893
|
* @returns automatically synchronized promise through #recorder
|
|
9891
9894
|
*/
|
|
9892
|
-
seeCurrentPathEquals(path: string):
|
|
9895
|
+
seeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
9893
9896
|
/**
|
|
9894
9897
|
* Checks that current URL path does NOT match the expected path.
|
|
9895
9898
|
* Query strings and URL fragments are ignored.
|
|
@@ -9901,7 +9904,7 @@ declare namespace CodeceptJS {
|
|
|
9901
9904
|
* @param path - value to check.
|
|
9902
9905
|
* @returns automatically synchronized promise through #recorder
|
|
9903
9906
|
*/
|
|
9904
|
-
dontSeeCurrentPathEquals(path: string):
|
|
9907
|
+
dontSeeCurrentPathEquals(path: string): CodeceptJS.StepPromise;
|
|
9905
9908
|
/**
|
|
9906
9909
|
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
9907
9910
|
*
|
|
@@ -9970,7 +9973,7 @@ declare namespace CodeceptJS {
|
|
|
9970
9973
|
* @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
9971
9974
|
* @returns automatically synchronized promise through #recorder
|
|
9972
9975
|
*/
|
|
9973
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean):
|
|
9976
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): CodeceptJS.StepPromise;
|
|
9974
9977
|
/**
|
|
9975
9978
|
* Scrolls to element matched by locator.
|
|
9976
9979
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -9984,7 +9987,7 @@ declare namespace CodeceptJS {
|
|
|
9984
9987
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
9985
9988
|
* @returns automatically synchronized promise through #recorder
|
|
9986
9989
|
*/
|
|
9987
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number):
|
|
9990
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
9988
9991
|
/**
|
|
9989
9992
|
* Moves cursor to element matched by locator.
|
|
9990
9993
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -10002,7 +10005,7 @@ declare namespace CodeceptJS {
|
|
|
10002
10005
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
10003
10006
|
* @returns automatically synchronized promise through #recorder
|
|
10004
10007
|
*/
|
|
10005
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number):
|
|
10008
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number | CodeceptJS.LocatorOrString, offsetY?: number): CodeceptJS.ElementStepPromise;
|
|
10006
10009
|
/**
|
|
10007
10010
|
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10008
10011
|
* Filename is relative to output folder.
|
|
@@ -10014,7 +10017,7 @@ declare namespace CodeceptJS {
|
|
|
10014
10017
|
* @param fileName - file name to save.
|
|
10015
10018
|
* @returns automatically synchronized promise through #recorder
|
|
10016
10019
|
*/
|
|
10017
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string):
|
|
10020
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): CodeceptJS.ElementStepPromise;
|
|
10018
10021
|
/**
|
|
10019
10022
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10020
10023
|
* Filename is relative to output folder.
|
|
@@ -10028,7 +10031,7 @@ declare namespace CodeceptJS {
|
|
|
10028
10031
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
10029
10032
|
* @returns automatically synchronized promise through #recorder
|
|
10030
10033
|
*/
|
|
10031
|
-
saveScreenshot(fileName: string, fullPage?: boolean):
|
|
10034
|
+
saveScreenshot(fileName: string, fullPage?: boolean): CodeceptJS.StepPromise;
|
|
10032
10035
|
/**
|
|
10033
10036
|
* Uses Selenium's JSON [cookie format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
|
|
10034
10037
|
* Sets cookie(s).
|
|
@@ -10047,7 +10050,7 @@ declare namespace CodeceptJS {
|
|
|
10047
10050
|
* @param cookie - a cookie object or array of cookie objects.
|
|
10048
10051
|
* @returns automatically synchronized promise through #recorder
|
|
10049
10052
|
*/
|
|
10050
|
-
setCookie(cookie: Cookie | Cookie[]):
|
|
10053
|
+
setCookie(cookie: Cookie | Cookie[]): CodeceptJS.StepPromise;
|
|
10051
10054
|
/**
|
|
10052
10055
|
* Clears a cookie by name,
|
|
10053
10056
|
* if none provided clears all cookies.
|
|
@@ -10068,7 +10071,7 @@ declare namespace CodeceptJS {
|
|
|
10068
10071
|
* @param name - cookie name.
|
|
10069
10072
|
* @returns automatically synchronized promise through #recorder
|
|
10070
10073
|
*/
|
|
10071
|
-
seeCookie(name: string):
|
|
10074
|
+
seeCookie(name: string): CodeceptJS.StepPromise;
|
|
10072
10075
|
/**
|
|
10073
10076
|
* Checks that cookie with given name does not exist.
|
|
10074
10077
|
*
|
|
@@ -10078,7 +10081,7 @@ declare namespace CodeceptJS {
|
|
|
10078
10081
|
* @param name - cookie name.
|
|
10079
10082
|
* @returns automatically synchronized promise through #recorder
|
|
10080
10083
|
*/
|
|
10081
|
-
dontSeeCookie(name: string):
|
|
10084
|
+
dontSeeCookie(name: string): CodeceptJS.StepPromise;
|
|
10082
10085
|
/**
|
|
10083
10086
|
* Gets a cookie object by name.
|
|
10084
10087
|
* If none provided gets all cookies.
|
|
@@ -10105,7 +10108,7 @@ declare namespace CodeceptJS {
|
|
|
10105
10108
|
* @param text - value to check.
|
|
10106
10109
|
* @returns automatically synchronized promise through #recorder
|
|
10107
10110
|
*/
|
|
10108
|
-
seeInClipboard(text: string):
|
|
10111
|
+
seeInClipboard(text: string): CodeceptJS.StepPromise;
|
|
10109
10112
|
/**
|
|
10110
10113
|
* Checks that the system clipboard is equal to the given text.
|
|
10111
10114
|
*
|
|
@@ -10119,7 +10122,7 @@ declare namespace CodeceptJS {
|
|
|
10119
10122
|
* @param text - value to check.
|
|
10120
10123
|
* @returns automatically synchronized promise through #recorder
|
|
10121
10124
|
*/
|
|
10122
|
-
seeClipboardEquals(text: string):
|
|
10125
|
+
seeClipboardEquals(text: string): CodeceptJS.StepPromise;
|
|
10123
10126
|
/**
|
|
10124
10127
|
* Grabs the text content of the system clipboard and returns it to test.
|
|
10125
10128
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10143,7 +10146,7 @@ declare namespace CodeceptJS {
|
|
|
10143
10146
|
* ```
|
|
10144
10147
|
* @returns automatically synchronized promise through #recorder
|
|
10145
10148
|
*/
|
|
10146
|
-
clearClipboard():
|
|
10149
|
+
clearClipboard(): CodeceptJS.StepPromise;
|
|
10147
10150
|
/**
|
|
10148
10151
|
* Waits for the specified cookie in the cookies.
|
|
10149
10152
|
*
|
|
@@ -10154,7 +10157,7 @@ declare namespace CodeceptJS {
|
|
|
10154
10157
|
* @param [sec = 3] - (optional, `3` by default) time in seconds to wait
|
|
10155
10158
|
* @returns automatically synchronized promise through #recorder
|
|
10156
10159
|
*/
|
|
10157
|
-
waitForCookie(name: string, sec?: number):
|
|
10160
|
+
waitForCookie(name: string, sec?: number): CodeceptJS.StepPromise;
|
|
10158
10161
|
/**
|
|
10159
10162
|
* Accepts the active JavaScript native popup window, as created by window.alert|window.confirm|window.prompt.
|
|
10160
10163
|
* Don't confuse popups with modal windows, as created by [various
|
|
@@ -10191,7 +10194,7 @@ declare namespace CodeceptJS {
|
|
|
10191
10194
|
* @param key - name of key to press down.
|
|
10192
10195
|
* @returns automatically synchronized promise through #recorder
|
|
10193
10196
|
*/
|
|
10194
|
-
pressKeyDown(key: string):
|
|
10197
|
+
pressKeyDown(key: string): CodeceptJS.StepPromise;
|
|
10195
10198
|
/**
|
|
10196
10199
|
* Releases a key in the browser which was previously set to a down state.
|
|
10197
10200
|
*
|
|
@@ -10205,7 +10208,7 @@ declare namespace CodeceptJS {
|
|
|
10205
10208
|
* @param key - name of key to release.
|
|
10206
10209
|
* @returns automatically synchronized promise through #recorder
|
|
10207
10210
|
*/
|
|
10208
|
-
pressKeyUp(key: string):
|
|
10211
|
+
pressKeyUp(key: string): CodeceptJS.StepPromise;
|
|
10209
10212
|
/**
|
|
10210
10213
|
* _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.
|
|
10211
10214
|
*
|
|
@@ -10269,7 +10272,7 @@ declare namespace CodeceptJS {
|
|
|
10269
10272
|
* @param key - key or array of keys to press.
|
|
10270
10273
|
* @returns automatically synchronized promise through #recorder
|
|
10271
10274
|
*/
|
|
10272
|
-
pressKey(key: string | string[]):
|
|
10275
|
+
pressKey(key: string | string[]): CodeceptJS.StepPromise;
|
|
10273
10276
|
/**
|
|
10274
10277
|
* Types out the given text into an active field.
|
|
10275
10278
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -10292,7 +10295,7 @@ declare namespace CodeceptJS {
|
|
|
10292
10295
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
10293
10296
|
* @returns automatically synchronized promise through #recorder
|
|
10294
10297
|
*/
|
|
10295
|
-
type(key: string | string[], delay?: number):
|
|
10298
|
+
type(key: string | string[], delay?: number): CodeceptJS.StepPromise;
|
|
10296
10299
|
/**
|
|
10297
10300
|
* Appium: not tested in web, in apps doesn't work
|
|
10298
10301
|
*
|
|
@@ -10302,7 +10305,7 @@ declare namespace CodeceptJS {
|
|
|
10302
10305
|
* @param height - height in pixels.
|
|
10303
10306
|
* @returns automatically synchronized promise through #recorder
|
|
10304
10307
|
*/
|
|
10305
|
-
resizeWindow(width: number, height: number):
|
|
10308
|
+
resizeWindow(width: number, height: number): CodeceptJS.StepPromise;
|
|
10306
10309
|
/**
|
|
10307
10310
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
10308
10311
|
*
|
|
@@ -10317,7 +10320,7 @@ declare namespace CodeceptJS {
|
|
|
10317
10320
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
10318
10321
|
* @returns automatically synchronized promise through #recorder
|
|
10319
10322
|
*/
|
|
10320
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
10323
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
10321
10324
|
/**
|
|
10322
10325
|
* Remove focus from a text input, button, etc.
|
|
10323
10326
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -10337,7 +10340,7 @@ declare namespace CodeceptJS {
|
|
|
10337
10340
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
10338
10341
|
* @returns automatically synchronized promise through #recorder
|
|
10339
10342
|
*/
|
|
10340
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any):
|
|
10343
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): CodeceptJS.ElementStepPromise;
|
|
10341
10344
|
/**
|
|
10342
10345
|
* Appium: not tested
|
|
10343
10346
|
* Drag an item to a destination element.
|
|
@@ -10349,7 +10352,7 @@ declare namespace CodeceptJS {
|
|
|
10349
10352
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
10350
10353
|
* @returns automatically synchronized promise through #recorder
|
|
10351
10354
|
*/
|
|
10352
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString):
|
|
10355
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): CodeceptJS.ElementStepPromise;
|
|
10353
10356
|
/**
|
|
10354
10357
|
* Drag the scrubber of a slider to a given position
|
|
10355
10358
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -10362,7 +10365,7 @@ declare namespace CodeceptJS {
|
|
|
10362
10365
|
* @param offsetX - position to drag.
|
|
10363
10366
|
* @returns automatically synchronized promise through #recorder
|
|
10364
10367
|
*/
|
|
10365
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number):
|
|
10368
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): CodeceptJS.ElementStepPromise;
|
|
10366
10369
|
/**
|
|
10367
10370
|
* Get all Window Handles.
|
|
10368
10371
|
* Useful for referencing a specific handle when calling `I.switchToWindow(handle)`
|
|
@@ -10404,7 +10407,7 @@ declare namespace CodeceptJS {
|
|
|
10404
10407
|
* ```
|
|
10405
10408
|
* @returns automatically synchronized promise through #recorder
|
|
10406
10409
|
*/
|
|
10407
|
-
closeOtherTabs():
|
|
10410
|
+
closeOtherTabs(): CodeceptJS.StepPromise;
|
|
10408
10411
|
/**
|
|
10409
10412
|
* Pauses execution for a number of seconds.
|
|
10410
10413
|
*
|
|
@@ -10414,7 +10417,7 @@ declare namespace CodeceptJS {
|
|
|
10414
10417
|
* @param sec - number of second to wait.
|
|
10415
10418
|
* @returns automatically synchronized promise through #recorder
|
|
10416
10419
|
*/
|
|
10417
|
-
wait(sec: number):
|
|
10420
|
+
wait(sec: number): CodeceptJS.StepPromise;
|
|
10418
10421
|
/**
|
|
10419
10422
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
10420
10423
|
* Element can be located by CSS or XPath.
|
|
@@ -10422,7 +10425,7 @@ declare namespace CodeceptJS {
|
|
|
10422
10425
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
10423
10426
|
* @returns automatically synchronized promise through #recorder
|
|
10424
10427
|
*/
|
|
10425
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10428
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10426
10429
|
/**
|
|
10427
10430
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
10428
10431
|
* Element can be located by CSS or XPath.
|
|
@@ -10435,7 +10438,7 @@ declare namespace CodeceptJS {
|
|
|
10435
10438
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10436
10439
|
* @returns automatically synchronized promise through #recorder
|
|
10437
10440
|
*/
|
|
10438
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10441
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10439
10442
|
/**
|
|
10440
10443
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
10441
10444
|
* Element can be located by CSS or XPath.
|
|
@@ -10448,7 +10451,7 @@ declare namespace CodeceptJS {
|
|
|
10448
10451
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
10449
10452
|
* @returns automatically synchronized promise through #recorder
|
|
10450
10453
|
*/
|
|
10451
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10454
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10452
10455
|
/**
|
|
10453
10456
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
10454
10457
|
*
|
|
@@ -10459,7 +10462,7 @@ declare namespace CodeceptJS {
|
|
|
10459
10462
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10460
10463
|
* @returns automatically synchronized promise through #recorder
|
|
10461
10464
|
*/
|
|
10462
|
-
waitInUrl(urlPart: string, sec?: number):
|
|
10465
|
+
waitInUrl(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
10463
10466
|
/**
|
|
10464
10467
|
* Waits for the entire URL to match the expected
|
|
10465
10468
|
*
|
|
@@ -10471,7 +10474,7 @@ declare namespace CodeceptJS {
|
|
|
10471
10474
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10472
10475
|
* @returns automatically synchronized promise through #recorder
|
|
10473
10476
|
*/
|
|
10474
|
-
waitUrlEquals(urlPart: string, sec?: number):
|
|
10477
|
+
waitUrlEquals(urlPart: string, sec?: number): CodeceptJS.StepPromise;
|
|
10475
10478
|
/**
|
|
10476
10479
|
* {{> waitCurrentPathEquals }}
|
|
10477
10480
|
*/
|
|
@@ -10490,7 +10493,7 @@ declare namespace CodeceptJS {
|
|
|
10490
10493
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
10491
10494
|
* @returns automatically synchronized promise through #recorder
|
|
10492
10495
|
*/
|
|
10493
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString):
|
|
10496
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
10494
10497
|
/**
|
|
10495
10498
|
* Waits for the specified value to be in value attribute.
|
|
10496
10499
|
*
|
|
@@ -10502,7 +10505,7 @@ declare namespace CodeceptJS {
|
|
|
10502
10505
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10503
10506
|
* @returns automatically synchronized promise through #recorder
|
|
10504
10507
|
*/
|
|
10505
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number):
|
|
10508
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): CodeceptJS.StepPromise;
|
|
10506
10509
|
/**
|
|
10507
10510
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
10508
10511
|
* Element can be located by CSS or XPath.
|
|
@@ -10514,7 +10517,7 @@ declare namespace CodeceptJS {
|
|
|
10514
10517
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10515
10518
|
* @returns automatically synchronized promise through #recorder
|
|
10516
10519
|
*/
|
|
10517
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10520
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10518
10521
|
/**
|
|
10519
10522
|
* Waits for a specified number of elements on the page.
|
|
10520
10523
|
*
|
|
@@ -10526,7 +10529,7 @@ declare namespace CodeceptJS {
|
|
|
10526
10529
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10527
10530
|
* @returns automatically synchronized promise through #recorder
|
|
10528
10531
|
*/
|
|
10529
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number):
|
|
10532
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): CodeceptJS.StepPromise;
|
|
10530
10533
|
/**
|
|
10531
10534
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
10532
10535
|
* Element can be located by CSS or XPath.
|
|
@@ -10538,7 +10541,7 @@ declare namespace CodeceptJS {
|
|
|
10538
10541
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10539
10542
|
* @returns automatically synchronized promise through #recorder
|
|
10540
10543
|
*/
|
|
10541
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10544
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10542
10545
|
/**
|
|
10543
10546
|
* Waits for an element to hide (by default waits for 1sec).
|
|
10544
10547
|
* Element can be located by CSS or XPath.
|
|
@@ -10550,7 +10553,7 @@ declare namespace CodeceptJS {
|
|
|
10550
10553
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10551
10554
|
* @returns automatically synchronized promise through #recorder
|
|
10552
10555
|
*/
|
|
10553
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10556
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10554
10557
|
/**
|
|
10555
10558
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
10556
10559
|
* Element can be located by CSS or XPath.
|
|
@@ -10562,7 +10565,7 @@ declare namespace CodeceptJS {
|
|
|
10562
10565
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10563
10566
|
* @returns automatically synchronized promise through #recorder
|
|
10564
10567
|
*/
|
|
10565
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number):
|
|
10568
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): CodeceptJS.StepPromise;
|
|
10566
10569
|
/**
|
|
10567
10570
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
10568
10571
|
* Running in browser context.
|
|
@@ -10581,7 +10584,7 @@ declare namespace CodeceptJS {
|
|
|
10581
10584
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10582
10585
|
* @returns automatically synchronized promise through #recorder
|
|
10583
10586
|
*/
|
|
10584
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number):
|
|
10587
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): CodeceptJS.StepPromise;
|
|
10585
10588
|
/**
|
|
10586
10589
|
* Waits for number of tabs.
|
|
10587
10590
|
*
|
|
@@ -10592,7 +10595,7 @@ declare namespace CodeceptJS {
|
|
|
10592
10595
|
* @param sec - number of secs to wait.
|
|
10593
10596
|
* @returns automatically synchronized promise through #recorder
|
|
10594
10597
|
*/
|
|
10595
|
-
waitForNumberOfTabs(expectedTabs: number, sec: number):
|
|
10598
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): CodeceptJS.StepPromise;
|
|
10596
10599
|
/**
|
|
10597
10600
|
* Switches frame or in case of null locator reverts to parent.
|
|
10598
10601
|
*
|
|
@@ -10603,7 +10606,7 @@ declare namespace CodeceptJS {
|
|
|
10603
10606
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
10604
10607
|
* @returns automatically synchronized promise through #recorder
|
|
10605
10608
|
*/
|
|
10606
|
-
switchTo(locator?: CodeceptJS.LocatorOrString):
|
|
10609
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): CodeceptJS.StepPromise;
|
|
10607
10610
|
/**
|
|
10608
10611
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10609
10612
|
*
|
|
@@ -10615,7 +10618,7 @@ declare namespace CodeceptJS {
|
|
|
10615
10618
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10616
10619
|
* @returns automatically synchronized promise through #recorder
|
|
10617
10620
|
*/
|
|
10618
|
-
switchToNextTab(num?: number, sec?: number | null):
|
|
10621
|
+
switchToNextTab(num?: number, sec?: number | null): CodeceptJS.StepPromise;
|
|
10619
10622
|
/**
|
|
10620
10623
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10621
10624
|
*
|
|
@@ -10627,7 +10630,7 @@ declare namespace CodeceptJS {
|
|
|
10627
10630
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10628
10631
|
* @returns automatically synchronized promise through #recorder
|
|
10629
10632
|
*/
|
|
10630
|
-
switchToPreviousTab(num?: number, sec?: number):
|
|
10633
|
+
switchToPreviousTab(num?: number, sec?: number): CodeceptJS.StepPromise;
|
|
10631
10634
|
/**
|
|
10632
10635
|
* Close current tab.
|
|
10633
10636
|
*
|
|
@@ -10636,7 +10639,7 @@ declare namespace CodeceptJS {
|
|
|
10636
10639
|
* ```
|
|
10637
10640
|
* @returns automatically synchronized promise through #recorder
|
|
10638
10641
|
*/
|
|
10639
|
-
closeCurrentTab():
|
|
10642
|
+
closeCurrentTab(): CodeceptJS.StepPromise;
|
|
10640
10643
|
/**
|
|
10641
10644
|
* Open new tab and switch to it.
|
|
10642
10645
|
*
|
|
@@ -10645,7 +10648,7 @@ declare namespace CodeceptJS {
|
|
|
10645
10648
|
* ```
|
|
10646
10649
|
* @returns automatically synchronized promise through #recorder
|
|
10647
10650
|
*/
|
|
10648
|
-
openNewTab():
|
|
10651
|
+
openNewTab(): CodeceptJS.StepPromise;
|
|
10649
10652
|
/**
|
|
10650
10653
|
* Grab number of open tabs.
|
|
10651
10654
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10664,7 +10667,7 @@ declare namespace CodeceptJS {
|
|
|
10664
10667
|
* ```
|
|
10665
10668
|
* @returns automatically synchronized promise through #recorder
|
|
10666
10669
|
*/
|
|
10667
|
-
refreshPage():
|
|
10670
|
+
refreshPage(): CodeceptJS.StepPromise;
|
|
10668
10671
|
/**
|
|
10669
10672
|
* Scroll page to the top.
|
|
10670
10673
|
*
|
|
@@ -10673,7 +10676,7 @@ declare namespace CodeceptJS {
|
|
|
10673
10676
|
* ```
|
|
10674
10677
|
* @returns automatically synchronized promise through #recorder
|
|
10675
10678
|
*/
|
|
10676
|
-
scrollPageToTop():
|
|
10679
|
+
scrollPageToTop(): CodeceptJS.StepPromise;
|
|
10677
10680
|
/**
|
|
10678
10681
|
* Scroll page to the bottom.
|
|
10679
10682
|
*
|
|
@@ -10682,7 +10685,7 @@ declare namespace CodeceptJS {
|
|
|
10682
10685
|
* ```
|
|
10683
10686
|
* @returns automatically synchronized promise through #recorder
|
|
10684
10687
|
*/
|
|
10685
|
-
scrollPageToBottom():
|
|
10688
|
+
scrollPageToBottom(): CodeceptJS.StepPromise;
|
|
10686
10689
|
/**
|
|
10687
10690
|
* Retrieves a page scroll position and returns it to test.
|
|
10688
10691
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -11135,6 +11138,135 @@ declare namespace CodeceptJS {
|
|
|
11135
11138
|
* @returns A promise resolving to `true` if the step succeeds, or `false` if it fails.
|
|
11136
11139
|
*/
|
|
11137
11140
|
function tryTo(callback: (...params: any[]) => any): Promise<boolean | any>;
|
|
11141
|
+
/**
|
|
11142
|
+
* Unified WebElement class that wraps native element instances from different helpers
|
|
11143
|
+
* and provides a consistent API across all supported helpers (Playwright, WebDriver, Puppeteer).
|
|
11144
|
+
*/
|
|
11145
|
+
class WebElement {
|
|
11146
|
+
/**
|
|
11147
|
+
* Get the native element instance
|
|
11148
|
+
* @returns Native element (Playwright/Puppeteer ElementHandle or WebdriverIO element)
|
|
11149
|
+
*/
|
|
11150
|
+
getNativeElement(): any;
|
|
11151
|
+
/**
|
|
11152
|
+
* Get the helper instance
|
|
11153
|
+
* @returns Helper instance
|
|
11154
|
+
*/
|
|
11155
|
+
getHelper(): Helper;
|
|
11156
|
+
/**
|
|
11157
|
+
* Get text content of the element
|
|
11158
|
+
* @returns Element text content
|
|
11159
|
+
*/
|
|
11160
|
+
getText(): Promise<string>;
|
|
11161
|
+
/**
|
|
11162
|
+
* Get attribute value of the element
|
|
11163
|
+
* @param name - Attribute name
|
|
11164
|
+
* @returns Attribute value
|
|
11165
|
+
*/
|
|
11166
|
+
getAttribute(name: string): Promise<string | null>;
|
|
11167
|
+
/**
|
|
11168
|
+
* Get property value of the element
|
|
11169
|
+
* @param name - Property name
|
|
11170
|
+
* @returns Property value
|
|
11171
|
+
*/
|
|
11172
|
+
getProperty(name: string): Promise<any>;
|
|
11173
|
+
/**
|
|
11174
|
+
* Get innerHTML of the element
|
|
11175
|
+
* @returns Element innerHTML
|
|
11176
|
+
*/
|
|
11177
|
+
getInnerHTML(): Promise<string>;
|
|
11178
|
+
/**
|
|
11179
|
+
* Get value of the element (for input elements)
|
|
11180
|
+
* @returns Element value
|
|
11181
|
+
*/
|
|
11182
|
+
getValue(): Promise<string>;
|
|
11183
|
+
/**
|
|
11184
|
+
* Check if element is visible
|
|
11185
|
+
* @returns True if element is visible
|
|
11186
|
+
*/
|
|
11187
|
+
isVisible(): Promise<boolean>;
|
|
11188
|
+
/**
|
|
11189
|
+
* Check if element is enabled
|
|
11190
|
+
* @returns True if element is enabled
|
|
11191
|
+
*/
|
|
11192
|
+
isEnabled(): Promise<boolean>;
|
|
11193
|
+
/**
|
|
11194
|
+
* Check if element exists in DOM
|
|
11195
|
+
* @returns True if element exists
|
|
11196
|
+
*/
|
|
11197
|
+
exists(): Promise<boolean>;
|
|
11198
|
+
/**
|
|
11199
|
+
* Get bounding box of the element
|
|
11200
|
+
* @returns Bounding box with x, y, width, height properties
|
|
11201
|
+
*/
|
|
11202
|
+
getBoundingBox(): Promise<object>;
|
|
11203
|
+
/**
|
|
11204
|
+
* Click the element
|
|
11205
|
+
* @param [options] - Click options
|
|
11206
|
+
*/
|
|
11207
|
+
click(options?: any): Promise<void>;
|
|
11208
|
+
/**
|
|
11209
|
+
* Type text into the element
|
|
11210
|
+
* @param text - Text to type
|
|
11211
|
+
* @param [options] - Type options
|
|
11212
|
+
*/
|
|
11213
|
+
type(text: string, options?: any): Promise<void>;
|
|
11214
|
+
/**
|
|
11215
|
+
* Run a function in the browser with this element as the first argument.
|
|
11216
|
+
* @param fn - Browser-side function. Receives the element, then extra args.
|
|
11217
|
+
* @param args - Additional arguments passed to the function
|
|
11218
|
+
* @returns Value returned by fn
|
|
11219
|
+
*/
|
|
11220
|
+
evaluate(fn: (...params: any[]) => any, ...args: any[]): Promise<any>;
|
|
11221
|
+
/**
|
|
11222
|
+
* Focus the element.
|
|
11223
|
+
*/
|
|
11224
|
+
focus(): Promise<void>;
|
|
11225
|
+
/**
|
|
11226
|
+
* Type characters via the page/browser keyboard into the focused element.
|
|
11227
|
+
* Unlike `type()`, this does not call `.fill()`/`.setValue()`, so it works
|
|
11228
|
+
* with contenteditable nodes, iframe bodies, and editor-owned hidden textareas.
|
|
11229
|
+
* @param text - Text to send
|
|
11230
|
+
* @param [options] - Options (e.g. `{ delay }`)
|
|
11231
|
+
*/
|
|
11232
|
+
typeText(text: string, options?: any): Promise<void>;
|
|
11233
|
+
/**
|
|
11234
|
+
* Select all content in the focused field and delete it via keyboard input.
|
|
11235
|
+
* Sends Ctrl+A and Meta+A (so it works across platforms) followed by Backspace.
|
|
11236
|
+
*/
|
|
11237
|
+
selectAllAndDelete(): Promise<void>;
|
|
11238
|
+
/**
|
|
11239
|
+
* Treat this element as an iframe; invoke `fn` with a WebElement wrapping
|
|
11240
|
+
* the iframe body. For WebDriver this switches the browser into the frame
|
|
11241
|
+
* for the duration of the callback and switches back on exit.
|
|
11242
|
+
* @returns Return value of fn
|
|
11243
|
+
*/
|
|
11244
|
+
inIframe(fn: (...params: any[]) => any): Promise<any>;
|
|
11245
|
+
/**
|
|
11246
|
+
* Find first child element matching the locator
|
|
11247
|
+
* @param locator - Element locator
|
|
11248
|
+
* @returns WebElement instance or null if not found
|
|
11249
|
+
*/
|
|
11250
|
+
$(locator: string | any): Promise<WebElement | null>;
|
|
11251
|
+
/**
|
|
11252
|
+
* Find all child elements matching the locator
|
|
11253
|
+
* @param locator - Element locator
|
|
11254
|
+
* @returns Array of WebElement instances
|
|
11255
|
+
*/
|
|
11256
|
+
$$(locator: string | any): Promise<WebElement[]>;
|
|
11257
|
+
/**
|
|
11258
|
+
* Plain-object snapshot of the element — text, simplified HTML, visibility,
|
|
11259
|
+
* enabled state, and a curated set of attributes. Each underlying call is
|
|
11260
|
+
* isolated so a single failure (e.g. detached element) doesn't poison the
|
|
11261
|
+
* rest. Suitable for JSON.stringify, log output, MCP tool responses.
|
|
11262
|
+
* @param [opts.maxHtmlLength = 300] - passed through to toSimplifiedHTML
|
|
11263
|
+
* @param [opts.attrs] - attribute names to surface
|
|
11264
|
+
*/
|
|
11265
|
+
describe(opts?: {
|
|
11266
|
+
maxHtmlLength?: number;
|
|
11267
|
+
attrs?: string[];
|
|
11268
|
+
}): Promise<{ text: string | undefined; html: string | undefined; visible: boolean | undefined; enabled: boolean | undefined; attrs: object | undefined; }>;
|
|
11269
|
+
}
|
|
11138
11270
|
namespace event {
|
|
11139
11271
|
const dispatcher: NodeJS.EventEmitter;
|
|
11140
11272
|
const test: {
|
|
@@ -11423,8 +11555,9 @@ declare namespace CodeceptJS {
|
|
|
11423
11555
|
* @param [retry] - undefined: `add(fn)` -> `false` and `add('step',fn)` -> `true`
|
|
11424
11556
|
* true: it will retries if `retryOpts` set.
|
|
11425
11557
|
* false: ignore `retryOpts` and won't retry.
|
|
11558
|
+
* @param [timeout] - in milliseconds, or a function returning it when the task starts
|
|
11426
11559
|
*/
|
|
11427
|
-
add(taskName: string | ((...params: any[]) => any), fn?: (...params: any[]) => any, force?: boolean, retry?: boolean, timeout?: number): Promise<any>;
|
|
11560
|
+
add(taskName: string | ((...params: any[]) => any), fn?: (...params: any[]) => any, force?: boolean, retry?: boolean, timeout?: number | ((...params: any[]) => any)): Promise<any>;
|
|
11428
11561
|
retry(opts: any): any;
|
|
11429
11562
|
catch(customErrFn?: (...params: any[]) => any): Promise<any>;
|
|
11430
11563
|
catchWithoutStop(customErrFn: (...params: any[]) => any): Promise<any>;
|