codeceptjs 3.5.8 → 3.5.9-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/build/Appium.js +24 -24
- package/docs/build/Nightmare.js +51 -52
- package/docs/build/Playwright.js +137 -76
- package/docs/build/Protractor.js +64 -65
- package/docs/build/Puppeteer.js +74 -75
- package/docs/build/TestCafe.js +54 -55
- package/docs/build/WebDriver.js +79 -80
- package/docs/changelog.md +1 -571
- package/docs/community-helpers.md +4 -8
- package/docs/examples.md +2 -8
- package/docs/helpers/Appium.md +19 -19
- package/docs/helpers/Nightmare.md +75 -77
- package/docs/helpers/Playwright.md +350 -314
- package/docs/helpers/Protractor.md +153 -155
- package/docs/helpers/Puppeteer.md +146 -148
- package/docs/helpers/TestCafe.md +124 -126
- package/docs/helpers/WebDriver.md +155 -157
- package/docs/internal-api.md +111 -0
- package/docs/plugins.md +4 -2
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +1 -1
- package/docs/webapi/blur.mustache +1 -1
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -2
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +1 -1
- package/docs/webapi/saveScreenshot.mustache +1 -1
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/lib/command/run-multiple.js +1 -1
- package/lib/command/run-workers.js +30 -4
- package/lib/command/workers/runTests.js +23 -0
- package/lib/event.js +2 -0
- package/lib/helper/Appium.js +10 -10
- package/lib/helper/Playwright.js +78 -7
- package/lib/helper/Puppeteer.js +7 -3
- package/lib/helper/WebDriver.js +6 -2
- package/lib/interfaces/gherkin.js +8 -1
- package/lib/interfaces/scenarioConfig.js +1 -0
- package/lib/locator.js +2 -2
- package/lib/plugin/autoLogin.js +4 -2
- package/lib/plugin/retryFailedStep.js +5 -0
- package/lib/plugin/stepByStepReport.js +2 -2
- package/lib/ui.js +1 -0
- package/lib/workers.js +2 -0
- package/package.json +4 -4
- package/typings/promiseBasedTypes.d.ts +449 -1008
- package/typings/types.d.ts +452 -425
|
@@ -458,7 +458,7 @@ declare namespace CodeceptJS {
|
|
|
458
458
|
* Switch to the specified context.
|
|
459
459
|
* @param context - the context to switch to
|
|
460
460
|
*/
|
|
461
|
-
|
|
461
|
+
switchToContext(context: any): Promise<any>;
|
|
462
462
|
/**
|
|
463
463
|
* Switches to web context.
|
|
464
464
|
* If no context is provided switches to the first detected web context
|
|
@@ -763,9 +763,8 @@ declare namespace CodeceptJS {
|
|
|
763
763
|
* ```
|
|
764
764
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
765
765
|
* @param value - text value to append.
|
|
766
|
-
* @returns automatically synchronized promise through #recorder
|
|
767
766
|
*/
|
|
768
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
767
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
769
768
|
/**
|
|
770
769
|
* Selects a checkbox or radio button.
|
|
771
770
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -779,9 +778,8 @@ declare namespace CodeceptJS {
|
|
|
779
778
|
* ```
|
|
780
779
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
781
780
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
782
|
-
* @returns automatically synchronized promise through #recorder
|
|
783
781
|
*/
|
|
784
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
782
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
785
783
|
/**
|
|
786
784
|
* Perform a click on a link or a button, given by a locator.
|
|
787
785
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -806,9 +804,8 @@ declare namespace CodeceptJS {
|
|
|
806
804
|
* ```
|
|
807
805
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
808
806
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
809
|
-
* @returns automatically synchronized promise through #recorder
|
|
810
807
|
*/
|
|
811
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
808
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
812
809
|
/**
|
|
813
810
|
* Verifies that the specified checkbox is not checked.
|
|
814
811
|
*
|
|
@@ -818,9 +815,8 @@ declare namespace CodeceptJS {
|
|
|
818
815
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
819
816
|
* ```
|
|
820
817
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
821
|
-
* @returns automatically synchronized promise through #recorder
|
|
822
818
|
*/
|
|
823
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
819
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
824
820
|
/**
|
|
825
821
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
826
822
|
*
|
|
@@ -828,9 +824,8 @@ declare namespace CodeceptJS {
|
|
|
828
824
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
829
825
|
* ```
|
|
830
826
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
831
|
-
* @returns automatically synchronized promise through #recorder
|
|
832
827
|
*/
|
|
833
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
828
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
834
829
|
/**
|
|
835
830
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
836
831
|
* Opposite to `seeInField`.
|
|
@@ -841,9 +836,8 @@ declare namespace CodeceptJS {
|
|
|
841
836
|
* ```
|
|
842
837
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
843
838
|
* @param value - value to check.
|
|
844
|
-
* @returns automatically synchronized promise through #recorder
|
|
845
839
|
*/
|
|
846
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
840
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
847
841
|
/**
|
|
848
842
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
849
843
|
* Use context parameter to narrow down the search.
|
|
@@ -854,9 +848,8 @@ declare namespace CodeceptJS {
|
|
|
854
848
|
* ```
|
|
855
849
|
* @param text - which is not present.
|
|
856
850
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
857
|
-
* @returns automatically synchronized promise through #recorder
|
|
858
851
|
*/
|
|
859
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
852
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
860
853
|
/**
|
|
861
854
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
862
855
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -873,9 +866,8 @@ declare namespace CodeceptJS {
|
|
|
873
866
|
* ```
|
|
874
867
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
875
868
|
* @param value - text value to fill.
|
|
876
|
-
* @returns automatically synchronized promise through #recorder
|
|
877
869
|
*/
|
|
878
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
870
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
879
871
|
/**
|
|
880
872
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
881
873
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -981,12 +973,8 @@ declare namespace CodeceptJS {
|
|
|
981
973
|
* ```
|
|
982
974
|
* @param locator - located by CSS|XPath|strict locator.
|
|
983
975
|
* @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
984
|
-
* @returns automatically synchronized promise through #recorder
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
* Supported only for web testing
|
|
988
976
|
*/
|
|
989
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<
|
|
977
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
|
|
990
978
|
/**
|
|
991
979
|
* Verifies that the specified checkbox is checked.
|
|
992
980
|
*
|
|
@@ -996,9 +984,8 @@ declare namespace CodeceptJS {
|
|
|
996
984
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
997
985
|
* ```
|
|
998
986
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
999
|
-
* @returns automatically synchronized promise through #recorder
|
|
1000
987
|
*/
|
|
1001
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
988
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1002
989
|
/**
|
|
1003
990
|
* Checks that a given Element is visible
|
|
1004
991
|
* Element is located by CSS or XPath.
|
|
@@ -1007,9 +994,8 @@ declare namespace CodeceptJS {
|
|
|
1007
994
|
* I.seeElement('#modal');
|
|
1008
995
|
* ```
|
|
1009
996
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1010
|
-
* @returns automatically synchronized promise through #recorder
|
|
1011
997
|
*/
|
|
1012
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
998
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1013
999
|
/**
|
|
1014
1000
|
* Checks that the given input field or textarea equals to given value.
|
|
1015
1001
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -1022,9 +1008,8 @@ declare namespace CodeceptJS {
|
|
|
1022
1008
|
* ```
|
|
1023
1009
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1024
1010
|
* @param value - value to check.
|
|
1025
|
-
* @returns automatically synchronized promise through #recorder
|
|
1026
1011
|
*/
|
|
1027
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
1012
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
1028
1013
|
/**
|
|
1029
1014
|
* Checks that a page contains a visible text.
|
|
1030
1015
|
* Use context parameter to narrow down the search.
|
|
@@ -1036,9 +1021,8 @@ declare namespace CodeceptJS {
|
|
|
1036
1021
|
* ```
|
|
1037
1022
|
* @param text - expected on page.
|
|
1038
1023
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1039
|
-
* @returns automatically synchronized promise through #recorder
|
|
1040
1024
|
*/
|
|
1041
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
1025
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1042
1026
|
/**
|
|
1043
1027
|
* Selects an option in a drop-down select.
|
|
1044
1028
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -1060,12 +1044,8 @@ declare namespace CodeceptJS {
|
|
|
1060
1044
|
* ```
|
|
1061
1045
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
1062
1046
|
* @param option - visible text or value of option.
|
|
1063
|
-
* @returns automatically synchronized promise through #recorder
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1066
|
-
* Supported only for web testing
|
|
1067
1047
|
*/
|
|
1068
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
1048
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
1069
1049
|
/**
|
|
1070
1050
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
1071
1051
|
* Element can be located by CSS or XPath.
|
|
@@ -1076,9 +1056,8 @@ declare namespace CodeceptJS {
|
|
|
1076
1056
|
* ```
|
|
1077
1057
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1078
1058
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1079
|
-
* @returns automatically synchronized promise through #recorder
|
|
1080
1059
|
*/
|
|
1081
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
1060
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
1082
1061
|
/**
|
|
1083
1062
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
1084
1063
|
* Element can be located by CSS or XPath.
|
|
@@ -1088,9 +1067,8 @@ declare namespace CodeceptJS {
|
|
|
1088
1067
|
* ```
|
|
1089
1068
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1090
1069
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1091
|
-
* @returns automatically synchronized promise through #recorder
|
|
1092
1070
|
*/
|
|
1093
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
1071
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
1094
1072
|
/**
|
|
1095
1073
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
1096
1074
|
* Element can be located by CSS or XPath.
|
|
@@ -1100,9 +1078,8 @@ declare namespace CodeceptJS {
|
|
|
1100
1078
|
* ```
|
|
1101
1079
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1102
1080
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1103
|
-
* @returns automatically synchronized promise through #recorder
|
|
1104
1081
|
*/
|
|
1105
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
1082
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
1106
1083
|
/**
|
|
1107
1084
|
* Waits for a text to appear (by default waits for 1sec).
|
|
1108
1085
|
* Element can be located by CSS or XPath.
|
|
@@ -1115,9 +1092,8 @@ declare namespace CodeceptJS {
|
|
|
1115
1092
|
* @param text - to wait for.
|
|
1116
1093
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1117
1094
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1118
|
-
* @returns automatically synchronized promise through #recorder
|
|
1119
1095
|
*/
|
|
1120
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
1096
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1121
1097
|
}
|
|
1122
1098
|
/**
|
|
1123
1099
|
* This helper allows performing assertions based on Chai.
|
|
@@ -1839,9 +1815,8 @@ declare namespace CodeceptJS {
|
|
|
1839
1815
|
* ```
|
|
1840
1816
|
* @param url - url path or global url.
|
|
1841
1817
|
* @param headers - list of request headers can be passed
|
|
1842
|
-
* @returns automatically synchronized promise through #recorder
|
|
1843
1818
|
*/
|
|
1844
|
-
amOnPage(url: string, headers: any): Promise<
|
|
1819
|
+
amOnPage(url: string, headers: any): Promise<any>;
|
|
1845
1820
|
/**
|
|
1846
1821
|
* Checks that title contains text.
|
|
1847
1822
|
*
|
|
@@ -1849,9 +1824,8 @@ declare namespace CodeceptJS {
|
|
|
1849
1824
|
* I.seeInTitle('Home Page');
|
|
1850
1825
|
* ```
|
|
1851
1826
|
* @param text - text value to check.
|
|
1852
|
-
* @returns automatically synchronized promise through #recorder
|
|
1853
1827
|
*/
|
|
1854
|
-
seeInTitle(text: string): Promise<
|
|
1828
|
+
seeInTitle(text: string): Promise<any>;
|
|
1855
1829
|
/**
|
|
1856
1830
|
* Checks that title does not contain text.
|
|
1857
1831
|
*
|
|
@@ -1859,9 +1833,8 @@ declare namespace CodeceptJS {
|
|
|
1859
1833
|
* I.dontSeeInTitle('Error');
|
|
1860
1834
|
* ```
|
|
1861
1835
|
* @param text - value to check.
|
|
1862
|
-
* @returns automatically synchronized promise through #recorder
|
|
1863
1836
|
*/
|
|
1864
|
-
dontSeeInTitle(text: string): Promise<
|
|
1837
|
+
dontSeeInTitle(text: string): Promise<any>;
|
|
1865
1838
|
/**
|
|
1866
1839
|
* Retrieves a page title and returns it to test.
|
|
1867
1840
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -1890,15 +1863,13 @@ declare namespace CodeceptJS {
|
|
|
1890
1863
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
1891
1864
|
* ```
|
|
1892
1865
|
* @param url - a fragment to check
|
|
1893
|
-
* @returns automatically synchronized promise through #recorder
|
|
1894
1866
|
*/
|
|
1895
|
-
seeInCurrentUrl(url: string): Promise<
|
|
1867
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
1896
1868
|
/**
|
|
1897
1869
|
* Checks that current url does not contain a provided fragment.
|
|
1898
1870
|
* @param url - value to check.
|
|
1899
|
-
* @returns automatically synchronized promise through #recorder
|
|
1900
1871
|
*/
|
|
1901
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
1872
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
1902
1873
|
/**
|
|
1903
1874
|
* Checks that current url is equal to provided one.
|
|
1904
1875
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -1909,9 +1880,8 @@ declare namespace CodeceptJS {
|
|
|
1909
1880
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
1910
1881
|
* ```
|
|
1911
1882
|
* @param url - value to check.
|
|
1912
|
-
* @returns automatically synchronized promise through #recorder
|
|
1913
1883
|
*/
|
|
1914
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
1884
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
1915
1885
|
/**
|
|
1916
1886
|
* Checks that current url is not equal to provided one.
|
|
1917
1887
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -1921,9 +1891,8 @@ declare namespace CodeceptJS {
|
|
|
1921
1891
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
1922
1892
|
* ```
|
|
1923
1893
|
* @param url - value to check.
|
|
1924
|
-
* @returns automatically synchronized promise through #recorder
|
|
1925
1894
|
*/
|
|
1926
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
1895
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
1927
1896
|
/**
|
|
1928
1897
|
* Checks that a page contains a visible text.
|
|
1929
1898
|
* Use context parameter to narrow down the search.
|
|
@@ -1935,9 +1904,8 @@ declare namespace CodeceptJS {
|
|
|
1935
1904
|
* ```
|
|
1936
1905
|
* @param text - expected on page.
|
|
1937
1906
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1938
|
-
* @returns automatically synchronized promise through #recorder
|
|
1939
1907
|
*/
|
|
1940
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
1908
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1941
1909
|
/**
|
|
1942
1910
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
1943
1911
|
* Use context parameter to narrow down the search.
|
|
@@ -1948,9 +1916,8 @@ declare namespace CodeceptJS {
|
|
|
1948
1916
|
* ```
|
|
1949
1917
|
* @param text - which is not present.
|
|
1950
1918
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1951
|
-
* @returns automatically synchronized promise through #recorder
|
|
1952
1919
|
*/
|
|
1953
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
1920
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1954
1921
|
/**
|
|
1955
1922
|
* Checks that a given Element is visible
|
|
1956
1923
|
* Element is located by CSS or XPath.
|
|
@@ -1959,9 +1926,8 @@ declare namespace CodeceptJS {
|
|
|
1959
1926
|
* I.seeElement('#modal');
|
|
1960
1927
|
* ```
|
|
1961
1928
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1962
|
-
* @returns automatically synchronized promise through #recorder
|
|
1963
1929
|
*/
|
|
1964
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1930
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1965
1931
|
/**
|
|
1966
1932
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
1967
1933
|
*
|
|
@@ -1969,9 +1935,8 @@ declare namespace CodeceptJS {
|
|
|
1969
1935
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
1970
1936
|
* ```
|
|
1971
1937
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1972
|
-
* @returns automatically synchronized promise through #recorder
|
|
1973
1938
|
*/
|
|
1974
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1939
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1975
1940
|
/**
|
|
1976
1941
|
* Checks that a given Element is present in the DOM
|
|
1977
1942
|
* Element is located by CSS or XPath.
|
|
@@ -1980,9 +1945,8 @@ declare namespace CodeceptJS {
|
|
|
1980
1945
|
* I.seeElementInDOM('#modal');
|
|
1981
1946
|
* ```
|
|
1982
1947
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1983
|
-
* @returns automatically synchronized promise through #recorder
|
|
1984
1948
|
*/
|
|
1985
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1949
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1986
1950
|
/**
|
|
1987
1951
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
1988
1952
|
*
|
|
@@ -1990,9 +1954,8 @@ declare namespace CodeceptJS {
|
|
|
1990
1954
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
1991
1955
|
* ```
|
|
1992
1956
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1993
|
-
* @returns automatically synchronized promise through #recorder
|
|
1994
1957
|
*/
|
|
1995
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
1958
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
1996
1959
|
/**
|
|
1997
1960
|
* Checks that the current page contains the given string in its raw source code.
|
|
1998
1961
|
*
|
|
@@ -2000,9 +1963,8 @@ declare namespace CodeceptJS {
|
|
|
2000
1963
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
2001
1964
|
* ```
|
|
2002
1965
|
* @param text - value to check.
|
|
2003
|
-
* @returns automatically synchronized promise through #recorder
|
|
2004
1966
|
*/
|
|
2005
|
-
seeInSource(text: string): Promise<
|
|
1967
|
+
seeInSource(text: string): Promise<any>;
|
|
2006
1968
|
/**
|
|
2007
1969
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
2008
1970
|
*
|
|
@@ -2010,9 +1972,8 @@ declare namespace CodeceptJS {
|
|
|
2010
1972
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
2011
1973
|
* ```
|
|
2012
1974
|
* @param value - to check.
|
|
2013
|
-
* @returns automatically synchronized promise through #recorder
|
|
2014
1975
|
*/
|
|
2015
|
-
dontSeeInSource(value: string): Promise<
|
|
1976
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
2016
1977
|
/**
|
|
2017
1978
|
* Asserts that an element appears a given number of times in the DOM.
|
|
2018
1979
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -2023,9 +1984,8 @@ declare namespace CodeceptJS {
|
|
|
2023
1984
|
* ```
|
|
2024
1985
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2025
1986
|
* @param num - number of elements.
|
|
2026
|
-
* @returns automatically synchronized promise through #recorder
|
|
2027
1987
|
*/
|
|
2028
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
1988
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
2029
1989
|
/**
|
|
2030
1990
|
* Asserts that an element is visible a given number of times.
|
|
2031
1991
|
* Element is located by CSS or XPath.
|
|
@@ -2035,9 +1995,8 @@ declare namespace CodeceptJS {
|
|
|
2035
1995
|
* ```
|
|
2036
1996
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2037
1997
|
* @param num - number of elements.
|
|
2038
|
-
* @returns automatically synchronized promise through #recorder
|
|
2039
1998
|
*/
|
|
2040
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
1999
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
2041
2000
|
/**
|
|
2042
2001
|
* Grab number of visible elements by locator.
|
|
2043
2002
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -2073,9 +2032,8 @@ declare namespace CodeceptJS {
|
|
|
2073
2032
|
* ```
|
|
2074
2033
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
2075
2034
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
2076
|
-
* @returns automatically synchronized promise through #recorder
|
|
2077
2035
|
*/
|
|
2078
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
2036
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
2079
2037
|
/**
|
|
2080
2038
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
2081
2039
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -2088,9 +2046,8 @@ declare namespace CodeceptJS {
|
|
|
2088
2046
|
* ```
|
|
2089
2047
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
2090
2048
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
2091
|
-
* @returns automatically synchronized promise through #recorder
|
|
2092
2049
|
*/
|
|
2093
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
2050
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2094
2051
|
/**
|
|
2095
2052
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
2096
2053
|
*
|
|
@@ -2104,9 +2061,8 @@ declare namespace CodeceptJS {
|
|
|
2104
2061
|
* ```
|
|
2105
2062
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
2106
2063
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
2107
|
-
* @returns automatically synchronized promise through #recorder
|
|
2108
2064
|
*/
|
|
2109
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
2065
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2110
2066
|
/**
|
|
2111
2067
|
* Moves cursor to element matched by locator.
|
|
2112
2068
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -2118,9 +2074,8 @@ declare namespace CodeceptJS {
|
|
|
2118
2074
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2119
2075
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2120
2076
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2121
|
-
* @returns automatically synchronized promise through #recorder
|
|
2122
2077
|
*/
|
|
2123
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
2078
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
2124
2079
|
/**
|
|
2125
2080
|
* Executes sync script on a page.
|
|
2126
2081
|
* Pass arguments to function as additional parameters.
|
|
@@ -2187,9 +2142,8 @@ declare namespace CodeceptJS {
|
|
|
2187
2142
|
* First parameter can be set to `maximize`.
|
|
2188
2143
|
* @param width - width in pixels or `maximize`.
|
|
2189
2144
|
* @param height - height in pixels.
|
|
2190
|
-
* @returns automatically synchronized promise through #recorder
|
|
2191
2145
|
*/
|
|
2192
|
-
resizeWindow(width: number, height: number): Promise<
|
|
2146
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
2193
2147
|
/**
|
|
2194
2148
|
* Selects a checkbox or radio button.
|
|
2195
2149
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -2203,9 +2157,8 @@ declare namespace CodeceptJS {
|
|
|
2203
2157
|
* ```
|
|
2204
2158
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
2205
2159
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2206
|
-
* @returns automatically synchronized promise through #recorder
|
|
2207
2160
|
*/
|
|
2208
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
2161
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2209
2162
|
/**
|
|
2210
2163
|
* Unselects a checkbox or radio button.
|
|
2211
2164
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -2219,9 +2172,8 @@ declare namespace CodeceptJS {
|
|
|
2219
2172
|
* ```
|
|
2220
2173
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
2221
2174
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2222
|
-
* @returns automatically synchronized promise through #recorder
|
|
2223
2175
|
*/
|
|
2224
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
2176
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2225
2177
|
/**
|
|
2226
2178
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
2227
2179
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -2238,9 +2190,8 @@ declare namespace CodeceptJS {
|
|
|
2238
2190
|
* ```
|
|
2239
2191
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2240
2192
|
* @param value - text value to fill.
|
|
2241
|
-
* @returns automatically synchronized promise through #recorder
|
|
2242
2193
|
*/
|
|
2243
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
2194
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
2244
2195
|
/**
|
|
2245
2196
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
2246
2197
|
*
|
|
@@ -2250,9 +2201,8 @@ declare namespace CodeceptJS {
|
|
|
2250
2201
|
* I.clearField('#email');
|
|
2251
2202
|
* ```
|
|
2252
2203
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
2253
|
-
* @returns automatically synchronized promise through #recorder.
|
|
2254
2204
|
*/
|
|
2255
|
-
clearField(editable: LocatorOrString): Promise<
|
|
2205
|
+
clearField(editable: LocatorOrString): Promise<any>;
|
|
2256
2206
|
/**
|
|
2257
2207
|
* Appends text to a input field or textarea.
|
|
2258
2208
|
* Field is located by name, label, CSS or XPath
|
|
@@ -2264,9 +2214,8 @@ declare namespace CodeceptJS {
|
|
|
2264
2214
|
* ```
|
|
2265
2215
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
2266
2216
|
* @param value - text value to append.
|
|
2267
|
-
* @returns automatically synchronized promise through #recorder
|
|
2268
2217
|
*/
|
|
2269
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
2218
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
2270
2219
|
/**
|
|
2271
2220
|
* Checks that the given input field or textarea equals to given value.
|
|
2272
2221
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -2279,9 +2228,8 @@ declare namespace CodeceptJS {
|
|
|
2279
2228
|
* ```
|
|
2280
2229
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2281
2230
|
* @param value - value to check.
|
|
2282
|
-
* @returns automatically synchronized promise through #recorder
|
|
2283
2231
|
*/
|
|
2284
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
2232
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
2285
2233
|
/**
|
|
2286
2234
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
2287
2235
|
* Opposite to `seeInField`.
|
|
@@ -2292,9 +2240,8 @@ declare namespace CodeceptJS {
|
|
|
2292
2240
|
* ```
|
|
2293
2241
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2294
2242
|
* @param value - value to check.
|
|
2295
|
-
* @returns automatically synchronized promise through #recorder
|
|
2296
2243
|
*/
|
|
2297
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
2244
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
2298
2245
|
/**
|
|
2299
2246
|
* Sends [input event](http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent) on a page.
|
|
2300
2247
|
* Can submit special keys like 'Enter', 'Backspace', etc
|
|
@@ -2320,9 +2267,8 @@ declare namespace CodeceptJS {
|
|
|
2320
2267
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
2321
2268
|
* ```
|
|
2322
2269
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2323
|
-
* @returns automatically synchronized promise through #recorder
|
|
2324
2270
|
*/
|
|
2325
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
2271
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2326
2272
|
/**
|
|
2327
2273
|
* Verifies that the specified checkbox is not checked.
|
|
2328
2274
|
*
|
|
@@ -2332,9 +2278,8 @@ declare namespace CodeceptJS {
|
|
|
2332
2278
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
2333
2279
|
* ```
|
|
2334
2280
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2335
|
-
* @returns automatically synchronized promise through #recorder
|
|
2336
2281
|
*/
|
|
2337
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
2282
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2338
2283
|
/**
|
|
2339
2284
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
2340
2285
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -2346,12 +2291,8 @@ declare namespace CodeceptJS {
|
|
|
2346
2291
|
* ```
|
|
2347
2292
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
2348
2293
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
2349
|
-
* @returns automatically synchronized promise through #recorder
|
|
2350
|
-
*
|
|
2351
|
-
*
|
|
2352
|
-
* Doesn't work if the Chromium DevTools panel is open (as Chromium allows only one attachment to the debugger at a time. [See more](https://github.com/rosshinkley/nightmare-upload#important-note-about-setting-file-upload-inputs))
|
|
2353
2294
|
*/
|
|
2354
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
2295
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
2355
2296
|
/**
|
|
2356
2297
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
2357
2298
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -2480,9 +2421,8 @@ declare namespace CodeceptJS {
|
|
|
2480
2421
|
* ```
|
|
2481
2422
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
2482
2423
|
* @param option - visible text or value of option.
|
|
2483
|
-
* @returns automatically synchronized promise through #recorder
|
|
2484
2424
|
*/
|
|
2485
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
2425
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
2486
2426
|
/**
|
|
2487
2427
|
* Sets cookie(s).
|
|
2488
2428
|
*
|
|
@@ -2498,13 +2438,8 @@ declare namespace CodeceptJS {
|
|
|
2498
2438
|
* ]);
|
|
2499
2439
|
* ```
|
|
2500
2440
|
* @param cookie - a cookie object or array of cookie objects.
|
|
2501
|
-
* @returns automatically synchronized promise through #recorder
|
|
2502
|
-
*
|
|
2503
|
-
*
|
|
2504
|
-
* Wrapper for `.cookies.set(cookie)`.
|
|
2505
|
-
* [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
|
|
2506
2441
|
*/
|
|
2507
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
2442
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
2508
2443
|
/**
|
|
2509
2444
|
* Checks that cookie with given name exists.
|
|
2510
2445
|
*
|
|
@@ -2512,9 +2447,8 @@ declare namespace CodeceptJS {
|
|
|
2512
2447
|
* I.seeCookie('Auth');
|
|
2513
2448
|
* ```
|
|
2514
2449
|
* @param name - cookie name.
|
|
2515
|
-
* @returns automatically synchronized promise through #recorder
|
|
2516
2450
|
*/
|
|
2517
|
-
seeCookie(name: string): Promise<
|
|
2451
|
+
seeCookie(name: string): Promise<any>;
|
|
2518
2452
|
/**
|
|
2519
2453
|
* Checks that cookie with given name does not exist.
|
|
2520
2454
|
*
|
|
@@ -2522,9 +2456,8 @@ declare namespace CodeceptJS {
|
|
|
2522
2456
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
2523
2457
|
* ```
|
|
2524
2458
|
* @param name - cookie name.
|
|
2525
|
-
* @returns automatically synchronized promise through #recorder
|
|
2526
2459
|
*/
|
|
2527
|
-
dontSeeCookie(name: string): Promise<
|
|
2460
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
2528
2461
|
/**
|
|
2529
2462
|
* Gets a cookie object by name.
|
|
2530
2463
|
* If none provided gets all cookies.
|
|
@@ -2543,12 +2476,11 @@ declare namespace CodeceptJS {
|
|
|
2543
2476
|
*
|
|
2544
2477
|
* ```js
|
|
2545
2478
|
* I.clearCookie();
|
|
2546
|
-
* I.clearCookie('test');
|
|
2479
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
2547
2480
|
* ```
|
|
2548
2481
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
2549
|
-
* @returns automatically synchronized promise through #recorder
|
|
2550
2482
|
*/
|
|
2551
|
-
clearCookie(cookie?: string): Promise<
|
|
2483
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
2552
2484
|
/**
|
|
2553
2485
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
2554
2486
|
* Running in browser context.
|
|
@@ -2565,9 +2497,8 @@ declare namespace CodeceptJS {
|
|
|
2565
2497
|
* @param fn - to be executed in browser context.
|
|
2566
2498
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
2567
2499
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
2568
|
-
* @returns automatically synchronized promise through #recorder
|
|
2569
2500
|
*/
|
|
2570
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
2501
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
2571
2502
|
/**
|
|
2572
2503
|
* Pauses execution for a number of seconds.
|
|
2573
2504
|
*
|
|
@@ -2575,9 +2506,8 @@ declare namespace CodeceptJS {
|
|
|
2575
2506
|
* I.wait(2); // wait 2 secs
|
|
2576
2507
|
* ```
|
|
2577
2508
|
* @param sec - number of second to wait.
|
|
2578
|
-
* @returns automatically synchronized promise through #recorder
|
|
2579
2509
|
*/
|
|
2580
|
-
wait(sec: number): Promise<
|
|
2510
|
+
wait(sec: number): Promise<any>;
|
|
2581
2511
|
/**
|
|
2582
2512
|
* Waits for a text to appear (by default waits for 1sec).
|
|
2583
2513
|
* Element can be located by CSS or XPath.
|
|
@@ -2590,9 +2520,8 @@ declare namespace CodeceptJS {
|
|
|
2590
2520
|
* @param text - to wait for.
|
|
2591
2521
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2592
2522
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
2593
|
-
* @returns automatically synchronized promise through #recorder
|
|
2594
2523
|
*/
|
|
2595
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
2524
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
2596
2525
|
/**
|
|
2597
2526
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
2598
2527
|
* Element can be located by CSS or XPath.
|
|
@@ -2602,9 +2531,8 @@ declare namespace CodeceptJS {
|
|
|
2602
2531
|
* ```
|
|
2603
2532
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2604
2533
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2605
|
-
* @returns automatically synchronized promise through #recorder
|
|
2606
2534
|
*/
|
|
2607
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
2535
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
2608
2536
|
/**
|
|
2609
2537
|
* Waits for an element to hide (by default waits for 1sec).
|
|
2610
2538
|
* Element can be located by CSS or XPath.
|
|
@@ -2614,9 +2542,8 @@ declare namespace CodeceptJS {
|
|
|
2614
2542
|
* ```
|
|
2615
2543
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2616
2544
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2617
|
-
* @returns automatically synchronized promise through #recorder
|
|
2618
2545
|
*/
|
|
2619
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
2546
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
2620
2547
|
/**
|
|
2621
2548
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
2622
2549
|
* Element can be located by CSS or XPath.
|
|
@@ -2626,9 +2553,8 @@ declare namespace CodeceptJS {
|
|
|
2626
2553
|
* ```
|
|
2627
2554
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2628
2555
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2629
|
-
* @returns automatically synchronized promise through #recorder
|
|
2630
2556
|
*/
|
|
2631
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
2557
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
2632
2558
|
/**
|
|
2633
2559
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
2634
2560
|
* Element can be located by CSS or XPath.
|
|
@@ -2639,9 +2565,8 @@ declare namespace CodeceptJS {
|
|
|
2639
2565
|
* ```
|
|
2640
2566
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2641
2567
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
2642
|
-
* @returns automatically synchronized promise through #recorder
|
|
2643
2568
|
*/
|
|
2644
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
2569
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
2645
2570
|
/**
|
|
2646
2571
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
2647
2572
|
* Element can be located by CSS or XPath.
|
|
@@ -2651,18 +2576,16 @@ declare namespace CodeceptJS {
|
|
|
2651
2576
|
* ```
|
|
2652
2577
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2653
2578
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2654
|
-
* @returns automatically synchronized promise through #recorder
|
|
2655
2579
|
*/
|
|
2656
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
2580
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
2657
2581
|
/**
|
|
2658
2582
|
* Reload the current page.
|
|
2659
2583
|
*
|
|
2660
2584
|
* ```js
|
|
2661
2585
|
* I.refreshPage();
|
|
2662
2586
|
* ```
|
|
2663
|
-
* @returns automatically synchronized promise through #recorder
|
|
2664
2587
|
*/
|
|
2665
|
-
refreshPage(): Promise<
|
|
2588
|
+
refreshPage(): Promise<any>;
|
|
2666
2589
|
/**
|
|
2667
2590
|
* Reload the page
|
|
2668
2591
|
*/
|
|
@@ -2676,9 +2599,8 @@ declare namespace CodeceptJS {
|
|
|
2676
2599
|
* ```
|
|
2677
2600
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2678
2601
|
* @param fileName - file name to save.
|
|
2679
|
-
* @returns automatically synchronized promise through #recorder
|
|
2680
2602
|
*/
|
|
2681
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
2603
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
2682
2604
|
/**
|
|
2683
2605
|
* Grab the width, height, location of given locator.
|
|
2684
2606
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -2713,9 +2635,8 @@ declare namespace CodeceptJS {
|
|
|
2713
2635
|
* ```
|
|
2714
2636
|
* @param fileName - file name to save.
|
|
2715
2637
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
2716
|
-
* @returns automatically synchronized promise through #recorder
|
|
2717
2638
|
*/
|
|
2718
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
2639
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
2719
2640
|
/**
|
|
2720
2641
|
* Scrolls to element matched by locator.
|
|
2721
2642
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -2727,27 +2648,24 @@ declare namespace CodeceptJS {
|
|
|
2727
2648
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2728
2649
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2729
2650
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2730
|
-
* @returns automatically synchronized promise through #recorder
|
|
2731
2651
|
*/
|
|
2732
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
2652
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
2733
2653
|
/**
|
|
2734
2654
|
* Scroll page to the top.
|
|
2735
2655
|
*
|
|
2736
2656
|
* ```js
|
|
2737
2657
|
* I.scrollPageToTop();
|
|
2738
2658
|
* ```
|
|
2739
|
-
* @returns automatically synchronized promise through #recorder
|
|
2740
2659
|
*/
|
|
2741
|
-
scrollPageToTop(): Promise<
|
|
2660
|
+
scrollPageToTop(): Promise<any>;
|
|
2742
2661
|
/**
|
|
2743
2662
|
* Scroll page to the bottom.
|
|
2744
2663
|
*
|
|
2745
2664
|
* ```js
|
|
2746
2665
|
* I.scrollPageToBottom();
|
|
2747
2666
|
* ```
|
|
2748
|
-
* @returns automatically synchronized promise through #recorder
|
|
2749
2667
|
*/
|
|
2750
|
-
scrollPageToBottom(): Promise<
|
|
2668
|
+
scrollPageToBottom(): Promise<any>;
|
|
2751
2669
|
/**
|
|
2752
2670
|
* Retrieves a page scroll position and returns it to test.
|
|
2753
2671
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -2843,6 +2761,21 @@ declare namespace CodeceptJS {
|
|
|
2843
2761
|
* * `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
|
|
2844
2762
|
* * `keepTraceForPassedTests`: - save trace for passed tests
|
|
2845
2763
|
*
|
|
2764
|
+
* #### HAR Recording Customization
|
|
2765
|
+
*
|
|
2766
|
+
* A HAR file is an HTTP Archive file that contains a record of all the network requests that are made when a page is loaded.
|
|
2767
|
+
* It contains information about the request and response headers, cookies, content, timings, and more. You can use HAR files to mock network requests in your tests.
|
|
2768
|
+
* HAR will be saved to `output/har`. More info could be found here https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har.
|
|
2769
|
+
*
|
|
2770
|
+
* ```
|
|
2771
|
+
* ...
|
|
2772
|
+
* recordHar: {
|
|
2773
|
+
* mode: 'minimal', // possible values: 'minimal'|'full'.
|
|
2774
|
+
* content: 'embed' // possible values: "omit"|"embed"|"attach".
|
|
2775
|
+
* }
|
|
2776
|
+
* ...
|
|
2777
|
+
* ```
|
|
2778
|
+
*
|
|
2846
2779
|
* #### Example #1: Wait for 0 network connections.
|
|
2847
2780
|
*
|
|
2848
2781
|
* ```js
|
|
@@ -3060,9 +2993,8 @@ declare namespace CodeceptJS {
|
|
|
3060
2993
|
* I.seeInPopup('Popup text');
|
|
3061
2994
|
* ```
|
|
3062
2995
|
* @param text - value to check.
|
|
3063
|
-
* @returns automatically synchronized promise through #recorder
|
|
3064
2996
|
*/
|
|
3065
|
-
seeInPopup(text: string): Promise<
|
|
2997
|
+
seeInPopup(text: string): Promise<any>;
|
|
3066
2998
|
/**
|
|
3067
2999
|
* Set current page
|
|
3068
3000
|
* @param page - page to set
|
|
@@ -3100,30 +3032,15 @@ declare namespace CodeceptJS {
|
|
|
3100
3032
|
* I.amOnPage('/login'); // opens a login page
|
|
3101
3033
|
* ```
|
|
3102
3034
|
* @param url - url path or global url.
|
|
3103
|
-
* @returns automatically synchronized promise through #recorder
|
|
3104
3035
|
*/
|
|
3105
|
-
amOnPage(url: string): Promise<
|
|
3036
|
+
amOnPage(url: string): Promise<any>;
|
|
3106
3037
|
/**
|
|
3107
3038
|
* Resize the current window to provided width and height.
|
|
3108
3039
|
* First parameter can be set to `maximize`.
|
|
3109
3040
|
* @param width - width in pixels or `maximize`.
|
|
3110
3041
|
* @param height - height in pixels.
|
|
3111
|
-
* @returns automatically synchronized promise through #recorder
|
|
3112
|
-
*
|
|
3113
|
-
*
|
|
3114
|
-
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
3115
|
-
* Playwright does not control the window of a browser so it can't adjust its real size.
|
|
3116
|
-
* It also can't maximize a window.
|
|
3117
|
-
*
|
|
3118
|
-
* Update configuration to change real window size on start:
|
|
3119
|
-
*
|
|
3120
|
-
* ```js
|
|
3121
|
-
* // inside codecept.conf.js
|
|
3122
|
-
* // @codeceptjs/configure package must be installed
|
|
3123
|
-
* { setWindowSize } = require('@codeceptjs/configure');
|
|
3124
|
-
* ````
|
|
3125
3042
|
*/
|
|
3126
|
-
resizeWindow(width: number, height: number): Promise<
|
|
3043
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
3127
3044
|
/**
|
|
3128
3045
|
* Set headers for all next requests
|
|
3129
3046
|
*
|
|
@@ -3146,9 +3063,8 @@ declare namespace CodeceptJS {
|
|
|
3146
3063
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3147
3064
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
3148
3065
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
3149
|
-
* @returns automatically synchronized promise through #recorder
|
|
3150
3066
|
*/
|
|
3151
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
3067
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
3152
3068
|
/**
|
|
3153
3069
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
3154
3070
|
*
|
|
@@ -3161,9 +3077,8 @@ declare namespace CodeceptJS {
|
|
|
3161
3077
|
* ```
|
|
3162
3078
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
3163
3079
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
3164
|
-
* @returns automatically synchronized promise through #recorder
|
|
3165
3080
|
*/
|
|
3166
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
3081
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
3167
3082
|
/**
|
|
3168
3083
|
* Remove focus from a text input, button, etc.
|
|
3169
3084
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -3181,9 +3096,8 @@ declare namespace CodeceptJS {
|
|
|
3181
3096
|
* ```
|
|
3182
3097
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
3183
3098
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
3184
|
-
* @returns automatically synchronized promise through #recorder
|
|
3185
3099
|
*/
|
|
3186
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
3100
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
3187
3101
|
/**
|
|
3188
3102
|
* Return the checked status of given element.
|
|
3189
3103
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
@@ -3212,9 +3126,8 @@ declare namespace CodeceptJS {
|
|
|
3212
3126
|
* ```
|
|
3213
3127
|
*
|
|
3214
3128
|
* > When no option is set, custom drag and drop would be used, to use the dragAndDrop API from Playwright, please set options, for example `force: true`
|
|
3215
|
-
* @returns automatically synchronized promise through #recorder
|
|
3216
3129
|
*/
|
|
3217
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): Promise<
|
|
3130
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): Promise<any>;
|
|
3218
3131
|
/**
|
|
3219
3132
|
* Restart browser with a new context and a new page
|
|
3220
3133
|
*
|
|
@@ -3235,27 +3148,39 @@ declare namespace CodeceptJS {
|
|
|
3235
3148
|
* ```js
|
|
3236
3149
|
* I.refreshPage();
|
|
3237
3150
|
* ```
|
|
3238
|
-
* @returns automatically synchronized promise through #recorder
|
|
3239
3151
|
*/
|
|
3240
|
-
refreshPage(): Promise<
|
|
3152
|
+
refreshPage(): Promise<any>;
|
|
3153
|
+
/**
|
|
3154
|
+
* Replaying from HAR
|
|
3155
|
+
*
|
|
3156
|
+
* ```js
|
|
3157
|
+
* // Replay API requests from HAR.
|
|
3158
|
+
* // Either use a matching response from the HAR,
|
|
3159
|
+
* // or abort the request if nothing matches.
|
|
3160
|
+
* I.replayFromHar('./output/har/something.har', { url: "*\/**\/api/v1/fruits" });
|
|
3161
|
+
* I.amOnPage('https://demo.playwright.dev/api-mocking');
|
|
3162
|
+
* I.see('CodeceptJS');
|
|
3163
|
+
* ```
|
|
3164
|
+
* @param harFilePath - Path to recorded HAR file
|
|
3165
|
+
* @param [opts] - [Options for replaying from HAR](https://playwright.dev/docs/api/class-page#page-route-from-har)
|
|
3166
|
+
*/
|
|
3167
|
+
replayFromHar(harFilePath: string, opts?: any): Promise<any>;
|
|
3241
3168
|
/**
|
|
3242
3169
|
* Scroll page to the top.
|
|
3243
3170
|
*
|
|
3244
3171
|
* ```js
|
|
3245
3172
|
* I.scrollPageToTop();
|
|
3246
3173
|
* ```
|
|
3247
|
-
* @returns automatically synchronized promise through #recorder
|
|
3248
3174
|
*/
|
|
3249
|
-
scrollPageToTop(): Promise<
|
|
3175
|
+
scrollPageToTop(): Promise<any>;
|
|
3250
3176
|
/**
|
|
3251
3177
|
* Scroll page to the bottom.
|
|
3252
3178
|
*
|
|
3253
3179
|
* ```js
|
|
3254
3180
|
* I.scrollPageToBottom();
|
|
3255
3181
|
* ```
|
|
3256
|
-
* @returns automatically synchronized promise through #recorder
|
|
3257
3182
|
*/
|
|
3258
|
-
scrollPageToBottom(): Promise<
|
|
3183
|
+
scrollPageToBottom(): Promise<any>;
|
|
3259
3184
|
/**
|
|
3260
3185
|
* Scrolls to element matched by locator.
|
|
3261
3186
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -3267,9 +3192,8 @@ declare namespace CodeceptJS {
|
|
|
3267
3192
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3268
3193
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
3269
3194
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
3270
|
-
* @returns automatically synchronized promise through #recorder
|
|
3271
3195
|
*/
|
|
3272
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
3196
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
3273
3197
|
/**
|
|
3274
3198
|
* Checks that title contains text.
|
|
3275
3199
|
*
|
|
@@ -3277,9 +3201,8 @@ declare namespace CodeceptJS {
|
|
|
3277
3201
|
* I.seeInTitle('Home Page');
|
|
3278
3202
|
* ```
|
|
3279
3203
|
* @param text - text value to check.
|
|
3280
|
-
* @returns automatically synchronized promise through #recorder
|
|
3281
3204
|
*/
|
|
3282
|
-
seeInTitle(text: string): Promise<
|
|
3205
|
+
seeInTitle(text: string): Promise<any>;
|
|
3283
3206
|
/**
|
|
3284
3207
|
* Retrieves a page scroll position and returns it to test.
|
|
3285
3208
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -3297,9 +3220,8 @@ declare namespace CodeceptJS {
|
|
|
3297
3220
|
* I.seeTitleEquals('Test title.');
|
|
3298
3221
|
* ```
|
|
3299
3222
|
* @param text - value to check.
|
|
3300
|
-
* @returns automatically synchronized promise through #recorder
|
|
3301
3223
|
*/
|
|
3302
|
-
seeTitleEquals(text: string): Promise<
|
|
3224
|
+
seeTitleEquals(text: string): Promise<any>;
|
|
3303
3225
|
/**
|
|
3304
3226
|
* Checks that title does not contain text.
|
|
3305
3227
|
*
|
|
@@ -3307,9 +3229,8 @@ declare namespace CodeceptJS {
|
|
|
3307
3229
|
* I.dontSeeInTitle('Error');
|
|
3308
3230
|
* ```
|
|
3309
3231
|
* @param text - value to check.
|
|
3310
|
-
* @returns automatically synchronized promise through #recorder
|
|
3311
3232
|
*/
|
|
3312
|
-
dontSeeInTitle(text: string): Promise<
|
|
3233
|
+
dontSeeInTitle(text: string): Promise<any>;
|
|
3313
3234
|
/**
|
|
3314
3235
|
* Retrieves a page title and returns it to test.
|
|
3315
3236
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -3430,9 +3351,8 @@ declare namespace CodeceptJS {
|
|
|
3430
3351
|
* I.seeElement('#modal');
|
|
3431
3352
|
* ```
|
|
3432
3353
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3433
|
-
* @returns automatically synchronized promise through #recorder
|
|
3434
3354
|
*/
|
|
3435
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
3355
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3436
3356
|
/**
|
|
3437
3357
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
3438
3358
|
*
|
|
@@ -3440,9 +3360,8 @@ declare namespace CodeceptJS {
|
|
|
3440
3360
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
3441
3361
|
* ```
|
|
3442
3362
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3443
|
-
* @returns automatically synchronized promise through #recorder
|
|
3444
3363
|
*/
|
|
3445
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
3364
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3446
3365
|
/**
|
|
3447
3366
|
* Checks that a given Element is present in the DOM
|
|
3448
3367
|
* Element is located by CSS or XPath.
|
|
@@ -3451,9 +3370,8 @@ declare namespace CodeceptJS {
|
|
|
3451
3370
|
* I.seeElementInDOM('#modal');
|
|
3452
3371
|
* ```
|
|
3453
3372
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3454
|
-
* @returns automatically synchronized promise through #recorder
|
|
3455
3373
|
*/
|
|
3456
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
3374
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3457
3375
|
/**
|
|
3458
3376
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
3459
3377
|
*
|
|
@@ -3461,9 +3379,8 @@ declare namespace CodeceptJS {
|
|
|
3461
3379
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
3462
3380
|
* ```
|
|
3463
3381
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3464
|
-
* @returns automatically synchronized promise through #recorder
|
|
3465
3382
|
*/
|
|
3466
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
3383
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3467
3384
|
/**
|
|
3468
3385
|
* Handles a file download. A file name is required to save the file on disk.
|
|
3469
3386
|
* Files are saved to "output" directory.
|
|
@@ -3515,9 +3432,8 @@ declare namespace CodeceptJS {
|
|
|
3515
3432
|
* // make ctrl-click
|
|
3516
3433
|
* I.click('.edit', null, { modifiers: ['Ctrl'] } )
|
|
3517
3434
|
* ```
|
|
3518
|
-
* @returns automatically synchronized promise through #recorder
|
|
3519
3435
|
*/
|
|
3520
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): Promise<
|
|
3436
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): Promise<any>;
|
|
3521
3437
|
/**
|
|
3522
3438
|
* Clicks link and waits for navigation (deprecated)
|
|
3523
3439
|
*/
|
|
@@ -3549,9 +3465,8 @@ declare namespace CodeceptJS {
|
|
|
3549
3465
|
* ```
|
|
3550
3466
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3551
3467
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3552
|
-
* @returns automatically synchronized promise through #recorder
|
|
3553
3468
|
*/
|
|
3554
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3469
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3555
3470
|
/**
|
|
3556
3471
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
3557
3472
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -3564,9 +3479,8 @@ declare namespace CodeceptJS {
|
|
|
3564
3479
|
* ```
|
|
3565
3480
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3566
3481
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3567
|
-
* @returns automatically synchronized promise through #recorder
|
|
3568
3482
|
*/
|
|
3569
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3483
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3570
3484
|
/**
|
|
3571
3485
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
3572
3486
|
*
|
|
@@ -3580,9 +3494,8 @@ declare namespace CodeceptJS {
|
|
|
3580
3494
|
* ```
|
|
3581
3495
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
3582
3496
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
3583
|
-
* @returns automatically synchronized promise through #recorder
|
|
3584
3497
|
*/
|
|
3585
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3498
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3586
3499
|
/**
|
|
3587
3500
|
* Selects a checkbox or radio button.
|
|
3588
3501
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -3596,20 +3509,8 @@ declare namespace CodeceptJS {
|
|
|
3596
3509
|
* ```
|
|
3597
3510
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3598
3511
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
3599
|
-
* @returns automatically synchronized promise through #recorder
|
|
3600
|
-
*
|
|
3601
|
-
*
|
|
3602
|
-
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
3603
|
-
*
|
|
3604
|
-
* Examples:
|
|
3605
|
-
*
|
|
3606
|
-
* ```js
|
|
3607
|
-
* // click on element at position
|
|
3608
|
-
* I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
3609
|
-
* ```
|
|
3610
|
-
* > ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
3611
3512
|
*/
|
|
3612
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3513
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3613
3514
|
/**
|
|
3614
3515
|
* Unselects a checkbox or radio button.
|
|
3615
3516
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -3623,20 +3524,8 @@ declare namespace CodeceptJS {
|
|
|
3623
3524
|
* ```
|
|
3624
3525
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3625
3526
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
3626
|
-
* @returns automatically synchronized promise through #recorder
|
|
3627
|
-
*
|
|
3628
|
-
*
|
|
3629
|
-
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
3630
|
-
*
|
|
3631
|
-
* Examples:
|
|
3632
|
-
*
|
|
3633
|
-
* ```js
|
|
3634
|
-
* // click on element at position
|
|
3635
|
-
* I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
3636
|
-
* ```
|
|
3637
|
-
* > ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
3638
3527
|
*/
|
|
3639
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3528
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3640
3529
|
/**
|
|
3641
3530
|
* Verifies that the specified checkbox is checked.
|
|
3642
3531
|
*
|
|
@@ -3646,9 +3535,8 @@ declare namespace CodeceptJS {
|
|
|
3646
3535
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
3647
3536
|
* ```
|
|
3648
3537
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3649
|
-
* @returns automatically synchronized promise through #recorder
|
|
3650
3538
|
*/
|
|
3651
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
3539
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3652
3540
|
/**
|
|
3653
3541
|
* Verifies that the specified checkbox is not checked.
|
|
3654
3542
|
*
|
|
@@ -3658,9 +3546,8 @@ declare namespace CodeceptJS {
|
|
|
3658
3546
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
3659
3547
|
* ```
|
|
3660
3548
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3661
|
-
* @returns automatically synchronized promise through #recorder
|
|
3662
3549
|
*/
|
|
3663
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
3550
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3664
3551
|
/**
|
|
3665
3552
|
* Presses a key in the browser and leaves it in a down state.
|
|
3666
3553
|
*
|
|
@@ -3672,9 +3559,8 @@ declare namespace CodeceptJS {
|
|
|
3672
3559
|
* I.pressKeyUp('Control');
|
|
3673
3560
|
* ```
|
|
3674
3561
|
* @param key - name of key to press down.
|
|
3675
|
-
* @returns automatically synchronized promise through #recorder
|
|
3676
3562
|
*/
|
|
3677
|
-
pressKeyDown(key: string): Promise<
|
|
3563
|
+
pressKeyDown(key: string): Promise<any>;
|
|
3678
3564
|
/**
|
|
3679
3565
|
* Releases a key in the browser which was previously set to a down state.
|
|
3680
3566
|
*
|
|
@@ -3686,9 +3572,8 @@ declare namespace CodeceptJS {
|
|
|
3686
3572
|
* I.pressKeyUp('Control');
|
|
3687
3573
|
* ```
|
|
3688
3574
|
* @param key - name of key to release.
|
|
3689
|
-
* @returns automatically synchronized promise through #recorder
|
|
3690
3575
|
*/
|
|
3691
|
-
pressKeyUp(key: string): Promise<
|
|
3576
|
+
pressKeyUp(key: string): Promise<any>;
|
|
3692
3577
|
/**
|
|
3693
3578
|
* Presses a key in the browser (on a focused element).
|
|
3694
3579
|
*
|
|
@@ -3748,12 +3633,8 @@ declare namespace CodeceptJS {
|
|
|
3748
3633
|
* - `'Space'`
|
|
3749
3634
|
* - `'Tab'`
|
|
3750
3635
|
* @param key - key or array of keys to press.
|
|
3751
|
-
* @returns automatically synchronized promise through #recorder
|
|
3752
|
-
*
|
|
3753
|
-
*
|
|
3754
|
-
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
3755
3636
|
*/
|
|
3756
|
-
pressKey(key: string | string[]): Promise<
|
|
3637
|
+
pressKey(key: string | string[]): Promise<any>;
|
|
3757
3638
|
/**
|
|
3758
3639
|
* Types out the given text into an active field.
|
|
3759
3640
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -3774,9 +3655,8 @@ declare namespace CodeceptJS {
|
|
|
3774
3655
|
* ```
|
|
3775
3656
|
* @param key - or array of keys to type.
|
|
3776
3657
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
3777
|
-
* @returns automatically synchronized promise through #recorder
|
|
3778
3658
|
*/
|
|
3779
|
-
type(key: string | string[], delay?: number): Promise<
|
|
3659
|
+
type(key: string | string[], delay?: number): Promise<any>;
|
|
3780
3660
|
/**
|
|
3781
3661
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
3782
3662
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -3793,9 +3673,8 @@ declare namespace CodeceptJS {
|
|
|
3793
3673
|
* ```
|
|
3794
3674
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3795
3675
|
* @param value - text value to fill.
|
|
3796
|
-
* @returns automatically synchronized promise through #recorder
|
|
3797
3676
|
*/
|
|
3798
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
3677
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
3799
3678
|
/**
|
|
3800
3679
|
* Clears the text input element: `<input>`, `<textarea>` or `[contenteditable]` .
|
|
3801
3680
|
*
|
|
@@ -3824,9 +3703,8 @@ declare namespace CodeceptJS {
|
|
|
3824
3703
|
* ```
|
|
3825
3704
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
3826
3705
|
* @param value - text value to append.
|
|
3827
|
-
* @returns automatically synchronized promise through #recorder
|
|
3828
3706
|
*/
|
|
3829
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
3707
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
3830
3708
|
/**
|
|
3831
3709
|
* Checks that the given input field or textarea equals to given value.
|
|
3832
3710
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -3839,9 +3717,8 @@ declare namespace CodeceptJS {
|
|
|
3839
3717
|
* ```
|
|
3840
3718
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3841
3719
|
* @param value - value to check.
|
|
3842
|
-
* @returns automatically synchronized promise through #recorder
|
|
3843
3720
|
*/
|
|
3844
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
3721
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
3845
3722
|
/**
|
|
3846
3723
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
3847
3724
|
* Opposite to `seeInField`.
|
|
@@ -3852,9 +3729,8 @@ declare namespace CodeceptJS {
|
|
|
3852
3729
|
* ```
|
|
3853
3730
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3854
3731
|
* @param value - value to check.
|
|
3855
|
-
* @returns automatically synchronized promise through #recorder
|
|
3856
3732
|
*/
|
|
3857
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
3733
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
3858
3734
|
/**
|
|
3859
3735
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
3860
3736
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -3866,9 +3742,8 @@ declare namespace CodeceptJS {
|
|
|
3866
3742
|
* ```
|
|
3867
3743
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
3868
3744
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
3869
|
-
* @returns automatically synchronized promise through #recorder
|
|
3870
3745
|
*/
|
|
3871
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
3746
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
3872
3747
|
/**
|
|
3873
3748
|
* Selects an option in a drop-down select.
|
|
3874
3749
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -3890,9 +3765,8 @@ declare namespace CodeceptJS {
|
|
|
3890
3765
|
* ```
|
|
3891
3766
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
3892
3767
|
* @param option - visible text or value of option.
|
|
3893
|
-
* @returns automatically synchronized promise through #recorder
|
|
3894
3768
|
*/
|
|
3895
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
3769
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
3896
3770
|
/**
|
|
3897
3771
|
* Grab number of visible elements by locator.
|
|
3898
3772
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -3911,15 +3785,13 @@ declare namespace CodeceptJS {
|
|
|
3911
3785
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
3912
3786
|
* ```
|
|
3913
3787
|
* @param url - a fragment to check
|
|
3914
|
-
* @returns automatically synchronized promise through #recorder
|
|
3915
3788
|
*/
|
|
3916
|
-
seeInCurrentUrl(url: string): Promise<
|
|
3789
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
3917
3790
|
/**
|
|
3918
3791
|
* Checks that current url does not contain a provided fragment.
|
|
3919
3792
|
* @param url - value to check.
|
|
3920
|
-
* @returns automatically synchronized promise through #recorder
|
|
3921
3793
|
*/
|
|
3922
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
3794
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
3923
3795
|
/**
|
|
3924
3796
|
* Checks that current url is equal to provided one.
|
|
3925
3797
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -3930,9 +3802,8 @@ declare namespace CodeceptJS {
|
|
|
3930
3802
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
3931
3803
|
* ```
|
|
3932
3804
|
* @param url - value to check.
|
|
3933
|
-
* @returns automatically synchronized promise through #recorder
|
|
3934
3805
|
*/
|
|
3935
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
3806
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
3936
3807
|
/**
|
|
3937
3808
|
* Checks that current url is not equal to provided one.
|
|
3938
3809
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -3942,9 +3813,8 @@ declare namespace CodeceptJS {
|
|
|
3942
3813
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
3943
3814
|
* ```
|
|
3944
3815
|
* @param url - value to check.
|
|
3945
|
-
* @returns automatically synchronized promise through #recorder
|
|
3946
3816
|
*/
|
|
3947
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
3817
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
3948
3818
|
/**
|
|
3949
3819
|
* Checks that a page contains a visible text.
|
|
3950
3820
|
* Use context parameter to narrow down the search.
|
|
@@ -3956,9 +3826,8 @@ declare namespace CodeceptJS {
|
|
|
3956
3826
|
* ```
|
|
3957
3827
|
* @param text - expected on page.
|
|
3958
3828
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
3959
|
-
* @returns automatically synchronized promise through #recorder
|
|
3960
3829
|
*/
|
|
3961
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3830
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3962
3831
|
/**
|
|
3963
3832
|
* Checks that text is equal to provided one.
|
|
3964
3833
|
*
|
|
@@ -3967,9 +3836,8 @@ declare namespace CodeceptJS {
|
|
|
3967
3836
|
* ```
|
|
3968
3837
|
* @param text - element value to check.
|
|
3969
3838
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
3970
|
-
* @returns automatically synchronized promise through #recorder
|
|
3971
3839
|
*/
|
|
3972
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3840
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3973
3841
|
/**
|
|
3974
3842
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
3975
3843
|
* Use context parameter to narrow down the search.
|
|
@@ -3980,9 +3848,8 @@ declare namespace CodeceptJS {
|
|
|
3980
3848
|
* ```
|
|
3981
3849
|
* @param text - which is not present.
|
|
3982
3850
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
3983
|
-
* @returns automatically synchronized promise through #recorder
|
|
3984
3851
|
*/
|
|
3985
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
3852
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3986
3853
|
/**
|
|
3987
3854
|
* Retrieves page source and returns it to test.
|
|
3988
3855
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -4022,9 +3889,8 @@ declare namespace CodeceptJS {
|
|
|
4022
3889
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
4023
3890
|
* ```
|
|
4024
3891
|
* @param text - value to check.
|
|
4025
|
-
* @returns automatically synchronized promise through #recorder
|
|
4026
3892
|
*/
|
|
4027
|
-
seeInSource(text: string): Promise<
|
|
3893
|
+
seeInSource(text: string): Promise<any>;
|
|
4028
3894
|
/**
|
|
4029
3895
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
4030
3896
|
*
|
|
@@ -4032,9 +3898,8 @@ declare namespace CodeceptJS {
|
|
|
4032
3898
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
4033
3899
|
* ```
|
|
4034
3900
|
* @param value - to check.
|
|
4035
|
-
* @returns automatically synchronized promise through #recorder
|
|
4036
3901
|
*/
|
|
4037
|
-
dontSeeInSource(value: string): Promise<
|
|
3902
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
4038
3903
|
/**
|
|
4039
3904
|
* Asserts that an element appears a given number of times in the DOM.
|
|
4040
3905
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -4045,9 +3910,8 @@ declare namespace CodeceptJS {
|
|
|
4045
3910
|
* ```
|
|
4046
3911
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4047
3912
|
* @param num - number of elements.
|
|
4048
|
-
* @returns automatically synchronized promise through #recorder
|
|
4049
3913
|
*/
|
|
4050
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
3914
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
4051
3915
|
/**
|
|
4052
3916
|
* Asserts that an element is visible a given number of times.
|
|
4053
3917
|
* Element is located by CSS or XPath.
|
|
@@ -4057,9 +3921,8 @@ declare namespace CodeceptJS {
|
|
|
4057
3921
|
* ```
|
|
4058
3922
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4059
3923
|
* @param num - number of elements.
|
|
4060
|
-
* @returns automatically synchronized promise through #recorder
|
|
4061
3924
|
*/
|
|
4062
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
3925
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
4063
3926
|
/**
|
|
4064
3927
|
* Sets cookie(s).
|
|
4065
3928
|
*
|
|
@@ -4075,9 +3938,8 @@ declare namespace CodeceptJS {
|
|
|
4075
3938
|
* ]);
|
|
4076
3939
|
* ```
|
|
4077
3940
|
* @param cookie - a cookie object or array of cookie objects.
|
|
4078
|
-
* @returns automatically synchronized promise through #recorder
|
|
4079
3941
|
*/
|
|
4080
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
3942
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
4081
3943
|
/**
|
|
4082
3944
|
* Checks that cookie with given name exists.
|
|
4083
3945
|
*
|
|
@@ -4085,9 +3947,8 @@ declare namespace CodeceptJS {
|
|
|
4085
3947
|
* I.seeCookie('Auth');
|
|
4086
3948
|
* ```
|
|
4087
3949
|
* @param name - cookie name.
|
|
4088
|
-
* @returns automatically synchronized promise through #recorder
|
|
4089
3950
|
*/
|
|
4090
|
-
seeCookie(name: string): Promise<
|
|
3951
|
+
seeCookie(name: string): Promise<any>;
|
|
4091
3952
|
/**
|
|
4092
3953
|
* Checks that cookie with given name does not exist.
|
|
4093
3954
|
*
|
|
@@ -4095,9 +3956,8 @@ declare namespace CodeceptJS {
|
|
|
4095
3956
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
4096
3957
|
* ```
|
|
4097
3958
|
* @param name - cookie name.
|
|
4098
|
-
* @returns automatically synchronized promise through #recorder
|
|
4099
3959
|
*/
|
|
4100
|
-
dontSeeCookie(name: string): Promise<
|
|
3960
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
4101
3961
|
/**
|
|
4102
3962
|
* Gets a cookie object by name.
|
|
4103
3963
|
* If none provided gets all cookies.
|
|
@@ -4116,12 +3976,11 @@ declare namespace CodeceptJS {
|
|
|
4116
3976
|
*
|
|
4117
3977
|
* ```js
|
|
4118
3978
|
* I.clearCookie();
|
|
4119
|
-
* I.clearCookie('test');
|
|
3979
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
4120
3980
|
* ```
|
|
4121
3981
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
4122
|
-
* @returns automatically synchronized promise through #recorder
|
|
4123
3982
|
*/
|
|
4124
|
-
clearCookie(cookie?: string): Promise<
|
|
3983
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
4125
3984
|
/**
|
|
4126
3985
|
* Executes a script on the page:
|
|
4127
3986
|
*
|
|
@@ -4251,9 +4110,8 @@ declare namespace CodeceptJS {
|
|
|
4251
4110
|
* ```
|
|
4252
4111
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4253
4112
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
4254
|
-
* @returns automatically synchronized promise through #recorder
|
|
4255
4113
|
*/
|
|
4256
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<
|
|
4114
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
|
|
4257
4115
|
/**
|
|
4258
4116
|
* Checks that all elements with given locator have given attributes.
|
|
4259
4117
|
*
|
|
@@ -4262,9 +4120,8 @@ declare namespace CodeceptJS {
|
|
|
4262
4120
|
* ```
|
|
4263
4121
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4264
4122
|
* @param attributes - attributes and their values to check.
|
|
4265
|
-
* @returns automatically synchronized promise through #recorder
|
|
4266
4123
|
*/
|
|
4267
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<
|
|
4124
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
|
|
4268
4125
|
/**
|
|
4269
4126
|
* Drag the scrubber of a slider to a given position
|
|
4270
4127
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -4275,9 +4132,8 @@ declare namespace CodeceptJS {
|
|
|
4275
4132
|
* ```
|
|
4276
4133
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
4277
4134
|
* @param offsetX - position to drag.
|
|
4278
|
-
* @returns automatically synchronized promise through #recorder
|
|
4279
4135
|
*/
|
|
4280
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<
|
|
4136
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
|
|
4281
4137
|
/**
|
|
4282
4138
|
* Retrieves an attribute from an element located by CSS or XPath and returns it to test.
|
|
4283
4139
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -4312,9 +4168,8 @@ declare namespace CodeceptJS {
|
|
|
4312
4168
|
* ```
|
|
4313
4169
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4314
4170
|
* @param fileName - file name to save.
|
|
4315
|
-
* @returns automatically synchronized promise through #recorder
|
|
4316
4171
|
*/
|
|
4317
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
4172
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
4318
4173
|
/**
|
|
4319
4174
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
4320
4175
|
* Filename is relative to output folder.
|
|
@@ -4326,9 +4181,8 @@ declare namespace CodeceptJS {
|
|
|
4326
4181
|
* ```
|
|
4327
4182
|
* @param fileName - file name to save.
|
|
4328
4183
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
4329
|
-
* @returns automatically synchronized promise through #recorder
|
|
4330
4184
|
*/
|
|
4331
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
4185
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
4332
4186
|
/**
|
|
4333
4187
|
* Performs [api request](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get) using
|
|
4334
4188
|
* the cookies from the current browser session.
|
|
@@ -4353,17 +4207,15 @@ declare namespace CodeceptJS {
|
|
|
4353
4207
|
* I.wait(2); // wait 2 secs
|
|
4354
4208
|
* ```
|
|
4355
4209
|
* @param sec - number of second to wait.
|
|
4356
|
-
* @returns automatically synchronized promise through #recorder
|
|
4357
4210
|
*/
|
|
4358
|
-
wait(sec: number): Promise<
|
|
4211
|
+
wait(sec: number): Promise<any>;
|
|
4359
4212
|
/**
|
|
4360
4213
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
4361
4214
|
* Element can be located by CSS or XPath.
|
|
4362
4215
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4363
4216
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
4364
|
-
* @returns automatically synchronized promise through #recorder
|
|
4365
4217
|
*/
|
|
4366
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4218
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4367
4219
|
/**
|
|
4368
4220
|
* Waits for the specified value to be in value attribute.
|
|
4369
4221
|
*
|
|
@@ -4373,9 +4225,8 @@ declare namespace CodeceptJS {
|
|
|
4373
4225
|
* @param field - input field.
|
|
4374
4226
|
* @param value - expected value.
|
|
4375
4227
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4376
|
-
* @returns automatically synchronized promise through #recorder
|
|
4377
4228
|
*/
|
|
4378
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<
|
|
4229
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
|
|
4379
4230
|
/**
|
|
4380
4231
|
* Waits for a specified number of elements on the page.
|
|
4381
4232
|
*
|
|
@@ -4385,9 +4236,8 @@ declare namespace CodeceptJS {
|
|
|
4385
4236
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4386
4237
|
* @param num - number of elements.
|
|
4387
4238
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4388
|
-
* @returns automatically synchronized promise through #recorder
|
|
4389
4239
|
*/
|
|
4390
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<
|
|
4240
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
|
|
4391
4241
|
/**
|
|
4392
4242
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
4393
4243
|
* Element can be located by CSS or XPath.
|
|
@@ -4398,9 +4248,8 @@ declare namespace CodeceptJS {
|
|
|
4398
4248
|
* ```
|
|
4399
4249
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4400
4250
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4401
|
-
* @returns automatically synchronized promise through #recorder
|
|
4402
4251
|
*/
|
|
4403
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4252
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4404
4253
|
/**
|
|
4405
4254
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
4406
4255
|
* Element can be located by CSS or XPath.
|
|
@@ -4411,9 +4260,8 @@ declare namespace CodeceptJS {
|
|
|
4411
4260
|
* ```
|
|
4412
4261
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4413
4262
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4414
|
-
* @returns automatically synchronized promise through #recorder
|
|
4415
4263
|
*/
|
|
4416
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4264
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4417
4265
|
/**
|
|
4418
4266
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
4419
4267
|
* Element can be located by CSS or XPath.
|
|
@@ -4423,12 +4271,8 @@ declare namespace CodeceptJS {
|
|
|
4423
4271
|
* ```
|
|
4424
4272
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4425
4273
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4426
|
-
* @returns automatically synchronized promise through #recorder
|
|
4427
|
-
*
|
|
4428
|
-
*
|
|
4429
|
-
* This method accepts [React selectors](https://codecept.io/react).
|
|
4430
4274
|
*/
|
|
4431
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4275
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4432
4276
|
/**
|
|
4433
4277
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
4434
4278
|
* Element can be located by CSS or XPath.
|
|
@@ -4438,9 +4282,8 @@ declare namespace CodeceptJS {
|
|
|
4438
4282
|
* ```
|
|
4439
4283
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4440
4284
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4441
|
-
* @returns automatically synchronized promise through #recorder
|
|
4442
4285
|
*/
|
|
4443
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4286
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4444
4287
|
/**
|
|
4445
4288
|
* Waits for an element to hide (by default waits for 1sec).
|
|
4446
4289
|
* Element can be located by CSS or XPath.
|
|
@@ -4450,9 +4293,8 @@ declare namespace CodeceptJS {
|
|
|
4450
4293
|
* ```
|
|
4451
4294
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4452
4295
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4453
|
-
* @returns automatically synchronized promise through #recorder
|
|
4454
4296
|
*/
|
|
4455
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4297
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4456
4298
|
/**
|
|
4457
4299
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
4458
4300
|
*
|
|
@@ -4461,9 +4303,8 @@ declare namespace CodeceptJS {
|
|
|
4461
4303
|
* ```
|
|
4462
4304
|
* @param urlPart - value to check.
|
|
4463
4305
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4464
|
-
* @returns automatically synchronized promise through #recorder
|
|
4465
4306
|
*/
|
|
4466
|
-
waitInUrl(urlPart: string, sec?: number): Promise<
|
|
4307
|
+
waitInUrl(urlPart: string, sec?: number): Promise<any>;
|
|
4467
4308
|
/**
|
|
4468
4309
|
* Waits for the entire URL to match the expected
|
|
4469
4310
|
*
|
|
@@ -4473,9 +4314,8 @@ declare namespace CodeceptJS {
|
|
|
4473
4314
|
* ```
|
|
4474
4315
|
* @param urlPart - value to check.
|
|
4475
4316
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4476
|
-
* @returns automatically synchronized promise through #recorder
|
|
4477
4317
|
*/
|
|
4478
|
-
waitUrlEquals(urlPart: string, sec?: number): Promise<
|
|
4318
|
+
waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
|
|
4479
4319
|
/**
|
|
4480
4320
|
* Waits for a text to appear (by default waits for 1sec).
|
|
4481
4321
|
* Element can be located by CSS or XPath.
|
|
@@ -4488,9 +4328,8 @@ declare namespace CodeceptJS {
|
|
|
4488
4328
|
* @param text - to wait for.
|
|
4489
4329
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4490
4330
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
4491
|
-
* @returns automatically synchronized promise through #recorder
|
|
4492
4331
|
*/
|
|
4493
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4332
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
4494
4333
|
/**
|
|
4495
4334
|
* Waits for a network request.
|
|
4496
4335
|
*
|
|
@@ -4519,9 +4358,8 @@ declare namespace CodeceptJS {
|
|
|
4519
4358
|
* I.switchTo(); // switch back to main page
|
|
4520
4359
|
* ```
|
|
4521
4360
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
4522
|
-
* @returns automatically synchronized promise through #recorder
|
|
4523
4361
|
*/
|
|
4524
|
-
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<
|
|
4362
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
4525
4363
|
/**
|
|
4526
4364
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
4527
4365
|
* Running in browser context.
|
|
@@ -4538,9 +4376,8 @@ declare namespace CodeceptJS {
|
|
|
4538
4376
|
* @param fn - to be executed in browser context.
|
|
4539
4377
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
4540
4378
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
4541
|
-
* @returns automatically synchronized promise through #recorder
|
|
4542
4379
|
*/
|
|
4543
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
4380
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
4544
4381
|
/**
|
|
4545
4382
|
* Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
|
|
4546
4383
|
*
|
|
@@ -4563,9 +4400,8 @@ declare namespace CodeceptJS {
|
|
|
4563
4400
|
* ```
|
|
4564
4401
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4565
4402
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4566
|
-
* @returns automatically synchronized promise through #recorder
|
|
4567
4403
|
*/
|
|
4568
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
4404
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4569
4405
|
/**
|
|
4570
4406
|
* Grab the data from performance timing using Navigation Timing API.
|
|
4571
4407
|
* The returned data will contain following things in ms:
|
|
@@ -4586,9 +4422,8 @@ declare namespace CodeceptJS {
|
|
|
4586
4422
|
* loadEventEnd: 241
|
|
4587
4423
|
* }
|
|
4588
4424
|
* ```
|
|
4589
|
-
* @returns automatically synchronized promise through #recorder
|
|
4590
4425
|
*/
|
|
4591
|
-
grabDataFromPerformanceTiming(): Promise<
|
|
4426
|
+
grabDataFromPerformanceTiming(): Promise<any>;
|
|
4592
4427
|
/**
|
|
4593
4428
|
* Grab the width, height, location of given locator.
|
|
4594
4429
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -5017,9 +4852,8 @@ declare namespace CodeceptJS {
|
|
|
5017
4852
|
* I.amOnPage('/login'); // opens a login page
|
|
5018
4853
|
* ```
|
|
5019
4854
|
* @param url - url path or global url.
|
|
5020
|
-
* @returns automatically synchronized promise through #recorder
|
|
5021
4855
|
*/
|
|
5022
|
-
amOnPage(url: string): Promise<
|
|
4856
|
+
amOnPage(url: string): Promise<any>;
|
|
5023
4857
|
/**
|
|
5024
4858
|
* Perform a click on a link or a button, given by a locator.
|
|
5025
4859
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -5044,9 +4878,8 @@ declare namespace CodeceptJS {
|
|
|
5044
4878
|
* ```
|
|
5045
4879
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
5046
4880
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
5047
|
-
* @returns automatically synchronized promise through #recorder
|
|
5048
4881
|
*/
|
|
5049
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
4882
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
5050
4883
|
/**
|
|
5051
4884
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
5052
4885
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -5059,9 +4892,8 @@ declare namespace CodeceptJS {
|
|
|
5059
4892
|
* ```
|
|
5060
4893
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
5061
4894
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
5062
|
-
* @returns automatically synchronized promise through #recorder
|
|
5063
4895
|
*/
|
|
5064
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4896
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5065
4897
|
/**
|
|
5066
4898
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
5067
4899
|
*
|
|
@@ -5075,9 +4907,8 @@ declare namespace CodeceptJS {
|
|
|
5075
4907
|
* ```
|
|
5076
4908
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
5077
4909
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
5078
|
-
* @returns automatically synchronized promise through #recorder
|
|
5079
4910
|
*/
|
|
5080
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4911
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5081
4912
|
/**
|
|
5082
4913
|
* Moves cursor to element matched by locator.
|
|
5083
4914
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -5089,9 +4920,8 @@ declare namespace CodeceptJS {
|
|
|
5089
4920
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5090
4921
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
5091
4922
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
5092
|
-
* @returns automatically synchronized promise through #recorder
|
|
5093
4923
|
*/
|
|
5094
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
4924
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
5095
4925
|
/**
|
|
5096
4926
|
* Checks that a page contains a visible text.
|
|
5097
4927
|
* Use context parameter to narrow down the search.
|
|
@@ -5103,9 +4933,8 @@ declare namespace CodeceptJS {
|
|
|
5103
4933
|
* ```
|
|
5104
4934
|
* @param text - expected on page.
|
|
5105
4935
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
5106
|
-
* @returns automatically synchronized promise through #recorder
|
|
5107
4936
|
*/
|
|
5108
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4937
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5109
4938
|
/**
|
|
5110
4939
|
* Checks that text is equal to provided one.
|
|
5111
4940
|
*
|
|
@@ -5114,9 +4943,8 @@ declare namespace CodeceptJS {
|
|
|
5114
4943
|
* ```
|
|
5115
4944
|
* @param text - element value to check.
|
|
5116
4945
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
5117
|
-
* @returns automatically synchronized promise through #recorder
|
|
5118
4946
|
*/
|
|
5119
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4947
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5120
4948
|
/**
|
|
5121
4949
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
5122
4950
|
* Use context parameter to narrow down the search.
|
|
@@ -5127,9 +4955,8 @@ declare namespace CodeceptJS {
|
|
|
5127
4955
|
* ```
|
|
5128
4956
|
* @param text - which is not present.
|
|
5129
4957
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
5130
|
-
* @returns automatically synchronized promise through #recorder
|
|
5131
4958
|
*/
|
|
5132
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
4959
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5133
4960
|
/**
|
|
5134
4961
|
* Get JS log from browser. Log buffer is reset after each request.
|
|
5135
4962
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -5173,9 +5000,8 @@ declare namespace CodeceptJS {
|
|
|
5173
5000
|
* ```
|
|
5174
5001
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
5175
5002
|
* @param option - visible text or value of option.
|
|
5176
|
-
* @returns automatically synchronized promise through #recorder
|
|
5177
5003
|
*/
|
|
5178
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
5004
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
5179
5005
|
/**
|
|
5180
5006
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
5181
5007
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -5192,9 +5018,8 @@ declare namespace CodeceptJS {
|
|
|
5192
5018
|
* ```
|
|
5193
5019
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5194
5020
|
* @param value - text value to fill.
|
|
5195
|
-
* @returns automatically synchronized promise through #recorder
|
|
5196
5021
|
*/
|
|
5197
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
5022
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
5198
5023
|
/**
|
|
5199
5024
|
* Presses a key on a focused element.
|
|
5200
5025
|
* Special keys like 'Enter', 'Control', [etc](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value)
|
|
@@ -5206,11 +5031,8 @@ declare namespace CodeceptJS {
|
|
|
5206
5031
|
* I.pressKey(['Control','a']);
|
|
5207
5032
|
* ```
|
|
5208
5033
|
* @param key - key or array of keys to press.
|
|
5209
|
-
* @returns automatically synchronized promise through #recorder
|
|
5210
|
-
*
|
|
5211
|
-
* {{ keys }}
|
|
5212
5034
|
*/
|
|
5213
|
-
pressKey(key: string | string[]): Promise<
|
|
5035
|
+
pressKey(key: string | string[]): Promise<any>;
|
|
5214
5036
|
/**
|
|
5215
5037
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
5216
5038
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -5222,9 +5044,8 @@ declare namespace CodeceptJS {
|
|
|
5222
5044
|
* ```
|
|
5223
5045
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
5224
5046
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
5225
|
-
* @returns automatically synchronized promise through #recorder
|
|
5226
5047
|
*/
|
|
5227
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
5048
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
5228
5049
|
/**
|
|
5229
5050
|
* Checks that the given input field or textarea equals to given value.
|
|
5230
5051
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -5237,9 +5058,8 @@ declare namespace CodeceptJS {
|
|
|
5237
5058
|
* ```
|
|
5238
5059
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5239
5060
|
* @param value - value to check.
|
|
5240
|
-
* @returns automatically synchronized promise through #recorder
|
|
5241
5061
|
*/
|
|
5242
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
5062
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
5243
5063
|
/**
|
|
5244
5064
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
5245
5065
|
* Opposite to `seeInField`.
|
|
@@ -5250,9 +5070,8 @@ declare namespace CodeceptJS {
|
|
|
5250
5070
|
* ```
|
|
5251
5071
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5252
5072
|
* @param value - value to check.
|
|
5253
|
-
* @returns automatically synchronized promise through #recorder
|
|
5254
5073
|
*/
|
|
5255
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
5074
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
5256
5075
|
/**
|
|
5257
5076
|
* Appends text to a input field or textarea.
|
|
5258
5077
|
* Field is located by name, label, CSS or XPath
|
|
@@ -5264,9 +5083,8 @@ declare namespace CodeceptJS {
|
|
|
5264
5083
|
* ```
|
|
5265
5084
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
5266
5085
|
* @param value - text value to append.
|
|
5267
|
-
* @returns automatically synchronized promise through #recorder
|
|
5268
5086
|
*/
|
|
5269
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
5087
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
5270
5088
|
/**
|
|
5271
5089
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
5272
5090
|
*
|
|
@@ -5276,9 +5094,8 @@ declare namespace CodeceptJS {
|
|
|
5276
5094
|
* I.clearField('#email');
|
|
5277
5095
|
* ```
|
|
5278
5096
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
5279
|
-
* @returns automatically synchronized promise through #recorder.
|
|
5280
5097
|
*/
|
|
5281
|
-
clearField(editable: LocatorOrString): Promise<
|
|
5098
|
+
clearField(editable: LocatorOrString): Promise<any>;
|
|
5282
5099
|
/**
|
|
5283
5100
|
* Selects a checkbox or radio button.
|
|
5284
5101
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -5292,9 +5109,8 @@ declare namespace CodeceptJS {
|
|
|
5292
5109
|
* ```
|
|
5293
5110
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
5294
5111
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5295
|
-
* @returns automatically synchronized promise through #recorder
|
|
5296
5112
|
*/
|
|
5297
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
5113
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5298
5114
|
/**
|
|
5299
5115
|
* Unselects a checkbox or radio button.
|
|
5300
5116
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -5308,9 +5124,8 @@ declare namespace CodeceptJS {
|
|
|
5308
5124
|
* ```
|
|
5309
5125
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
5310
5126
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
5311
|
-
* @returns automatically synchronized promise through #recorder
|
|
5312
5127
|
*/
|
|
5313
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
5128
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5314
5129
|
/**
|
|
5315
5130
|
* Verifies that the specified checkbox is checked.
|
|
5316
5131
|
*
|
|
@@ -5320,9 +5135,8 @@ declare namespace CodeceptJS {
|
|
|
5320
5135
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
5321
5136
|
* ```
|
|
5322
5137
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5323
|
-
* @returns automatically synchronized promise through #recorder
|
|
5324
5138
|
*/
|
|
5325
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
5139
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5326
5140
|
/**
|
|
5327
5141
|
* Verifies that the specified checkbox is not checked.
|
|
5328
5142
|
*
|
|
@@ -5332,9 +5146,8 @@ declare namespace CodeceptJS {
|
|
|
5332
5146
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
5333
5147
|
* ```
|
|
5334
5148
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5335
|
-
* @returns automatically synchronized promise through #recorder
|
|
5336
5149
|
*/
|
|
5337
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
5150
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5338
5151
|
/**
|
|
5339
5152
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
5340
5153
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -5461,9 +5274,8 @@ declare namespace CodeceptJS {
|
|
|
5461
5274
|
* I.seeInTitle('Home Page');
|
|
5462
5275
|
* ```
|
|
5463
5276
|
* @param text - text value to check.
|
|
5464
|
-
* @returns automatically synchronized promise through #recorder
|
|
5465
5277
|
*/
|
|
5466
|
-
seeInTitle(text: string): Promise<
|
|
5278
|
+
seeInTitle(text: string): Promise<any>;
|
|
5467
5279
|
/**
|
|
5468
5280
|
* Checks that title is equal to provided one.
|
|
5469
5281
|
*
|
|
@@ -5471,9 +5283,8 @@ declare namespace CodeceptJS {
|
|
|
5471
5283
|
* I.seeTitleEquals('Test title.');
|
|
5472
5284
|
* ```
|
|
5473
5285
|
* @param text - value to check.
|
|
5474
|
-
* @returns automatically synchronized promise through #recorder
|
|
5475
5286
|
*/
|
|
5476
|
-
seeTitleEquals(text: string): Promise<
|
|
5287
|
+
seeTitleEquals(text: string): Promise<any>;
|
|
5477
5288
|
/**
|
|
5478
5289
|
* Checks that title does not contain text.
|
|
5479
5290
|
*
|
|
@@ -5481,9 +5292,8 @@ declare namespace CodeceptJS {
|
|
|
5481
5292
|
* I.dontSeeInTitle('Error');
|
|
5482
5293
|
* ```
|
|
5483
5294
|
* @param text - value to check.
|
|
5484
|
-
* @returns automatically synchronized promise through #recorder
|
|
5485
5295
|
*/
|
|
5486
|
-
dontSeeInTitle(text: string): Promise<
|
|
5296
|
+
dontSeeInTitle(text: string): Promise<any>;
|
|
5487
5297
|
/**
|
|
5488
5298
|
* Retrieves a page title and returns it to test.
|
|
5489
5299
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -5502,9 +5312,8 @@ declare namespace CodeceptJS {
|
|
|
5502
5312
|
* I.seeElement('#modal');
|
|
5503
5313
|
* ```
|
|
5504
5314
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5505
|
-
* @returns automatically synchronized promise through #recorder
|
|
5506
5315
|
*/
|
|
5507
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
5316
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5508
5317
|
/**
|
|
5509
5318
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
5510
5319
|
*
|
|
@@ -5512,9 +5321,8 @@ declare namespace CodeceptJS {
|
|
|
5512
5321
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
5513
5322
|
* ```
|
|
5514
5323
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5515
|
-
* @returns automatically synchronized promise through #recorder
|
|
5516
5324
|
*/
|
|
5517
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
5325
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5518
5326
|
/**
|
|
5519
5327
|
* Checks that a given Element is present in the DOM
|
|
5520
5328
|
* Element is located by CSS or XPath.
|
|
@@ -5523,9 +5331,8 @@ declare namespace CodeceptJS {
|
|
|
5523
5331
|
* I.seeElementInDOM('#modal');
|
|
5524
5332
|
* ```
|
|
5525
5333
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5526
|
-
* @returns automatically synchronized promise through #recorder
|
|
5527
5334
|
*/
|
|
5528
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
5335
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5529
5336
|
/**
|
|
5530
5337
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
5531
5338
|
*
|
|
@@ -5533,9 +5340,8 @@ declare namespace CodeceptJS {
|
|
|
5533
5340
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
5534
5341
|
* ```
|
|
5535
5342
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5536
|
-
* @returns automatically synchronized promise through #recorder
|
|
5537
5343
|
*/
|
|
5538
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
5344
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5539
5345
|
/**
|
|
5540
5346
|
* Checks that the current page contains the given string in its raw source code.
|
|
5541
5347
|
*
|
|
@@ -5543,9 +5349,8 @@ declare namespace CodeceptJS {
|
|
|
5543
5349
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
5544
5350
|
* ```
|
|
5545
5351
|
* @param text - value to check.
|
|
5546
|
-
* @returns automatically synchronized promise through #recorder
|
|
5547
5352
|
*/
|
|
5548
|
-
seeInSource(text: string): Promise<
|
|
5353
|
+
seeInSource(text: string): Promise<any>;
|
|
5549
5354
|
/**
|
|
5550
5355
|
* Retrieves page source and returns it to test.
|
|
5551
5356
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5563,9 +5368,8 @@ declare namespace CodeceptJS {
|
|
|
5563
5368
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
5564
5369
|
* ```
|
|
5565
5370
|
* @param value - to check.
|
|
5566
|
-
* @returns automatically synchronized promise through #recorder
|
|
5567
5371
|
*/
|
|
5568
|
-
dontSeeInSource(value: string): Promise<
|
|
5372
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
5569
5373
|
/**
|
|
5570
5374
|
* Asserts that an element appears a given number of times in the DOM.
|
|
5571
5375
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -5576,9 +5380,8 @@ declare namespace CodeceptJS {
|
|
|
5576
5380
|
* ```
|
|
5577
5381
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5578
5382
|
* @param num - number of elements.
|
|
5579
|
-
* @returns automatically synchronized promise through #recorder
|
|
5580
5383
|
*/
|
|
5581
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
5384
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
5582
5385
|
/**
|
|
5583
5386
|
* Asserts that an element is visible a given number of times.
|
|
5584
5387
|
* Element is located by CSS or XPath.
|
|
@@ -5588,9 +5391,8 @@ declare namespace CodeceptJS {
|
|
|
5588
5391
|
* ```
|
|
5589
5392
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5590
5393
|
* @param num - number of elements.
|
|
5591
|
-
* @returns automatically synchronized promise through #recorder
|
|
5592
5394
|
*/
|
|
5593
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
5395
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
5594
5396
|
/**
|
|
5595
5397
|
* Grab number of visible elements by locator.
|
|
5596
5398
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -5610,9 +5412,8 @@ declare namespace CodeceptJS {
|
|
|
5610
5412
|
* ```
|
|
5611
5413
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5612
5414
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
5613
|
-
* @returns automatically synchronized promise through #recorder
|
|
5614
5415
|
*/
|
|
5615
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<
|
|
5416
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
|
|
5616
5417
|
/**
|
|
5617
5418
|
* Checks that all elements with given locator have given attributes.
|
|
5618
5419
|
*
|
|
@@ -5621,9 +5422,8 @@ declare namespace CodeceptJS {
|
|
|
5621
5422
|
* ```
|
|
5622
5423
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5623
5424
|
* @param attributes - attributes and their values to check.
|
|
5624
|
-
* @returns automatically synchronized promise through #recorder
|
|
5625
5425
|
*/
|
|
5626
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<
|
|
5426
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
|
|
5627
5427
|
/**
|
|
5628
5428
|
* Executes sync script on a page.
|
|
5629
5429
|
* Pass arguments to function as additional parameters.
|
|
@@ -5685,15 +5485,13 @@ declare namespace CodeceptJS {
|
|
|
5685
5485
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
5686
5486
|
* ```
|
|
5687
5487
|
* @param url - a fragment to check
|
|
5688
|
-
* @returns automatically synchronized promise through #recorder
|
|
5689
5488
|
*/
|
|
5690
|
-
seeInCurrentUrl(url: string): Promise<
|
|
5489
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
5691
5490
|
/**
|
|
5692
5491
|
* Checks that current url does not contain a provided fragment.
|
|
5693
5492
|
* @param url - value to check.
|
|
5694
|
-
* @returns automatically synchronized promise through #recorder
|
|
5695
5493
|
*/
|
|
5696
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
5494
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
5697
5495
|
/**
|
|
5698
5496
|
* Checks that current url is equal to provided one.
|
|
5699
5497
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5704,9 +5502,8 @@ declare namespace CodeceptJS {
|
|
|
5704
5502
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
5705
5503
|
* ```
|
|
5706
5504
|
* @param url - value to check.
|
|
5707
|
-
* @returns automatically synchronized promise through #recorder
|
|
5708
5505
|
*/
|
|
5709
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
5506
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
5710
5507
|
/**
|
|
5711
5508
|
* Checks that current url is not equal to provided one.
|
|
5712
5509
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -5716,9 +5513,8 @@ declare namespace CodeceptJS {
|
|
|
5716
5513
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
5717
5514
|
* ```
|
|
5718
5515
|
* @param url - value to check.
|
|
5719
|
-
* @returns automatically synchronized promise through #recorder
|
|
5720
5516
|
*/
|
|
5721
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
5517
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
5722
5518
|
/**
|
|
5723
5519
|
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5724
5520
|
* Filename is relative to output folder.
|
|
@@ -5728,9 +5524,8 @@ declare namespace CodeceptJS {
|
|
|
5728
5524
|
* ```
|
|
5729
5525
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5730
5526
|
* @param fileName - file name to save.
|
|
5731
|
-
* @returns automatically synchronized promise through #recorder
|
|
5732
5527
|
*/
|
|
5733
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
5528
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
5734
5529
|
/**
|
|
5735
5530
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5736
5531
|
* Filename is relative to output folder.
|
|
@@ -5742,21 +5537,19 @@ declare namespace CodeceptJS {
|
|
|
5742
5537
|
* ```
|
|
5743
5538
|
* @param fileName - file name to save.
|
|
5744
5539
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
5745
|
-
* @returns automatically synchronized promise through #recorder
|
|
5746
5540
|
*/
|
|
5747
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
5541
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
5748
5542
|
/**
|
|
5749
5543
|
* Clears a cookie by name,
|
|
5750
5544
|
* if none provided clears all cookies.
|
|
5751
5545
|
*
|
|
5752
5546
|
* ```js
|
|
5753
5547
|
* I.clearCookie();
|
|
5754
|
-
* I.clearCookie('test');
|
|
5548
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
5755
5549
|
* ```
|
|
5756
5550
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
5757
|
-
* @returns automatically synchronized promise through #recorder
|
|
5758
5551
|
*/
|
|
5759
|
-
clearCookie(cookie?: string): Promise<
|
|
5552
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
5760
5553
|
/**
|
|
5761
5554
|
* Checks that cookie with given name exists.
|
|
5762
5555
|
*
|
|
@@ -5764,9 +5557,8 @@ declare namespace CodeceptJS {
|
|
|
5764
5557
|
* I.seeCookie('Auth');
|
|
5765
5558
|
* ```
|
|
5766
5559
|
* @param name - cookie name.
|
|
5767
|
-
* @returns automatically synchronized promise through #recorder
|
|
5768
5560
|
*/
|
|
5769
|
-
seeCookie(name: string): Promise<
|
|
5561
|
+
seeCookie(name: string): Promise<any>;
|
|
5770
5562
|
/**
|
|
5771
5563
|
* Checks that cookie with given name does not exist.
|
|
5772
5564
|
*
|
|
@@ -5774,9 +5566,8 @@ declare namespace CodeceptJS {
|
|
|
5774
5566
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
5775
5567
|
* ```
|
|
5776
5568
|
* @param name - cookie name.
|
|
5777
|
-
* @returns automatically synchronized promise through #recorder
|
|
5778
5569
|
*/
|
|
5779
|
-
dontSeeCookie(name: string): Promise<
|
|
5570
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
5780
5571
|
/**
|
|
5781
5572
|
* Gets a cookie object by name.
|
|
5782
5573
|
* If none provided gets all cookies.
|
|
@@ -5807,9 +5598,8 @@ declare namespace CodeceptJS {
|
|
|
5807
5598
|
* I.seeInPopup('Popup text');
|
|
5808
5599
|
* ```
|
|
5809
5600
|
* @param text - value to check.
|
|
5810
|
-
* @returns automatically synchronized promise through #recorder
|
|
5811
5601
|
*/
|
|
5812
|
-
seeInPopup(text: string): Promise<
|
|
5602
|
+
seeInPopup(text: string): Promise<any>;
|
|
5813
5603
|
/**
|
|
5814
5604
|
* Grab the text within the popup. If no popup is visible then it will return null
|
|
5815
5605
|
*
|
|
@@ -5823,9 +5613,8 @@ declare namespace CodeceptJS {
|
|
|
5823
5613
|
* First parameter can be set to `maximize`.
|
|
5824
5614
|
* @param width - width in pixels or `maximize`.
|
|
5825
5615
|
* @param height - height in pixels.
|
|
5826
|
-
* @returns automatically synchronized promise through #recorder
|
|
5827
5616
|
*/
|
|
5828
|
-
resizeWindow(width: number, height: number): Promise<
|
|
5617
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
5829
5618
|
/**
|
|
5830
5619
|
* Drag an item to a destination element.
|
|
5831
5620
|
*
|
|
@@ -5834,9 +5623,8 @@ declare namespace CodeceptJS {
|
|
|
5834
5623
|
* ```
|
|
5835
5624
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
5836
5625
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
5837
|
-
* @returns automatically synchronized promise through #recorder
|
|
5838
5626
|
*/
|
|
5839
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<
|
|
5627
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
|
|
5840
5628
|
/**
|
|
5841
5629
|
* Close all tabs except for the current one.
|
|
5842
5630
|
*
|
|
@@ -5902,9 +5690,8 @@ declare namespace CodeceptJS {
|
|
|
5902
5690
|
* I.switchTo(); // switch back to main page
|
|
5903
5691
|
* ```
|
|
5904
5692
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
5905
|
-
* @returns automatically synchronized promise through #recorder
|
|
5906
5693
|
*/
|
|
5907
|
-
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<
|
|
5694
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
5908
5695
|
/**
|
|
5909
5696
|
* Pauses execution for a number of seconds.
|
|
5910
5697
|
*
|
|
@@ -5912,9 +5699,8 @@ declare namespace CodeceptJS {
|
|
|
5912
5699
|
* I.wait(2); // wait 2 secs
|
|
5913
5700
|
* ```
|
|
5914
5701
|
* @param sec - number of second to wait.
|
|
5915
|
-
* @returns automatically synchronized promise through #recorder
|
|
5916
5702
|
*/
|
|
5917
|
-
wait(sec: number): Promise<
|
|
5703
|
+
wait(sec: number): Promise<any>;
|
|
5918
5704
|
/**
|
|
5919
5705
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
5920
5706
|
* Element can be located by CSS or XPath.
|
|
@@ -5925,9 +5711,8 @@ declare namespace CodeceptJS {
|
|
|
5925
5711
|
* ```
|
|
5926
5712
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5927
5713
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5928
|
-
* @returns automatically synchronized promise through #recorder
|
|
5929
5714
|
*/
|
|
5930
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5715
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
5931
5716
|
/**
|
|
5932
5717
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
5933
5718
|
* Element can be located by CSS or XPath.
|
|
@@ -5937,9 +5722,8 @@ declare namespace CodeceptJS {
|
|
|
5937
5722
|
* ```
|
|
5938
5723
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5939
5724
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5940
|
-
* @returns automatically synchronized promise through #recorder
|
|
5941
5725
|
*/
|
|
5942
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5726
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
5943
5727
|
/**
|
|
5944
5728
|
* Waits for element to become clickable for number of seconds.
|
|
5945
5729
|
*
|
|
@@ -5957,9 +5741,8 @@ declare namespace CodeceptJS {
|
|
|
5957
5741
|
* ```
|
|
5958
5742
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5959
5743
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5960
|
-
* @returns automatically synchronized promise through #recorder
|
|
5961
5744
|
*/
|
|
5962
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5745
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
5963
5746
|
/**
|
|
5964
5747
|
* Waits for an element to hide (by default waits for 1sec).
|
|
5965
5748
|
* Element can be located by CSS or XPath.
|
|
@@ -5969,9 +5752,8 @@ declare namespace CodeceptJS {
|
|
|
5969
5752
|
* ```
|
|
5970
5753
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5971
5754
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5972
|
-
* @returns automatically synchronized promise through #recorder
|
|
5973
5755
|
*/
|
|
5974
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5756
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
5975
5757
|
/**
|
|
5976
5758
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
5977
5759
|
* Element can be located by CSS or XPath.
|
|
@@ -5981,9 +5763,8 @@ declare namespace CodeceptJS {
|
|
|
5981
5763
|
* ```
|
|
5982
5764
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5983
5765
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5984
|
-
* @returns automatically synchronized promise through #recorder
|
|
5985
5766
|
*/
|
|
5986
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5767
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
5987
5768
|
/**
|
|
5988
5769
|
* Waits for a specified number of elements on the page.
|
|
5989
5770
|
*
|
|
@@ -5993,17 +5774,15 @@ declare namespace CodeceptJS {
|
|
|
5993
5774
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5994
5775
|
* @param num - number of elements.
|
|
5995
5776
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5996
|
-
* @returns automatically synchronized promise through #recorder
|
|
5997
5777
|
*/
|
|
5998
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<
|
|
5778
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
|
|
5999
5779
|
/**
|
|
6000
5780
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
6001
5781
|
* Element can be located by CSS or XPath.
|
|
6002
5782
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6003
5783
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
6004
|
-
* @returns automatically synchronized promise through #recorder
|
|
6005
5784
|
*/
|
|
6006
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
5785
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
6007
5786
|
/**
|
|
6008
5787
|
* Waits for the specified value to be in value attribute.
|
|
6009
5788
|
*
|
|
@@ -6013,9 +5792,8 @@ declare namespace CodeceptJS {
|
|
|
6013
5792
|
* @param field - input field.
|
|
6014
5793
|
* @param value - expected value.
|
|
6015
5794
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6016
|
-
* @returns automatically synchronized promise through #recorder
|
|
6017
5795
|
*/
|
|
6018
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<
|
|
5796
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
|
|
6019
5797
|
/**
|
|
6020
5798
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
6021
5799
|
* Running in browser context.
|
|
@@ -6032,9 +5810,8 @@ declare namespace CodeceptJS {
|
|
|
6032
5810
|
* @param fn - to be executed in browser context.
|
|
6033
5811
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
6034
5812
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
6035
|
-
* @returns automatically synchronized promise through #recorder
|
|
6036
5813
|
*/
|
|
6037
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
5814
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
6038
5815
|
/**
|
|
6039
5816
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
6040
5817
|
*
|
|
@@ -6043,9 +5820,8 @@ declare namespace CodeceptJS {
|
|
|
6043
5820
|
* ```
|
|
6044
5821
|
* @param urlPart - value to check.
|
|
6045
5822
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6046
|
-
* @returns automatically synchronized promise through #recorder
|
|
6047
5823
|
*/
|
|
6048
|
-
waitInUrl(urlPart: string, sec?: number): Promise<
|
|
5824
|
+
waitInUrl(urlPart: string, sec?: number): Promise<any>;
|
|
6049
5825
|
/**
|
|
6050
5826
|
* Waits for the entire URL to match the expected
|
|
6051
5827
|
*
|
|
@@ -6055,9 +5831,8 @@ declare namespace CodeceptJS {
|
|
|
6055
5831
|
* ```
|
|
6056
5832
|
* @param urlPart - value to check.
|
|
6057
5833
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6058
|
-
* @returns automatically synchronized promise through #recorder
|
|
6059
5834
|
*/
|
|
6060
|
-
waitUrlEquals(urlPart: string, sec?: number): Promise<
|
|
5835
|
+
waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
|
|
6061
5836
|
/**
|
|
6062
5837
|
* Waits for a text to appear (by default waits for 1sec).
|
|
6063
5838
|
* Element can be located by CSS or XPath.
|
|
@@ -6070,9 +5845,8 @@ declare namespace CodeceptJS {
|
|
|
6070
5845
|
* @param text - to wait for.
|
|
6071
5846
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
6072
5847
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
6073
|
-
* @returns automatically synchronized promise through #recorder
|
|
6074
5848
|
*/
|
|
6075
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
5849
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6076
5850
|
/**
|
|
6077
5851
|
* Moves to url
|
|
6078
5852
|
*/
|
|
@@ -6083,9 +5857,8 @@ declare namespace CodeceptJS {
|
|
|
6083
5857
|
* ```js
|
|
6084
5858
|
* I.refreshPage();
|
|
6085
5859
|
* ```
|
|
6086
|
-
* @returns automatically synchronized promise through #recorder
|
|
6087
5860
|
*/
|
|
6088
|
-
refreshPage(): Promise<
|
|
5861
|
+
refreshPage(): Promise<any>;
|
|
6089
5862
|
/**
|
|
6090
5863
|
* Reloads page
|
|
6091
5864
|
*/
|
|
@@ -6101,27 +5874,24 @@ declare namespace CodeceptJS {
|
|
|
6101
5874
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6102
5875
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6103
5876
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6104
|
-
* @returns automatically synchronized promise through #recorder
|
|
6105
5877
|
*/
|
|
6106
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
5878
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
6107
5879
|
/**
|
|
6108
5880
|
* Scroll page to the top.
|
|
6109
5881
|
*
|
|
6110
5882
|
* ```js
|
|
6111
5883
|
* I.scrollPageToTop();
|
|
6112
5884
|
* ```
|
|
6113
|
-
* @returns automatically synchronized promise through #recorder
|
|
6114
5885
|
*/
|
|
6115
|
-
scrollPageToTop(): Promise<
|
|
5886
|
+
scrollPageToTop(): Promise<any>;
|
|
6116
5887
|
/**
|
|
6117
5888
|
* Scroll page to the bottom.
|
|
6118
5889
|
*
|
|
6119
5890
|
* ```js
|
|
6120
5891
|
* I.scrollPageToBottom();
|
|
6121
5892
|
* ```
|
|
6122
|
-
* @returns automatically synchronized promise through #recorder
|
|
6123
5893
|
*/
|
|
6124
|
-
scrollPageToBottom(): Promise<
|
|
5894
|
+
scrollPageToBottom(): Promise<any>;
|
|
6125
5895
|
/**
|
|
6126
5896
|
* Retrieves a page scroll position and returns it to test.
|
|
6127
5897
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6166,9 +5936,8 @@ declare namespace CodeceptJS {
|
|
|
6166
5936
|
* ]);
|
|
6167
5937
|
* ```
|
|
6168
5938
|
* @param cookie - a cookie object or array of cookie objects.
|
|
6169
|
-
* @returns automatically synchronized promise through #recorder
|
|
6170
5939
|
*/
|
|
6171
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
5940
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
6172
5941
|
}
|
|
6173
5942
|
/**
|
|
6174
5943
|
* Uses [Google Chrome's Puppeteer](https://github.com/GoogleChrome/puppeteer) library to run tests inside headless Chrome.
|
|
@@ -6361,9 +6130,8 @@ declare namespace CodeceptJS {
|
|
|
6361
6130
|
* I.seeInPopup('Popup text');
|
|
6362
6131
|
* ```
|
|
6363
6132
|
* @param text - value to check.
|
|
6364
|
-
* @returns automatically synchronized promise through #recorder
|
|
6365
6133
|
*/
|
|
6366
|
-
seeInPopup(text: string): Promise<
|
|
6134
|
+
seeInPopup(text: string): Promise<any>;
|
|
6367
6135
|
/**
|
|
6368
6136
|
* Set current page
|
|
6369
6137
|
* @param page - page to set
|
|
@@ -6395,22 +6163,15 @@ declare namespace CodeceptJS {
|
|
|
6395
6163
|
* I.amOnPage('/login'); // opens a login page
|
|
6396
6164
|
* ```
|
|
6397
6165
|
* @param url - url path or global url.
|
|
6398
|
-
* @returns automatically synchronized promise through #recorder
|
|
6399
6166
|
*/
|
|
6400
|
-
amOnPage(url: string): Promise<
|
|
6167
|
+
amOnPage(url: string): Promise<any>;
|
|
6401
6168
|
/**
|
|
6402
6169
|
* Resize the current window to provided width and height.
|
|
6403
6170
|
* First parameter can be set to `maximize`.
|
|
6404
6171
|
* @param width - width in pixels or `maximize`.
|
|
6405
6172
|
* @param height - height in pixels.
|
|
6406
|
-
* @returns automatically synchronized promise through #recorder
|
|
6407
|
-
*
|
|
6408
|
-
*
|
|
6409
|
-
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
6410
|
-
* Puppeteer does not control the window of a browser so it can't adjust its real size.
|
|
6411
|
-
* It also can't maximize a window.
|
|
6412
6173
|
*/
|
|
6413
|
-
resizeWindow(width: number, height: number): Promise<
|
|
6174
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
6414
6175
|
/**
|
|
6415
6176
|
* Set headers for all next requests
|
|
6416
6177
|
*
|
|
@@ -6433,11 +6194,8 @@ declare namespace CodeceptJS {
|
|
|
6433
6194
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6434
6195
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6435
6196
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6436
|
-
* @returns automatically synchronized promise through #recorder
|
|
6437
|
-
*
|
|
6438
|
-
* {{ react }}
|
|
6439
6197
|
*/
|
|
6440
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
6198
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
6441
6199
|
/**
|
|
6442
6200
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
6443
6201
|
*
|
|
@@ -6450,9 +6208,8 @@ declare namespace CodeceptJS {
|
|
|
6450
6208
|
* ```
|
|
6451
6209
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6452
6210
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
6453
|
-
* @returns automatically synchronized promise through #recorder
|
|
6454
6211
|
*/
|
|
6455
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
6212
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
6456
6213
|
/**
|
|
6457
6214
|
* Remove focus from a text input, button, etc.
|
|
6458
6215
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -6470,9 +6227,8 @@ declare namespace CodeceptJS {
|
|
|
6470
6227
|
* ```
|
|
6471
6228
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6472
6229
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
6473
|
-
* @returns automatically synchronized promise through #recorder
|
|
6474
6230
|
*/
|
|
6475
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
6231
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
6476
6232
|
/**
|
|
6477
6233
|
* Drag an item to a destination element.
|
|
6478
6234
|
*
|
|
@@ -6481,36 +6237,32 @@ declare namespace CodeceptJS {
|
|
|
6481
6237
|
* ```
|
|
6482
6238
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
6483
6239
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
6484
|
-
* @returns automatically synchronized promise through #recorder
|
|
6485
6240
|
*/
|
|
6486
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<
|
|
6241
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
|
|
6487
6242
|
/**
|
|
6488
6243
|
* Reload the current page.
|
|
6489
6244
|
*
|
|
6490
6245
|
* ```js
|
|
6491
6246
|
* I.refreshPage();
|
|
6492
6247
|
* ```
|
|
6493
|
-
* @returns automatically synchronized promise through #recorder
|
|
6494
6248
|
*/
|
|
6495
|
-
refreshPage(): Promise<
|
|
6249
|
+
refreshPage(): Promise<any>;
|
|
6496
6250
|
/**
|
|
6497
6251
|
* Scroll page to the top.
|
|
6498
6252
|
*
|
|
6499
6253
|
* ```js
|
|
6500
6254
|
* I.scrollPageToTop();
|
|
6501
6255
|
* ```
|
|
6502
|
-
* @returns automatically synchronized promise through #recorder
|
|
6503
6256
|
*/
|
|
6504
|
-
scrollPageToTop(): Promise<
|
|
6257
|
+
scrollPageToTop(): Promise<any>;
|
|
6505
6258
|
/**
|
|
6506
6259
|
* Scroll page to the bottom.
|
|
6507
6260
|
*
|
|
6508
6261
|
* ```js
|
|
6509
6262
|
* I.scrollPageToBottom();
|
|
6510
6263
|
* ```
|
|
6511
|
-
* @returns automatically synchronized promise through #recorder
|
|
6512
6264
|
*/
|
|
6513
|
-
scrollPageToBottom(): Promise<
|
|
6265
|
+
scrollPageToBottom(): Promise<any>;
|
|
6514
6266
|
/**
|
|
6515
6267
|
* Scrolls to element matched by locator.
|
|
6516
6268
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -6522,9 +6274,8 @@ declare namespace CodeceptJS {
|
|
|
6522
6274
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6523
6275
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6524
6276
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6525
|
-
* @returns automatically synchronized promise through #recorder
|
|
6526
6277
|
*/
|
|
6527
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
6278
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
6528
6279
|
/**
|
|
6529
6280
|
* Checks that title contains text.
|
|
6530
6281
|
*
|
|
@@ -6532,9 +6283,8 @@ declare namespace CodeceptJS {
|
|
|
6532
6283
|
* I.seeInTitle('Home Page');
|
|
6533
6284
|
* ```
|
|
6534
6285
|
* @param text - text value to check.
|
|
6535
|
-
* @returns automatically synchronized promise through #recorder
|
|
6536
6286
|
*/
|
|
6537
|
-
seeInTitle(text: string): Promise<
|
|
6287
|
+
seeInTitle(text: string): Promise<any>;
|
|
6538
6288
|
/**
|
|
6539
6289
|
* Retrieves a page scroll position and returns it to test.
|
|
6540
6290
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -6552,9 +6302,8 @@ declare namespace CodeceptJS {
|
|
|
6552
6302
|
* I.seeTitleEquals('Test title.');
|
|
6553
6303
|
* ```
|
|
6554
6304
|
* @param text - value to check.
|
|
6555
|
-
* @returns automatically synchronized promise through #recorder
|
|
6556
6305
|
*/
|
|
6557
|
-
seeTitleEquals(text: string): Promise<
|
|
6306
|
+
seeTitleEquals(text: string): Promise<any>;
|
|
6558
6307
|
/**
|
|
6559
6308
|
* Checks that title does not contain text.
|
|
6560
6309
|
*
|
|
@@ -6562,9 +6311,8 @@ declare namespace CodeceptJS {
|
|
|
6562
6311
|
* I.dontSeeInTitle('Error');
|
|
6563
6312
|
* ```
|
|
6564
6313
|
* @param text - value to check.
|
|
6565
|
-
* @returns automatically synchronized promise through #recorder
|
|
6566
6314
|
*/
|
|
6567
|
-
dontSeeInTitle(text: string): Promise<
|
|
6315
|
+
dontSeeInTitle(text: string): Promise<any>;
|
|
6568
6316
|
/**
|
|
6569
6317
|
* Retrieves a page title and returns it to test.
|
|
6570
6318
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -6671,11 +6419,8 @@ declare namespace CodeceptJS {
|
|
|
6671
6419
|
* I.seeElement('#modal');
|
|
6672
6420
|
* ```
|
|
6673
6421
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6674
|
-
* @returns automatically synchronized promise through #recorder
|
|
6675
|
-
*
|
|
6676
|
-
* {{ react }}
|
|
6677
6422
|
*/
|
|
6678
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6423
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6679
6424
|
/**
|
|
6680
6425
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
6681
6426
|
*
|
|
@@ -6683,11 +6428,8 @@ declare namespace CodeceptJS {
|
|
|
6683
6428
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
6684
6429
|
* ```
|
|
6685
6430
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6686
|
-
* @returns automatically synchronized promise through #recorder
|
|
6687
|
-
*
|
|
6688
|
-
* {{ react }}
|
|
6689
6431
|
*/
|
|
6690
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6432
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6691
6433
|
/**
|
|
6692
6434
|
* Checks that a given Element is present in the DOM
|
|
6693
6435
|
* Element is located by CSS or XPath.
|
|
@@ -6696,9 +6438,8 @@ declare namespace CodeceptJS {
|
|
|
6696
6438
|
* I.seeElementInDOM('#modal');
|
|
6697
6439
|
* ```
|
|
6698
6440
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6699
|
-
* @returns automatically synchronized promise through #recorder
|
|
6700
6441
|
*/
|
|
6701
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6442
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6702
6443
|
/**
|
|
6703
6444
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
6704
6445
|
*
|
|
@@ -6706,9 +6447,8 @@ declare namespace CodeceptJS {
|
|
|
6706
6447
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
6707
6448
|
* ```
|
|
6708
6449
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6709
|
-
* @returns automatically synchronized promise through #recorder
|
|
6710
6450
|
*/
|
|
6711
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
6451
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6712
6452
|
/**
|
|
6713
6453
|
* Perform a click on a link or a button, given by a locator.
|
|
6714
6454
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -6733,12 +6473,8 @@ declare namespace CodeceptJS {
|
|
|
6733
6473
|
* ```
|
|
6734
6474
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6735
6475
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6736
|
-
* @returns automatically synchronized promise through #recorder
|
|
6737
|
-
*
|
|
6738
|
-
*
|
|
6739
|
-
* {{ react }}
|
|
6740
6476
|
*/
|
|
6741
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
6477
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
6742
6478
|
/**
|
|
6743
6479
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
6744
6480
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -6766,12 +6502,8 @@ declare namespace CodeceptJS {
|
|
|
6766
6502
|
* ```
|
|
6767
6503
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6768
6504
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6769
|
-
* @returns automatically synchronized promise through #recorder
|
|
6770
|
-
*
|
|
6771
|
-
*
|
|
6772
|
-
* {{ react }}
|
|
6773
6505
|
*/
|
|
6774
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6506
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6775
6507
|
/**
|
|
6776
6508
|
* Performs a click on a link and waits for navigation before moving on.
|
|
6777
6509
|
*
|
|
@@ -6780,12 +6512,8 @@ declare namespace CodeceptJS {
|
|
|
6780
6512
|
* ```
|
|
6781
6513
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
6782
6514
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
6783
|
-
* @returns automatically synchronized promise through #recorder
|
|
6784
|
-
*
|
|
6785
|
-
*
|
|
6786
|
-
* {{ react }}
|
|
6787
6515
|
*/
|
|
6788
|
-
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6516
|
+
clickLink(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6789
6517
|
/**
|
|
6790
6518
|
* Sets a directory to where save files. Allows to test file downloads.
|
|
6791
6519
|
* Should be used with [FileSystem helper](https://codecept.io/helpers/FileSystem) to check that file were downloaded correctly.
|
|
@@ -6821,12 +6549,8 @@ declare namespace CodeceptJS {
|
|
|
6821
6549
|
* ```
|
|
6822
6550
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6823
6551
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6824
|
-
* @returns automatically synchronized promise through #recorder
|
|
6825
|
-
*
|
|
6826
|
-
*
|
|
6827
|
-
* {{ react }}
|
|
6828
6552
|
*/
|
|
6829
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6553
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6830
6554
|
/**
|
|
6831
6555
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
6832
6556
|
*
|
|
@@ -6840,12 +6564,8 @@ declare namespace CodeceptJS {
|
|
|
6840
6564
|
* ```
|
|
6841
6565
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
6842
6566
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
6843
|
-
* @returns automatically synchronized promise through #recorder
|
|
6844
|
-
*
|
|
6845
|
-
*
|
|
6846
|
-
* {{ react }}
|
|
6847
6567
|
*/
|
|
6848
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6568
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6849
6569
|
/**
|
|
6850
6570
|
* Selects a checkbox or radio button.
|
|
6851
6571
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -6859,9 +6579,8 @@ declare namespace CodeceptJS {
|
|
|
6859
6579
|
* ```
|
|
6860
6580
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6861
6581
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6862
|
-
* @returns automatically synchronized promise through #recorder
|
|
6863
6582
|
*/
|
|
6864
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6583
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6865
6584
|
/**
|
|
6866
6585
|
* Unselects a checkbox or radio button.
|
|
6867
6586
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -6875,9 +6594,8 @@ declare namespace CodeceptJS {
|
|
|
6875
6594
|
* ```
|
|
6876
6595
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6877
6596
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6878
|
-
* @returns automatically synchronized promise through #recorder
|
|
6879
6597
|
*/
|
|
6880
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6598
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6881
6599
|
/**
|
|
6882
6600
|
* Verifies that the specified checkbox is checked.
|
|
6883
6601
|
*
|
|
@@ -6887,9 +6605,8 @@ declare namespace CodeceptJS {
|
|
|
6887
6605
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
6888
6606
|
* ```
|
|
6889
6607
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6890
|
-
* @returns automatically synchronized promise through #recorder
|
|
6891
6608
|
*/
|
|
6892
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
6609
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6893
6610
|
/**
|
|
6894
6611
|
* Verifies that the specified checkbox is not checked.
|
|
6895
6612
|
*
|
|
@@ -6899,9 +6616,8 @@ declare namespace CodeceptJS {
|
|
|
6899
6616
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
6900
6617
|
* ```
|
|
6901
6618
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6902
|
-
* @returns automatically synchronized promise through #recorder
|
|
6903
6619
|
*/
|
|
6904
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
6620
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6905
6621
|
/**
|
|
6906
6622
|
* Presses a key in the browser and leaves it in a down state.
|
|
6907
6623
|
*
|
|
@@ -6913,9 +6629,8 @@ declare namespace CodeceptJS {
|
|
|
6913
6629
|
* I.pressKeyUp('Control');
|
|
6914
6630
|
* ```
|
|
6915
6631
|
* @param key - name of key to press down.
|
|
6916
|
-
* @returns automatically synchronized promise through #recorder
|
|
6917
6632
|
*/
|
|
6918
|
-
pressKeyDown(key: string): Promise<
|
|
6633
|
+
pressKeyDown(key: string): Promise<any>;
|
|
6919
6634
|
/**
|
|
6920
6635
|
* Releases a key in the browser which was previously set to a down state.
|
|
6921
6636
|
*
|
|
@@ -6927,9 +6642,8 @@ declare namespace CodeceptJS {
|
|
|
6927
6642
|
* I.pressKeyUp('Control');
|
|
6928
6643
|
* ```
|
|
6929
6644
|
* @param key - name of key to release.
|
|
6930
|
-
* @returns automatically synchronized promise through #recorder
|
|
6931
6645
|
*/
|
|
6932
|
-
pressKeyUp(key: string): Promise<
|
|
6646
|
+
pressKeyUp(key: string): Promise<any>;
|
|
6933
6647
|
/**
|
|
6934
6648
|
* Presses a key in the browser (on a focused element).
|
|
6935
6649
|
*
|
|
@@ -6989,12 +6703,8 @@ declare namespace CodeceptJS {
|
|
|
6989
6703
|
* - `'Space'`
|
|
6990
6704
|
* - `'Tab'`
|
|
6991
6705
|
* @param key - key or array of keys to press.
|
|
6992
|
-
* @returns automatically synchronized promise through #recorder
|
|
6993
|
-
*
|
|
6994
|
-
*
|
|
6995
|
-
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
6996
6706
|
*/
|
|
6997
|
-
pressKey(key: string | string[]): Promise<
|
|
6707
|
+
pressKey(key: string | string[]): Promise<any>;
|
|
6998
6708
|
/**
|
|
6999
6709
|
* Types out the given text into an active field.
|
|
7000
6710
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -7015,9 +6725,8 @@ declare namespace CodeceptJS {
|
|
|
7015
6725
|
* ```
|
|
7016
6726
|
* @param key - or array of keys to type.
|
|
7017
6727
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
7018
|
-
* @returns automatically synchronized promise through #recorder
|
|
7019
6728
|
*/
|
|
7020
|
-
type(key: string | string[], delay?: number): Promise<
|
|
6729
|
+
type(key: string | string[], delay?: number): Promise<any>;
|
|
7021
6730
|
/**
|
|
7022
6731
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
7023
6732
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -7034,11 +6743,8 @@ declare namespace CodeceptJS {
|
|
|
7034
6743
|
* ```
|
|
7035
6744
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7036
6745
|
* @param value - text value to fill.
|
|
7037
|
-
* @returns automatically synchronized promise through #recorder
|
|
7038
|
-
*
|
|
7039
|
-
* {{ react }}
|
|
7040
6746
|
*/
|
|
7041
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
6747
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
7042
6748
|
/**
|
|
7043
6749
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
7044
6750
|
*
|
|
@@ -7048,9 +6754,8 @@ declare namespace CodeceptJS {
|
|
|
7048
6754
|
* I.clearField('#email');
|
|
7049
6755
|
* ```
|
|
7050
6756
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
7051
|
-
* @returns automatically synchronized promise through #recorder.
|
|
7052
6757
|
*/
|
|
7053
|
-
clearField(editable: LocatorOrString): Promise<
|
|
6758
|
+
clearField(editable: LocatorOrString): Promise<any>;
|
|
7054
6759
|
/**
|
|
7055
6760
|
* Appends text to a input field or textarea.
|
|
7056
6761
|
* Field is located by name, label, CSS or XPath
|
|
@@ -7062,12 +6767,8 @@ declare namespace CodeceptJS {
|
|
|
7062
6767
|
* ```
|
|
7063
6768
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
7064
6769
|
* @param value - text value to append.
|
|
7065
|
-
* @returns automatically synchronized promise through #recorder
|
|
7066
|
-
*
|
|
7067
|
-
*
|
|
7068
|
-
* {{ react }}
|
|
7069
6770
|
*/
|
|
7070
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
6771
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
7071
6772
|
/**
|
|
7072
6773
|
* Checks that the given input field or textarea equals to given value.
|
|
7073
6774
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7080,9 +6781,8 @@ declare namespace CodeceptJS {
|
|
|
7080
6781
|
* ```
|
|
7081
6782
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7082
6783
|
* @param value - value to check.
|
|
7083
|
-
* @returns automatically synchronized promise through #recorder
|
|
7084
6784
|
*/
|
|
7085
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
6785
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
7086
6786
|
/**
|
|
7087
6787
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
7088
6788
|
* Opposite to `seeInField`.
|
|
@@ -7093,9 +6793,8 @@ declare namespace CodeceptJS {
|
|
|
7093
6793
|
* ```
|
|
7094
6794
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
7095
6795
|
* @param value - value to check.
|
|
7096
|
-
* @returns automatically synchronized promise through #recorder
|
|
7097
6796
|
*/
|
|
7098
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
6797
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
7099
6798
|
/**
|
|
7100
6799
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
7101
6800
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -7107,12 +6806,8 @@ declare namespace CodeceptJS {
|
|
|
7107
6806
|
* ```
|
|
7108
6807
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
7109
6808
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
7110
|
-
* @returns automatically synchronized promise through #recorder
|
|
7111
|
-
*
|
|
7112
|
-
*
|
|
7113
|
-
* > ⚠ 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.
|
|
7114
6809
|
*/
|
|
7115
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
6810
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
7116
6811
|
/**
|
|
7117
6812
|
* Selects an option in a drop-down select.
|
|
7118
6813
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -7134,9 +6829,8 @@ declare namespace CodeceptJS {
|
|
|
7134
6829
|
* ```
|
|
7135
6830
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
7136
6831
|
* @param option - visible text or value of option.
|
|
7137
|
-
* @returns automatically synchronized promise through #recorder
|
|
7138
6832
|
*/
|
|
7139
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
6833
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
7140
6834
|
/**
|
|
7141
6835
|
* Grab number of visible elements by locator.
|
|
7142
6836
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7156,15 +6850,13 @@ declare namespace CodeceptJS {
|
|
|
7156
6850
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
7157
6851
|
* ```
|
|
7158
6852
|
* @param url - a fragment to check
|
|
7159
|
-
* @returns automatically synchronized promise through #recorder
|
|
7160
6853
|
*/
|
|
7161
|
-
seeInCurrentUrl(url: string): Promise<
|
|
6854
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
7162
6855
|
/**
|
|
7163
6856
|
* Checks that current url does not contain a provided fragment.
|
|
7164
6857
|
* @param url - value to check.
|
|
7165
|
-
* @returns automatically synchronized promise through #recorder
|
|
7166
6858
|
*/
|
|
7167
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
6859
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
7168
6860
|
/**
|
|
7169
6861
|
* Checks that current url is equal to provided one.
|
|
7170
6862
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7175,9 +6867,8 @@ declare namespace CodeceptJS {
|
|
|
7175
6867
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
7176
6868
|
* ```
|
|
7177
6869
|
* @param url - value to check.
|
|
7178
|
-
* @returns automatically synchronized promise through #recorder
|
|
7179
6870
|
*/
|
|
7180
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
6871
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
7181
6872
|
/**
|
|
7182
6873
|
* Checks that current url is not equal to provided one.
|
|
7183
6874
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -7187,9 +6878,8 @@ declare namespace CodeceptJS {
|
|
|
7187
6878
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
7188
6879
|
* ```
|
|
7189
6880
|
* @param url - value to check.
|
|
7190
|
-
* @returns automatically synchronized promise through #recorder
|
|
7191
6881
|
*/
|
|
7192
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
6882
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
7193
6883
|
/**
|
|
7194
6884
|
* Checks that a page contains a visible text.
|
|
7195
6885
|
* Use context parameter to narrow down the search.
|
|
@@ -7201,12 +6891,8 @@ declare namespace CodeceptJS {
|
|
|
7201
6891
|
* ```
|
|
7202
6892
|
* @param text - expected on page.
|
|
7203
6893
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
7204
|
-
* @returns automatically synchronized promise through #recorder
|
|
7205
|
-
*
|
|
7206
|
-
*
|
|
7207
|
-
* {{ react }}
|
|
7208
6894
|
*/
|
|
7209
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6895
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
7210
6896
|
/**
|
|
7211
6897
|
* Checks that text is equal to provided one.
|
|
7212
6898
|
*
|
|
@@ -7215,9 +6901,8 @@ declare namespace CodeceptJS {
|
|
|
7215
6901
|
* ```
|
|
7216
6902
|
* @param text - element value to check.
|
|
7217
6903
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
7218
|
-
* @returns automatically synchronized promise through #recorder
|
|
7219
6904
|
*/
|
|
7220
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6905
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
7221
6906
|
/**
|
|
7222
6907
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
7223
6908
|
* Use context parameter to narrow down the search.
|
|
@@ -7228,12 +6913,8 @@ declare namespace CodeceptJS {
|
|
|
7228
6913
|
* ```
|
|
7229
6914
|
* @param text - which is not present.
|
|
7230
6915
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
7231
|
-
* @returns automatically synchronized promise through #recorder
|
|
7232
|
-
*
|
|
7233
|
-
*
|
|
7234
|
-
* {{ react }}
|
|
7235
6916
|
*/
|
|
7236
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
6917
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
7237
6918
|
/**
|
|
7238
6919
|
* Retrieves page source and returns it to test.
|
|
7239
6920
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -7271,9 +6952,8 @@ declare namespace CodeceptJS {
|
|
|
7271
6952
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
7272
6953
|
* ```
|
|
7273
6954
|
* @param text - value to check.
|
|
7274
|
-
* @returns automatically synchronized promise through #recorder
|
|
7275
6955
|
*/
|
|
7276
|
-
seeInSource(text: string): Promise<
|
|
6956
|
+
seeInSource(text: string): Promise<any>;
|
|
7277
6957
|
/**
|
|
7278
6958
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
7279
6959
|
*
|
|
@@ -7281,9 +6961,8 @@ declare namespace CodeceptJS {
|
|
|
7281
6961
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
7282
6962
|
* ```
|
|
7283
6963
|
* @param value - to check.
|
|
7284
|
-
* @returns automatically synchronized promise through #recorder
|
|
7285
6964
|
*/
|
|
7286
|
-
dontSeeInSource(value: string): Promise<
|
|
6965
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
7287
6966
|
/**
|
|
7288
6967
|
* Asserts that an element appears a given number of times in the DOM.
|
|
7289
6968
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -7294,12 +6973,8 @@ declare namespace CodeceptJS {
|
|
|
7294
6973
|
* ```
|
|
7295
6974
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7296
6975
|
* @param num - number of elements.
|
|
7297
|
-
* @returns automatically synchronized promise through #recorder
|
|
7298
|
-
*
|
|
7299
|
-
*
|
|
7300
|
-
* {{ react }}
|
|
7301
6976
|
*/
|
|
7302
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
6977
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
7303
6978
|
/**
|
|
7304
6979
|
* Asserts that an element is visible a given number of times.
|
|
7305
6980
|
* Element is located by CSS or XPath.
|
|
@@ -7309,12 +6984,8 @@ declare namespace CodeceptJS {
|
|
|
7309
6984
|
* ```
|
|
7310
6985
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7311
6986
|
* @param num - number of elements.
|
|
7312
|
-
* @returns automatically synchronized promise through #recorder
|
|
7313
|
-
*
|
|
7314
|
-
*
|
|
7315
|
-
* {{ react }}
|
|
7316
6987
|
*/
|
|
7317
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
6988
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
7318
6989
|
/**
|
|
7319
6990
|
* Sets cookie(s).
|
|
7320
6991
|
*
|
|
@@ -7330,9 +7001,8 @@ declare namespace CodeceptJS {
|
|
|
7330
7001
|
* ]);
|
|
7331
7002
|
* ```
|
|
7332
7003
|
* @param cookie - a cookie object or array of cookie objects.
|
|
7333
|
-
* @returns automatically synchronized promise through #recorder
|
|
7334
7004
|
*/
|
|
7335
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
7005
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
7336
7006
|
/**
|
|
7337
7007
|
* Checks that cookie with given name exists.
|
|
7338
7008
|
*
|
|
@@ -7340,9 +7010,8 @@ declare namespace CodeceptJS {
|
|
|
7340
7010
|
* I.seeCookie('Auth');
|
|
7341
7011
|
* ```
|
|
7342
7012
|
* @param name - cookie name.
|
|
7343
|
-
* @returns automatically synchronized promise through #recorder
|
|
7344
7013
|
*/
|
|
7345
|
-
seeCookie(name: string): Promise<
|
|
7014
|
+
seeCookie(name: string): Promise<any>;
|
|
7346
7015
|
/**
|
|
7347
7016
|
* Checks that cookie with given name does not exist.
|
|
7348
7017
|
*
|
|
@@ -7350,9 +7019,8 @@ declare namespace CodeceptJS {
|
|
|
7350
7019
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
7351
7020
|
* ```
|
|
7352
7021
|
* @param name - cookie name.
|
|
7353
|
-
* @returns automatically synchronized promise through #recorder
|
|
7354
7022
|
*/
|
|
7355
|
-
dontSeeCookie(name: string): Promise<
|
|
7023
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
7356
7024
|
/**
|
|
7357
7025
|
* Gets a cookie object by name.
|
|
7358
7026
|
* If none provided gets all cookies.
|
|
@@ -7371,12 +7039,11 @@ declare namespace CodeceptJS {
|
|
|
7371
7039
|
*
|
|
7372
7040
|
* ```js
|
|
7373
7041
|
* I.clearCookie();
|
|
7374
|
-
* I.clearCookie('test');
|
|
7042
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
7375
7043
|
* ```
|
|
7376
7044
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
7377
|
-
* @returns automatically synchronized promise through #recorder
|
|
7378
7045
|
*/
|
|
7379
|
-
clearCookie(cookie?: string): Promise<
|
|
7046
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
7380
7047
|
/**
|
|
7381
7048
|
* Executes sync script on a page.
|
|
7382
7049
|
* Pass arguments to function as additional parameters.
|
|
@@ -7547,11 +7214,8 @@ declare namespace CodeceptJS {
|
|
|
7547
7214
|
* ```
|
|
7548
7215
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7549
7216
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
7550
|
-
* @returns automatically synchronized promise through #recorder
|
|
7551
|
-
*
|
|
7552
|
-
* {{ react }}
|
|
7553
7217
|
*/
|
|
7554
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<
|
|
7218
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
|
|
7555
7219
|
/**
|
|
7556
7220
|
* Checks that all elements with given locator have given attributes.
|
|
7557
7221
|
*
|
|
@@ -7560,11 +7224,8 @@ declare namespace CodeceptJS {
|
|
|
7560
7224
|
* ```
|
|
7561
7225
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7562
7226
|
* @param attributes - attributes and their values to check.
|
|
7563
|
-
* @returns automatically synchronized promise through #recorder
|
|
7564
|
-
*
|
|
7565
|
-
* {{ react }}
|
|
7566
7227
|
*/
|
|
7567
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<
|
|
7228
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
|
|
7568
7229
|
/**
|
|
7569
7230
|
* Drag the scrubber of a slider to a given position
|
|
7570
7231
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -7575,11 +7236,8 @@ declare namespace CodeceptJS {
|
|
|
7575
7236
|
* ```
|
|
7576
7237
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
7577
7238
|
* @param offsetX - position to drag.
|
|
7578
|
-
* @returns automatically synchronized promise through #recorder
|
|
7579
|
-
*
|
|
7580
|
-
* {{ react }}
|
|
7581
7239
|
*/
|
|
7582
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<
|
|
7240
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
|
|
7583
7241
|
/**
|
|
7584
7242
|
* Retrieves an array of attributes from elements located by CSS or XPath and returns it to test.
|
|
7585
7243
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -7618,9 +7276,8 @@ declare namespace CodeceptJS {
|
|
|
7618
7276
|
* ```
|
|
7619
7277
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7620
7278
|
* @param fileName - file name to save.
|
|
7621
|
-
* @returns automatically synchronized promise through #recorder
|
|
7622
7279
|
*/
|
|
7623
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
7280
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
7624
7281
|
/**
|
|
7625
7282
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
7626
7283
|
* Filename is relative to output folder.
|
|
@@ -7632,9 +7289,8 @@ declare namespace CodeceptJS {
|
|
|
7632
7289
|
* ```
|
|
7633
7290
|
* @param fileName - file name to save.
|
|
7634
7291
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
7635
|
-
* @returns automatically synchronized promise through #recorder
|
|
7636
7292
|
*/
|
|
7637
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
7293
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
7638
7294
|
/**
|
|
7639
7295
|
* Pauses execution for a number of seconds.
|
|
7640
7296
|
*
|
|
@@ -7642,17 +7298,15 @@ declare namespace CodeceptJS {
|
|
|
7642
7298
|
* I.wait(2); // wait 2 secs
|
|
7643
7299
|
* ```
|
|
7644
7300
|
* @param sec - number of second to wait.
|
|
7645
|
-
* @returns automatically synchronized promise through #recorder
|
|
7646
7301
|
*/
|
|
7647
|
-
wait(sec: number): Promise<
|
|
7302
|
+
wait(sec: number): Promise<any>;
|
|
7648
7303
|
/**
|
|
7649
7304
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
7650
7305
|
* Element can be located by CSS or XPath.
|
|
7651
7306
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7652
7307
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
7653
|
-
* @returns automatically synchronized promise through #recorder
|
|
7654
7308
|
*/
|
|
7655
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7309
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7656
7310
|
/**
|
|
7657
7311
|
* Waits for the specified value to be in value attribute.
|
|
7658
7312
|
*
|
|
@@ -7662,9 +7316,8 @@ declare namespace CodeceptJS {
|
|
|
7662
7316
|
* @param field - input field.
|
|
7663
7317
|
* @param value - expected value.
|
|
7664
7318
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7665
|
-
* @returns automatically synchronized promise through #recorder
|
|
7666
7319
|
*/
|
|
7667
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<
|
|
7320
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
|
|
7668
7321
|
/**
|
|
7669
7322
|
* Waits for a specified number of elements on the page.
|
|
7670
7323
|
*
|
|
@@ -7674,11 +7327,8 @@ declare namespace CodeceptJS {
|
|
|
7674
7327
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7675
7328
|
* @param num - number of elements.
|
|
7676
7329
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7677
|
-
* @returns automatically synchronized promise through #recorder
|
|
7678
|
-
*
|
|
7679
|
-
* {{ react }}
|
|
7680
7330
|
*/
|
|
7681
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<
|
|
7331
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
|
|
7682
7332
|
/**
|
|
7683
7333
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
7684
7334
|
* Element can be located by CSS or XPath.
|
|
@@ -7689,9 +7339,8 @@ declare namespace CodeceptJS {
|
|
|
7689
7339
|
* ```
|
|
7690
7340
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7691
7341
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7692
|
-
* @returns automatically synchronized promise through #recorder
|
|
7693
7342
|
*/
|
|
7694
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7343
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7695
7344
|
/**
|
|
7696
7345
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
7697
7346
|
* Element can be located by CSS or XPath.
|
|
@@ -7702,11 +7351,8 @@ declare namespace CodeceptJS {
|
|
|
7702
7351
|
* ```
|
|
7703
7352
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7704
7353
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7705
|
-
* @returns automatically synchronized promise through #recorder
|
|
7706
|
-
*
|
|
7707
|
-
* {{ react }}
|
|
7708
7354
|
*/
|
|
7709
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7355
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7710
7356
|
/**
|
|
7711
7357
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
7712
7358
|
* Element can be located by CSS or XPath.
|
|
@@ -7716,12 +7362,8 @@ declare namespace CodeceptJS {
|
|
|
7716
7362
|
* ```
|
|
7717
7363
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7718
7364
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7719
|
-
* @returns automatically synchronized promise through #recorder
|
|
7720
|
-
*
|
|
7721
|
-
*
|
|
7722
|
-
* This method accepts [React selectors](https://codecept.io/react).
|
|
7723
7365
|
*/
|
|
7724
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7366
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7725
7367
|
/**
|
|
7726
7368
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
7727
7369
|
* Element can be located by CSS or XPath.
|
|
@@ -7731,9 +7373,8 @@ declare namespace CodeceptJS {
|
|
|
7731
7373
|
* ```
|
|
7732
7374
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7733
7375
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7734
|
-
* @returns automatically synchronized promise through #recorder
|
|
7735
7376
|
*/
|
|
7736
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7377
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7737
7378
|
/**
|
|
7738
7379
|
* Waits for an element to hide (by default waits for 1sec).
|
|
7739
7380
|
* Element can be located by CSS or XPath.
|
|
@@ -7743,9 +7384,8 @@ declare namespace CodeceptJS {
|
|
|
7743
7384
|
* ```
|
|
7744
7385
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7745
7386
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7746
|
-
* @returns automatically synchronized promise through #recorder
|
|
7747
7387
|
*/
|
|
7748
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7388
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7749
7389
|
/**
|
|
7750
7390
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
7751
7391
|
*
|
|
@@ -7754,9 +7394,8 @@ declare namespace CodeceptJS {
|
|
|
7754
7394
|
* ```
|
|
7755
7395
|
* @param urlPart - value to check.
|
|
7756
7396
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7757
|
-
* @returns automatically synchronized promise through #recorder
|
|
7758
7397
|
*/
|
|
7759
|
-
waitInUrl(urlPart: string, sec?: number): Promise<
|
|
7398
|
+
waitInUrl(urlPart: string, sec?: number): Promise<any>;
|
|
7760
7399
|
/**
|
|
7761
7400
|
* Waits for the entire URL to match the expected
|
|
7762
7401
|
*
|
|
@@ -7766,9 +7405,8 @@ declare namespace CodeceptJS {
|
|
|
7766
7405
|
* ```
|
|
7767
7406
|
* @param urlPart - value to check.
|
|
7768
7407
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7769
|
-
* @returns automatically synchronized promise through #recorder
|
|
7770
7408
|
*/
|
|
7771
|
-
waitUrlEquals(urlPart: string, sec?: number): Promise<
|
|
7409
|
+
waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
|
|
7772
7410
|
/**
|
|
7773
7411
|
* Waits for a text to appear (by default waits for 1sec).
|
|
7774
7412
|
* Element can be located by CSS or XPath.
|
|
@@ -7781,9 +7419,8 @@ declare namespace CodeceptJS {
|
|
|
7781
7419
|
* @param text - to wait for.
|
|
7782
7420
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7783
7421
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
7784
|
-
* @returns automatically synchronized promise through #recorder
|
|
7785
7422
|
*/
|
|
7786
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
7423
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
7787
7424
|
/**
|
|
7788
7425
|
* Waits for a network request.
|
|
7789
7426
|
*
|
|
@@ -7812,9 +7449,8 @@ declare namespace CodeceptJS {
|
|
|
7812
7449
|
* I.switchTo(); // switch back to main page
|
|
7813
7450
|
* ```
|
|
7814
7451
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
7815
|
-
* @returns automatically synchronized promise through #recorder
|
|
7816
7452
|
*/
|
|
7817
|
-
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<
|
|
7453
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
7818
7454
|
/**
|
|
7819
7455
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
7820
7456
|
* Running in browser context.
|
|
@@ -7831,9 +7467,8 @@ declare namespace CodeceptJS {
|
|
|
7831
7467
|
* @param fn - to be executed in browser context.
|
|
7832
7468
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
7833
7469
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
7834
|
-
* @returns automatically synchronized promise through #recorder
|
|
7835
7470
|
*/
|
|
7836
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
7471
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
7837
7472
|
/**
|
|
7838
7473
|
* Waits for navigation to finish. By default takes configured `waitForNavigation` option.
|
|
7839
7474
|
*
|
|
@@ -7849,9 +7484,8 @@ declare namespace CodeceptJS {
|
|
|
7849
7484
|
* ```
|
|
7850
7485
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7851
7486
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7852
|
-
* @returns automatically synchronized promise through #recorder
|
|
7853
7487
|
*/
|
|
7854
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7488
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7855
7489
|
/**
|
|
7856
7490
|
* Grab the data from performance timing using Navigation Timing API.
|
|
7857
7491
|
* The returned data will contain following things in ms:
|
|
@@ -7872,9 +7506,8 @@ declare namespace CodeceptJS {
|
|
|
7872
7506
|
* loadEventEnd: 241
|
|
7873
7507
|
* }
|
|
7874
7508
|
* ```
|
|
7875
|
-
* @returns automatically synchronized promise through #recorder
|
|
7876
7509
|
*/
|
|
7877
|
-
grabDataFromPerformanceTiming(): Promise<
|
|
7510
|
+
grabDataFromPerformanceTiming(): Promise<any>;
|
|
7878
7511
|
/**
|
|
7879
7512
|
* Grab the width, height, location of given locator.
|
|
7880
7513
|
* Provide `width` or `height`as second param to get your desired prop.
|
|
@@ -8142,17 +7775,15 @@ declare namespace CodeceptJS {
|
|
|
8142
7775
|
* I.amOnPage('/login'); // opens a login page
|
|
8143
7776
|
* ```
|
|
8144
7777
|
* @param url - url path or global url.
|
|
8145
|
-
* @returns automatically synchronized promise through #recorder
|
|
8146
7778
|
*/
|
|
8147
|
-
amOnPage(url: string): Promise<
|
|
7779
|
+
amOnPage(url: string): Promise<any>;
|
|
8148
7780
|
/**
|
|
8149
7781
|
* Resize the current window to provided width and height.
|
|
8150
7782
|
* First parameter can be set to `maximize`.
|
|
8151
7783
|
* @param width - width in pixels or `maximize`.
|
|
8152
7784
|
* @param height - height in pixels.
|
|
8153
|
-
* @returns automatically synchronized promise through #recorder
|
|
8154
7785
|
*/
|
|
8155
|
-
resizeWindow(width: number, height: number): Promise<
|
|
7786
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
8156
7787
|
/**
|
|
8157
7788
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
8158
7789
|
*
|
|
@@ -8165,9 +7796,8 @@ declare namespace CodeceptJS {
|
|
|
8165
7796
|
* ```
|
|
8166
7797
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
8167
7798
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
8168
|
-
* @returns automatically synchronized promise through #recorder
|
|
8169
7799
|
*/
|
|
8170
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
7800
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
8171
7801
|
/**
|
|
8172
7802
|
* Remove focus from a text input, button, etc.
|
|
8173
7803
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -8185,9 +7815,8 @@ declare namespace CodeceptJS {
|
|
|
8185
7815
|
* ```
|
|
8186
7816
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
8187
7817
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
8188
|
-
* @returns automatically synchronized promise through #recorder
|
|
8189
7818
|
*/
|
|
8190
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
7819
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
8191
7820
|
/**
|
|
8192
7821
|
* Perform a click on a link or a button, given by a locator.
|
|
8193
7822
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -8212,18 +7841,16 @@ declare namespace CodeceptJS {
|
|
|
8212
7841
|
* ```
|
|
8213
7842
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8214
7843
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
8215
|
-
* @returns automatically synchronized promise through #recorder
|
|
8216
7844
|
*/
|
|
8217
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
7845
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
8218
7846
|
/**
|
|
8219
7847
|
* Reload the current page.
|
|
8220
7848
|
*
|
|
8221
7849
|
* ```js
|
|
8222
7850
|
* I.refreshPage();
|
|
8223
7851
|
* ```
|
|
8224
|
-
* @returns automatically synchronized promise through #recorder
|
|
8225
7852
|
*/
|
|
8226
|
-
refreshPage(): Promise<
|
|
7853
|
+
refreshPage(): Promise<any>;
|
|
8227
7854
|
/**
|
|
8228
7855
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
8229
7856
|
* Element can be located by CSS or XPath.
|
|
@@ -8233,9 +7860,8 @@ declare namespace CodeceptJS {
|
|
|
8233
7860
|
* ```
|
|
8234
7861
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8235
7862
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8236
|
-
* @returns automatically synchronized promise through #recorder
|
|
8237
7863
|
*/
|
|
8238
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
7864
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
8239
7865
|
/**
|
|
8240
7866
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
8241
7867
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -8252,9 +7878,8 @@ declare namespace CodeceptJS {
|
|
|
8252
7878
|
* ```
|
|
8253
7879
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8254
7880
|
* @param value - text value to fill.
|
|
8255
|
-
* @returns automatically synchronized promise through #recorder
|
|
8256
7881
|
*/
|
|
8257
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
7882
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
8258
7883
|
/**
|
|
8259
7884
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
8260
7885
|
*
|
|
@@ -8264,9 +7889,8 @@ declare namespace CodeceptJS {
|
|
|
8264
7889
|
* I.clearField('#email');
|
|
8265
7890
|
* ```
|
|
8266
7891
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
8267
|
-
* @returns automatically synchronized promise through #recorder.
|
|
8268
7892
|
*/
|
|
8269
|
-
clearField(editable: LocatorOrString): Promise<
|
|
7893
|
+
clearField(editable: LocatorOrString): Promise<any>;
|
|
8270
7894
|
/**
|
|
8271
7895
|
* Appends text to a input field or textarea.
|
|
8272
7896
|
* Field is located by name, label, CSS or XPath
|
|
@@ -8278,9 +7902,8 @@ declare namespace CodeceptJS {
|
|
|
8278
7902
|
* ```
|
|
8279
7903
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
8280
7904
|
* @param value - text value to append.
|
|
8281
|
-
* @returns automatically synchronized promise through #recorder
|
|
8282
7905
|
*/
|
|
8283
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
7906
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
8284
7907
|
/**
|
|
8285
7908
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
8286
7909
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -8292,9 +7915,8 @@ declare namespace CodeceptJS {
|
|
|
8292
7915
|
* ```
|
|
8293
7916
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
8294
7917
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
8295
|
-
* @returns automatically synchronized promise through #recorder
|
|
8296
7918
|
*/
|
|
8297
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
7919
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
8298
7920
|
/**
|
|
8299
7921
|
* Presses a key on a focused element.
|
|
8300
7922
|
* Special keys like 'Enter', 'Control', [etc](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value)
|
|
@@ -8306,12 +7928,8 @@ declare namespace CodeceptJS {
|
|
|
8306
7928
|
* I.pressKey(['Control','a']);
|
|
8307
7929
|
* ```
|
|
8308
7930
|
* @param key - key or array of keys to press.
|
|
8309
|
-
* @returns automatically synchronized promise through #recorder
|
|
8310
|
-
*
|
|
8311
|
-
*
|
|
8312
|
-
* {{ keys }}
|
|
8313
7931
|
*/
|
|
8314
|
-
pressKey(key: string | string[]): Promise<
|
|
7932
|
+
pressKey(key: string | string[]): Promise<any>;
|
|
8315
7933
|
/**
|
|
8316
7934
|
* Moves cursor to element matched by locator.
|
|
8317
7935
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -8323,9 +7941,8 @@ declare namespace CodeceptJS {
|
|
|
8323
7941
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8324
7942
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
8325
7943
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
8326
|
-
* @returns automatically synchronized promise through #recorder
|
|
8327
7944
|
*/
|
|
8328
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
7945
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
8329
7946
|
/**
|
|
8330
7947
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
8331
7948
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -8338,9 +7955,8 @@ declare namespace CodeceptJS {
|
|
|
8338
7955
|
* ```
|
|
8339
7956
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8340
7957
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
8341
|
-
* @returns automatically synchronized promise through #recorder
|
|
8342
7958
|
*/
|
|
8343
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
7959
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8344
7960
|
/**
|
|
8345
7961
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
8346
7962
|
*
|
|
@@ -8354,9 +7970,8 @@ declare namespace CodeceptJS {
|
|
|
8354
7970
|
* ```
|
|
8355
7971
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
8356
7972
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8357
|
-
* @returns automatically synchronized promise through #recorder
|
|
8358
7973
|
*/
|
|
8359
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
7974
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8360
7975
|
/**
|
|
8361
7976
|
* Selects a checkbox or radio button.
|
|
8362
7977
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -8370,9 +7985,8 @@ declare namespace CodeceptJS {
|
|
|
8370
7985
|
* ```
|
|
8371
7986
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8372
7987
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
8373
|
-
* @returns automatically synchronized promise through #recorder
|
|
8374
7988
|
*/
|
|
8375
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
7989
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8376
7990
|
/**
|
|
8377
7991
|
* Unselects a checkbox or radio button.
|
|
8378
7992
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -8386,9 +8000,8 @@ declare namespace CodeceptJS {
|
|
|
8386
8000
|
* ```
|
|
8387
8001
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8388
8002
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
8389
|
-
* @returns automatically synchronized promise through #recorder
|
|
8390
8003
|
*/
|
|
8391
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
8004
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8392
8005
|
/**
|
|
8393
8006
|
* Verifies that the specified checkbox is checked.
|
|
8394
8007
|
*
|
|
@@ -8398,9 +8011,8 @@ declare namespace CodeceptJS {
|
|
|
8398
8011
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
8399
8012
|
* ```
|
|
8400
8013
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8401
|
-
* @returns automatically synchronized promise through #recorder
|
|
8402
8014
|
*/
|
|
8403
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
8015
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8404
8016
|
/**
|
|
8405
8017
|
* Verifies that the specified checkbox is not checked.
|
|
8406
8018
|
*
|
|
@@ -8410,9 +8022,8 @@ declare namespace CodeceptJS {
|
|
|
8410
8022
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
8411
8023
|
* ```
|
|
8412
8024
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8413
|
-
* @returns automatically synchronized promise through #recorder
|
|
8414
8025
|
*/
|
|
8415
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
8026
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8416
8027
|
/**
|
|
8417
8028
|
* Selects an option in a drop-down select.
|
|
8418
8029
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -8434,9 +8045,8 @@ declare namespace CodeceptJS {
|
|
|
8434
8045
|
* ```
|
|
8435
8046
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
8436
8047
|
* @param option - visible text or value of option.
|
|
8437
|
-
* @returns automatically synchronized promise through #recorder
|
|
8438
8048
|
*/
|
|
8439
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
8049
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
8440
8050
|
/**
|
|
8441
8051
|
* Checks that current url contains a provided fragment.
|
|
8442
8052
|
*
|
|
@@ -8444,15 +8054,13 @@ declare namespace CodeceptJS {
|
|
|
8444
8054
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
8445
8055
|
* ```
|
|
8446
8056
|
* @param url - a fragment to check
|
|
8447
|
-
* @returns automatically synchronized promise through #recorder
|
|
8448
8057
|
*/
|
|
8449
|
-
seeInCurrentUrl(url: string): Promise<
|
|
8058
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
8450
8059
|
/**
|
|
8451
8060
|
* Checks that current url does not contain a provided fragment.
|
|
8452
8061
|
* @param url - value to check.
|
|
8453
|
-
* @returns automatically synchronized promise through #recorder
|
|
8454
8062
|
*/
|
|
8455
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
8063
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
8456
8064
|
/**
|
|
8457
8065
|
* Checks that current url is equal to provided one.
|
|
8458
8066
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -8463,9 +8071,8 @@ declare namespace CodeceptJS {
|
|
|
8463
8071
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
8464
8072
|
* ```
|
|
8465
8073
|
* @param url - value to check.
|
|
8466
|
-
* @returns automatically synchronized promise through #recorder
|
|
8467
8074
|
*/
|
|
8468
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
8075
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
8469
8076
|
/**
|
|
8470
8077
|
* Checks that current url is not equal to provided one.
|
|
8471
8078
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -8475,9 +8082,8 @@ declare namespace CodeceptJS {
|
|
|
8475
8082
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
8476
8083
|
* ```
|
|
8477
8084
|
* @param url - value to check.
|
|
8478
|
-
* @returns automatically synchronized promise through #recorder
|
|
8479
8085
|
*/
|
|
8480
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
8086
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
8481
8087
|
/**
|
|
8482
8088
|
* Checks that a page contains a visible text.
|
|
8483
8089
|
* Use context parameter to narrow down the search.
|
|
@@ -8489,9 +8095,8 @@ declare namespace CodeceptJS {
|
|
|
8489
8095
|
* ```
|
|
8490
8096
|
* @param text - expected on page.
|
|
8491
8097
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
8492
|
-
* @returns automatically synchronized promise through #recorder
|
|
8493
8098
|
*/
|
|
8494
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
8099
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8495
8100
|
/**
|
|
8496
8101
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
8497
8102
|
* Use context parameter to narrow down the search.
|
|
@@ -8502,9 +8107,8 @@ declare namespace CodeceptJS {
|
|
|
8502
8107
|
* ```
|
|
8503
8108
|
* @param text - which is not present.
|
|
8504
8109
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
8505
|
-
* @returns automatically synchronized promise through #recorder
|
|
8506
8110
|
*/
|
|
8507
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
8111
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8508
8112
|
/**
|
|
8509
8113
|
* Checks that a given Element is visible
|
|
8510
8114
|
* Element is located by CSS or XPath.
|
|
@@ -8513,9 +8117,8 @@ declare namespace CodeceptJS {
|
|
|
8513
8117
|
* I.seeElement('#modal');
|
|
8514
8118
|
* ```
|
|
8515
8119
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8516
|
-
* @returns automatically synchronized promise through #recorder
|
|
8517
8120
|
*/
|
|
8518
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
8121
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8519
8122
|
/**
|
|
8520
8123
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
8521
8124
|
*
|
|
@@ -8523,9 +8126,8 @@ declare namespace CodeceptJS {
|
|
|
8523
8126
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
8524
8127
|
* ```
|
|
8525
8128
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8526
|
-
* @returns automatically synchronized promise through #recorder
|
|
8527
8129
|
*/
|
|
8528
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
8130
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8529
8131
|
/**
|
|
8530
8132
|
* Checks that a given Element is present in the DOM
|
|
8531
8133
|
* Element is located by CSS or XPath.
|
|
@@ -8534,9 +8136,8 @@ declare namespace CodeceptJS {
|
|
|
8534
8136
|
* I.seeElementInDOM('#modal');
|
|
8535
8137
|
* ```
|
|
8536
8138
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8537
|
-
* @returns automatically synchronized promise through #recorder
|
|
8538
8139
|
*/
|
|
8539
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
8140
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8540
8141
|
/**
|
|
8541
8142
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
8542
8143
|
*
|
|
@@ -8544,9 +8145,8 @@ declare namespace CodeceptJS {
|
|
|
8544
8145
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
8545
8146
|
* ```
|
|
8546
8147
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8547
|
-
* @returns automatically synchronized promise through #recorder
|
|
8548
8148
|
*/
|
|
8549
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
8149
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8550
8150
|
/**
|
|
8551
8151
|
* Asserts that an element is visible a given number of times.
|
|
8552
8152
|
* Element is located by CSS or XPath.
|
|
@@ -8556,9 +8156,8 @@ declare namespace CodeceptJS {
|
|
|
8556
8156
|
* ```
|
|
8557
8157
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8558
8158
|
* @param num - number of elements.
|
|
8559
|
-
* @returns automatically synchronized promise through #recorder
|
|
8560
8159
|
*/
|
|
8561
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
8160
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
8562
8161
|
/**
|
|
8563
8162
|
* Grab number of visible elements by locator.
|
|
8564
8163
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -8582,9 +8181,8 @@ declare namespace CodeceptJS {
|
|
|
8582
8181
|
* ```
|
|
8583
8182
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8584
8183
|
* @param value - value to check.
|
|
8585
|
-
* @returns automatically synchronized promise through #recorder
|
|
8586
8184
|
*/
|
|
8587
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
8185
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
8588
8186
|
/**
|
|
8589
8187
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
8590
8188
|
* Opposite to `seeInField`.
|
|
@@ -8595,9 +8193,8 @@ declare namespace CodeceptJS {
|
|
|
8595
8193
|
* ```
|
|
8596
8194
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8597
8195
|
* @param value - value to check.
|
|
8598
|
-
* @returns automatically synchronized promise through #recorder
|
|
8599
8196
|
*/
|
|
8600
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
8197
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
8601
8198
|
/**
|
|
8602
8199
|
* Checks that text is equal to provided one.
|
|
8603
8200
|
*
|
|
@@ -8613,9 +8210,8 @@ declare namespace CodeceptJS {
|
|
|
8613
8210
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
8614
8211
|
* ```
|
|
8615
8212
|
* @param text - value to check.
|
|
8616
|
-
* @returns automatically synchronized promise through #recorder
|
|
8617
8213
|
*/
|
|
8618
|
-
seeInSource(text: string): Promise<
|
|
8214
|
+
seeInSource(text: string): Promise<any>;
|
|
8619
8215
|
/**
|
|
8620
8216
|
* Checks that the current page does not contains the given string in its raw source code.
|
|
8621
8217
|
*
|
|
@@ -8623,9 +8219,8 @@ declare namespace CodeceptJS {
|
|
|
8623
8219
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
8624
8220
|
* ```
|
|
8625
8221
|
* @param value - to check.
|
|
8626
|
-
* @returns automatically synchronized promise through #recorder
|
|
8627
8222
|
*/
|
|
8628
|
-
dontSeeInSource(value: string): Promise<
|
|
8223
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
8629
8224
|
/**
|
|
8630
8225
|
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
8631
8226
|
* Filename is relative to output folder.
|
|
@@ -8635,9 +8230,8 @@ declare namespace CodeceptJS {
|
|
|
8635
8230
|
* ```
|
|
8636
8231
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8637
8232
|
* @param fileName - file name to save.
|
|
8638
|
-
* @returns automatically synchronized promise through #recorder
|
|
8639
8233
|
*/
|
|
8640
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
8234
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
8641
8235
|
/**
|
|
8642
8236
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
8643
8237
|
* Filename is relative to output folder.
|
|
@@ -8649,9 +8243,8 @@ declare namespace CodeceptJS {
|
|
|
8649
8243
|
* ```
|
|
8650
8244
|
* @param fileName - file name to save.
|
|
8651
8245
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
8652
|
-
* @returns automatically synchronized promise through #recorder
|
|
8653
8246
|
*/
|
|
8654
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
8247
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
8655
8248
|
/**
|
|
8656
8249
|
* Pauses execution for a number of seconds.
|
|
8657
8250
|
*
|
|
@@ -8659,9 +8252,8 @@ declare namespace CodeceptJS {
|
|
|
8659
8252
|
* I.wait(2); // wait 2 secs
|
|
8660
8253
|
* ```
|
|
8661
8254
|
* @param sec - number of second to wait.
|
|
8662
|
-
* @returns automatically synchronized promise through #recorder
|
|
8663
8255
|
*/
|
|
8664
|
-
wait(sec: number): Promise<
|
|
8256
|
+
wait(sec: number): Promise<any>;
|
|
8665
8257
|
/**
|
|
8666
8258
|
* Executes sync script on a page.
|
|
8667
8259
|
* Pass arguments to function as additional parameters.
|
|
@@ -8811,18 +8403,16 @@ declare namespace CodeceptJS {
|
|
|
8811
8403
|
* ```js
|
|
8812
8404
|
* I.scrollPageToTop();
|
|
8813
8405
|
* ```
|
|
8814
|
-
* @returns automatically synchronized promise through #recorder
|
|
8815
8406
|
*/
|
|
8816
|
-
scrollPageToTop(): Promise<
|
|
8407
|
+
scrollPageToTop(): Promise<any>;
|
|
8817
8408
|
/**
|
|
8818
8409
|
* Scroll page to the bottom.
|
|
8819
8410
|
*
|
|
8820
8411
|
* ```js
|
|
8821
8412
|
* I.scrollPageToBottom();
|
|
8822
8413
|
* ```
|
|
8823
|
-
* @returns automatically synchronized promise through #recorder
|
|
8824
8414
|
*/
|
|
8825
|
-
scrollPageToBottom(): Promise<
|
|
8415
|
+
scrollPageToBottom(): Promise<any>;
|
|
8826
8416
|
/**
|
|
8827
8417
|
* Scrolls to element matched by locator.
|
|
8828
8418
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -8834,9 +8424,8 @@ declare namespace CodeceptJS {
|
|
|
8834
8424
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8835
8425
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
8836
8426
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
8837
|
-
* @returns automatically synchronized promise through #recorder
|
|
8838
8427
|
*/
|
|
8839
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
8428
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
8840
8429
|
/**
|
|
8841
8430
|
* Switches frame or in case of null locator reverts to parent.
|
|
8842
8431
|
*
|
|
@@ -8845,9 +8434,8 @@ declare namespace CodeceptJS {
|
|
|
8845
8434
|
* I.switchTo(); // switch back to main page
|
|
8846
8435
|
* ```
|
|
8847
8436
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8848
|
-
* @returns automatically synchronized promise through #recorder
|
|
8849
8437
|
*/
|
|
8850
|
-
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<
|
|
8438
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
8851
8439
|
/**
|
|
8852
8440
|
* Sets cookie(s).
|
|
8853
8441
|
*
|
|
@@ -8863,9 +8451,8 @@ declare namespace CodeceptJS {
|
|
|
8863
8451
|
* ]);
|
|
8864
8452
|
* ```
|
|
8865
8453
|
* @param cookie - a cookie object or array of cookie objects.
|
|
8866
|
-
* @returns automatically synchronized promise through #recorder
|
|
8867
8454
|
*/
|
|
8868
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
8455
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
8869
8456
|
/**
|
|
8870
8457
|
* Checks that cookie with given name exists.
|
|
8871
8458
|
*
|
|
@@ -8873,9 +8460,8 @@ declare namespace CodeceptJS {
|
|
|
8873
8460
|
* I.seeCookie('Auth');
|
|
8874
8461
|
* ```
|
|
8875
8462
|
* @param name - cookie name.
|
|
8876
|
-
* @returns automatically synchronized promise through #recorder
|
|
8877
8463
|
*/
|
|
8878
|
-
seeCookie(name: string): Promise<
|
|
8464
|
+
seeCookie(name: string): Promise<any>;
|
|
8879
8465
|
/**
|
|
8880
8466
|
* Checks that cookie with given name does not exist.
|
|
8881
8467
|
*
|
|
@@ -8883,9 +8469,8 @@ declare namespace CodeceptJS {
|
|
|
8883
8469
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
8884
8470
|
* ```
|
|
8885
8471
|
* @param name - cookie name.
|
|
8886
|
-
* @returns automatically synchronized promise through #recorder
|
|
8887
8472
|
*/
|
|
8888
|
-
dontSeeCookie(name: string): Promise<
|
|
8473
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
8889
8474
|
/**
|
|
8890
8475
|
* Gets a cookie object by name.
|
|
8891
8476
|
* If none provided gets all cookies.
|
|
@@ -8904,12 +8489,11 @@ declare namespace CodeceptJS {
|
|
|
8904
8489
|
*
|
|
8905
8490
|
* ```js
|
|
8906
8491
|
* I.clearCookie();
|
|
8907
|
-
* I.clearCookie('test');
|
|
8492
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
8908
8493
|
* ```
|
|
8909
8494
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
8910
|
-
* @returns automatically synchronized promise through #recorder
|
|
8911
8495
|
*/
|
|
8912
|
-
clearCookie(cookie?: string): Promise<
|
|
8496
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
8913
8497
|
/**
|
|
8914
8498
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
8915
8499
|
*
|
|
@@ -8918,9 +8502,8 @@ declare namespace CodeceptJS {
|
|
|
8918
8502
|
* ```
|
|
8919
8503
|
* @param urlPart - value to check.
|
|
8920
8504
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8921
|
-
* @returns automatically synchronized promise through #recorder
|
|
8922
8505
|
*/
|
|
8923
|
-
waitInUrl(urlPart: string, sec?: number): Promise<
|
|
8506
|
+
waitInUrl(urlPart: string, sec?: number): Promise<any>;
|
|
8924
8507
|
/**
|
|
8925
8508
|
* Waits for the entire URL to match the expected
|
|
8926
8509
|
*
|
|
@@ -8930,9 +8513,8 @@ declare namespace CodeceptJS {
|
|
|
8930
8513
|
* ```
|
|
8931
8514
|
* @param urlPart - value to check.
|
|
8932
8515
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8933
|
-
* @returns automatically synchronized promise through #recorder
|
|
8934
8516
|
*/
|
|
8935
|
-
waitUrlEquals(urlPart: string, sec?: number): Promise<
|
|
8517
|
+
waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
|
|
8936
8518
|
/**
|
|
8937
8519
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
8938
8520
|
* Running in browser context.
|
|
@@ -8949,9 +8531,8 @@ declare namespace CodeceptJS {
|
|
|
8949
8531
|
* @param fn - to be executed in browser context.
|
|
8950
8532
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
8951
8533
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
8952
|
-
* @returns automatically synchronized promise through #recorder
|
|
8953
8534
|
*/
|
|
8954
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
8535
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
8955
8536
|
/**
|
|
8956
8537
|
* Waits for a specified number of elements on the page.
|
|
8957
8538
|
*
|
|
@@ -8961,9 +8542,8 @@ declare namespace CodeceptJS {
|
|
|
8961
8542
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8962
8543
|
* @param num - number of elements.
|
|
8963
8544
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8964
|
-
* @returns automatically synchronized promise through #recorder
|
|
8965
8545
|
*/
|
|
8966
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<
|
|
8546
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
|
|
8967
8547
|
/**
|
|
8968
8548
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
8969
8549
|
* Element can be located by CSS or XPath.
|
|
@@ -8974,9 +8554,8 @@ declare namespace CodeceptJS {
|
|
|
8974
8554
|
* ```
|
|
8975
8555
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8976
8556
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
8977
|
-
* @returns automatically synchronized promise through #recorder
|
|
8978
8557
|
*/
|
|
8979
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
8558
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
8980
8559
|
/**
|
|
8981
8560
|
* Waits for an element to hide (by default waits for 1sec).
|
|
8982
8561
|
* Element can be located by CSS or XPath.
|
|
@@ -8986,9 +8565,8 @@ declare namespace CodeceptJS {
|
|
|
8986
8565
|
* ```
|
|
8987
8566
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8988
8567
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8989
|
-
* @returns automatically synchronized promise through #recorder
|
|
8990
8568
|
*/
|
|
8991
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
8569
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
8992
8570
|
/**
|
|
8993
8571
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
8994
8572
|
* Element can be located by CSS or XPath.
|
|
@@ -8998,9 +8576,8 @@ declare namespace CodeceptJS {
|
|
|
8998
8576
|
* ```
|
|
8999
8577
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9000
8578
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
9001
|
-
* @returns automatically synchronized promise through #recorder
|
|
9002
8579
|
*/
|
|
9003
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
8580
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
9004
8581
|
/**
|
|
9005
8582
|
* Waits for a text to appear (by default waits for 1sec).
|
|
9006
8583
|
* Element can be located by CSS or XPath.
|
|
@@ -9013,9 +8590,8 @@ declare namespace CodeceptJS {
|
|
|
9013
8590
|
* @param text - to wait for.
|
|
9014
8591
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
9015
8592
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
9016
|
-
* @returns automatically synchronized promise through #recorder
|
|
9017
8593
|
*/
|
|
9018
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
8594
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9019
8595
|
}
|
|
9020
8596
|
/**
|
|
9021
8597
|
* WebDriver helper which wraps [webdriverio](http://webdriver.io/) library to
|
|
@@ -9427,9 +9003,8 @@ declare namespace CodeceptJS {
|
|
|
9427
9003
|
* I.amOnPage('/login'); // opens a login page
|
|
9428
9004
|
* ```
|
|
9429
9005
|
* @param url - url path or global url.
|
|
9430
|
-
* @returns automatically synchronized promise through #recorder
|
|
9431
9006
|
*/
|
|
9432
|
-
amOnPage(url: string): Promise<
|
|
9007
|
+
amOnPage(url: string): Promise<any>;
|
|
9433
9008
|
/**
|
|
9434
9009
|
* Perform a click on a link or a button, given by a locator.
|
|
9435
9010
|
* If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
|
|
@@ -9454,12 +9029,8 @@ declare namespace CodeceptJS {
|
|
|
9454
9029
|
* ```
|
|
9455
9030
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9456
9031
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9457
|
-
* @returns automatically synchronized promise through #recorder
|
|
9458
|
-
*
|
|
9459
|
-
*
|
|
9460
|
-
* {{ react }}
|
|
9461
9032
|
*/
|
|
9462
|
-
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<
|
|
9033
|
+
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): Promise<any>;
|
|
9463
9034
|
/**
|
|
9464
9035
|
* Perform an emulated click on a link or a button, given by a locator.
|
|
9465
9036
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -9487,12 +9058,8 @@ declare namespace CodeceptJS {
|
|
|
9487
9058
|
* ```
|
|
9488
9059
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9489
9060
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9490
|
-
* @returns automatically synchronized promise through #recorder
|
|
9491
|
-
*
|
|
9492
|
-
*
|
|
9493
|
-
* {{ react }}
|
|
9494
9061
|
*/
|
|
9495
|
-
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9062
|
+
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9496
9063
|
/**
|
|
9497
9064
|
* Performs a double-click on an element matched by link|button|label|CSS or XPath.
|
|
9498
9065
|
* Context can be specified as second parameter to narrow search.
|
|
@@ -9505,12 +9072,8 @@ declare namespace CodeceptJS {
|
|
|
9505
9072
|
* ```
|
|
9506
9073
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9507
9074
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9508
|
-
* @returns automatically synchronized promise through #recorder
|
|
9509
|
-
*
|
|
9510
|
-
*
|
|
9511
|
-
* {{ react }}
|
|
9512
9075
|
*/
|
|
9513
|
-
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9076
|
+
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9514
9077
|
/**
|
|
9515
9078
|
* Performs right click on a clickable element matched by semantic locator, CSS or XPath.
|
|
9516
9079
|
*
|
|
@@ -9524,12 +9087,8 @@ declare namespace CodeceptJS {
|
|
|
9524
9087
|
* ```
|
|
9525
9088
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
9526
9089
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
9527
|
-
* @returns automatically synchronized promise through #recorder
|
|
9528
|
-
*
|
|
9529
|
-
*
|
|
9530
|
-
* {{ react }}
|
|
9531
9090
|
*/
|
|
9532
|
-
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9091
|
+
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9533
9092
|
/**
|
|
9534
9093
|
* Emulates right click on an element.
|
|
9535
9094
|
* Unlike normal click instead of sending native event, emulates a click with JavaScript.
|
|
@@ -9547,12 +9106,8 @@ declare namespace CodeceptJS {
|
|
|
9547
9106
|
* ```
|
|
9548
9107
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9549
9108
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9550
|
-
* @returns automatically synchronized promise through #recorder
|
|
9551
|
-
*
|
|
9552
|
-
*
|
|
9553
|
-
* {{ react }}
|
|
9554
9109
|
*/
|
|
9555
|
-
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9110
|
+
forceRightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9556
9111
|
/**
|
|
9557
9112
|
* Fills a text field or textarea, after clearing its value, with the given string.
|
|
9558
9113
|
* Field is located by name, label, CSS, or XPath.
|
|
@@ -9569,12 +9124,8 @@ declare namespace CodeceptJS {
|
|
|
9569
9124
|
* ```
|
|
9570
9125
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9571
9126
|
* @param value - text value to fill.
|
|
9572
|
-
* @returns automatically synchronized promise through #recorder
|
|
9573
|
-
*
|
|
9574
|
-
* {{ react }}
|
|
9575
|
-
* {{ custom }}
|
|
9576
9127
|
*/
|
|
9577
|
-
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
9128
|
+
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
9578
9129
|
/**
|
|
9579
9130
|
* Appends text to a input field or textarea.
|
|
9580
9131
|
* Field is located by name, label, CSS or XPath
|
|
@@ -9586,11 +9137,8 @@ declare namespace CodeceptJS {
|
|
|
9586
9137
|
* ```
|
|
9587
9138
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
9588
9139
|
* @param value - text value to append.
|
|
9589
|
-
* @returns automatically synchronized promise through #recorder
|
|
9590
|
-
*
|
|
9591
|
-
* {{ react }}
|
|
9592
9140
|
*/
|
|
9593
|
-
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<
|
|
9141
|
+
appendField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
|
|
9594
9142
|
/**
|
|
9595
9143
|
* Clears a `<textarea>` or text `<input>` element's value.
|
|
9596
9144
|
*
|
|
@@ -9600,9 +9148,8 @@ declare namespace CodeceptJS {
|
|
|
9600
9148
|
* I.clearField('#email');
|
|
9601
9149
|
* ```
|
|
9602
9150
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
9603
|
-
* @returns automatically synchronized promise through #recorder.
|
|
9604
9151
|
*/
|
|
9605
|
-
clearField(editable: LocatorOrString): Promise<
|
|
9152
|
+
clearField(editable: LocatorOrString): Promise<any>;
|
|
9606
9153
|
/**
|
|
9607
9154
|
* Selects an option in a drop-down select.
|
|
9608
9155
|
* Field is searched by label | name | CSS | XPath.
|
|
@@ -9624,9 +9171,8 @@ declare namespace CodeceptJS {
|
|
|
9624
9171
|
* ```
|
|
9625
9172
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
9626
9173
|
* @param option - visible text or value of option.
|
|
9627
|
-
* @returns automatically synchronized promise through #recorder
|
|
9628
9174
|
*/
|
|
9629
|
-
selectOption(select: LocatorOrString, option: string | any[]): Promise<
|
|
9175
|
+
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
9630
9176
|
/**
|
|
9631
9177
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
9632
9178
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
@@ -9638,11 +9184,8 @@ declare namespace CodeceptJS {
|
|
|
9638
9184
|
* ```
|
|
9639
9185
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
9640
9186
|
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
9641
|
-
* @returns automatically synchronized promise through #recorder
|
|
9642
|
-
*
|
|
9643
|
-
* Appium: not tested
|
|
9644
9187
|
*/
|
|
9645
|
-
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<
|
|
9188
|
+
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
9646
9189
|
/**
|
|
9647
9190
|
* Selects a checkbox or radio button.
|
|
9648
9191
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -9656,11 +9199,8 @@ declare namespace CodeceptJS {
|
|
|
9656
9199
|
* ```
|
|
9657
9200
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9658
9201
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9659
|
-
* @returns automatically synchronized promise through #recorder
|
|
9660
|
-
*
|
|
9661
|
-
* Appium: not tested
|
|
9662
9202
|
*/
|
|
9663
|
-
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9203
|
+
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9664
9204
|
/**
|
|
9665
9205
|
* Unselects a checkbox or radio button.
|
|
9666
9206
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -9674,11 +9214,8 @@ declare namespace CodeceptJS {
|
|
|
9674
9214
|
* ```
|
|
9675
9215
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9676
9216
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9677
|
-
* @returns automatically synchronized promise through #recorder
|
|
9678
|
-
*
|
|
9679
|
-
* Appium: not tested
|
|
9680
9217
|
*/
|
|
9681
|
-
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9218
|
+
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9682
9219
|
/**
|
|
9683
9220
|
* Retrieves all texts from an element located by CSS or XPath and returns it to test.
|
|
9684
9221
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9805,9 +9342,8 @@ declare namespace CodeceptJS {
|
|
|
9805
9342
|
* I.seeInTitle('Home Page');
|
|
9806
9343
|
* ```
|
|
9807
9344
|
* @param text - text value to check.
|
|
9808
|
-
* @returns automatically synchronized promise through #recorder
|
|
9809
9345
|
*/
|
|
9810
|
-
seeInTitle(text: string): Promise<
|
|
9346
|
+
seeInTitle(text: string): Promise<any>;
|
|
9811
9347
|
/**
|
|
9812
9348
|
* Checks that title is equal to provided one.
|
|
9813
9349
|
*
|
|
@@ -9815,9 +9351,8 @@ declare namespace CodeceptJS {
|
|
|
9815
9351
|
* I.seeTitleEquals('Test title.');
|
|
9816
9352
|
* ```
|
|
9817
9353
|
* @param text - value to check.
|
|
9818
|
-
* @returns automatically synchronized promise through #recorder
|
|
9819
9354
|
*/
|
|
9820
|
-
seeTitleEquals(text: string): Promise<
|
|
9355
|
+
seeTitleEquals(text: string): Promise<any>;
|
|
9821
9356
|
/**
|
|
9822
9357
|
* Checks that title does not contain text.
|
|
9823
9358
|
*
|
|
@@ -9825,9 +9360,8 @@ declare namespace CodeceptJS {
|
|
|
9825
9360
|
* I.dontSeeInTitle('Error');
|
|
9826
9361
|
* ```
|
|
9827
9362
|
* @param text - value to check.
|
|
9828
|
-
* @returns automatically synchronized promise through #recorder
|
|
9829
9363
|
*/
|
|
9830
|
-
dontSeeInTitle(text: string): Promise<
|
|
9364
|
+
dontSeeInTitle(text: string): Promise<any>;
|
|
9831
9365
|
/**
|
|
9832
9366
|
* Retrieves a page title and returns it to test.
|
|
9833
9367
|
* Resumes test execution, so **should be used inside async with `await`** operator.
|
|
@@ -9849,12 +9383,8 @@ declare namespace CodeceptJS {
|
|
|
9849
9383
|
* ```
|
|
9850
9384
|
* @param text - expected on page.
|
|
9851
9385
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
9852
|
-
* @returns automatically synchronized promise through #recorder
|
|
9853
|
-
*
|
|
9854
|
-
*
|
|
9855
|
-
* {{ react }}
|
|
9856
9386
|
*/
|
|
9857
|
-
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9387
|
+
see(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9858
9388
|
/**
|
|
9859
9389
|
* Checks that text is equal to provided one.
|
|
9860
9390
|
*
|
|
@@ -9863,9 +9393,8 @@ declare namespace CodeceptJS {
|
|
|
9863
9393
|
* ```
|
|
9864
9394
|
* @param text - element value to check.
|
|
9865
9395
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
9866
|
-
* @returns automatically synchronized promise through #recorder
|
|
9867
9396
|
*/
|
|
9868
|
-
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9397
|
+
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9869
9398
|
/**
|
|
9870
9399
|
* Opposite to `see`. Checks that a text is not present on a page.
|
|
9871
9400
|
* Use context parameter to narrow down the search.
|
|
@@ -9876,12 +9405,8 @@ declare namespace CodeceptJS {
|
|
|
9876
9405
|
* ```
|
|
9877
9406
|
* @param text - which is not present.
|
|
9878
9407
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
9879
|
-
* @returns automatically synchronized promise through #recorder
|
|
9880
|
-
*
|
|
9881
|
-
*
|
|
9882
|
-
* {{ react }}
|
|
9883
9408
|
*/
|
|
9884
|
-
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<
|
|
9409
|
+
dontSee(text: string, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9885
9410
|
/**
|
|
9886
9411
|
* Checks that the given input field or textarea equals to given value.
|
|
9887
9412
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -9894,9 +9419,8 @@ declare namespace CodeceptJS {
|
|
|
9894
9419
|
* ```
|
|
9895
9420
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9896
9421
|
* @param value - value to check.
|
|
9897
|
-
* @returns automatically synchronized promise through #recorder
|
|
9898
9422
|
*/
|
|
9899
|
-
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
9423
|
+
seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
9900
9424
|
/**
|
|
9901
9425
|
* Checks that value of input field or textarea doesn't equal to given value
|
|
9902
9426
|
* Opposite to `seeInField`.
|
|
@@ -9907,9 +9431,8 @@ declare namespace CodeceptJS {
|
|
|
9907
9431
|
* ```
|
|
9908
9432
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9909
9433
|
* @param value - value to check.
|
|
9910
|
-
* @returns automatically synchronized promise through #recorder
|
|
9911
9434
|
*/
|
|
9912
|
-
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<
|
|
9435
|
+
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
9913
9436
|
/**
|
|
9914
9437
|
* Verifies that the specified checkbox is checked.
|
|
9915
9438
|
*
|
|
@@ -9919,11 +9442,8 @@ declare namespace CodeceptJS {
|
|
|
9919
9442
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
9920
9443
|
* ```
|
|
9921
9444
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9922
|
-
* @returns automatically synchronized promise through #recorder
|
|
9923
|
-
*
|
|
9924
|
-
* Appium: not tested
|
|
9925
9445
|
*/
|
|
9926
|
-
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
9446
|
+
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9927
9447
|
/**
|
|
9928
9448
|
* Verifies that the specified checkbox is not checked.
|
|
9929
9449
|
*
|
|
@@ -9933,11 +9453,8 @@ declare namespace CodeceptJS {
|
|
|
9933
9453
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
9934
9454
|
* ```
|
|
9935
9455
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9936
|
-
* @returns automatically synchronized promise through #recorder
|
|
9937
|
-
*
|
|
9938
|
-
* Appium: not tested
|
|
9939
9456
|
*/
|
|
9940
|
-
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<
|
|
9457
|
+
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9941
9458
|
/**
|
|
9942
9459
|
* Checks that a given Element is visible
|
|
9943
9460
|
* Element is located by CSS or XPath.
|
|
@@ -9946,11 +9463,8 @@ declare namespace CodeceptJS {
|
|
|
9946
9463
|
* I.seeElement('#modal');
|
|
9947
9464
|
* ```
|
|
9948
9465
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9949
|
-
* @returns automatically synchronized promise through #recorder
|
|
9950
|
-
*
|
|
9951
|
-
* {{ react }}
|
|
9952
9466
|
*/
|
|
9953
|
-
seeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9467
|
+
seeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9954
9468
|
/**
|
|
9955
9469
|
* Opposite to `seeElement`. Checks that element is not visible (or in DOM)
|
|
9956
9470
|
*
|
|
@@ -9958,11 +9472,8 @@ declare namespace CodeceptJS {
|
|
|
9958
9472
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
9959
9473
|
* ```
|
|
9960
9474
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9961
|
-
* @returns automatically synchronized promise through #recorder
|
|
9962
|
-
*
|
|
9963
|
-
* {{ react }}
|
|
9964
9475
|
*/
|
|
9965
|
-
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9476
|
+
dontSeeElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9966
9477
|
/**
|
|
9967
9478
|
* Checks that a given Element is present in the DOM
|
|
9968
9479
|
* Element is located by CSS or XPath.
|
|
@@ -9971,9 +9482,8 @@ declare namespace CodeceptJS {
|
|
|
9971
9482
|
* I.seeElementInDOM('#modal');
|
|
9972
9483
|
* ```
|
|
9973
9484
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9974
|
-
* @returns automatically synchronized promise through #recorder
|
|
9975
9485
|
*/
|
|
9976
|
-
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9486
|
+
seeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9977
9487
|
/**
|
|
9978
9488
|
* Opposite to `seeElementInDOM`. Checks that element is not on page.
|
|
9979
9489
|
*
|
|
@@ -9981,9 +9491,8 @@ declare namespace CodeceptJS {
|
|
|
9981
9491
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
9982
9492
|
* ```
|
|
9983
9493
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9984
|
-
* @returns automatically synchronized promise through #recorder
|
|
9985
9494
|
*/
|
|
9986
|
-
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<
|
|
9495
|
+
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9987
9496
|
/**
|
|
9988
9497
|
* Checks that the current page contains the given string in its raw source code.
|
|
9989
9498
|
*
|
|
@@ -9991,9 +9500,8 @@ declare namespace CodeceptJS {
|
|
|
9991
9500
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
9992
9501
|
* ```
|
|
9993
9502
|
* @param text - value to check.
|
|
9994
|
-
* @returns automatically synchronized promise through #recorder
|
|
9995
9503
|
*/
|
|
9996
|
-
seeInSource(text: string): Promise<
|
|
9504
|
+
seeInSource(text: string): Promise<any>;
|
|
9997
9505
|
/**
|
|
9998
9506
|
* Retrieves page source and returns it to test.
|
|
9999
9507
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10033,9 +9541,8 @@ declare namespace CodeceptJS {
|
|
|
10033
9541
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
10034
9542
|
* ```
|
|
10035
9543
|
* @param value - to check.
|
|
10036
|
-
* @returns automatically synchronized promise through #recorder
|
|
10037
9544
|
*/
|
|
10038
|
-
dontSeeInSource(value: string): Promise<
|
|
9545
|
+
dontSeeInSource(value: string): Promise<any>;
|
|
10039
9546
|
/**
|
|
10040
9547
|
* Asserts that an element appears a given number of times in the DOM.
|
|
10041
9548
|
* Element is located by label or name or CSS or XPath.
|
|
@@ -10046,11 +9553,8 @@ declare namespace CodeceptJS {
|
|
|
10046
9553
|
* ```
|
|
10047
9554
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10048
9555
|
* @param num - number of elements.
|
|
10049
|
-
* @returns automatically synchronized promise through #recorder
|
|
10050
|
-
*
|
|
10051
|
-
* {{ react }}
|
|
10052
9556
|
*/
|
|
10053
|
-
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
9557
|
+
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
10054
9558
|
/**
|
|
10055
9559
|
* Asserts that an element is visible a given number of times.
|
|
10056
9560
|
* Element is located by CSS or XPath.
|
|
@@ -10060,11 +9564,8 @@ declare namespace CodeceptJS {
|
|
|
10060
9564
|
* ```
|
|
10061
9565
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10062
9566
|
* @param num - number of elements.
|
|
10063
|
-
* @returns automatically synchronized promise through #recorder
|
|
10064
|
-
*
|
|
10065
|
-
* {{ react }}
|
|
10066
9567
|
*/
|
|
10067
|
-
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<
|
|
9568
|
+
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): Promise<any>;
|
|
10068
9569
|
/**
|
|
10069
9570
|
* Checks that all elements with given locator have given CSS properties.
|
|
10070
9571
|
*
|
|
@@ -10073,9 +9574,8 @@ declare namespace CodeceptJS {
|
|
|
10073
9574
|
* ```
|
|
10074
9575
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10075
9576
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
10076
|
-
* @returns automatically synchronized promise through #recorder
|
|
10077
9577
|
*/
|
|
10078
|
-
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<
|
|
9578
|
+
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): Promise<any>;
|
|
10079
9579
|
/**
|
|
10080
9580
|
* Checks that all elements with given locator have given attributes.
|
|
10081
9581
|
*
|
|
@@ -10084,9 +9584,8 @@ declare namespace CodeceptJS {
|
|
|
10084
9584
|
* ```
|
|
10085
9585
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10086
9586
|
* @param attributes - attributes and their values to check.
|
|
10087
|
-
* @returns automatically synchronized promise through #recorder
|
|
10088
9587
|
*/
|
|
10089
|
-
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<
|
|
9588
|
+
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): Promise<any>;
|
|
10090
9589
|
/**
|
|
10091
9590
|
* Grab number of visible elements by locator.
|
|
10092
9591
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10105,15 +9604,13 @@ declare namespace CodeceptJS {
|
|
|
10105
9604
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
10106
9605
|
* ```
|
|
10107
9606
|
* @param url - a fragment to check
|
|
10108
|
-
* @returns automatically synchronized promise through #recorder
|
|
10109
9607
|
*/
|
|
10110
|
-
seeInCurrentUrl(url: string): Promise<
|
|
9608
|
+
seeInCurrentUrl(url: string): Promise<any>;
|
|
10111
9609
|
/**
|
|
10112
9610
|
* Checks that current url does not contain a provided fragment.
|
|
10113
9611
|
* @param url - value to check.
|
|
10114
|
-
* @returns automatically synchronized promise through #recorder
|
|
10115
9612
|
*/
|
|
10116
|
-
dontSeeInCurrentUrl(url: string): Promise<
|
|
9613
|
+
dontSeeInCurrentUrl(url: string): Promise<any>;
|
|
10117
9614
|
/**
|
|
10118
9615
|
* Checks that current url is equal to provided one.
|
|
10119
9616
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -10124,9 +9621,8 @@ declare namespace CodeceptJS {
|
|
|
10124
9621
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
10125
9622
|
* ```
|
|
10126
9623
|
* @param url - value to check.
|
|
10127
|
-
* @returns automatically synchronized promise through #recorder
|
|
10128
9624
|
*/
|
|
10129
|
-
seeCurrentUrlEquals(url: string): Promise<
|
|
9625
|
+
seeCurrentUrlEquals(url: string): Promise<any>;
|
|
10130
9626
|
/**
|
|
10131
9627
|
* Checks that current url is not equal to provided one.
|
|
10132
9628
|
* If a relative url provided, a configured url will be prepended to it.
|
|
@@ -10136,9 +9632,8 @@ declare namespace CodeceptJS {
|
|
|
10136
9632
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
10137
9633
|
* ```
|
|
10138
9634
|
* @param url - value to check.
|
|
10139
|
-
* @returns automatically synchronized promise through #recorder
|
|
10140
9635
|
*/
|
|
10141
|
-
dontSeeCurrentUrlEquals(url: string): Promise<
|
|
9636
|
+
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
10142
9637
|
/**
|
|
10143
9638
|
* Executes sync script on a page.
|
|
10144
9639
|
* Pass arguments to function as additional parameters.
|
|
@@ -10207,9 +9702,8 @@ declare namespace CodeceptJS {
|
|
|
10207
9702
|
* ```
|
|
10208
9703
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10209
9704
|
* @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
10210
|
-
* @returns automatically synchronized promise through #recorder
|
|
10211
9705
|
*/
|
|
10212
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<
|
|
9706
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
|
|
10213
9707
|
/**
|
|
10214
9708
|
* Scrolls to element matched by locator.
|
|
10215
9709
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -10221,9 +9715,8 @@ declare namespace CodeceptJS {
|
|
|
10221
9715
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10222
9716
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
10223
9717
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
10224
|
-
* @returns automatically synchronized promise through #recorder
|
|
10225
9718
|
*/
|
|
10226
|
-
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
9719
|
+
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
10227
9720
|
/**
|
|
10228
9721
|
* Moves cursor to element matched by locator.
|
|
10229
9722
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -10235,9 +9728,8 @@ declare namespace CodeceptJS {
|
|
|
10235
9728
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10236
9729
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
10237
9730
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
10238
|
-
* @returns automatically synchronized promise through #recorder
|
|
10239
9731
|
*/
|
|
10240
|
-
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<
|
|
9732
|
+
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): Promise<any>;
|
|
10241
9733
|
/**
|
|
10242
9734
|
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10243
9735
|
* Filename is relative to output folder.
|
|
@@ -10247,9 +9739,8 @@ declare namespace CodeceptJS {
|
|
|
10247
9739
|
* ```
|
|
10248
9740
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10249
9741
|
* @param fileName - file name to save.
|
|
10250
|
-
* @returns automatically synchronized promise through #recorder
|
|
10251
9742
|
*/
|
|
10252
|
-
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<
|
|
9743
|
+
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): Promise<any>;
|
|
10253
9744
|
/**
|
|
10254
9745
|
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10255
9746
|
* Filename is relative to output folder.
|
|
@@ -10261,9 +9752,8 @@ declare namespace CodeceptJS {
|
|
|
10261
9752
|
* ```
|
|
10262
9753
|
* @param fileName - file name to save.
|
|
10263
9754
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
10264
|
-
* @returns automatically synchronized promise through #recorder
|
|
10265
9755
|
*/
|
|
10266
|
-
saveScreenshot(fileName: string, fullPage?: boolean): Promise<
|
|
9756
|
+
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
10267
9757
|
/**
|
|
10268
9758
|
* Sets cookie(s).
|
|
10269
9759
|
*
|
|
@@ -10279,26 +9769,19 @@ declare namespace CodeceptJS {
|
|
|
10279
9769
|
* ]);
|
|
10280
9770
|
* ```
|
|
10281
9771
|
* @param cookie - a cookie object or array of cookie objects.
|
|
10282
|
-
* @returns automatically synchronized promise through #recorder
|
|
10283
|
-
*
|
|
10284
|
-
*
|
|
10285
|
-
*
|
|
10286
|
-
* Uses Selenium's JSON [cookie
|
|
10287
|
-
* format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
|
|
10288
9772
|
*/
|
|
10289
|
-
setCookie(cookie: Cookie | Cookie[]): Promise<
|
|
9773
|
+
setCookie(cookie: Cookie | Cookie[]): Promise<any>;
|
|
10290
9774
|
/**
|
|
10291
9775
|
* Clears a cookie by name,
|
|
10292
9776
|
* if none provided clears all cookies.
|
|
10293
9777
|
*
|
|
10294
9778
|
* ```js
|
|
10295
9779
|
* I.clearCookie();
|
|
10296
|
-
* I.clearCookie('test');
|
|
9780
|
+
* I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
10297
9781
|
* ```
|
|
10298
9782
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
10299
|
-
* @returns automatically synchronized promise through #recorder
|
|
10300
9783
|
*/
|
|
10301
|
-
clearCookie(cookie?: string): Promise<
|
|
9784
|
+
clearCookie(cookie?: string): Promise<any>;
|
|
10302
9785
|
/**
|
|
10303
9786
|
* Checks that cookie with given name exists.
|
|
10304
9787
|
*
|
|
@@ -10306,9 +9789,8 @@ declare namespace CodeceptJS {
|
|
|
10306
9789
|
* I.seeCookie('Auth');
|
|
10307
9790
|
* ```
|
|
10308
9791
|
* @param name - cookie name.
|
|
10309
|
-
* @returns automatically synchronized promise through #recorder
|
|
10310
9792
|
*/
|
|
10311
|
-
seeCookie(name: string): Promise<
|
|
9793
|
+
seeCookie(name: string): Promise<any>;
|
|
10312
9794
|
/**
|
|
10313
9795
|
* Checks that cookie with given name does not exist.
|
|
10314
9796
|
*
|
|
@@ -10316,9 +9798,8 @@ declare namespace CodeceptJS {
|
|
|
10316
9798
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
10317
9799
|
* ```
|
|
10318
9800
|
* @param name - cookie name.
|
|
10319
|
-
* @returns automatically synchronized promise through #recorder
|
|
10320
9801
|
*/
|
|
10321
|
-
dontSeeCookie(name: string): Promise<
|
|
9802
|
+
dontSeeCookie(name: string): Promise<any>;
|
|
10322
9803
|
/**
|
|
10323
9804
|
* Gets a cookie object by name.
|
|
10324
9805
|
* If none provided gets all cookies.
|
|
@@ -10365,9 +9846,8 @@ declare namespace CodeceptJS {
|
|
|
10365
9846
|
* I.pressKeyUp('Control');
|
|
10366
9847
|
* ```
|
|
10367
9848
|
* @param key - name of key to press down.
|
|
10368
|
-
* @returns automatically synchronized promise through #recorder
|
|
10369
9849
|
*/
|
|
10370
|
-
pressKeyDown(key: string): Promise<
|
|
9850
|
+
pressKeyDown(key: string): Promise<any>;
|
|
10371
9851
|
/**
|
|
10372
9852
|
* Releases a key in the browser which was previously set to a down state.
|
|
10373
9853
|
*
|
|
@@ -10379,9 +9859,8 @@ declare namespace CodeceptJS {
|
|
|
10379
9859
|
* I.pressKeyUp('Control');
|
|
10380
9860
|
* ```
|
|
10381
9861
|
* @param key - name of key to release.
|
|
10382
|
-
* @returns automatically synchronized promise through #recorder
|
|
10383
9862
|
*/
|
|
10384
|
-
pressKeyUp(key: string): Promise<
|
|
9863
|
+
pressKeyUp(key: string): Promise<any>;
|
|
10385
9864
|
/**
|
|
10386
9865
|
* Presses a key in the browser (on a focused element).
|
|
10387
9866
|
*
|
|
@@ -10441,12 +9920,8 @@ declare namespace CodeceptJS {
|
|
|
10441
9920
|
* - `'Space'`
|
|
10442
9921
|
* - `'Tab'`
|
|
10443
9922
|
* @param key - key or array of keys to press.
|
|
10444
|
-
* @returns automatically synchronized promise through #recorder
|
|
10445
|
-
*
|
|
10446
|
-
*
|
|
10447
|
-
* _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.
|
|
10448
9923
|
*/
|
|
10449
|
-
pressKey(key: string | string[]): Promise<
|
|
9924
|
+
pressKey(key: string | string[]): Promise<any>;
|
|
10450
9925
|
/**
|
|
10451
9926
|
* Types out the given text into an active field.
|
|
10452
9927
|
* To slow down typing use a second parameter, to set interval between key presses.
|
|
@@ -10467,19 +9942,15 @@ declare namespace CodeceptJS {
|
|
|
10467
9942
|
* ```
|
|
10468
9943
|
* @param key - or array of keys to type.
|
|
10469
9944
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
10470
|
-
* @returns automatically synchronized promise through #recorder
|
|
10471
9945
|
*/
|
|
10472
|
-
type(key: string | string[], delay?: number): Promise<
|
|
9946
|
+
type(key: string | string[], delay?: number): Promise<any>;
|
|
10473
9947
|
/**
|
|
10474
9948
|
* Resize the current window to provided width and height.
|
|
10475
9949
|
* First parameter can be set to `maximize`.
|
|
10476
9950
|
* @param width - width in pixels or `maximize`.
|
|
10477
9951
|
* @param height - height in pixels.
|
|
10478
|
-
* @returns automatically synchronized promise through #recorder
|
|
10479
|
-
*
|
|
10480
|
-
* Appium: not tested in web, in apps doesn't work
|
|
10481
9952
|
*/
|
|
10482
|
-
resizeWindow(width: number, height: number): Promise<
|
|
9953
|
+
resizeWindow(width: number, height: number): Promise<any>;
|
|
10483
9954
|
/**
|
|
10484
9955
|
* Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
|
|
10485
9956
|
*
|
|
@@ -10492,9 +9963,8 @@ declare namespace CodeceptJS {
|
|
|
10492
9963
|
* ```
|
|
10493
9964
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
10494
9965
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
10495
|
-
* @returns automatically synchronized promise through #recorder
|
|
10496
9966
|
*/
|
|
10497
|
-
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
9967
|
+
focus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
10498
9968
|
/**
|
|
10499
9969
|
* Remove focus from a text input, button, etc.
|
|
10500
9970
|
* Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
|
|
@@ -10512,9 +9982,8 @@ declare namespace CodeceptJS {
|
|
|
10512
9982
|
* ```
|
|
10513
9983
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
10514
9984
|
* @param [options] - Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
10515
|
-
* @returns automatically synchronized promise through #recorder
|
|
10516
9985
|
*/
|
|
10517
|
-
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<
|
|
9986
|
+
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
10518
9987
|
/**
|
|
10519
9988
|
* Drag an item to a destination element.
|
|
10520
9989
|
*
|
|
@@ -10523,11 +9992,8 @@ declare namespace CodeceptJS {
|
|
|
10523
9992
|
* ```
|
|
10524
9993
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
10525
9994
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
10526
|
-
* @returns automatically synchronized promise through #recorder
|
|
10527
|
-
*
|
|
10528
|
-
* Appium: not tested
|
|
10529
9995
|
*/
|
|
10530
|
-
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<
|
|
9996
|
+
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): Promise<any>;
|
|
10531
9997
|
/**
|
|
10532
9998
|
* Drag the scrubber of a slider to a given position
|
|
10533
9999
|
* For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath.
|
|
@@ -10538,9 +10004,8 @@ declare namespace CodeceptJS {
|
|
|
10538
10004
|
* ```
|
|
10539
10005
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
10540
10006
|
* @param offsetX - position to drag.
|
|
10541
|
-
* @returns automatically synchronized promise through #recorder
|
|
10542
10007
|
*/
|
|
10543
|
-
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<
|
|
10008
|
+
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): Promise<any>;
|
|
10544
10009
|
/**
|
|
10545
10010
|
* Get all Window Handles.
|
|
10546
10011
|
* Useful for referencing a specific handle when calling `I.switchToWindow(handle)`
|
|
@@ -10580,9 +10045,8 @@ declare namespace CodeceptJS {
|
|
|
10580
10045
|
* ```js
|
|
10581
10046
|
* I.closeOtherTabs();
|
|
10582
10047
|
* ```
|
|
10583
|
-
* @returns automatically synchronized promise through #recorder
|
|
10584
10048
|
*/
|
|
10585
|
-
closeOtherTabs(): Promise<
|
|
10049
|
+
closeOtherTabs(): Promise<any>;
|
|
10586
10050
|
/**
|
|
10587
10051
|
* Pauses execution for a number of seconds.
|
|
10588
10052
|
*
|
|
@@ -10590,17 +10054,15 @@ declare namespace CodeceptJS {
|
|
|
10590
10054
|
* I.wait(2); // wait 2 secs
|
|
10591
10055
|
* ```
|
|
10592
10056
|
* @param sec - number of second to wait.
|
|
10593
|
-
* @returns automatically synchronized promise through #recorder
|
|
10594
10057
|
*/
|
|
10595
|
-
wait(sec: number): Promise<
|
|
10058
|
+
wait(sec: number): Promise<any>;
|
|
10596
10059
|
/**
|
|
10597
10060
|
* Waits for element to become enabled (by default waits for 1sec).
|
|
10598
10061
|
* Element can be located by CSS or XPath.
|
|
10599
10062
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10600
10063
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
10601
|
-
* @returns automatically synchronized promise through #recorder
|
|
10602
10064
|
*/
|
|
10603
|
-
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10065
|
+
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10604
10066
|
/**
|
|
10605
10067
|
* Waits for element to be present on page (by default waits for 1sec).
|
|
10606
10068
|
* Element can be located by CSS or XPath.
|
|
@@ -10611,9 +10073,8 @@ declare namespace CodeceptJS {
|
|
|
10611
10073
|
* ```
|
|
10612
10074
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10613
10075
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10614
|
-
* @returns automatically synchronized promise through #recorder
|
|
10615
10076
|
*/
|
|
10616
|
-
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10077
|
+
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10617
10078
|
/**
|
|
10618
10079
|
* Waits for element to be clickable (by default waits for 1sec).
|
|
10619
10080
|
* Element can be located by CSS or XPath.
|
|
@@ -10624,9 +10085,8 @@ declare namespace CodeceptJS {
|
|
|
10624
10085
|
* ```
|
|
10625
10086
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10626
10087
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
10627
|
-
* @returns automatically synchronized promise through #recorder
|
|
10628
10088
|
*/
|
|
10629
|
-
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10089
|
+
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10630
10090
|
/**
|
|
10631
10091
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
10632
10092
|
*
|
|
@@ -10635,9 +10095,8 @@ declare namespace CodeceptJS {
|
|
|
10635
10095
|
* ```
|
|
10636
10096
|
* @param urlPart - value to check.
|
|
10637
10097
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10638
|
-
* @returns automatically synchronized promise through #recorder
|
|
10639
10098
|
*/
|
|
10640
|
-
waitInUrl(urlPart: string, sec?: number): Promise<
|
|
10099
|
+
waitInUrl(urlPart: string, sec?: number): Promise<any>;
|
|
10641
10100
|
/**
|
|
10642
10101
|
* Waits for the entire URL to match the expected
|
|
10643
10102
|
*
|
|
@@ -10647,9 +10106,8 @@ declare namespace CodeceptJS {
|
|
|
10647
10106
|
* ```
|
|
10648
10107
|
* @param urlPart - value to check.
|
|
10649
10108
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10650
|
-
* @returns automatically synchronized promise through #recorder
|
|
10651
10109
|
*/
|
|
10652
|
-
waitUrlEquals(urlPart: string, sec?: number): Promise<
|
|
10110
|
+
waitUrlEquals(urlPart: string, sec?: number): Promise<any>;
|
|
10653
10111
|
/**
|
|
10654
10112
|
* Waits for a text to appear (by default waits for 1sec).
|
|
10655
10113
|
* Element can be located by CSS or XPath.
|
|
@@ -10662,9 +10120,8 @@ declare namespace CodeceptJS {
|
|
|
10662
10120
|
* @param text - to wait for.
|
|
10663
10121
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10664
10122
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
10665
|
-
* @returns automatically synchronized promise through #recorder
|
|
10666
10123
|
*/
|
|
10667
|
-
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<
|
|
10124
|
+
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
10668
10125
|
/**
|
|
10669
10126
|
* Waits for the specified value to be in value attribute.
|
|
10670
10127
|
*
|
|
@@ -10674,9 +10131,8 @@ declare namespace CodeceptJS {
|
|
|
10674
10131
|
* @param field - input field.
|
|
10675
10132
|
* @param value - expected value.
|
|
10676
10133
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10677
|
-
* @returns automatically synchronized promise through #recorder
|
|
10678
10134
|
*/
|
|
10679
|
-
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<
|
|
10135
|
+
waitForValue(field: LocatorOrString, value: string, sec?: number): Promise<any>;
|
|
10680
10136
|
/**
|
|
10681
10137
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
10682
10138
|
* Element can be located by CSS or XPath.
|
|
@@ -10686,9 +10142,8 @@ declare namespace CodeceptJS {
|
|
|
10686
10142
|
* ```
|
|
10687
10143
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10688
10144
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10689
|
-
* @returns automatically synchronized promise through #recorder
|
|
10690
10145
|
*/
|
|
10691
|
-
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10146
|
+
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10692
10147
|
/**
|
|
10693
10148
|
* Waits for a specified number of elements on the page.
|
|
10694
10149
|
*
|
|
@@ -10698,9 +10153,8 @@ declare namespace CodeceptJS {
|
|
|
10698
10153
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10699
10154
|
* @param num - number of elements.
|
|
10700
10155
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10701
|
-
* @returns automatically synchronized promise through #recorder
|
|
10702
10156
|
*/
|
|
10703
|
-
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<
|
|
10157
|
+
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): Promise<any>;
|
|
10704
10158
|
/**
|
|
10705
10159
|
* Waits for an element to be removed or become invisible on a page (by default waits for 1sec).
|
|
10706
10160
|
* Element can be located by CSS or XPath.
|
|
@@ -10710,9 +10164,8 @@ declare namespace CodeceptJS {
|
|
|
10710
10164
|
* ```
|
|
10711
10165
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10712
10166
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10713
|
-
* @returns automatically synchronized promise through #recorder
|
|
10714
10167
|
*/
|
|
10715
|
-
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10168
|
+
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10716
10169
|
/**
|
|
10717
10170
|
* Waits for an element to hide (by default waits for 1sec).
|
|
10718
10171
|
* Element can be located by CSS or XPath.
|
|
@@ -10722,9 +10175,8 @@ declare namespace CodeceptJS {
|
|
|
10722
10175
|
* ```
|
|
10723
10176
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10724
10177
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10725
|
-
* @returns automatically synchronized promise through #recorder
|
|
10726
10178
|
*/
|
|
10727
|
-
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10179
|
+
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10728
10180
|
/**
|
|
10729
10181
|
* Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
|
|
10730
10182
|
* Element can be located by CSS or XPath.
|
|
@@ -10734,9 +10186,8 @@ declare namespace CodeceptJS {
|
|
|
10734
10186
|
* ```
|
|
10735
10187
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10736
10188
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10737
|
-
* @returns automatically synchronized promise through #recorder
|
|
10738
10189
|
*/
|
|
10739
|
-
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<
|
|
10190
|
+
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
10740
10191
|
/**
|
|
10741
10192
|
* Waits for a function to return true (waits for 1 sec by default).
|
|
10742
10193
|
* Running in browser context.
|
|
@@ -10753,9 +10204,8 @@ declare namespace CodeceptJS {
|
|
|
10753
10204
|
* @param fn - to be executed in browser context.
|
|
10754
10205
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
10755
10206
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10756
|
-
* @returns automatically synchronized promise through #recorder
|
|
10757
10207
|
*/
|
|
10758
|
-
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<
|
|
10208
|
+
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
10759
10209
|
/**
|
|
10760
10210
|
* Switches frame or in case of null locator reverts to parent.
|
|
10761
10211
|
*
|
|
@@ -10764,9 +10214,8 @@ declare namespace CodeceptJS {
|
|
|
10764
10214
|
* I.switchTo(); // switch back to main page
|
|
10765
10215
|
* ```
|
|
10766
10216
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
10767
|
-
* @returns automatically synchronized promise through #recorder
|
|
10768
10217
|
*/
|
|
10769
|
-
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<
|
|
10218
|
+
switchTo(locator?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
10770
10219
|
/**
|
|
10771
10220
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10772
10221
|
*
|
|
@@ -10776,9 +10225,8 @@ declare namespace CodeceptJS {
|
|
|
10776
10225
|
* ```
|
|
10777
10226
|
* @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
|
|
10778
10227
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10779
|
-
* @returns automatically synchronized promise through #recorder
|
|
10780
10228
|
*/
|
|
10781
|
-
switchToNextTab(num?: number, sec?: number | null): Promise<
|
|
10229
|
+
switchToNextTab(num?: number, sec?: number | null): Promise<any>;
|
|
10782
10230
|
/**
|
|
10783
10231
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab.
|
|
10784
10232
|
*
|
|
@@ -10788,27 +10236,24 @@ declare namespace CodeceptJS {
|
|
|
10788
10236
|
* ```
|
|
10789
10237
|
* @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
|
|
10790
10238
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10791
|
-
* @returns automatically synchronized promise through #recorder
|
|
10792
10239
|
*/
|
|
10793
|
-
switchToPreviousTab(num?: number, sec?: number): Promise<
|
|
10240
|
+
switchToPreviousTab(num?: number, sec?: number): Promise<any>;
|
|
10794
10241
|
/**
|
|
10795
10242
|
* Close current tab.
|
|
10796
10243
|
*
|
|
10797
10244
|
* ```js
|
|
10798
10245
|
* I.closeCurrentTab();
|
|
10799
10246
|
* ```
|
|
10800
|
-
* @returns automatically synchronized promise through #recorder
|
|
10801
10247
|
*/
|
|
10802
|
-
closeCurrentTab(): Promise<
|
|
10248
|
+
closeCurrentTab(): Promise<any>;
|
|
10803
10249
|
/**
|
|
10804
10250
|
* Open new tab and switch to it.
|
|
10805
10251
|
*
|
|
10806
10252
|
* ```js
|
|
10807
10253
|
* I.openNewTab();
|
|
10808
10254
|
* ```
|
|
10809
|
-
* @returns automatically synchronized promise through #recorder
|
|
10810
10255
|
*/
|
|
10811
|
-
openNewTab(): Promise<
|
|
10256
|
+
openNewTab(): Promise<any>;
|
|
10812
10257
|
/**
|
|
10813
10258
|
* Grab number of open tabs.
|
|
10814
10259
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -10825,27 +10270,24 @@ declare namespace CodeceptJS {
|
|
|
10825
10270
|
* ```js
|
|
10826
10271
|
* I.refreshPage();
|
|
10827
10272
|
* ```
|
|
10828
|
-
* @returns automatically synchronized promise through #recorder
|
|
10829
10273
|
*/
|
|
10830
|
-
refreshPage(): Promise<
|
|
10274
|
+
refreshPage(): Promise<any>;
|
|
10831
10275
|
/**
|
|
10832
10276
|
* Scroll page to the top.
|
|
10833
10277
|
*
|
|
10834
10278
|
* ```js
|
|
10835
10279
|
* I.scrollPageToTop();
|
|
10836
10280
|
* ```
|
|
10837
|
-
* @returns automatically synchronized promise through #recorder
|
|
10838
10281
|
*/
|
|
10839
|
-
scrollPageToTop(): Promise<
|
|
10282
|
+
scrollPageToTop(): Promise<any>;
|
|
10840
10283
|
/**
|
|
10841
10284
|
* Scroll page to the bottom.
|
|
10842
10285
|
*
|
|
10843
10286
|
* ```js
|
|
10844
10287
|
* I.scrollPageToBottom();
|
|
10845
10288
|
* ```
|
|
10846
|
-
* @returns automatically synchronized promise through #recorder
|
|
10847
10289
|
*/
|
|
10848
|
-
scrollPageToBottom(): Promise<
|
|
10290
|
+
scrollPageToBottom(): Promise<any>;
|
|
10849
10291
|
/**
|
|
10850
10292
|
* Retrieves a page scroll position and returns it to test.
|
|
10851
10293
|
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
@@ -10867,9 +10309,8 @@ declare namespace CodeceptJS {
|
|
|
10867
10309
|
* @param latitude - to set.
|
|
10868
10310
|
* @param longitude - to set
|
|
10869
10311
|
* @param [altitude = null] - (optional, null by default) to set
|
|
10870
|
-
* @returns automatically synchronized promise through #recorder
|
|
10871
10312
|
*/
|
|
10872
|
-
setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<
|
|
10313
|
+
setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<any>;
|
|
10873
10314
|
/**
|
|
10874
10315
|
* Return the current geo location
|
|
10875
10316
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|