codeceptjs 3.3.5 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -7
- package/bin/codecept.js +40 -3
- package/docs/basics.md +24 -1
- package/docs/build/Appium.js +41 -22
- package/docs/build/FileSystem.js +1 -1
- package/docs/build/Nightmare.js +106 -57
- package/docs/build/Playwright.js +187 -111
- package/docs/build/Protractor.js +132 -70
- package/docs/build/Puppeteer.js +143 -76
- package/docs/build/REST.js +2 -2
- package/docs/build/TestCafe.js +107 -57
- package/docs/build/WebDriver.js +162 -89
- package/docs/changelog.md +37 -7
- package/docs/commands.md +5 -3
- package/docs/configuration.md +5 -5
- package/docs/helpers/Appium.md +25 -23
- package/docs/helpers/FileSystem.md +1 -1
- package/docs/helpers/Nightmare.md +57 -57
- package/docs/helpers/Playwright.md +76 -75
- package/docs/helpers/Puppeteer.md +76 -85
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +57 -57
- package/docs/helpers/WebDriver.md +84 -97
- package/docs/quickstart.md +1 -1
- package/docs/reports.md +1 -1
- package/docs/secrets.md +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +3 -3
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -1
- 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/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.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 +2 -2
- package/docs/webapi/saveScreenshot.mustache +2 -2
- 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/configMigrate.js +1 -1
- package/lib/command/dryRun.js +2 -1
- package/lib/command/generate.js +35 -18
- package/lib/command/run-rerun.js +38 -0
- package/lib/command/utils.js +13 -3
- package/lib/config.js +2 -2
- package/lib/data/context.js +7 -0
- package/lib/helper/Appium.js +6 -4
- package/lib/helper/FileSystem.js +1 -1
- package/lib/helper/Nightmare.js +1 -1
- package/lib/helper/Playwright.js +48 -38
- package/lib/helper/Protractor.js +1 -1
- package/lib/helper/REST.js +2 -2
- package/lib/helper/TestCafe.js +1 -1
- package/lib/helper/WebDriver.js +7 -7
- package/lib/plugin/wdio.js +11 -2
- package/lib/utils.js +3 -0
- package/package.json +2 -2
- package/typings/index.d.ts +46 -46
- package/typings/types.d.ts +497 -443
package/typings/types.d.ts
CHANGED
|
@@ -472,9 +472,10 @@ declare namespace CodeceptJS {
|
|
|
472
472
|
* ```js
|
|
473
473
|
* I.startActivity('io.selendroid.testapp', '.RegisterUserActivity');
|
|
474
474
|
* ```
|
|
475
|
-
*
|
|
475
|
+
*
|
|
476
|
+
* Appium: support only Android
|
|
476
477
|
*/
|
|
477
|
-
startActivity(): Promise<void>;
|
|
478
|
+
startActivity(appPackage: string, appActivity: string): Promise<void>;
|
|
478
479
|
/**
|
|
479
480
|
* Set network connection mode.
|
|
480
481
|
*
|
|
@@ -740,7 +741,7 @@ declare namespace CodeceptJS {
|
|
|
740
741
|
* ```
|
|
741
742
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
742
743
|
* @param value - text value to append.
|
|
743
|
-
*
|
|
744
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
744
745
|
*/
|
|
745
746
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
746
747
|
/**
|
|
@@ -756,7 +757,7 @@ declare namespace CodeceptJS {
|
|
|
756
757
|
* ```
|
|
757
758
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
758
759
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
759
|
-
*
|
|
760
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
760
761
|
*/
|
|
761
762
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
762
763
|
/**
|
|
@@ -783,7 +784,7 @@ declare namespace CodeceptJS {
|
|
|
783
784
|
* ```
|
|
784
785
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
785
786
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
786
|
-
*
|
|
787
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
787
788
|
*/
|
|
788
789
|
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
789
790
|
/**
|
|
@@ -795,7 +796,7 @@ declare namespace CodeceptJS {
|
|
|
795
796
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
796
797
|
* ```
|
|
797
798
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
798
|
-
*
|
|
799
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
799
800
|
*/
|
|
800
801
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
801
802
|
/**
|
|
@@ -805,7 +806,7 @@ declare namespace CodeceptJS {
|
|
|
805
806
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
806
807
|
* ```
|
|
807
808
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
808
|
-
*
|
|
809
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
809
810
|
*/
|
|
810
811
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
811
812
|
/**
|
|
@@ -818,7 +819,7 @@ declare namespace CodeceptJS {
|
|
|
818
819
|
* ```
|
|
819
820
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
820
821
|
* @param value - value to check.
|
|
821
|
-
*
|
|
822
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
822
823
|
*/
|
|
823
824
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
824
825
|
/**
|
|
@@ -831,7 +832,7 @@ declare namespace CodeceptJS {
|
|
|
831
832
|
* ```
|
|
832
833
|
* @param text - which is not present.
|
|
833
834
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
834
|
-
*
|
|
835
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
835
836
|
*/
|
|
836
837
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
837
838
|
/**
|
|
@@ -850,7 +851,7 @@ declare namespace CodeceptJS {
|
|
|
850
851
|
* ```
|
|
851
852
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
852
853
|
* @param value - text value to fill.
|
|
853
|
-
*
|
|
854
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
854
855
|
*/
|
|
855
856
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
856
857
|
/**
|
|
@@ -939,7 +940,7 @@ declare namespace CodeceptJS {
|
|
|
939
940
|
*/
|
|
940
941
|
grabValueFrom(locator: CodeceptJS.LocatorOrString): Promise<string>;
|
|
941
942
|
/**
|
|
942
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
943
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
943
944
|
* Filename is relative to output folder.
|
|
944
945
|
*
|
|
945
946
|
* ```js
|
|
@@ -958,7 +959,8 @@ declare namespace CodeceptJS {
|
|
|
958
959
|
* ```
|
|
959
960
|
* @param locator - located by CSS|XPath|strict locator.
|
|
960
961
|
* @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
961
|
-
*
|
|
962
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
963
|
+
*
|
|
962
964
|
*
|
|
963
965
|
* Supported only for web testing
|
|
964
966
|
*/
|
|
@@ -972,7 +974,7 @@ declare namespace CodeceptJS {
|
|
|
972
974
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
973
975
|
* ```
|
|
974
976
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
975
|
-
*
|
|
977
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
976
978
|
*/
|
|
977
979
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
978
980
|
/**
|
|
@@ -983,7 +985,7 @@ declare namespace CodeceptJS {
|
|
|
983
985
|
* I.seeElement('#modal');
|
|
984
986
|
* ```
|
|
985
987
|
* @param locator - located by CSS|XPath|strict locator.
|
|
986
|
-
*
|
|
988
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
987
989
|
*/
|
|
988
990
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
989
991
|
/**
|
|
@@ -998,7 +1000,7 @@ declare namespace CodeceptJS {
|
|
|
998
1000
|
* ```
|
|
999
1001
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
1000
1002
|
* @param value - value to check.
|
|
1001
|
-
*
|
|
1003
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1002
1004
|
*/
|
|
1003
1005
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
1004
1006
|
/**
|
|
@@ -1012,7 +1014,7 @@ declare namespace CodeceptJS {
|
|
|
1012
1014
|
* ```
|
|
1013
1015
|
* @param text - expected on page.
|
|
1014
1016
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1015
|
-
*
|
|
1017
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1016
1018
|
*/
|
|
1017
1019
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
1018
1020
|
/**
|
|
@@ -1036,7 +1038,8 @@ declare namespace CodeceptJS {
|
|
|
1036
1038
|
* ```
|
|
1037
1039
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
1038
1040
|
* @param option - visible text or value of option.
|
|
1039
|
-
*
|
|
1041
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1042
|
+
*
|
|
1040
1043
|
*
|
|
1041
1044
|
* Supported only for web testing
|
|
1042
1045
|
*/
|
|
@@ -1051,7 +1054,7 @@ declare namespace CodeceptJS {
|
|
|
1051
1054
|
* ```
|
|
1052
1055
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1053
1056
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
1054
|
-
*
|
|
1057
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1055
1058
|
*/
|
|
1056
1059
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
1057
1060
|
/**
|
|
@@ -1063,7 +1066,7 @@ declare namespace CodeceptJS {
|
|
|
1063
1066
|
* ```
|
|
1064
1067
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1065
1068
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1066
|
-
*
|
|
1069
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1067
1070
|
*/
|
|
1068
1071
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
1069
1072
|
/**
|
|
@@ -1075,7 +1078,7 @@ declare namespace CodeceptJS {
|
|
|
1075
1078
|
* ```
|
|
1076
1079
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1077
1080
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1078
|
-
*
|
|
1081
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1079
1082
|
*/
|
|
1080
1083
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
1081
1084
|
/**
|
|
@@ -1090,7 +1093,7 @@ declare namespace CodeceptJS {
|
|
|
1090
1093
|
* @param text - to wait for.
|
|
1091
1094
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
1092
1095
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
1093
|
-
*
|
|
1096
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1094
1097
|
*/
|
|
1095
1098
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
1096
1099
|
}
|
|
@@ -1100,7 +1103,7 @@ declare namespace CodeceptJS {
|
|
|
1100
1103
|
*
|
|
1101
1104
|
* ```js
|
|
1102
1105
|
* I.amInPath('test');
|
|
1103
|
-
* I.seeFile('codecept.
|
|
1106
|
+
* I.seeFile('codecept.js');
|
|
1104
1107
|
* I.seeInThisFile('FileSystem');
|
|
1105
1108
|
* I.dontSeeInThisFile("WebDriver");
|
|
1106
1109
|
* ```
|
|
@@ -1663,7 +1666,7 @@ declare namespace CodeceptJS {
|
|
|
1663
1666
|
*
|
|
1664
1667
|
* ## Configuration
|
|
1665
1668
|
*
|
|
1666
|
-
* This helper should be configured in codecept.
|
|
1669
|
+
* This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
1667
1670
|
*
|
|
1668
1671
|
* * `url` - base url of website to be tested
|
|
1669
1672
|
* * `restart` (optional, default: true) - restart browser between tests.
|
|
@@ -1740,7 +1743,7 @@ declare namespace CodeceptJS {
|
|
|
1740
1743
|
* I.seeInTitle('Home Page');
|
|
1741
1744
|
* ```
|
|
1742
1745
|
* @param text - text value to check.
|
|
1743
|
-
*
|
|
1746
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1744
1747
|
*/
|
|
1745
1748
|
seeInTitle(text: string): void;
|
|
1746
1749
|
/**
|
|
@@ -1750,7 +1753,7 @@ declare namespace CodeceptJS {
|
|
|
1750
1753
|
* I.dontSeeInTitle('Error');
|
|
1751
1754
|
* ```
|
|
1752
1755
|
* @param text - value to check.
|
|
1753
|
-
*
|
|
1756
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1754
1757
|
*/
|
|
1755
1758
|
dontSeeInTitle(text: string): void;
|
|
1756
1759
|
/**
|
|
@@ -1781,13 +1784,13 @@ declare namespace CodeceptJS {
|
|
|
1781
1784
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
1782
1785
|
* ```
|
|
1783
1786
|
* @param url - a fragment to check
|
|
1784
|
-
*
|
|
1787
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1785
1788
|
*/
|
|
1786
1789
|
seeInCurrentUrl(url: string): void;
|
|
1787
1790
|
/**
|
|
1788
1791
|
* Checks that current url does not contain a provided fragment.
|
|
1789
1792
|
* @param url - value to check.
|
|
1790
|
-
*
|
|
1793
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1791
1794
|
*/
|
|
1792
1795
|
dontSeeInCurrentUrl(url: string): void;
|
|
1793
1796
|
/**
|
|
@@ -1800,7 +1803,7 @@ declare namespace CodeceptJS {
|
|
|
1800
1803
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
1801
1804
|
* ```
|
|
1802
1805
|
* @param url - value to check.
|
|
1803
|
-
*
|
|
1806
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1804
1807
|
*/
|
|
1805
1808
|
seeCurrentUrlEquals(url: string): void;
|
|
1806
1809
|
/**
|
|
@@ -1812,7 +1815,7 @@ declare namespace CodeceptJS {
|
|
|
1812
1815
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
1813
1816
|
* ```
|
|
1814
1817
|
* @param url - value to check.
|
|
1815
|
-
*
|
|
1818
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1816
1819
|
*/
|
|
1817
1820
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
1818
1821
|
/**
|
|
@@ -1826,7 +1829,7 @@ declare namespace CodeceptJS {
|
|
|
1826
1829
|
* ```
|
|
1827
1830
|
* @param text - expected on page.
|
|
1828
1831
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1829
|
-
*
|
|
1832
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1830
1833
|
*/
|
|
1831
1834
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
1832
1835
|
/**
|
|
@@ -1839,7 +1842,7 @@ declare namespace CodeceptJS {
|
|
|
1839
1842
|
* ```
|
|
1840
1843
|
* @param text - which is not present.
|
|
1841
1844
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1842
|
-
*
|
|
1845
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1843
1846
|
*/
|
|
1844
1847
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
1845
1848
|
/**
|
|
@@ -1850,7 +1853,7 @@ declare namespace CodeceptJS {
|
|
|
1850
1853
|
* I.seeElement('#modal');
|
|
1851
1854
|
* ```
|
|
1852
1855
|
* @param locator - located by CSS|XPath|strict locator.
|
|
1853
|
-
*
|
|
1856
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1854
1857
|
*/
|
|
1855
1858
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
1856
1859
|
/**
|
|
@@ -1860,7 +1863,7 @@ declare namespace CodeceptJS {
|
|
|
1860
1863
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
1861
1864
|
* ```
|
|
1862
1865
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1863
|
-
*
|
|
1866
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1864
1867
|
*/
|
|
1865
1868
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
1866
1869
|
/**
|
|
@@ -1871,7 +1874,7 @@ declare namespace CodeceptJS {
|
|
|
1871
1874
|
* I.seeElementInDOM('#modal');
|
|
1872
1875
|
* ```
|
|
1873
1876
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1874
|
-
*
|
|
1877
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1875
1878
|
*/
|
|
1876
1879
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
1877
1880
|
/**
|
|
@@ -1881,7 +1884,7 @@ declare namespace CodeceptJS {
|
|
|
1881
1884
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
1882
1885
|
* ```
|
|
1883
1886
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
1884
|
-
*
|
|
1887
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1885
1888
|
*/
|
|
1886
1889
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
1887
1890
|
/**
|
|
@@ -1891,7 +1894,7 @@ declare namespace CodeceptJS {
|
|
|
1891
1894
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
1892
1895
|
* ```
|
|
1893
1896
|
* @param text - value to check.
|
|
1894
|
-
*
|
|
1897
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1895
1898
|
*/
|
|
1896
1899
|
seeInSource(text: string): void;
|
|
1897
1900
|
/**
|
|
@@ -1901,7 +1904,7 @@ declare namespace CodeceptJS {
|
|
|
1901
1904
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
1902
1905
|
* ```
|
|
1903
1906
|
* @param value - to check.
|
|
1904
|
-
*
|
|
1907
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1905
1908
|
*/
|
|
1906
1909
|
dontSeeInSource(value: string): void;
|
|
1907
1910
|
/**
|
|
@@ -1914,7 +1917,7 @@ declare namespace CodeceptJS {
|
|
|
1914
1917
|
* ```
|
|
1915
1918
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1916
1919
|
* @param num - number of elements.
|
|
1917
|
-
*
|
|
1920
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1918
1921
|
*/
|
|
1919
1922
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
1920
1923
|
/**
|
|
@@ -1926,7 +1929,7 @@ declare namespace CodeceptJS {
|
|
|
1926
1929
|
* ```
|
|
1927
1930
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
1928
1931
|
* @param num - number of elements.
|
|
1929
|
-
*
|
|
1932
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1930
1933
|
*/
|
|
1931
1934
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
1932
1935
|
/**
|
|
@@ -1964,7 +1967,7 @@ declare namespace CodeceptJS {
|
|
|
1964
1967
|
* ```
|
|
1965
1968
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1966
1969
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1967
|
-
*
|
|
1970
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1968
1971
|
*/
|
|
1969
1972
|
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
1970
1973
|
/**
|
|
@@ -1979,7 +1982,7 @@ declare namespace CodeceptJS {
|
|
|
1979
1982
|
* ```
|
|
1980
1983
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1981
1984
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1982
|
-
*
|
|
1985
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1983
1986
|
*/
|
|
1984
1987
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
1985
1988
|
/**
|
|
@@ -1995,7 +1998,7 @@ declare namespace CodeceptJS {
|
|
|
1995
1998
|
* ```
|
|
1996
1999
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
1997
2000
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1998
|
-
*
|
|
2001
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
1999
2002
|
*/
|
|
2000
2003
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
2001
2004
|
/**
|
|
@@ -2009,7 +2012,7 @@ declare namespace CodeceptJS {
|
|
|
2009
2012
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2010
2013
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2011
2014
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2012
|
-
*
|
|
2015
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2013
2016
|
*/
|
|
2014
2017
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
2015
2018
|
/**
|
|
@@ -2037,7 +2040,7 @@ declare namespace CodeceptJS {
|
|
|
2037
2040
|
* ```
|
|
2038
2041
|
* @param fn - function to be executed in browser context.
|
|
2039
2042
|
* @param args - to be passed to function.
|
|
2040
|
-
*
|
|
2043
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2041
2044
|
*
|
|
2042
2045
|
*
|
|
2043
2046
|
* Wrapper for synchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2)
|
|
@@ -2066,7 +2069,7 @@ declare namespace CodeceptJS {
|
|
|
2066
2069
|
* ```
|
|
2067
2070
|
* @param fn - function to be executed in browser context.
|
|
2068
2071
|
* @param args - to be passed to function.
|
|
2069
|
-
*
|
|
2072
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2070
2073
|
*
|
|
2071
2074
|
*
|
|
2072
2075
|
* Wrapper for asynchronous [evaluate](https://github.com/segmentio/nightmare#evaluatefn-arg1-arg2).
|
|
@@ -2078,7 +2081,7 @@ declare namespace CodeceptJS {
|
|
|
2078
2081
|
* First parameter can be set to `maximize`.
|
|
2079
2082
|
* @param width - width in pixels or `maximize`.
|
|
2080
2083
|
* @param height - height in pixels.
|
|
2081
|
-
*
|
|
2084
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2082
2085
|
*/
|
|
2083
2086
|
resizeWindow(width: number, height: number): void;
|
|
2084
2087
|
/**
|
|
@@ -2094,7 +2097,7 @@ declare namespace CodeceptJS {
|
|
|
2094
2097
|
* ```
|
|
2095
2098
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
2096
2099
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2097
|
-
*
|
|
2100
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2098
2101
|
*/
|
|
2099
2102
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
2100
2103
|
/**
|
|
@@ -2110,7 +2113,7 @@ declare namespace CodeceptJS {
|
|
|
2110
2113
|
* ```
|
|
2111
2114
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
2112
2115
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
2113
|
-
*
|
|
2116
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2114
2117
|
*/
|
|
2115
2118
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
2116
2119
|
/**
|
|
@@ -2129,7 +2132,7 @@ declare namespace CodeceptJS {
|
|
|
2129
2132
|
* ```
|
|
2130
2133
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2131
2134
|
* @param value - text value to fill.
|
|
2132
|
-
*
|
|
2135
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2133
2136
|
*/
|
|
2134
2137
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
2135
2138
|
/**
|
|
@@ -2141,7 +2144,7 @@ declare namespace CodeceptJS {
|
|
|
2141
2144
|
* I.clearField('#email');
|
|
2142
2145
|
* ```
|
|
2143
2146
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
2144
|
-
*
|
|
2147
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
2145
2148
|
*/
|
|
2146
2149
|
clearField(editable: LocatorOrString): void;
|
|
2147
2150
|
/**
|
|
@@ -2153,7 +2156,7 @@ declare namespace CodeceptJS {
|
|
|
2153
2156
|
* ```
|
|
2154
2157
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
2155
2158
|
* @param value - text value to append.
|
|
2156
|
-
*
|
|
2159
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2157
2160
|
*/
|
|
2158
2161
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
2159
2162
|
/**
|
|
@@ -2168,7 +2171,7 @@ declare namespace CodeceptJS {
|
|
|
2168
2171
|
* ```
|
|
2169
2172
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2170
2173
|
* @param value - value to check.
|
|
2171
|
-
*
|
|
2174
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2172
2175
|
*/
|
|
2173
2176
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
2174
2177
|
/**
|
|
@@ -2181,7 +2184,7 @@ declare namespace CodeceptJS {
|
|
|
2181
2184
|
* ```
|
|
2182
2185
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2183
2186
|
* @param value - value to check.
|
|
2184
|
-
*
|
|
2187
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2185
2188
|
*/
|
|
2186
2189
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
2187
2190
|
/**
|
|
@@ -2209,7 +2212,7 @@ declare namespace CodeceptJS {
|
|
|
2209
2212
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
2210
2213
|
* ```
|
|
2211
2214
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2212
|
-
*
|
|
2215
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2213
2216
|
*/
|
|
2214
2217
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
2215
2218
|
/**
|
|
@@ -2221,12 +2224,12 @@ declare namespace CodeceptJS {
|
|
|
2221
2224
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
2222
2225
|
* ```
|
|
2223
2226
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
2224
|
-
*
|
|
2227
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2225
2228
|
*/
|
|
2226
2229
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
2227
2230
|
/**
|
|
2228
2231
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
2229
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
2232
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
2230
2233
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
2231
2234
|
*
|
|
2232
2235
|
* ```js
|
|
@@ -2234,8 +2237,9 @@ declare namespace CodeceptJS {
|
|
|
2234
2237
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
2235
2238
|
* ```
|
|
2236
2239
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
2237
|
-
* @param pathToFile - local file path relative to codecept.
|
|
2238
|
-
*
|
|
2240
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
2241
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2242
|
+
*
|
|
2239
2243
|
*
|
|
2240
2244
|
* 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))
|
|
2241
2245
|
*/
|
|
@@ -2368,7 +2372,7 @@ declare namespace CodeceptJS {
|
|
|
2368
2372
|
* ```
|
|
2369
2373
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
2370
2374
|
* @param option - visible text or value of option.
|
|
2371
|
-
*
|
|
2375
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2372
2376
|
*/
|
|
2373
2377
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
2374
2378
|
/**
|
|
@@ -2386,7 +2390,8 @@ declare namespace CodeceptJS {
|
|
|
2386
2390
|
* ]);
|
|
2387
2391
|
* ```
|
|
2388
2392
|
* @param cookie - a cookie object or array of cookie objects.
|
|
2389
|
-
*
|
|
2393
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2394
|
+
*
|
|
2390
2395
|
*
|
|
2391
2396
|
* Wrapper for `.cookies.set(cookie)`.
|
|
2392
2397
|
* [See more](https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie)
|
|
@@ -2399,7 +2404,7 @@ declare namespace CodeceptJS {
|
|
|
2399
2404
|
* I.seeCookie('Auth');
|
|
2400
2405
|
* ```
|
|
2401
2406
|
* @param name - cookie name.
|
|
2402
|
-
*
|
|
2407
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2403
2408
|
*/
|
|
2404
2409
|
seeCookie(name: string): void;
|
|
2405
2410
|
/**
|
|
@@ -2409,7 +2414,7 @@ declare namespace CodeceptJS {
|
|
|
2409
2414
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
2410
2415
|
* ```
|
|
2411
2416
|
* @param name - cookie name.
|
|
2412
|
-
*
|
|
2417
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2413
2418
|
*/
|
|
2414
2419
|
dontSeeCookie(name: string): void;
|
|
2415
2420
|
/**
|
|
@@ -2439,7 +2444,7 @@ declare namespace CodeceptJS {
|
|
|
2439
2444
|
* I.clearCookie('test');
|
|
2440
2445
|
* ```
|
|
2441
2446
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
2442
|
-
*
|
|
2447
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2443
2448
|
*/
|
|
2444
2449
|
clearCookie(cookie?: string): void;
|
|
2445
2450
|
/**
|
|
@@ -2458,7 +2463,7 @@ declare namespace CodeceptJS {
|
|
|
2458
2463
|
* @param fn - to be executed in browser context.
|
|
2459
2464
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
2460
2465
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
2461
|
-
*
|
|
2466
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2462
2467
|
*/
|
|
2463
2468
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
2464
2469
|
/**
|
|
@@ -2468,7 +2473,7 @@ declare namespace CodeceptJS {
|
|
|
2468
2473
|
* I.wait(2); // wait 2 secs
|
|
2469
2474
|
* ```
|
|
2470
2475
|
* @param sec - number of second to wait.
|
|
2471
|
-
*
|
|
2476
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2472
2477
|
*/
|
|
2473
2478
|
wait(sec: number): void;
|
|
2474
2479
|
/**
|
|
@@ -2483,7 +2488,7 @@ declare namespace CodeceptJS {
|
|
|
2483
2488
|
* @param text - to wait for.
|
|
2484
2489
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2485
2490
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
2486
|
-
*
|
|
2491
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2487
2492
|
*/
|
|
2488
2493
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
2489
2494
|
/**
|
|
@@ -2495,7 +2500,7 @@ declare namespace CodeceptJS {
|
|
|
2495
2500
|
* ```
|
|
2496
2501
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2497
2502
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2498
|
-
*
|
|
2503
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2499
2504
|
*/
|
|
2500
2505
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
2501
2506
|
/**
|
|
@@ -2507,7 +2512,7 @@ declare namespace CodeceptJS {
|
|
|
2507
2512
|
* ```
|
|
2508
2513
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2509
2514
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2510
|
-
*
|
|
2515
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2511
2516
|
*/
|
|
2512
2517
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
2513
2518
|
/**
|
|
@@ -2519,7 +2524,7 @@ declare namespace CodeceptJS {
|
|
|
2519
2524
|
* ```
|
|
2520
2525
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2521
2526
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2522
|
-
*
|
|
2527
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2523
2528
|
*/
|
|
2524
2529
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
2525
2530
|
/**
|
|
@@ -2532,7 +2537,7 @@ declare namespace CodeceptJS {
|
|
|
2532
2537
|
* ```
|
|
2533
2538
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2534
2539
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
2535
|
-
*
|
|
2540
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2536
2541
|
*/
|
|
2537
2542
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
2538
2543
|
/**
|
|
@@ -2544,7 +2549,7 @@ declare namespace CodeceptJS {
|
|
|
2544
2549
|
* ```
|
|
2545
2550
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2546
2551
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
2547
|
-
*
|
|
2552
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2548
2553
|
*/
|
|
2549
2554
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
2550
2555
|
/**
|
|
@@ -2553,7 +2558,7 @@ declare namespace CodeceptJS {
|
|
|
2553
2558
|
* ```js
|
|
2554
2559
|
* I.refreshPage();
|
|
2555
2560
|
* ```
|
|
2556
|
-
*
|
|
2561
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2557
2562
|
*/
|
|
2558
2563
|
refreshPage(): void;
|
|
2559
2564
|
/**
|
|
@@ -2561,7 +2566,7 @@ declare namespace CodeceptJS {
|
|
|
2561
2566
|
*/
|
|
2562
2567
|
refresh(): void;
|
|
2563
2568
|
/**
|
|
2564
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
2569
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
2565
2570
|
* Filename is relative to output folder.
|
|
2566
2571
|
*
|
|
2567
2572
|
* ```js
|
|
@@ -2569,7 +2574,7 @@ declare namespace CodeceptJS {
|
|
|
2569
2574
|
* ```
|
|
2570
2575
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
2571
2576
|
* @param fileName - file name to save.
|
|
2572
|
-
*
|
|
2577
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2573
2578
|
*/
|
|
2574
2579
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
2575
2580
|
/**
|
|
@@ -2596,7 +2601,7 @@ declare namespace CodeceptJS {
|
|
|
2596
2601
|
*/
|
|
2597
2602
|
grabElementBoundingRect(locator: LocatorOrString, elementSize?: string): Promise<DOMRect> | Promise<number>;
|
|
2598
2603
|
/**
|
|
2599
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
2604
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
2600
2605
|
* Filename is relative to output folder.
|
|
2601
2606
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
2602
2607
|
*
|
|
@@ -2606,7 +2611,7 @@ declare namespace CodeceptJS {
|
|
|
2606
2611
|
* ```
|
|
2607
2612
|
* @param fileName - file name to save.
|
|
2608
2613
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
2609
|
-
*
|
|
2614
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2610
2615
|
*/
|
|
2611
2616
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
2612
2617
|
/**
|
|
@@ -2620,7 +2625,7 @@ declare namespace CodeceptJS {
|
|
|
2620
2625
|
* @param locator - located by CSS|XPath|strict locator.
|
|
2621
2626
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
2622
2627
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
2623
|
-
*
|
|
2628
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2624
2629
|
*/
|
|
2625
2630
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
2626
2631
|
/**
|
|
@@ -2629,7 +2634,7 @@ declare namespace CodeceptJS {
|
|
|
2629
2634
|
* ```js
|
|
2630
2635
|
* I.scrollPageToTop();
|
|
2631
2636
|
* ```
|
|
2632
|
-
*
|
|
2637
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2633
2638
|
*/
|
|
2634
2639
|
scrollPageToTop(): void;
|
|
2635
2640
|
/**
|
|
@@ -2638,7 +2643,7 @@ declare namespace CodeceptJS {
|
|
|
2638
2643
|
* ```js
|
|
2639
2644
|
* I.scrollPageToBottom();
|
|
2640
2645
|
* ```
|
|
2641
|
-
*
|
|
2646
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
2642
2647
|
*/
|
|
2643
2648
|
scrollPageToBottom(): void;
|
|
2644
2649
|
/**
|
|
@@ -2694,6 +2699,10 @@ declare namespace CodeceptJS {
|
|
|
2694
2699
|
* enables video recording for failed tests; videos are saved into `output/videos` folder
|
|
2695
2700
|
*/
|
|
2696
2701
|
video?: boolean;
|
|
2702
|
+
/**
|
|
2703
|
+
* save videos for passed tests; videos are saved into `output/videos` folder
|
|
2704
|
+
*/
|
|
2705
|
+
keepVideoForPassedTests?: boolean;
|
|
2697
2706
|
/**
|
|
2698
2707
|
* record [tracing information](https://playwright.dev/docs/trace-viewer) with screenshots and snapshots.
|
|
2699
2708
|
*/
|
|
@@ -2719,9 +2728,9 @@ declare namespace CodeceptJS {
|
|
|
2719
2728
|
*/
|
|
2720
2729
|
waitForAction?: number;
|
|
2721
2730
|
/**
|
|
2722
|
-
* When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://
|
|
2731
|
+
* When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://playwright.dev/docs/api/class-page#page-wait-for-navigation).
|
|
2723
2732
|
*/
|
|
2724
|
-
waitForNavigation?:
|
|
2733
|
+
waitForNavigation?: string;
|
|
2725
2734
|
/**
|
|
2726
2735
|
* Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
|
|
2727
2736
|
* @defaultValue 10
|
|
@@ -3012,7 +3021,7 @@ declare namespace CodeceptJS {
|
|
|
3012
3021
|
* I.seeInPopup('Popup text');
|
|
3013
3022
|
* ```
|
|
3014
3023
|
* @param text - value to check.
|
|
3015
|
-
*
|
|
3024
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3016
3025
|
*/
|
|
3017
3026
|
seeInPopup(text: string): void;
|
|
3018
3027
|
/**
|
|
@@ -3054,7 +3063,8 @@ declare namespace CodeceptJS {
|
|
|
3054
3063
|
* First parameter can be set to `maximize`.
|
|
3055
3064
|
* @param width - width in pixels or `maximize`.
|
|
3056
3065
|
* @param height - height in pixels.
|
|
3057
|
-
*
|
|
3066
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3067
|
+
*
|
|
3058
3068
|
*
|
|
3059
3069
|
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
3060
3070
|
* Playwright does not control the window of a browser so it can't adjust its real size.
|
|
@@ -3091,7 +3101,7 @@ declare namespace CodeceptJS {
|
|
|
3091
3101
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3092
3102
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
3093
3103
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
3094
|
-
*
|
|
3104
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3095
3105
|
*/
|
|
3096
3106
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
3097
3107
|
/**
|
|
@@ -3102,7 +3112,7 @@ declare namespace CodeceptJS {
|
|
|
3102
3112
|
* ```
|
|
3103
3113
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
3104
3114
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
3105
|
-
*
|
|
3115
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3106
3116
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
3107
3117
|
*
|
|
3108
3118
|
* ```js
|
|
@@ -3119,7 +3129,7 @@ declare namespace CodeceptJS {
|
|
|
3119
3129
|
* ```js
|
|
3120
3130
|
* I.refreshPage();
|
|
3121
3131
|
* ```
|
|
3122
|
-
*
|
|
3132
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3123
3133
|
*/
|
|
3124
3134
|
refreshPage(): void;
|
|
3125
3135
|
/**
|
|
@@ -3128,7 +3138,7 @@ declare namespace CodeceptJS {
|
|
|
3128
3138
|
* ```js
|
|
3129
3139
|
* I.scrollPageToTop();
|
|
3130
3140
|
* ```
|
|
3131
|
-
*
|
|
3141
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3132
3142
|
*/
|
|
3133
3143
|
scrollPageToTop(): void;
|
|
3134
3144
|
/**
|
|
@@ -3137,7 +3147,7 @@ declare namespace CodeceptJS {
|
|
|
3137
3147
|
* ```js
|
|
3138
3148
|
* I.scrollPageToBottom();
|
|
3139
3149
|
* ```
|
|
3140
|
-
*
|
|
3150
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3141
3151
|
*/
|
|
3142
3152
|
scrollPageToBottom(): void;
|
|
3143
3153
|
/**
|
|
@@ -3151,7 +3161,7 @@ declare namespace CodeceptJS {
|
|
|
3151
3161
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3152
3162
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
3153
3163
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
3154
|
-
*
|
|
3164
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3155
3165
|
*/
|
|
3156
3166
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
3157
3167
|
/**
|
|
@@ -3161,7 +3171,7 @@ declare namespace CodeceptJS {
|
|
|
3161
3171
|
* I.seeInTitle('Home Page');
|
|
3162
3172
|
* ```
|
|
3163
3173
|
* @param text - text value to check.
|
|
3164
|
-
*
|
|
3174
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3165
3175
|
*/
|
|
3166
3176
|
seeInTitle(text: string): void;
|
|
3167
3177
|
/**
|
|
@@ -3181,7 +3191,7 @@ declare namespace CodeceptJS {
|
|
|
3181
3191
|
* I.seeTitleEquals('Test title.');
|
|
3182
3192
|
* ```
|
|
3183
3193
|
* @param text - value to check.
|
|
3184
|
-
*
|
|
3194
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3185
3195
|
*/
|
|
3186
3196
|
seeTitleEquals(text: string): void;
|
|
3187
3197
|
/**
|
|
@@ -3191,7 +3201,7 @@ declare namespace CodeceptJS {
|
|
|
3191
3201
|
* I.dontSeeInTitle('Error');
|
|
3192
3202
|
* ```
|
|
3193
3203
|
* @param text - value to check.
|
|
3194
|
-
*
|
|
3204
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3195
3205
|
*/
|
|
3196
3206
|
dontSeeInTitle(text: string): void;
|
|
3197
3207
|
/**
|
|
@@ -3305,7 +3315,7 @@ declare namespace CodeceptJS {
|
|
|
3305
3315
|
* I.seeElement('#modal');
|
|
3306
3316
|
* ```
|
|
3307
3317
|
* @param locator - located by CSS|XPath|strict locator.
|
|
3308
|
-
*
|
|
3318
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3309
3319
|
*/
|
|
3310
3320
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
3311
3321
|
/**
|
|
@@ -3315,7 +3325,7 @@ declare namespace CodeceptJS {
|
|
|
3315
3325
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
3316
3326
|
* ```
|
|
3317
3327
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3318
|
-
*
|
|
3328
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3319
3329
|
*/
|
|
3320
3330
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
3321
3331
|
/**
|
|
@@ -3326,7 +3336,7 @@ declare namespace CodeceptJS {
|
|
|
3326
3336
|
* I.seeElementInDOM('#modal');
|
|
3327
3337
|
* ```
|
|
3328
3338
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3329
|
-
*
|
|
3339
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3330
3340
|
*/
|
|
3331
3341
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
3332
3342
|
/**
|
|
@@ -3336,7 +3346,7 @@ declare namespace CodeceptJS {
|
|
|
3336
3346
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
3337
3347
|
* ```
|
|
3338
3348
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
3339
|
-
*
|
|
3349
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3340
3350
|
*/
|
|
3341
3351
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
3342
3352
|
/**
|
|
@@ -3379,7 +3389,7 @@ declare namespace CodeceptJS {
|
|
|
3379
3389
|
* ```
|
|
3380
3390
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3381
3391
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3382
|
-
*
|
|
3392
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3383
3393
|
* @param [opts] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
3384
3394
|
*
|
|
3385
3395
|
* Examples:
|
|
@@ -3424,7 +3434,7 @@ declare namespace CodeceptJS {
|
|
|
3424
3434
|
* ```
|
|
3425
3435
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3426
3436
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3427
|
-
*
|
|
3437
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3428
3438
|
*/
|
|
3429
3439
|
forceClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3430
3440
|
/**
|
|
@@ -3439,7 +3449,7 @@ declare namespace CodeceptJS {
|
|
|
3439
3449
|
* ```
|
|
3440
3450
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3441
3451
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3442
|
-
*
|
|
3452
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3443
3453
|
*/
|
|
3444
3454
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3445
3455
|
/**
|
|
@@ -3455,7 +3465,7 @@ declare namespace CodeceptJS {
|
|
|
3455
3465
|
* ```
|
|
3456
3466
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
3457
3467
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
3458
|
-
*
|
|
3468
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3459
3469
|
*/
|
|
3460
3470
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
3461
3471
|
/**
|
|
@@ -3471,7 +3481,8 @@ declare namespace CodeceptJS {
|
|
|
3471
3481
|
* ```
|
|
3472
3482
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3473
3483
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
3474
|
-
*
|
|
3484
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3485
|
+
*
|
|
3475
3486
|
*
|
|
3476
3487
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
3477
3488
|
*
|
|
@@ -3497,7 +3508,8 @@ declare namespace CodeceptJS {
|
|
|
3497
3508
|
* ```
|
|
3498
3509
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
3499
3510
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
3500
|
-
*
|
|
3511
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3512
|
+
*
|
|
3501
3513
|
*
|
|
3502
3514
|
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
3503
3515
|
*
|
|
@@ -3519,7 +3531,7 @@ declare namespace CodeceptJS {
|
|
|
3519
3531
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
3520
3532
|
* ```
|
|
3521
3533
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3522
|
-
*
|
|
3534
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3523
3535
|
*/
|
|
3524
3536
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
3525
3537
|
/**
|
|
@@ -3531,7 +3543,7 @@ declare namespace CodeceptJS {
|
|
|
3531
3543
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
3532
3544
|
* ```
|
|
3533
3545
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3534
|
-
*
|
|
3546
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3535
3547
|
*/
|
|
3536
3548
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
3537
3549
|
/**
|
|
@@ -3545,7 +3557,7 @@ declare namespace CodeceptJS {
|
|
|
3545
3557
|
* I.pressKeyUp('Control');
|
|
3546
3558
|
* ```
|
|
3547
3559
|
* @param key - name of key to press down.
|
|
3548
|
-
*
|
|
3560
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3549
3561
|
*/
|
|
3550
3562
|
pressKeyDown(key: string): void;
|
|
3551
3563
|
/**
|
|
@@ -3559,7 +3571,7 @@ declare namespace CodeceptJS {
|
|
|
3559
3571
|
* I.pressKeyUp('Control');
|
|
3560
3572
|
* ```
|
|
3561
3573
|
* @param key - name of key to release.
|
|
3562
|
-
*
|
|
3574
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3563
3575
|
*/
|
|
3564
3576
|
pressKeyUp(key: string): void;
|
|
3565
3577
|
/**
|
|
@@ -3621,7 +3633,7 @@ declare namespace CodeceptJS {
|
|
|
3621
3633
|
* - `'Space'`
|
|
3622
3634
|
* - `'Tab'`
|
|
3623
3635
|
* @param key - key or array of keys to press.
|
|
3624
|
-
*
|
|
3636
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3625
3637
|
*
|
|
3626
3638
|
*
|
|
3627
3639
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
@@ -3644,7 +3656,7 @@ declare namespace CodeceptJS {
|
|
|
3644
3656
|
* ```
|
|
3645
3657
|
* @param key - or array of keys to type.
|
|
3646
3658
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
3647
|
-
*
|
|
3659
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3648
3660
|
*/
|
|
3649
3661
|
type(key: string | string[], delay?: number): void;
|
|
3650
3662
|
/**
|
|
@@ -3663,7 +3675,7 @@ declare namespace CodeceptJS {
|
|
|
3663
3675
|
* ```
|
|
3664
3676
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3665
3677
|
* @param value - text value to fill.
|
|
3666
|
-
*
|
|
3678
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3667
3679
|
*/
|
|
3668
3680
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
3669
3681
|
/**
|
|
@@ -3675,7 +3687,7 @@ declare namespace CodeceptJS {
|
|
|
3675
3687
|
* I.clearField('#email');
|
|
3676
3688
|
* ```
|
|
3677
3689
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
3678
|
-
*
|
|
3690
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
3679
3691
|
*/
|
|
3680
3692
|
clearField(editable: LocatorOrString): void;
|
|
3681
3693
|
/**
|
|
@@ -3687,7 +3699,7 @@ declare namespace CodeceptJS {
|
|
|
3687
3699
|
* ```
|
|
3688
3700
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
3689
3701
|
* @param value - text value to append.
|
|
3690
|
-
*
|
|
3702
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3691
3703
|
*/
|
|
3692
3704
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3693
3705
|
/**
|
|
@@ -3702,7 +3714,7 @@ declare namespace CodeceptJS {
|
|
|
3702
3714
|
* ```
|
|
3703
3715
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3704
3716
|
* @param value - value to check.
|
|
3705
|
-
*
|
|
3717
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3706
3718
|
*/
|
|
3707
3719
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3708
3720
|
/**
|
|
@@ -3715,12 +3727,12 @@ declare namespace CodeceptJS {
|
|
|
3715
3727
|
* ```
|
|
3716
3728
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
3717
3729
|
* @param value - value to check.
|
|
3718
|
-
*
|
|
3730
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3719
3731
|
*/
|
|
3720
3732
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
3721
3733
|
/**
|
|
3722
3734
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
3723
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
3735
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
3724
3736
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
3725
3737
|
*
|
|
3726
3738
|
* ```js
|
|
@@ -3728,8 +3740,8 @@ declare namespace CodeceptJS {
|
|
|
3728
3740
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
3729
3741
|
* ```
|
|
3730
3742
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
3731
|
-
* @param pathToFile - local file path relative to codecept.
|
|
3732
|
-
*
|
|
3743
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
3744
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3733
3745
|
*/
|
|
3734
3746
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
3735
3747
|
/**
|
|
@@ -3753,7 +3765,7 @@ declare namespace CodeceptJS {
|
|
|
3753
3765
|
* ```
|
|
3754
3766
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
3755
3767
|
* @param option - visible text or value of option.
|
|
3756
|
-
*
|
|
3768
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3757
3769
|
*/
|
|
3758
3770
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
3759
3771
|
/**
|
|
@@ -3774,13 +3786,13 @@ declare namespace CodeceptJS {
|
|
|
3774
3786
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
3775
3787
|
* ```
|
|
3776
3788
|
* @param url - a fragment to check
|
|
3777
|
-
*
|
|
3789
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3778
3790
|
*/
|
|
3779
3791
|
seeInCurrentUrl(url: string): void;
|
|
3780
3792
|
/**
|
|
3781
3793
|
* Checks that current url does not contain a provided fragment.
|
|
3782
3794
|
* @param url - value to check.
|
|
3783
|
-
*
|
|
3795
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3784
3796
|
*/
|
|
3785
3797
|
dontSeeInCurrentUrl(url: string): void;
|
|
3786
3798
|
/**
|
|
@@ -3793,7 +3805,7 @@ declare namespace CodeceptJS {
|
|
|
3793
3805
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
3794
3806
|
* ```
|
|
3795
3807
|
* @param url - value to check.
|
|
3796
|
-
*
|
|
3808
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3797
3809
|
*/
|
|
3798
3810
|
seeCurrentUrlEquals(url: string): void;
|
|
3799
3811
|
/**
|
|
@@ -3805,7 +3817,7 @@ declare namespace CodeceptJS {
|
|
|
3805
3817
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
3806
3818
|
* ```
|
|
3807
3819
|
* @param url - value to check.
|
|
3808
|
-
*
|
|
3820
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3809
3821
|
*/
|
|
3810
3822
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
3811
3823
|
/**
|
|
@@ -3819,7 +3831,7 @@ declare namespace CodeceptJS {
|
|
|
3819
3831
|
* ```
|
|
3820
3832
|
* @param text - expected on page.
|
|
3821
3833
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
3822
|
-
*
|
|
3834
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3823
3835
|
*/
|
|
3824
3836
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3825
3837
|
/**
|
|
@@ -3830,7 +3842,7 @@ declare namespace CodeceptJS {
|
|
|
3830
3842
|
* ```
|
|
3831
3843
|
* @param text - element value to check.
|
|
3832
3844
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
3833
|
-
*
|
|
3845
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3834
3846
|
*/
|
|
3835
3847
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3836
3848
|
/**
|
|
@@ -3843,7 +3855,7 @@ declare namespace CodeceptJS {
|
|
|
3843
3855
|
* ```
|
|
3844
3856
|
* @param text - which is not present.
|
|
3845
3857
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
3846
|
-
*
|
|
3858
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3847
3859
|
*/
|
|
3848
3860
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
3849
3861
|
/**
|
|
@@ -3885,7 +3897,7 @@ declare namespace CodeceptJS {
|
|
|
3885
3897
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
3886
3898
|
* ```
|
|
3887
3899
|
* @param text - value to check.
|
|
3888
|
-
*
|
|
3900
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3889
3901
|
*/
|
|
3890
3902
|
seeInSource(text: string): void;
|
|
3891
3903
|
/**
|
|
@@ -3895,7 +3907,7 @@ declare namespace CodeceptJS {
|
|
|
3895
3907
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
3896
3908
|
* ```
|
|
3897
3909
|
* @param value - to check.
|
|
3898
|
-
*
|
|
3910
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3899
3911
|
*/
|
|
3900
3912
|
dontSeeInSource(value: string): void;
|
|
3901
3913
|
/**
|
|
@@ -3908,7 +3920,7 @@ declare namespace CodeceptJS {
|
|
|
3908
3920
|
* ```
|
|
3909
3921
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3910
3922
|
* @param num - number of elements.
|
|
3911
|
-
*
|
|
3923
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3912
3924
|
*/
|
|
3913
3925
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
3914
3926
|
/**
|
|
@@ -3920,7 +3932,7 @@ declare namespace CodeceptJS {
|
|
|
3920
3932
|
* ```
|
|
3921
3933
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
3922
3934
|
* @param num - number of elements.
|
|
3923
|
-
*
|
|
3935
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3924
3936
|
*/
|
|
3925
3937
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
3926
3938
|
/**
|
|
@@ -3938,7 +3950,7 @@ declare namespace CodeceptJS {
|
|
|
3938
3950
|
* ]);
|
|
3939
3951
|
* ```
|
|
3940
3952
|
* @param cookie - a cookie object or array of cookie objects.
|
|
3941
|
-
*
|
|
3953
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3942
3954
|
*/
|
|
3943
3955
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
3944
3956
|
/**
|
|
@@ -3948,7 +3960,7 @@ declare namespace CodeceptJS {
|
|
|
3948
3960
|
* I.seeCookie('Auth');
|
|
3949
3961
|
* ```
|
|
3950
3962
|
* @param name - cookie name.
|
|
3951
|
-
*
|
|
3963
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3952
3964
|
*/
|
|
3953
3965
|
seeCookie(name: string): void;
|
|
3954
3966
|
/**
|
|
@@ -3958,7 +3970,7 @@ declare namespace CodeceptJS {
|
|
|
3958
3970
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
3959
3971
|
* ```
|
|
3960
3972
|
* @param name - cookie name.
|
|
3961
|
-
*
|
|
3973
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3962
3974
|
*/
|
|
3963
3975
|
dontSeeCookie(name: string): void;
|
|
3964
3976
|
/**
|
|
@@ -3986,7 +3998,7 @@ declare namespace CodeceptJS {
|
|
|
3986
3998
|
* I.clearCookie('test');
|
|
3987
3999
|
* ```
|
|
3988
4000
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
3989
|
-
*
|
|
4001
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
3990
4002
|
*/
|
|
3991
4003
|
clearCookie(cookie?: string): void;
|
|
3992
4004
|
/**
|
|
@@ -4118,7 +4130,7 @@ declare namespace CodeceptJS {
|
|
|
4118
4130
|
* ```
|
|
4119
4131
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4120
4132
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
4121
|
-
*
|
|
4133
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4122
4134
|
*/
|
|
4123
4135
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
4124
4136
|
/**
|
|
@@ -4129,7 +4141,7 @@ declare namespace CodeceptJS {
|
|
|
4129
4141
|
* ```
|
|
4130
4142
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4131
4143
|
* @param attributes - attributes and their values to check.
|
|
4132
|
-
*
|
|
4144
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4133
4145
|
*/
|
|
4134
4146
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
4135
4147
|
/**
|
|
@@ -4142,7 +4154,7 @@ declare namespace CodeceptJS {
|
|
|
4142
4154
|
* ```
|
|
4143
4155
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
4144
4156
|
* @param offsetX - position to drag.
|
|
4145
|
-
*
|
|
4157
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4146
4158
|
*/
|
|
4147
4159
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
4148
4160
|
/**
|
|
@@ -4171,7 +4183,7 @@ declare namespace CodeceptJS {
|
|
|
4171
4183
|
*/
|
|
4172
4184
|
grabAttributeFromAll(locator: CodeceptJS.LocatorOrString, attr: string): Promise<string[]>;
|
|
4173
4185
|
/**
|
|
4174
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
4186
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
4175
4187
|
* Filename is relative to output folder.
|
|
4176
4188
|
*
|
|
4177
4189
|
* ```js
|
|
@@ -4179,11 +4191,11 @@ declare namespace CodeceptJS {
|
|
|
4179
4191
|
* ```
|
|
4180
4192
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4181
4193
|
* @param fileName - file name to save.
|
|
4182
|
-
*
|
|
4194
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4183
4195
|
*/
|
|
4184
4196
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
4185
4197
|
/**
|
|
4186
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
4198
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
4187
4199
|
* Filename is relative to output folder.
|
|
4188
4200
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
4189
4201
|
*
|
|
@@ -4193,7 +4205,7 @@ declare namespace CodeceptJS {
|
|
|
4193
4205
|
* ```
|
|
4194
4206
|
* @param fileName - file name to save.
|
|
4195
4207
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
4196
|
-
*
|
|
4208
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4197
4209
|
*/
|
|
4198
4210
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
4199
4211
|
/**
|
|
@@ -4220,7 +4232,7 @@ declare namespace CodeceptJS {
|
|
|
4220
4232
|
* I.wait(2); // wait 2 secs
|
|
4221
4233
|
* ```
|
|
4222
4234
|
* @param sec - number of second to wait.
|
|
4223
|
-
*
|
|
4235
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4224
4236
|
*/
|
|
4225
4237
|
wait(sec: number): void;
|
|
4226
4238
|
/**
|
|
@@ -4228,7 +4240,7 @@ declare namespace CodeceptJS {
|
|
|
4228
4240
|
* Element can be located by CSS or XPath.
|
|
4229
4241
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4230
4242
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
4231
|
-
*
|
|
4243
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4232
4244
|
*/
|
|
4233
4245
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4234
4246
|
/**
|
|
@@ -4240,7 +4252,7 @@ declare namespace CodeceptJS {
|
|
|
4240
4252
|
* @param field - input field.
|
|
4241
4253
|
* @param value - expected value.
|
|
4242
4254
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4243
|
-
*
|
|
4255
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4244
4256
|
*/
|
|
4245
4257
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
4246
4258
|
/**
|
|
@@ -4252,7 +4264,7 @@ declare namespace CodeceptJS {
|
|
|
4252
4264
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4253
4265
|
* @param num - number of elements.
|
|
4254
4266
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4255
|
-
*
|
|
4267
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4256
4268
|
*/
|
|
4257
4269
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
4258
4270
|
/**
|
|
@@ -4265,7 +4277,7 @@ declare namespace CodeceptJS {
|
|
|
4265
4277
|
* ```
|
|
4266
4278
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4267
4279
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4268
|
-
*
|
|
4280
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4269
4281
|
*/
|
|
4270
4282
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4271
4283
|
/**
|
|
@@ -4278,7 +4290,7 @@ declare namespace CodeceptJS {
|
|
|
4278
4290
|
* ```
|
|
4279
4291
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4280
4292
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
4281
|
-
*
|
|
4293
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4282
4294
|
*/
|
|
4283
4295
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4284
4296
|
/**
|
|
@@ -4290,7 +4302,8 @@ declare namespace CodeceptJS {
|
|
|
4290
4302
|
* ```
|
|
4291
4303
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4292
4304
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4293
|
-
*
|
|
4305
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4306
|
+
*
|
|
4294
4307
|
*
|
|
4295
4308
|
* This method accepts [React selectors](https://codecept.io/react).
|
|
4296
4309
|
*/
|
|
@@ -4304,7 +4317,7 @@ declare namespace CodeceptJS {
|
|
|
4304
4317
|
* ```
|
|
4305
4318
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4306
4319
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4307
|
-
*
|
|
4320
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4308
4321
|
*/
|
|
4309
4322
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4310
4323
|
/**
|
|
@@ -4316,7 +4329,7 @@ declare namespace CodeceptJS {
|
|
|
4316
4329
|
* ```
|
|
4317
4330
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4318
4331
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4319
|
-
*
|
|
4332
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4320
4333
|
*/
|
|
4321
4334
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4322
4335
|
/**
|
|
@@ -4327,7 +4340,7 @@ declare namespace CodeceptJS {
|
|
|
4327
4340
|
* ```
|
|
4328
4341
|
* @param urlPart - value to check.
|
|
4329
4342
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4330
|
-
*
|
|
4343
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4331
4344
|
*/
|
|
4332
4345
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
4333
4346
|
/**
|
|
@@ -4339,7 +4352,7 @@ declare namespace CodeceptJS {
|
|
|
4339
4352
|
* ```
|
|
4340
4353
|
* @param urlPart - value to check.
|
|
4341
4354
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4342
|
-
*
|
|
4355
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4343
4356
|
*/
|
|
4344
4357
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
4345
4358
|
/**
|
|
@@ -4354,7 +4367,7 @@ declare namespace CodeceptJS {
|
|
|
4354
4367
|
* @param text - to wait for.
|
|
4355
4368
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4356
4369
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
4357
|
-
*
|
|
4370
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4358
4371
|
*/
|
|
4359
4372
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
4360
4373
|
/**
|
|
@@ -4385,7 +4398,7 @@ declare namespace CodeceptJS {
|
|
|
4385
4398
|
* I.switchTo(); // switch back to main page
|
|
4386
4399
|
* ```
|
|
4387
4400
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
4388
|
-
*
|
|
4401
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4389
4402
|
*/
|
|
4390
4403
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
4391
4404
|
/**
|
|
@@ -4404,7 +4417,7 @@ declare namespace CodeceptJS {
|
|
|
4404
4417
|
* @param fn - to be executed in browser context.
|
|
4405
4418
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
4406
4419
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
4407
|
-
*
|
|
4420
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4408
4421
|
*/
|
|
4409
4422
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
4410
4423
|
/**
|
|
@@ -4422,7 +4435,7 @@ declare namespace CodeceptJS {
|
|
|
4422
4435
|
* ```
|
|
4423
4436
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
4424
4437
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4425
|
-
*
|
|
4438
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4426
4439
|
*/
|
|
4427
4440
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
4428
4441
|
/**
|
|
@@ -4539,7 +4552,7 @@ declare namespace CodeceptJS {
|
|
|
4539
4552
|
*
|
|
4540
4553
|
* ### Configuration
|
|
4541
4554
|
*
|
|
4542
|
-
* This helper should be configured in codecept.
|
|
4555
|
+
* This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
4543
4556
|
*
|
|
4544
4557
|
* * `url` - base url of website to be tested
|
|
4545
4558
|
* * `browser` - browser in which perform testing
|
|
@@ -4723,7 +4736,7 @@ declare namespace CodeceptJS {
|
|
|
4723
4736
|
* ```
|
|
4724
4737
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4725
4738
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4726
|
-
*
|
|
4739
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4727
4740
|
*/
|
|
4728
4741
|
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
4729
4742
|
/**
|
|
@@ -4738,7 +4751,7 @@ declare namespace CodeceptJS {
|
|
|
4738
4751
|
* ```
|
|
4739
4752
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
4740
4753
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
4741
|
-
*
|
|
4754
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4742
4755
|
*/
|
|
4743
4756
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4744
4757
|
/**
|
|
@@ -4754,7 +4767,7 @@ declare namespace CodeceptJS {
|
|
|
4754
4767
|
* ```
|
|
4755
4768
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
4756
4769
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
4757
|
-
*
|
|
4770
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4758
4771
|
*/
|
|
4759
4772
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4760
4773
|
/**
|
|
@@ -4768,7 +4781,7 @@ declare namespace CodeceptJS {
|
|
|
4768
4781
|
* @param locator - located by CSS|XPath|strict locator.
|
|
4769
4782
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
4770
4783
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
4771
|
-
*
|
|
4784
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4772
4785
|
*/
|
|
4773
4786
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
4774
4787
|
/**
|
|
@@ -4782,7 +4795,7 @@ declare namespace CodeceptJS {
|
|
|
4782
4795
|
* ```
|
|
4783
4796
|
* @param text - expected on page.
|
|
4784
4797
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
4785
|
-
*
|
|
4798
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4786
4799
|
*/
|
|
4787
4800
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4788
4801
|
/**
|
|
@@ -4793,7 +4806,7 @@ declare namespace CodeceptJS {
|
|
|
4793
4806
|
* ```
|
|
4794
4807
|
* @param text - element value to check.
|
|
4795
4808
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
4796
|
-
*
|
|
4809
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4797
4810
|
*/
|
|
4798
4811
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4799
4812
|
/**
|
|
@@ -4806,7 +4819,7 @@ declare namespace CodeceptJS {
|
|
|
4806
4819
|
* ```
|
|
4807
4820
|
* @param text - which is not present.
|
|
4808
4821
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
4809
|
-
*
|
|
4822
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4810
4823
|
*/
|
|
4811
4824
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
4812
4825
|
/**
|
|
@@ -4852,7 +4865,7 @@ declare namespace CodeceptJS {
|
|
|
4852
4865
|
* ```
|
|
4853
4866
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
4854
4867
|
* @param option - visible text or value of option.
|
|
4855
|
-
*
|
|
4868
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4856
4869
|
*/
|
|
4857
4870
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
4858
4871
|
/**
|
|
@@ -4871,7 +4884,7 @@ declare namespace CodeceptJS {
|
|
|
4871
4884
|
* ```
|
|
4872
4885
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4873
4886
|
* @param value - text value to fill.
|
|
4874
|
-
*
|
|
4887
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4875
4888
|
*/
|
|
4876
4889
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
4877
4890
|
/**
|
|
@@ -4885,13 +4898,14 @@ declare namespace CodeceptJS {
|
|
|
4885
4898
|
* I.pressKey(['Control','a']);
|
|
4886
4899
|
* ```
|
|
4887
4900
|
* @param key - key or array of keys to press.
|
|
4888
|
-
*
|
|
4901
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4902
|
+
*
|
|
4889
4903
|
* {{ keys }}
|
|
4890
4904
|
*/
|
|
4891
4905
|
pressKey(key: string | string[]): void;
|
|
4892
4906
|
/**
|
|
4893
4907
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
4894
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
4908
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
4895
4909
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
4896
4910
|
*
|
|
4897
4911
|
* ```js
|
|
@@ -4899,8 +4913,8 @@ declare namespace CodeceptJS {
|
|
|
4899
4913
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
4900
4914
|
* ```
|
|
4901
4915
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
4902
|
-
* @param pathToFile - local file path relative to codecept.
|
|
4903
|
-
*
|
|
4916
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
4917
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4904
4918
|
*/
|
|
4905
4919
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
4906
4920
|
/**
|
|
@@ -4915,7 +4929,7 @@ declare namespace CodeceptJS {
|
|
|
4915
4929
|
* ```
|
|
4916
4930
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4917
4931
|
* @param value - value to check.
|
|
4918
|
-
*
|
|
4932
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4919
4933
|
*/
|
|
4920
4934
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4921
4935
|
/**
|
|
@@ -4928,7 +4942,7 @@ declare namespace CodeceptJS {
|
|
|
4928
4942
|
* ```
|
|
4929
4943
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4930
4944
|
* @param value - value to check.
|
|
4931
|
-
*
|
|
4945
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4932
4946
|
*/
|
|
4933
4947
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4934
4948
|
/**
|
|
@@ -4940,7 +4954,7 @@ declare namespace CodeceptJS {
|
|
|
4940
4954
|
* ```
|
|
4941
4955
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
4942
4956
|
* @param value - text value to append.
|
|
4943
|
-
*
|
|
4957
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4944
4958
|
*/
|
|
4945
4959
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
4946
4960
|
/**
|
|
@@ -4952,7 +4966,7 @@ declare namespace CodeceptJS {
|
|
|
4952
4966
|
* I.clearField('#email');
|
|
4953
4967
|
* ```
|
|
4954
4968
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
4955
|
-
*
|
|
4969
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
4956
4970
|
*/
|
|
4957
4971
|
clearField(editable: LocatorOrString): void;
|
|
4958
4972
|
/**
|
|
@@ -4968,7 +4982,7 @@ declare namespace CodeceptJS {
|
|
|
4968
4982
|
* ```
|
|
4969
4983
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4970
4984
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4971
|
-
*
|
|
4985
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4972
4986
|
*/
|
|
4973
4987
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4974
4988
|
/**
|
|
@@ -4984,7 +4998,7 @@ declare namespace CodeceptJS {
|
|
|
4984
4998
|
* ```
|
|
4985
4999
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
4986
5000
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
4987
|
-
*
|
|
5001
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
4988
5002
|
*/
|
|
4989
5003
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
4990
5004
|
/**
|
|
@@ -4996,7 +5010,7 @@ declare namespace CodeceptJS {
|
|
|
4996
5010
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
4997
5011
|
* ```
|
|
4998
5012
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
4999
|
-
*
|
|
5013
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5000
5014
|
*/
|
|
5001
5015
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
5002
5016
|
/**
|
|
@@ -5008,7 +5022,7 @@ declare namespace CodeceptJS {
|
|
|
5008
5022
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
5009
5023
|
* ```
|
|
5010
5024
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
5011
|
-
*
|
|
5025
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5012
5026
|
*/
|
|
5013
5027
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
5014
5028
|
/**
|
|
@@ -5137,7 +5151,7 @@ declare namespace CodeceptJS {
|
|
|
5137
5151
|
* I.seeInTitle('Home Page');
|
|
5138
5152
|
* ```
|
|
5139
5153
|
* @param text - text value to check.
|
|
5140
|
-
*
|
|
5154
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5141
5155
|
*/
|
|
5142
5156
|
seeInTitle(text: string): void;
|
|
5143
5157
|
/**
|
|
@@ -5147,7 +5161,7 @@ declare namespace CodeceptJS {
|
|
|
5147
5161
|
* I.seeTitleEquals('Test title.');
|
|
5148
5162
|
* ```
|
|
5149
5163
|
* @param text - value to check.
|
|
5150
|
-
*
|
|
5164
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5151
5165
|
*/
|
|
5152
5166
|
seeTitleEquals(text: string): void;
|
|
5153
5167
|
/**
|
|
@@ -5157,7 +5171,7 @@ declare namespace CodeceptJS {
|
|
|
5157
5171
|
* I.dontSeeInTitle('Error');
|
|
5158
5172
|
* ```
|
|
5159
5173
|
* @param text - value to check.
|
|
5160
|
-
*
|
|
5174
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5161
5175
|
*/
|
|
5162
5176
|
dontSeeInTitle(text: string): void;
|
|
5163
5177
|
/**
|
|
@@ -5178,7 +5192,7 @@ declare namespace CodeceptJS {
|
|
|
5178
5192
|
* I.seeElement('#modal');
|
|
5179
5193
|
* ```
|
|
5180
5194
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5181
|
-
*
|
|
5195
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5182
5196
|
*/
|
|
5183
5197
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
5184
5198
|
/**
|
|
@@ -5188,7 +5202,7 @@ declare namespace CodeceptJS {
|
|
|
5188
5202
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
5189
5203
|
* ```
|
|
5190
5204
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5191
|
-
*
|
|
5205
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5192
5206
|
*/
|
|
5193
5207
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
5194
5208
|
/**
|
|
@@ -5199,7 +5213,7 @@ declare namespace CodeceptJS {
|
|
|
5199
5213
|
* I.seeElementInDOM('#modal');
|
|
5200
5214
|
* ```
|
|
5201
5215
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5202
|
-
*
|
|
5216
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5203
5217
|
*/
|
|
5204
5218
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
5205
5219
|
/**
|
|
@@ -5209,7 +5223,7 @@ declare namespace CodeceptJS {
|
|
|
5209
5223
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
5210
5224
|
* ```
|
|
5211
5225
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
5212
|
-
*
|
|
5226
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5213
5227
|
*/
|
|
5214
5228
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
5215
5229
|
/**
|
|
@@ -5219,7 +5233,7 @@ declare namespace CodeceptJS {
|
|
|
5219
5233
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
5220
5234
|
* ```
|
|
5221
5235
|
* @param text - value to check.
|
|
5222
|
-
*
|
|
5236
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5223
5237
|
*/
|
|
5224
5238
|
seeInSource(text: string): void;
|
|
5225
5239
|
/**
|
|
@@ -5239,7 +5253,7 @@ declare namespace CodeceptJS {
|
|
|
5239
5253
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
5240
5254
|
* ```
|
|
5241
5255
|
* @param value - to check.
|
|
5242
|
-
*
|
|
5256
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5243
5257
|
*/
|
|
5244
5258
|
dontSeeInSource(value: string): void;
|
|
5245
5259
|
/**
|
|
@@ -5252,7 +5266,7 @@ declare namespace CodeceptJS {
|
|
|
5252
5266
|
* ```
|
|
5253
5267
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5254
5268
|
* @param num - number of elements.
|
|
5255
|
-
*
|
|
5269
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5256
5270
|
*/
|
|
5257
5271
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
5258
5272
|
/**
|
|
@@ -5264,7 +5278,7 @@ declare namespace CodeceptJS {
|
|
|
5264
5278
|
* ```
|
|
5265
5279
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5266
5280
|
* @param num - number of elements.
|
|
5267
|
-
*
|
|
5281
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5268
5282
|
*/
|
|
5269
5283
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
5270
5284
|
/**
|
|
@@ -5286,7 +5300,7 @@ declare namespace CodeceptJS {
|
|
|
5286
5300
|
* ```
|
|
5287
5301
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5288
5302
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
5289
|
-
*
|
|
5303
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5290
5304
|
*/
|
|
5291
5305
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
5292
5306
|
/**
|
|
@@ -5297,7 +5311,7 @@ declare namespace CodeceptJS {
|
|
|
5297
5311
|
* ```
|
|
5298
5312
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5299
5313
|
* @param attributes - attributes and their values to check.
|
|
5300
|
-
*
|
|
5314
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5301
5315
|
*/
|
|
5302
5316
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
5303
5317
|
/**
|
|
@@ -5325,7 +5339,7 @@ declare namespace CodeceptJS {
|
|
|
5325
5339
|
* ```
|
|
5326
5340
|
* @param fn - function to be executed in browser context.
|
|
5327
5341
|
* @param args - to be passed to function.
|
|
5328
|
-
*
|
|
5342
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5329
5343
|
*/
|
|
5330
5344
|
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
5331
5345
|
/**
|
|
@@ -5351,7 +5365,7 @@ declare namespace CodeceptJS {
|
|
|
5351
5365
|
* ```
|
|
5352
5366
|
* @param fn - function to be executed in browser context.
|
|
5353
5367
|
* @param args - to be passed to function.
|
|
5354
|
-
*
|
|
5368
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5355
5369
|
*/
|
|
5356
5370
|
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
5357
5371
|
/**
|
|
@@ -5361,13 +5375,13 @@ declare namespace CodeceptJS {
|
|
|
5361
5375
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
5362
5376
|
* ```
|
|
5363
5377
|
* @param url - a fragment to check
|
|
5364
|
-
*
|
|
5378
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5365
5379
|
*/
|
|
5366
5380
|
seeInCurrentUrl(url: string): void;
|
|
5367
5381
|
/**
|
|
5368
5382
|
* Checks that current url does not contain a provided fragment.
|
|
5369
5383
|
* @param url - value to check.
|
|
5370
|
-
*
|
|
5384
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5371
5385
|
*/
|
|
5372
5386
|
dontSeeInCurrentUrl(url: string): void;
|
|
5373
5387
|
/**
|
|
@@ -5380,7 +5394,7 @@ declare namespace CodeceptJS {
|
|
|
5380
5394
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
5381
5395
|
* ```
|
|
5382
5396
|
* @param url - value to check.
|
|
5383
|
-
*
|
|
5397
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5384
5398
|
*/
|
|
5385
5399
|
seeCurrentUrlEquals(url: string): void;
|
|
5386
5400
|
/**
|
|
@@ -5392,11 +5406,11 @@ declare namespace CodeceptJS {
|
|
|
5392
5406
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
5393
5407
|
* ```
|
|
5394
5408
|
* @param url - value to check.
|
|
5395
|
-
*
|
|
5409
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5396
5410
|
*/
|
|
5397
5411
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
5398
5412
|
/**
|
|
5399
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
5413
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5400
5414
|
* Filename is relative to output folder.
|
|
5401
5415
|
*
|
|
5402
5416
|
* ```js
|
|
@@ -5404,11 +5418,11 @@ declare namespace CodeceptJS {
|
|
|
5404
5418
|
* ```
|
|
5405
5419
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5406
5420
|
* @param fileName - file name to save.
|
|
5407
|
-
*
|
|
5421
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5408
5422
|
*/
|
|
5409
5423
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
5410
5424
|
/**
|
|
5411
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
5425
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
5412
5426
|
* Filename is relative to output folder.
|
|
5413
5427
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
5414
5428
|
*
|
|
@@ -5418,7 +5432,7 @@ declare namespace CodeceptJS {
|
|
|
5418
5432
|
* ```
|
|
5419
5433
|
* @param fileName - file name to save.
|
|
5420
5434
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
5421
|
-
*
|
|
5435
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5422
5436
|
*/
|
|
5423
5437
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
5424
5438
|
/**
|
|
@@ -5430,7 +5444,7 @@ declare namespace CodeceptJS {
|
|
|
5430
5444
|
* I.clearCookie('test');
|
|
5431
5445
|
* ```
|
|
5432
5446
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
5433
|
-
*
|
|
5447
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5434
5448
|
*/
|
|
5435
5449
|
clearCookie(cookie?: string): void;
|
|
5436
5450
|
/**
|
|
@@ -5440,7 +5454,7 @@ declare namespace CodeceptJS {
|
|
|
5440
5454
|
* I.seeCookie('Auth');
|
|
5441
5455
|
* ```
|
|
5442
5456
|
* @param name - cookie name.
|
|
5443
|
-
*
|
|
5457
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5444
5458
|
*/
|
|
5445
5459
|
seeCookie(name: string): void;
|
|
5446
5460
|
/**
|
|
@@ -5450,7 +5464,7 @@ declare namespace CodeceptJS {
|
|
|
5450
5464
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
5451
5465
|
* ```
|
|
5452
5466
|
* @param name - cookie name.
|
|
5453
|
-
*
|
|
5467
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5454
5468
|
*/
|
|
5455
5469
|
dontSeeCookie(name: string): void;
|
|
5456
5470
|
/**
|
|
@@ -5487,7 +5501,7 @@ declare namespace CodeceptJS {
|
|
|
5487
5501
|
* I.seeInPopup('Popup text');
|
|
5488
5502
|
* ```
|
|
5489
5503
|
* @param text - value to check.
|
|
5490
|
-
*
|
|
5504
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5491
5505
|
*/
|
|
5492
5506
|
seeInPopup(text: string): void;
|
|
5493
5507
|
/**
|
|
@@ -5503,7 +5517,7 @@ declare namespace CodeceptJS {
|
|
|
5503
5517
|
* First parameter can be set to `maximize`.
|
|
5504
5518
|
* @param width - width in pixels or `maximize`.
|
|
5505
5519
|
* @param height - height in pixels.
|
|
5506
|
-
*
|
|
5520
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5507
5521
|
*/
|
|
5508
5522
|
resizeWindow(width: number, height: number): void;
|
|
5509
5523
|
/**
|
|
@@ -5514,7 +5528,7 @@ declare namespace CodeceptJS {
|
|
|
5514
5528
|
* ```
|
|
5515
5529
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
5516
5530
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
5517
|
-
*
|
|
5531
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5518
5532
|
*/
|
|
5519
5533
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
5520
5534
|
/**
|
|
@@ -5582,7 +5596,7 @@ declare namespace CodeceptJS {
|
|
|
5582
5596
|
* I.switchTo(); // switch back to main page
|
|
5583
5597
|
* ```
|
|
5584
5598
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
5585
|
-
*
|
|
5599
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5586
5600
|
*/
|
|
5587
5601
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
5588
5602
|
/**
|
|
@@ -5592,7 +5606,7 @@ declare namespace CodeceptJS {
|
|
|
5592
5606
|
* I.wait(2); // wait 2 secs
|
|
5593
5607
|
* ```
|
|
5594
5608
|
* @param sec - number of second to wait.
|
|
5595
|
-
*
|
|
5609
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5596
5610
|
*/
|
|
5597
5611
|
wait(sec: number): void;
|
|
5598
5612
|
/**
|
|
@@ -5605,7 +5619,7 @@ declare namespace CodeceptJS {
|
|
|
5605
5619
|
* ```
|
|
5606
5620
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5607
5621
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5608
|
-
*
|
|
5622
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5609
5623
|
*/
|
|
5610
5624
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5611
5625
|
/**
|
|
@@ -5617,7 +5631,7 @@ declare namespace CodeceptJS {
|
|
|
5617
5631
|
* ```
|
|
5618
5632
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5619
5633
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5620
|
-
*
|
|
5634
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5621
5635
|
*/
|
|
5622
5636
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5623
5637
|
/**
|
|
@@ -5637,7 +5651,7 @@ declare namespace CodeceptJS {
|
|
|
5637
5651
|
* ```
|
|
5638
5652
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5639
5653
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5640
|
-
*
|
|
5654
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5641
5655
|
*/
|
|
5642
5656
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5643
5657
|
/**
|
|
@@ -5649,7 +5663,7 @@ declare namespace CodeceptJS {
|
|
|
5649
5663
|
* ```
|
|
5650
5664
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5651
5665
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5652
|
-
*
|
|
5666
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5653
5667
|
*/
|
|
5654
5668
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5655
5669
|
/**
|
|
@@ -5661,7 +5675,7 @@ declare namespace CodeceptJS {
|
|
|
5661
5675
|
* ```
|
|
5662
5676
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5663
5677
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5664
|
-
*
|
|
5678
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5665
5679
|
*/
|
|
5666
5680
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5667
5681
|
/**
|
|
@@ -5673,7 +5687,7 @@ declare namespace CodeceptJS {
|
|
|
5673
5687
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5674
5688
|
* @param num - number of elements.
|
|
5675
5689
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5676
|
-
*
|
|
5690
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5677
5691
|
*/
|
|
5678
5692
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
5679
5693
|
/**
|
|
@@ -5681,7 +5695,7 @@ declare namespace CodeceptJS {
|
|
|
5681
5695
|
* Element can be located by CSS or XPath.
|
|
5682
5696
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
5683
5697
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
5684
|
-
*
|
|
5698
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5685
5699
|
*/
|
|
5686
5700
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
5687
5701
|
/**
|
|
@@ -5693,7 +5707,7 @@ declare namespace CodeceptJS {
|
|
|
5693
5707
|
* @param field - input field.
|
|
5694
5708
|
* @param value - expected value.
|
|
5695
5709
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5696
|
-
*
|
|
5710
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5697
5711
|
*/
|
|
5698
5712
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
5699
5713
|
/**
|
|
@@ -5712,7 +5726,7 @@ declare namespace CodeceptJS {
|
|
|
5712
5726
|
* @param fn - to be executed in browser context.
|
|
5713
5727
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
5714
5728
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
5715
|
-
*
|
|
5729
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5716
5730
|
*/
|
|
5717
5731
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
5718
5732
|
/**
|
|
@@ -5723,7 +5737,7 @@ declare namespace CodeceptJS {
|
|
|
5723
5737
|
* ```
|
|
5724
5738
|
* @param urlPart - value to check.
|
|
5725
5739
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5726
|
-
*
|
|
5740
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5727
5741
|
*/
|
|
5728
5742
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
5729
5743
|
/**
|
|
@@ -5735,7 +5749,7 @@ declare namespace CodeceptJS {
|
|
|
5735
5749
|
* ```
|
|
5736
5750
|
* @param urlPart - value to check.
|
|
5737
5751
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5738
|
-
*
|
|
5752
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5739
5753
|
*/
|
|
5740
5754
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
5741
5755
|
/**
|
|
@@ -5750,7 +5764,7 @@ declare namespace CodeceptJS {
|
|
|
5750
5764
|
* @param text - to wait for.
|
|
5751
5765
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
5752
5766
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
5753
|
-
*
|
|
5767
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5754
5768
|
*/
|
|
5755
5769
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
5756
5770
|
/**
|
|
@@ -5763,7 +5777,7 @@ declare namespace CodeceptJS {
|
|
|
5763
5777
|
* ```js
|
|
5764
5778
|
* I.refreshPage();
|
|
5765
5779
|
* ```
|
|
5766
|
-
*
|
|
5780
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5767
5781
|
*/
|
|
5768
5782
|
refreshPage(): void;
|
|
5769
5783
|
/**
|
|
@@ -5781,7 +5795,7 @@ declare namespace CodeceptJS {
|
|
|
5781
5795
|
* @param locator - located by CSS|XPath|strict locator.
|
|
5782
5796
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
5783
5797
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
5784
|
-
*
|
|
5798
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5785
5799
|
*/
|
|
5786
5800
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
5787
5801
|
/**
|
|
@@ -5790,7 +5804,7 @@ declare namespace CodeceptJS {
|
|
|
5790
5804
|
* ```js
|
|
5791
5805
|
* I.scrollPageToTop();
|
|
5792
5806
|
* ```
|
|
5793
|
-
*
|
|
5807
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5794
5808
|
*/
|
|
5795
5809
|
scrollPageToTop(): void;
|
|
5796
5810
|
/**
|
|
@@ -5799,7 +5813,7 @@ declare namespace CodeceptJS {
|
|
|
5799
5813
|
* ```js
|
|
5800
5814
|
* I.scrollPageToBottom();
|
|
5801
5815
|
* ```
|
|
5802
|
-
*
|
|
5816
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5803
5817
|
*/
|
|
5804
5818
|
scrollPageToBottom(): void;
|
|
5805
5819
|
/**
|
|
@@ -5846,7 +5860,7 @@ declare namespace CodeceptJS {
|
|
|
5846
5860
|
* ]);
|
|
5847
5861
|
* ```
|
|
5848
5862
|
* @param cookie - a cookie object or array of cookie objects.
|
|
5849
|
-
*
|
|
5863
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
5850
5864
|
*/
|
|
5851
5865
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
5852
5866
|
}
|
|
@@ -6123,7 +6137,7 @@ declare namespace CodeceptJS {
|
|
|
6123
6137
|
* I.seeInPopup('Popup text');
|
|
6124
6138
|
* ```
|
|
6125
6139
|
* @param text - value to check.
|
|
6126
|
-
*
|
|
6140
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6127
6141
|
*/
|
|
6128
6142
|
seeInPopup(text: string): void;
|
|
6129
6143
|
/**
|
|
@@ -6165,7 +6179,8 @@ declare namespace CodeceptJS {
|
|
|
6165
6179
|
* First parameter can be set to `maximize`.
|
|
6166
6180
|
* @param width - width in pixels or `maximize`.
|
|
6167
6181
|
* @param height - height in pixels.
|
|
6168
|
-
*
|
|
6182
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6183
|
+
*
|
|
6169
6184
|
*
|
|
6170
6185
|
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
6171
6186
|
* Puppeteer does not control the window of a browser so it can't adjust its real size.
|
|
@@ -6194,7 +6209,8 @@ declare namespace CodeceptJS {
|
|
|
6194
6209
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6195
6210
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6196
6211
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6197
|
-
*
|
|
6212
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6213
|
+
*
|
|
6198
6214
|
* {{ react }}
|
|
6199
6215
|
*/
|
|
6200
6216
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
@@ -6206,7 +6222,7 @@ declare namespace CodeceptJS {
|
|
|
6206
6222
|
* ```
|
|
6207
6223
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
6208
6224
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
6209
|
-
*
|
|
6225
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6210
6226
|
*/
|
|
6211
6227
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
6212
6228
|
/**
|
|
@@ -6215,7 +6231,7 @@ declare namespace CodeceptJS {
|
|
|
6215
6231
|
* ```js
|
|
6216
6232
|
* I.refreshPage();
|
|
6217
6233
|
* ```
|
|
6218
|
-
*
|
|
6234
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6219
6235
|
*/
|
|
6220
6236
|
refreshPage(): void;
|
|
6221
6237
|
/**
|
|
@@ -6224,7 +6240,7 @@ declare namespace CodeceptJS {
|
|
|
6224
6240
|
* ```js
|
|
6225
6241
|
* I.scrollPageToTop();
|
|
6226
6242
|
* ```
|
|
6227
|
-
*
|
|
6243
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6228
6244
|
*/
|
|
6229
6245
|
scrollPageToTop(): void;
|
|
6230
6246
|
/**
|
|
@@ -6233,7 +6249,7 @@ declare namespace CodeceptJS {
|
|
|
6233
6249
|
* ```js
|
|
6234
6250
|
* I.scrollPageToBottom();
|
|
6235
6251
|
* ```
|
|
6236
|
-
*
|
|
6252
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6237
6253
|
*/
|
|
6238
6254
|
scrollPageToBottom(): void;
|
|
6239
6255
|
/**
|
|
@@ -6247,7 +6263,7 @@ declare namespace CodeceptJS {
|
|
|
6247
6263
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6248
6264
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
6249
6265
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
6250
|
-
*
|
|
6266
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6251
6267
|
*/
|
|
6252
6268
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
6253
6269
|
/**
|
|
@@ -6257,7 +6273,7 @@ declare namespace CodeceptJS {
|
|
|
6257
6273
|
* I.seeInTitle('Home Page');
|
|
6258
6274
|
* ```
|
|
6259
6275
|
* @param text - text value to check.
|
|
6260
|
-
*
|
|
6276
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6261
6277
|
*/
|
|
6262
6278
|
seeInTitle(text: string): void;
|
|
6263
6279
|
/**
|
|
@@ -6277,7 +6293,7 @@ declare namespace CodeceptJS {
|
|
|
6277
6293
|
* I.seeTitleEquals('Test title.');
|
|
6278
6294
|
* ```
|
|
6279
6295
|
* @param text - value to check.
|
|
6280
|
-
*
|
|
6296
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6281
6297
|
*/
|
|
6282
6298
|
seeTitleEquals(text: string): void;
|
|
6283
6299
|
/**
|
|
@@ -6287,7 +6303,7 @@ declare namespace CodeceptJS {
|
|
|
6287
6303
|
* I.dontSeeInTitle('Error');
|
|
6288
6304
|
* ```
|
|
6289
6305
|
* @param text - value to check.
|
|
6290
|
-
*
|
|
6306
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6291
6307
|
*/
|
|
6292
6308
|
dontSeeInTitle(text: string): void;
|
|
6293
6309
|
/**
|
|
@@ -6396,7 +6412,8 @@ declare namespace CodeceptJS {
|
|
|
6396
6412
|
* I.seeElement('#modal');
|
|
6397
6413
|
* ```
|
|
6398
6414
|
* @param locator - located by CSS|XPath|strict locator.
|
|
6399
|
-
*
|
|
6415
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6416
|
+
*
|
|
6400
6417
|
* {{ react }}
|
|
6401
6418
|
*/
|
|
6402
6419
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -6407,7 +6424,8 @@ declare namespace CodeceptJS {
|
|
|
6407
6424
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
6408
6425
|
* ```
|
|
6409
6426
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6410
|
-
*
|
|
6427
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6428
|
+
*
|
|
6411
6429
|
* {{ react }}
|
|
6412
6430
|
*/
|
|
6413
6431
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -6419,7 +6437,7 @@ declare namespace CodeceptJS {
|
|
|
6419
6437
|
* I.seeElementInDOM('#modal');
|
|
6420
6438
|
* ```
|
|
6421
6439
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
6422
|
-
*
|
|
6440
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6423
6441
|
*/
|
|
6424
6442
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
6425
6443
|
/**
|
|
@@ -6429,7 +6447,7 @@ declare namespace CodeceptJS {
|
|
|
6429
6447
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
6430
6448
|
* ```
|
|
6431
6449
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
6432
|
-
*
|
|
6450
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6433
6451
|
*/
|
|
6434
6452
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
6435
6453
|
/**
|
|
@@ -6456,7 +6474,7 @@ declare namespace CodeceptJS {
|
|
|
6456
6474
|
* ```
|
|
6457
6475
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6458
6476
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6459
|
-
*
|
|
6477
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6460
6478
|
*
|
|
6461
6479
|
*
|
|
6462
6480
|
* {{ react }}
|
|
@@ -6489,7 +6507,7 @@ declare namespace CodeceptJS {
|
|
|
6489
6507
|
* ```
|
|
6490
6508
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6491
6509
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6492
|
-
*
|
|
6510
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6493
6511
|
*
|
|
6494
6512
|
*
|
|
6495
6513
|
* {{ react }}
|
|
@@ -6503,7 +6521,8 @@ declare namespace CodeceptJS {
|
|
|
6503
6521
|
* ```
|
|
6504
6522
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
6505
6523
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
6506
|
-
*
|
|
6524
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6525
|
+
*
|
|
6507
6526
|
*
|
|
6508
6527
|
* {{ react }}
|
|
6509
6528
|
*/
|
|
@@ -6543,7 +6562,8 @@ declare namespace CodeceptJS {
|
|
|
6543
6562
|
* ```
|
|
6544
6563
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
6545
6564
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
6546
|
-
*
|
|
6565
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6566
|
+
*
|
|
6547
6567
|
*
|
|
6548
6568
|
* {{ react }}
|
|
6549
6569
|
*/
|
|
@@ -6561,7 +6581,8 @@ declare namespace CodeceptJS {
|
|
|
6561
6581
|
* ```
|
|
6562
6582
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
6563
6583
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
6564
|
-
*
|
|
6584
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6585
|
+
*
|
|
6565
6586
|
*
|
|
6566
6587
|
* {{ react }}
|
|
6567
6588
|
*/
|
|
@@ -6579,7 +6600,7 @@ declare namespace CodeceptJS {
|
|
|
6579
6600
|
* ```
|
|
6580
6601
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6581
6602
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6582
|
-
*
|
|
6603
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6583
6604
|
*/
|
|
6584
6605
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
6585
6606
|
/**
|
|
@@ -6595,7 +6616,7 @@ declare namespace CodeceptJS {
|
|
|
6595
6616
|
* ```
|
|
6596
6617
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
6597
6618
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
6598
|
-
*
|
|
6619
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6599
6620
|
*/
|
|
6600
6621
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
6601
6622
|
/**
|
|
@@ -6607,7 +6628,7 @@ declare namespace CodeceptJS {
|
|
|
6607
6628
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
6608
6629
|
* ```
|
|
6609
6630
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6610
|
-
*
|
|
6631
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6611
6632
|
*/
|
|
6612
6633
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
6613
6634
|
/**
|
|
@@ -6619,7 +6640,7 @@ declare namespace CodeceptJS {
|
|
|
6619
6640
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
6620
6641
|
* ```
|
|
6621
6642
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6622
|
-
*
|
|
6643
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6623
6644
|
*/
|
|
6624
6645
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
6625
6646
|
/**
|
|
@@ -6633,7 +6654,7 @@ declare namespace CodeceptJS {
|
|
|
6633
6654
|
* I.pressKeyUp('Control');
|
|
6634
6655
|
* ```
|
|
6635
6656
|
* @param key - name of key to press down.
|
|
6636
|
-
*
|
|
6657
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6637
6658
|
*/
|
|
6638
6659
|
pressKeyDown(key: string): void;
|
|
6639
6660
|
/**
|
|
@@ -6647,7 +6668,7 @@ declare namespace CodeceptJS {
|
|
|
6647
6668
|
* I.pressKeyUp('Control');
|
|
6648
6669
|
* ```
|
|
6649
6670
|
* @param key - name of key to release.
|
|
6650
|
-
*
|
|
6671
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6651
6672
|
*/
|
|
6652
6673
|
pressKeyUp(key: string): void;
|
|
6653
6674
|
/**
|
|
@@ -6709,7 +6730,7 @@ declare namespace CodeceptJS {
|
|
|
6709
6730
|
* - `'Space'`
|
|
6710
6731
|
* - `'Tab'`
|
|
6711
6732
|
* @param key - key or array of keys to press.
|
|
6712
|
-
*
|
|
6733
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6713
6734
|
*
|
|
6714
6735
|
*
|
|
6715
6736
|
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
@@ -6732,7 +6753,7 @@ declare namespace CodeceptJS {
|
|
|
6732
6753
|
* ```
|
|
6733
6754
|
* @param key - or array of keys to type.
|
|
6734
6755
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
6735
|
-
*
|
|
6756
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6736
6757
|
*/
|
|
6737
6758
|
type(key: string | string[], delay?: number): void;
|
|
6738
6759
|
/**
|
|
@@ -6751,7 +6772,8 @@ declare namespace CodeceptJS {
|
|
|
6751
6772
|
* ```
|
|
6752
6773
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6753
6774
|
* @param value - text value to fill.
|
|
6754
|
-
*
|
|
6775
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6776
|
+
*
|
|
6755
6777
|
* {{ react }}
|
|
6756
6778
|
*/
|
|
6757
6779
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
@@ -6764,7 +6786,7 @@ declare namespace CodeceptJS {
|
|
|
6764
6786
|
* I.clearField('#email');
|
|
6765
6787
|
* ```
|
|
6766
6788
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
6767
|
-
*
|
|
6789
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
6768
6790
|
*/
|
|
6769
6791
|
clearField(editable: LocatorOrString): void;
|
|
6770
6792
|
/**
|
|
@@ -6776,7 +6798,8 @@ declare namespace CodeceptJS {
|
|
|
6776
6798
|
* ```
|
|
6777
6799
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
6778
6800
|
* @param value - text value to append.
|
|
6779
|
-
*
|
|
6801
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6802
|
+
*
|
|
6780
6803
|
*
|
|
6781
6804
|
* {{ react }}
|
|
6782
6805
|
*/
|
|
@@ -6793,7 +6816,7 @@ declare namespace CodeceptJS {
|
|
|
6793
6816
|
* ```
|
|
6794
6817
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6795
6818
|
* @param value - value to check.
|
|
6796
|
-
*
|
|
6819
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6797
6820
|
*/
|
|
6798
6821
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
6799
6822
|
/**
|
|
@@ -6806,12 +6829,12 @@ declare namespace CodeceptJS {
|
|
|
6806
6829
|
* ```
|
|
6807
6830
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
6808
6831
|
* @param value - value to check.
|
|
6809
|
-
*
|
|
6832
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6810
6833
|
*/
|
|
6811
6834
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
6812
6835
|
/**
|
|
6813
6836
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
6814
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
6837
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
6815
6838
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
6816
6839
|
*
|
|
6817
6840
|
* ```js
|
|
@@ -6819,8 +6842,9 @@ declare namespace CodeceptJS {
|
|
|
6819
6842
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
6820
6843
|
* ```
|
|
6821
6844
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
6822
|
-
* @param pathToFile - local file path relative to codecept.
|
|
6823
|
-
*
|
|
6845
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
6846
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6847
|
+
*
|
|
6824
6848
|
*
|
|
6825
6849
|
* > ⚠ 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.
|
|
6826
6850
|
*/
|
|
@@ -6846,7 +6870,7 @@ declare namespace CodeceptJS {
|
|
|
6846
6870
|
* ```
|
|
6847
6871
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
6848
6872
|
* @param option - visible text or value of option.
|
|
6849
|
-
*
|
|
6873
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6850
6874
|
*/
|
|
6851
6875
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
6852
6876
|
/**
|
|
@@ -6868,13 +6892,13 @@ declare namespace CodeceptJS {
|
|
|
6868
6892
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
6869
6893
|
* ```
|
|
6870
6894
|
* @param url - a fragment to check
|
|
6871
|
-
*
|
|
6895
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6872
6896
|
*/
|
|
6873
6897
|
seeInCurrentUrl(url: string): void;
|
|
6874
6898
|
/**
|
|
6875
6899
|
* Checks that current url does not contain a provided fragment.
|
|
6876
6900
|
* @param url - value to check.
|
|
6877
|
-
*
|
|
6901
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6878
6902
|
*/
|
|
6879
6903
|
dontSeeInCurrentUrl(url: string): void;
|
|
6880
6904
|
/**
|
|
@@ -6887,7 +6911,7 @@ declare namespace CodeceptJS {
|
|
|
6887
6911
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
6888
6912
|
* ```
|
|
6889
6913
|
* @param url - value to check.
|
|
6890
|
-
*
|
|
6914
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6891
6915
|
*/
|
|
6892
6916
|
seeCurrentUrlEquals(url: string): void;
|
|
6893
6917
|
/**
|
|
@@ -6899,7 +6923,7 @@ declare namespace CodeceptJS {
|
|
|
6899
6923
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
6900
6924
|
* ```
|
|
6901
6925
|
* @param url - value to check.
|
|
6902
|
-
*
|
|
6926
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6903
6927
|
*/
|
|
6904
6928
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
6905
6929
|
/**
|
|
@@ -6913,7 +6937,8 @@ declare namespace CodeceptJS {
|
|
|
6913
6937
|
* ```
|
|
6914
6938
|
* @param text - expected on page.
|
|
6915
6939
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
6916
|
-
*
|
|
6940
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6941
|
+
*
|
|
6917
6942
|
*
|
|
6918
6943
|
* {{ react }}
|
|
6919
6944
|
*/
|
|
@@ -6926,7 +6951,7 @@ declare namespace CodeceptJS {
|
|
|
6926
6951
|
* ```
|
|
6927
6952
|
* @param text - element value to check.
|
|
6928
6953
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
6929
|
-
*
|
|
6954
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6930
6955
|
*/
|
|
6931
6956
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
6932
6957
|
/**
|
|
@@ -6939,7 +6964,8 @@ declare namespace CodeceptJS {
|
|
|
6939
6964
|
* ```
|
|
6940
6965
|
* @param text - which is not present.
|
|
6941
6966
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
6942
|
-
*
|
|
6967
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6968
|
+
*
|
|
6943
6969
|
*
|
|
6944
6970
|
* {{ react }}
|
|
6945
6971
|
*/
|
|
@@ -6981,7 +7007,7 @@ declare namespace CodeceptJS {
|
|
|
6981
7007
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
6982
7008
|
* ```
|
|
6983
7009
|
* @param text - value to check.
|
|
6984
|
-
*
|
|
7010
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6985
7011
|
*/
|
|
6986
7012
|
seeInSource(text: string): void;
|
|
6987
7013
|
/**
|
|
@@ -6991,7 +7017,7 @@ declare namespace CodeceptJS {
|
|
|
6991
7017
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
6992
7018
|
* ```
|
|
6993
7019
|
* @param value - to check.
|
|
6994
|
-
*
|
|
7020
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
6995
7021
|
*/
|
|
6996
7022
|
dontSeeInSource(value: string): void;
|
|
6997
7023
|
/**
|
|
@@ -7004,7 +7030,8 @@ declare namespace CodeceptJS {
|
|
|
7004
7030
|
* ```
|
|
7005
7031
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7006
7032
|
* @param num - number of elements.
|
|
7007
|
-
*
|
|
7033
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7034
|
+
*
|
|
7008
7035
|
*
|
|
7009
7036
|
* {{ react }}
|
|
7010
7037
|
*/
|
|
@@ -7018,7 +7045,8 @@ declare namespace CodeceptJS {
|
|
|
7018
7045
|
* ```
|
|
7019
7046
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7020
7047
|
* @param num - number of elements.
|
|
7021
|
-
*
|
|
7048
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7049
|
+
*
|
|
7022
7050
|
*
|
|
7023
7051
|
* {{ react }}
|
|
7024
7052
|
*/
|
|
@@ -7038,7 +7066,7 @@ declare namespace CodeceptJS {
|
|
|
7038
7066
|
* ]);
|
|
7039
7067
|
* ```
|
|
7040
7068
|
* @param cookie - a cookie object or array of cookie objects.
|
|
7041
|
-
*
|
|
7069
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7042
7070
|
*/
|
|
7043
7071
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
7044
7072
|
/**
|
|
@@ -7048,7 +7076,7 @@ declare namespace CodeceptJS {
|
|
|
7048
7076
|
* I.seeCookie('Auth');
|
|
7049
7077
|
* ```
|
|
7050
7078
|
* @param name - cookie name.
|
|
7051
|
-
*
|
|
7079
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7052
7080
|
*/
|
|
7053
7081
|
seeCookie(name: string): void;
|
|
7054
7082
|
/**
|
|
@@ -7058,7 +7086,7 @@ declare namespace CodeceptJS {
|
|
|
7058
7086
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
7059
7087
|
* ```
|
|
7060
7088
|
* @param name - cookie name.
|
|
7061
|
-
*
|
|
7089
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7062
7090
|
*/
|
|
7063
7091
|
dontSeeCookie(name: string): void;
|
|
7064
7092
|
/**
|
|
@@ -7086,7 +7114,7 @@ declare namespace CodeceptJS {
|
|
|
7086
7114
|
* I.clearCookie('test');
|
|
7087
7115
|
* ```
|
|
7088
7116
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
7089
|
-
*
|
|
7117
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7090
7118
|
*/
|
|
7091
7119
|
clearCookie(cookie?: string): void;
|
|
7092
7120
|
/**
|
|
@@ -7114,7 +7142,7 @@ declare namespace CodeceptJS {
|
|
|
7114
7142
|
* ```
|
|
7115
7143
|
* @param fn - function to be executed in browser context.
|
|
7116
7144
|
* @param args - to be passed to function.
|
|
7117
|
-
*
|
|
7145
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7118
7146
|
*
|
|
7119
7147
|
*
|
|
7120
7148
|
* If a function returns a Promise It will wait for it resolution.
|
|
@@ -7143,7 +7171,7 @@ declare namespace CodeceptJS {
|
|
|
7143
7171
|
* ```
|
|
7144
7172
|
* @param fn - function to be executed in browser context.
|
|
7145
7173
|
* @param args - to be passed to function.
|
|
7146
|
-
*
|
|
7174
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7147
7175
|
*
|
|
7148
7176
|
*
|
|
7149
7177
|
* Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
|
|
@@ -7259,7 +7287,8 @@ declare namespace CodeceptJS {
|
|
|
7259
7287
|
* ```
|
|
7260
7288
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7261
7289
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
7262
|
-
*
|
|
7290
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7291
|
+
*
|
|
7263
7292
|
* {{ react }}
|
|
7264
7293
|
*/
|
|
7265
7294
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
@@ -7271,7 +7300,8 @@ declare namespace CodeceptJS {
|
|
|
7271
7300
|
* ```
|
|
7272
7301
|
* @param locator - located by CSS|XPath|strict locator.
|
|
7273
7302
|
* @param attributes - attributes and their values to check.
|
|
7274
|
-
*
|
|
7303
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7304
|
+
*
|
|
7275
7305
|
* {{ react }}
|
|
7276
7306
|
*/
|
|
7277
7307
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
@@ -7285,7 +7315,8 @@ declare namespace CodeceptJS {
|
|
|
7285
7315
|
* ```
|
|
7286
7316
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
7287
7317
|
* @param offsetX - position to drag.
|
|
7288
|
-
*
|
|
7318
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7319
|
+
*
|
|
7289
7320
|
* {{ react }}
|
|
7290
7321
|
*/
|
|
7291
7322
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
@@ -7319,7 +7350,7 @@ declare namespace CodeceptJS {
|
|
|
7319
7350
|
*/
|
|
7320
7351
|
grabAttributeFrom(locator: CodeceptJS.LocatorOrString, attr: string): Promise<string>;
|
|
7321
7352
|
/**
|
|
7322
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
7353
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
7323
7354
|
* Filename is relative to output folder.
|
|
7324
7355
|
*
|
|
7325
7356
|
* ```js
|
|
@@ -7327,11 +7358,11 @@ declare namespace CodeceptJS {
|
|
|
7327
7358
|
* ```
|
|
7328
7359
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7329
7360
|
* @param fileName - file name to save.
|
|
7330
|
-
*
|
|
7361
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7331
7362
|
*/
|
|
7332
7363
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
7333
7364
|
/**
|
|
7334
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
7365
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
7335
7366
|
* Filename is relative to output folder.
|
|
7336
7367
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
7337
7368
|
*
|
|
@@ -7341,7 +7372,7 @@ declare namespace CodeceptJS {
|
|
|
7341
7372
|
* ```
|
|
7342
7373
|
* @param fileName - file name to save.
|
|
7343
7374
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
7344
|
-
*
|
|
7375
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7345
7376
|
*/
|
|
7346
7377
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
7347
7378
|
/**
|
|
@@ -7351,7 +7382,7 @@ declare namespace CodeceptJS {
|
|
|
7351
7382
|
* I.wait(2); // wait 2 secs
|
|
7352
7383
|
* ```
|
|
7353
7384
|
* @param sec - number of second to wait.
|
|
7354
|
-
*
|
|
7385
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7355
7386
|
*/
|
|
7356
7387
|
wait(sec: number): void;
|
|
7357
7388
|
/**
|
|
@@ -7359,7 +7390,7 @@ declare namespace CodeceptJS {
|
|
|
7359
7390
|
* Element can be located by CSS or XPath.
|
|
7360
7391
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7361
7392
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
7362
|
-
*
|
|
7393
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7363
7394
|
*/
|
|
7364
7395
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7365
7396
|
/**
|
|
@@ -7371,7 +7402,7 @@ declare namespace CodeceptJS {
|
|
|
7371
7402
|
* @param field - input field.
|
|
7372
7403
|
* @param value - expected value.
|
|
7373
7404
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7374
|
-
*
|
|
7405
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7375
7406
|
*/
|
|
7376
7407
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
7377
7408
|
/**
|
|
@@ -7383,7 +7414,8 @@ declare namespace CodeceptJS {
|
|
|
7383
7414
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7384
7415
|
* @param num - number of elements.
|
|
7385
7416
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7386
|
-
*
|
|
7417
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7418
|
+
*
|
|
7387
7419
|
* {{ react }}
|
|
7388
7420
|
*/
|
|
7389
7421
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
@@ -7397,7 +7429,7 @@ declare namespace CodeceptJS {
|
|
|
7397
7429
|
* ```
|
|
7398
7430
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7399
7431
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7400
|
-
*
|
|
7432
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7401
7433
|
*/
|
|
7402
7434
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7403
7435
|
/**
|
|
@@ -7410,7 +7442,8 @@ declare namespace CodeceptJS {
|
|
|
7410
7442
|
* ```
|
|
7411
7443
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7412
7444
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
7413
|
-
*
|
|
7445
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7446
|
+
*
|
|
7414
7447
|
* {{ react }}
|
|
7415
7448
|
*/
|
|
7416
7449
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
@@ -7423,7 +7456,8 @@ declare namespace CodeceptJS {
|
|
|
7423
7456
|
* ```
|
|
7424
7457
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7425
7458
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7426
|
-
*
|
|
7459
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7460
|
+
*
|
|
7427
7461
|
*
|
|
7428
7462
|
* This method accepts [React selectors](https://codecept.io/react).
|
|
7429
7463
|
*/
|
|
@@ -7437,7 +7471,7 @@ declare namespace CodeceptJS {
|
|
|
7437
7471
|
* ```
|
|
7438
7472
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7439
7473
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7440
|
-
*
|
|
7474
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7441
7475
|
*/
|
|
7442
7476
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7443
7477
|
/**
|
|
@@ -7449,7 +7483,7 @@ declare namespace CodeceptJS {
|
|
|
7449
7483
|
* ```
|
|
7450
7484
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7451
7485
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7452
|
-
*
|
|
7486
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7453
7487
|
*/
|
|
7454
7488
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7455
7489
|
/**
|
|
@@ -7460,7 +7494,7 @@ declare namespace CodeceptJS {
|
|
|
7460
7494
|
* ```
|
|
7461
7495
|
* @param urlPart - value to check.
|
|
7462
7496
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7463
|
-
*
|
|
7497
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7464
7498
|
*/
|
|
7465
7499
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
7466
7500
|
/**
|
|
@@ -7472,7 +7506,7 @@ declare namespace CodeceptJS {
|
|
|
7472
7506
|
* ```
|
|
7473
7507
|
* @param urlPart - value to check.
|
|
7474
7508
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7475
|
-
*
|
|
7509
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7476
7510
|
*/
|
|
7477
7511
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
7478
7512
|
/**
|
|
@@ -7487,7 +7521,7 @@ declare namespace CodeceptJS {
|
|
|
7487
7521
|
* @param text - to wait for.
|
|
7488
7522
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7489
7523
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
7490
|
-
*
|
|
7524
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7491
7525
|
*/
|
|
7492
7526
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
7493
7527
|
/**
|
|
@@ -7518,7 +7552,7 @@ declare namespace CodeceptJS {
|
|
|
7518
7552
|
* I.switchTo(); // switch back to main page
|
|
7519
7553
|
* ```
|
|
7520
7554
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
7521
|
-
*
|
|
7555
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7522
7556
|
*/
|
|
7523
7557
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
7524
7558
|
/**
|
|
@@ -7537,7 +7571,7 @@ declare namespace CodeceptJS {
|
|
|
7537
7571
|
* @param fn - to be executed in browser context.
|
|
7538
7572
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
7539
7573
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
7540
|
-
*
|
|
7574
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7541
7575
|
*/
|
|
7542
7576
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
7543
7577
|
/**
|
|
@@ -7555,7 +7589,7 @@ declare namespace CodeceptJS {
|
|
|
7555
7589
|
* ```
|
|
7556
7590
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
7557
7591
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7558
|
-
*
|
|
7592
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7559
7593
|
*/
|
|
7560
7594
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
7561
7595
|
/**
|
|
@@ -7612,7 +7646,7 @@ declare namespace CodeceptJS {
|
|
|
7612
7646
|
/**
|
|
7613
7647
|
* API base URL
|
|
7614
7648
|
*/
|
|
7615
|
-
endpoint
|
|
7649
|
+
endpoint?: string;
|
|
7616
7650
|
/**
|
|
7617
7651
|
* pretty print json for response/request on console logs
|
|
7618
7652
|
*/
|
|
@@ -7855,7 +7889,7 @@ declare namespace CodeceptJS {
|
|
|
7855
7889
|
*
|
|
7856
7890
|
* ## Configuration
|
|
7857
7891
|
*
|
|
7858
|
-
* This helper should be configured in codecept.
|
|
7892
|
+
* This helper should be configured in codecept.conf.ts or codecept.conf.js
|
|
7859
7893
|
*
|
|
7860
7894
|
* * `url`: base url of website to be tested
|
|
7861
7895
|
* * `show`: (optional, default: false) - show browser window.
|
|
@@ -7955,7 +7989,7 @@ declare namespace CodeceptJS {
|
|
|
7955
7989
|
* First parameter can be set to `maximize`.
|
|
7956
7990
|
* @param width - width in pixels or `maximize`.
|
|
7957
7991
|
* @param height - height in pixels.
|
|
7958
|
-
*
|
|
7992
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7959
7993
|
*/
|
|
7960
7994
|
resizeWindow(width: number, height: number): void;
|
|
7961
7995
|
/**
|
|
@@ -7982,7 +8016,7 @@ declare namespace CodeceptJS {
|
|
|
7982
8016
|
* ```
|
|
7983
8017
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
7984
8018
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
7985
|
-
*
|
|
8019
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7986
8020
|
*/
|
|
7987
8021
|
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null): void;
|
|
7988
8022
|
/**
|
|
@@ -7991,7 +8025,7 @@ declare namespace CodeceptJS {
|
|
|
7991
8025
|
* ```js
|
|
7992
8026
|
* I.refreshPage();
|
|
7993
8027
|
* ```
|
|
7994
|
-
*
|
|
8028
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
7995
8029
|
*/
|
|
7996
8030
|
refreshPage(): void;
|
|
7997
8031
|
/**
|
|
@@ -8003,7 +8037,7 @@ declare namespace CodeceptJS {
|
|
|
8003
8037
|
* ```
|
|
8004
8038
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8005
8039
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8006
|
-
*
|
|
8040
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8007
8041
|
*/
|
|
8008
8042
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8009
8043
|
/**
|
|
@@ -8022,7 +8056,7 @@ declare namespace CodeceptJS {
|
|
|
8022
8056
|
* ```
|
|
8023
8057
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8024
8058
|
* @param value - text value to fill.
|
|
8025
|
-
*
|
|
8059
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8026
8060
|
*/
|
|
8027
8061
|
fillField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
|
|
8028
8062
|
/**
|
|
@@ -8034,7 +8068,7 @@ declare namespace CodeceptJS {
|
|
|
8034
8068
|
* I.clearField('#email');
|
|
8035
8069
|
* ```
|
|
8036
8070
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
8037
|
-
*
|
|
8071
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
8038
8072
|
*/
|
|
8039
8073
|
clearField(editable: LocatorOrString): void;
|
|
8040
8074
|
/**
|
|
@@ -8046,12 +8080,12 @@ declare namespace CodeceptJS {
|
|
|
8046
8080
|
* ```
|
|
8047
8081
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
8048
8082
|
* @param value - text value to append.
|
|
8049
|
-
*
|
|
8083
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8050
8084
|
*/
|
|
8051
8085
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
8052
8086
|
/**
|
|
8053
8087
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
8054
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
8088
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
8055
8089
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
8056
8090
|
*
|
|
8057
8091
|
* ```js
|
|
@@ -8059,8 +8093,8 @@ declare namespace CodeceptJS {
|
|
|
8059
8093
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
8060
8094
|
* ```
|
|
8061
8095
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
8062
|
-
* @param pathToFile - local file path relative to codecept.
|
|
8063
|
-
*
|
|
8096
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
8097
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8064
8098
|
*/
|
|
8065
8099
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
8066
8100
|
/**
|
|
@@ -8074,7 +8108,8 @@ declare namespace CodeceptJS {
|
|
|
8074
8108
|
* I.pressKey(['Control','a']);
|
|
8075
8109
|
* ```
|
|
8076
8110
|
* @param key - key or array of keys to press.
|
|
8077
|
-
*
|
|
8111
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8112
|
+
*
|
|
8078
8113
|
*
|
|
8079
8114
|
* {{ keys }}
|
|
8080
8115
|
*/
|
|
@@ -8090,7 +8125,7 @@ declare namespace CodeceptJS {
|
|
|
8090
8125
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8091
8126
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
8092
8127
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
8093
|
-
*
|
|
8128
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8094
8129
|
*/
|
|
8095
8130
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
8096
8131
|
/**
|
|
@@ -8105,7 +8140,7 @@ declare namespace CodeceptJS {
|
|
|
8105
8140
|
* ```
|
|
8106
8141
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
8107
8142
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
8108
|
-
*
|
|
8143
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8109
8144
|
*/
|
|
8110
8145
|
doubleClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
8111
8146
|
/**
|
|
@@ -8121,7 +8156,7 @@ declare namespace CodeceptJS {
|
|
|
8121
8156
|
* ```
|
|
8122
8157
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
8123
8158
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8124
|
-
*
|
|
8159
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8125
8160
|
*/
|
|
8126
8161
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
8127
8162
|
/**
|
|
@@ -8137,7 +8172,7 @@ declare namespace CodeceptJS {
|
|
|
8137
8172
|
* ```
|
|
8138
8173
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8139
8174
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
8140
|
-
*
|
|
8175
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8141
8176
|
*/
|
|
8142
8177
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
8143
8178
|
/**
|
|
@@ -8153,7 +8188,7 @@ declare namespace CodeceptJS {
|
|
|
8153
8188
|
* ```
|
|
8154
8189
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
8155
8190
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
8156
|
-
*
|
|
8191
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8157
8192
|
*/
|
|
8158
8193
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
8159
8194
|
/**
|
|
@@ -8165,7 +8200,7 @@ declare namespace CodeceptJS {
|
|
|
8165
8200
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
8166
8201
|
* ```
|
|
8167
8202
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8168
|
-
*
|
|
8203
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8169
8204
|
*/
|
|
8170
8205
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
8171
8206
|
/**
|
|
@@ -8177,7 +8212,7 @@ declare namespace CodeceptJS {
|
|
|
8177
8212
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
8178
8213
|
* ```
|
|
8179
8214
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8180
|
-
*
|
|
8215
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8181
8216
|
*/
|
|
8182
8217
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
8183
8218
|
/**
|
|
@@ -8201,7 +8236,7 @@ declare namespace CodeceptJS {
|
|
|
8201
8236
|
* ```
|
|
8202
8237
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
8203
8238
|
* @param option - visible text or value of option.
|
|
8204
|
-
*
|
|
8239
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8205
8240
|
*/
|
|
8206
8241
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
8207
8242
|
/**
|
|
@@ -8211,13 +8246,13 @@ declare namespace CodeceptJS {
|
|
|
8211
8246
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
8212
8247
|
* ```
|
|
8213
8248
|
* @param url - a fragment to check
|
|
8214
|
-
*
|
|
8249
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8215
8250
|
*/
|
|
8216
8251
|
seeInCurrentUrl(url: string): void;
|
|
8217
8252
|
/**
|
|
8218
8253
|
* Checks that current url does not contain a provided fragment.
|
|
8219
8254
|
* @param url - value to check.
|
|
8220
|
-
*
|
|
8255
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8221
8256
|
*/
|
|
8222
8257
|
dontSeeInCurrentUrl(url: string): void;
|
|
8223
8258
|
/**
|
|
@@ -8230,7 +8265,7 @@ declare namespace CodeceptJS {
|
|
|
8230
8265
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
8231
8266
|
* ```
|
|
8232
8267
|
* @param url - value to check.
|
|
8233
|
-
*
|
|
8268
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8234
8269
|
*/
|
|
8235
8270
|
seeCurrentUrlEquals(url: string): void;
|
|
8236
8271
|
/**
|
|
@@ -8242,7 +8277,7 @@ declare namespace CodeceptJS {
|
|
|
8242
8277
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
8243
8278
|
* ```
|
|
8244
8279
|
* @param url - value to check.
|
|
8245
|
-
*
|
|
8280
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8246
8281
|
*/
|
|
8247
8282
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
8248
8283
|
/**
|
|
@@ -8256,7 +8291,7 @@ declare namespace CodeceptJS {
|
|
|
8256
8291
|
* ```
|
|
8257
8292
|
* @param text - expected on page.
|
|
8258
8293
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
8259
|
-
*
|
|
8294
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8260
8295
|
*/
|
|
8261
8296
|
see(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
8262
8297
|
/**
|
|
@@ -8269,7 +8304,7 @@ declare namespace CodeceptJS {
|
|
|
8269
8304
|
* ```
|
|
8270
8305
|
* @param text - which is not present.
|
|
8271
8306
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
8272
|
-
*
|
|
8307
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8273
8308
|
*/
|
|
8274
8309
|
dontSee(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
8275
8310
|
/**
|
|
@@ -8280,7 +8315,7 @@ declare namespace CodeceptJS {
|
|
|
8280
8315
|
* I.seeElement('#modal');
|
|
8281
8316
|
* ```
|
|
8282
8317
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8283
|
-
*
|
|
8318
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8284
8319
|
*/
|
|
8285
8320
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
8286
8321
|
/**
|
|
@@ -8290,7 +8325,7 @@ declare namespace CodeceptJS {
|
|
|
8290
8325
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
8291
8326
|
* ```
|
|
8292
8327
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8293
|
-
*
|
|
8328
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8294
8329
|
*/
|
|
8295
8330
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
8296
8331
|
/**
|
|
@@ -8301,7 +8336,7 @@ declare namespace CodeceptJS {
|
|
|
8301
8336
|
* I.seeElementInDOM('#modal');
|
|
8302
8337
|
* ```
|
|
8303
8338
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8304
|
-
*
|
|
8339
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8305
8340
|
*/
|
|
8306
8341
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
8307
8342
|
/**
|
|
@@ -8311,7 +8346,7 @@ declare namespace CodeceptJS {
|
|
|
8311
8346
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
8312
8347
|
* ```
|
|
8313
8348
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
8314
|
-
*
|
|
8349
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8315
8350
|
*/
|
|
8316
8351
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
8317
8352
|
/**
|
|
@@ -8323,7 +8358,7 @@ declare namespace CodeceptJS {
|
|
|
8323
8358
|
* ```
|
|
8324
8359
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8325
8360
|
* @param num - number of elements.
|
|
8326
|
-
*
|
|
8361
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8327
8362
|
*/
|
|
8328
8363
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
8329
8364
|
/**
|
|
@@ -8349,7 +8384,7 @@ declare namespace CodeceptJS {
|
|
|
8349
8384
|
* ```
|
|
8350
8385
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8351
8386
|
* @param value - value to check.
|
|
8352
|
-
*
|
|
8387
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8353
8388
|
*/
|
|
8354
8389
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
8355
8390
|
/**
|
|
@@ -8362,7 +8397,7 @@ declare namespace CodeceptJS {
|
|
|
8362
8397
|
* ```
|
|
8363
8398
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
8364
8399
|
* @param value - value to check.
|
|
8365
|
-
*
|
|
8400
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8366
8401
|
*/
|
|
8367
8402
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
8368
8403
|
/**
|
|
@@ -8380,7 +8415,7 @@ declare namespace CodeceptJS {
|
|
|
8380
8415
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
8381
8416
|
* ```
|
|
8382
8417
|
* @param text - value to check.
|
|
8383
|
-
*
|
|
8418
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8384
8419
|
*/
|
|
8385
8420
|
seeInSource(text: string): void;
|
|
8386
8421
|
/**
|
|
@@ -8390,11 +8425,11 @@ declare namespace CodeceptJS {
|
|
|
8390
8425
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
8391
8426
|
* ```
|
|
8392
8427
|
* @param value - to check.
|
|
8393
|
-
*
|
|
8428
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8394
8429
|
*/
|
|
8395
8430
|
dontSeeInSource(value: string): void;
|
|
8396
8431
|
/**
|
|
8397
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
8432
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
8398
8433
|
* Filename is relative to output folder.
|
|
8399
8434
|
*
|
|
8400
8435
|
* ```js
|
|
@@ -8402,11 +8437,11 @@ declare namespace CodeceptJS {
|
|
|
8402
8437
|
* ```
|
|
8403
8438
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8404
8439
|
* @param fileName - file name to save.
|
|
8405
|
-
*
|
|
8440
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8406
8441
|
*/
|
|
8407
8442
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
8408
8443
|
/**
|
|
8409
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
8444
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
8410
8445
|
* Filename is relative to output folder.
|
|
8411
8446
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
8412
8447
|
*
|
|
@@ -8416,7 +8451,7 @@ declare namespace CodeceptJS {
|
|
|
8416
8451
|
* ```
|
|
8417
8452
|
* @param fileName - file name to save.
|
|
8418
8453
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
8419
|
-
*
|
|
8454
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8420
8455
|
*/
|
|
8421
8456
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
8422
8457
|
/**
|
|
@@ -8426,7 +8461,7 @@ declare namespace CodeceptJS {
|
|
|
8426
8461
|
* I.wait(2); // wait 2 secs
|
|
8427
8462
|
* ```
|
|
8428
8463
|
* @param sec - number of second to wait.
|
|
8429
|
-
*
|
|
8464
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8430
8465
|
*/
|
|
8431
8466
|
wait(sec: number): void;
|
|
8432
8467
|
/**
|
|
@@ -8454,7 +8489,7 @@ declare namespace CodeceptJS {
|
|
|
8454
8489
|
* ```
|
|
8455
8490
|
* @param fn - function to be executed in browser context.
|
|
8456
8491
|
* @param args - to be passed to function.
|
|
8457
|
-
*
|
|
8492
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8458
8493
|
*
|
|
8459
8494
|
*
|
|
8460
8495
|
* If a function returns a Promise It will wait for it resolution.
|
|
@@ -8578,7 +8613,7 @@ declare namespace CodeceptJS {
|
|
|
8578
8613
|
* ```js
|
|
8579
8614
|
* I.scrollPageToTop();
|
|
8580
8615
|
* ```
|
|
8581
|
-
*
|
|
8616
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8582
8617
|
*/
|
|
8583
8618
|
scrollPageToTop(): void;
|
|
8584
8619
|
/**
|
|
@@ -8587,7 +8622,7 @@ declare namespace CodeceptJS {
|
|
|
8587
8622
|
* ```js
|
|
8588
8623
|
* I.scrollPageToBottom();
|
|
8589
8624
|
* ```
|
|
8590
|
-
*
|
|
8625
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8591
8626
|
*/
|
|
8592
8627
|
scrollPageToBottom(): void;
|
|
8593
8628
|
/**
|
|
@@ -8601,7 +8636,7 @@ declare namespace CodeceptJS {
|
|
|
8601
8636
|
* @param locator - located by CSS|XPath|strict locator.
|
|
8602
8637
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
8603
8638
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
8604
|
-
*
|
|
8639
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8605
8640
|
*/
|
|
8606
8641
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
8607
8642
|
/**
|
|
@@ -8612,7 +8647,7 @@ declare namespace CodeceptJS {
|
|
|
8612
8647
|
* I.switchTo(); // switch back to main page
|
|
8613
8648
|
* ```
|
|
8614
8649
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
8615
|
-
*
|
|
8650
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8616
8651
|
*/
|
|
8617
8652
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
8618
8653
|
/**
|
|
@@ -8630,7 +8665,7 @@ declare namespace CodeceptJS {
|
|
|
8630
8665
|
* ]);
|
|
8631
8666
|
* ```
|
|
8632
8667
|
* @param cookie - a cookie object or array of cookie objects.
|
|
8633
|
-
*
|
|
8668
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8634
8669
|
*/
|
|
8635
8670
|
setCookie(cookie: Cookie | Cookie[]): void;
|
|
8636
8671
|
/**
|
|
@@ -8640,7 +8675,7 @@ declare namespace CodeceptJS {
|
|
|
8640
8675
|
* I.seeCookie('Auth');
|
|
8641
8676
|
* ```
|
|
8642
8677
|
* @param name - cookie name.
|
|
8643
|
-
*
|
|
8678
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8644
8679
|
*/
|
|
8645
8680
|
seeCookie(name: string): void;
|
|
8646
8681
|
/**
|
|
@@ -8650,7 +8685,7 @@ declare namespace CodeceptJS {
|
|
|
8650
8685
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
8651
8686
|
* ```
|
|
8652
8687
|
* @param name - cookie name.
|
|
8653
|
-
*
|
|
8688
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8654
8689
|
*/
|
|
8655
8690
|
dontSeeCookie(name: string): void;
|
|
8656
8691
|
/**
|
|
@@ -8678,7 +8713,7 @@ declare namespace CodeceptJS {
|
|
|
8678
8713
|
* I.clearCookie('test');
|
|
8679
8714
|
* ```
|
|
8680
8715
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
8681
|
-
*
|
|
8716
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8682
8717
|
*/
|
|
8683
8718
|
clearCookie(cookie?: string): void;
|
|
8684
8719
|
/**
|
|
@@ -8689,7 +8724,7 @@ declare namespace CodeceptJS {
|
|
|
8689
8724
|
* ```
|
|
8690
8725
|
* @param urlPart - value to check.
|
|
8691
8726
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8692
|
-
*
|
|
8727
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8693
8728
|
*/
|
|
8694
8729
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
8695
8730
|
/**
|
|
@@ -8701,7 +8736,7 @@ declare namespace CodeceptJS {
|
|
|
8701
8736
|
* ```
|
|
8702
8737
|
* @param urlPart - value to check.
|
|
8703
8738
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8704
|
-
*
|
|
8739
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8705
8740
|
*/
|
|
8706
8741
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
8707
8742
|
/**
|
|
@@ -8720,7 +8755,7 @@ declare namespace CodeceptJS {
|
|
|
8720
8755
|
* @param fn - to be executed in browser context.
|
|
8721
8756
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
8722
8757
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
8723
|
-
*
|
|
8758
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8724
8759
|
*/
|
|
8725
8760
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
8726
8761
|
/**
|
|
@@ -8732,7 +8767,7 @@ declare namespace CodeceptJS {
|
|
|
8732
8767
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8733
8768
|
* @param num - number of elements.
|
|
8734
8769
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8735
|
-
*
|
|
8770
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8736
8771
|
*/
|
|
8737
8772
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
8738
8773
|
/**
|
|
@@ -8745,7 +8780,7 @@ declare namespace CodeceptJS {
|
|
|
8745
8780
|
* ```
|
|
8746
8781
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8747
8782
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
8748
|
-
*
|
|
8783
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8749
8784
|
*/
|
|
8750
8785
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8751
8786
|
/**
|
|
@@ -8757,7 +8792,7 @@ declare namespace CodeceptJS {
|
|
|
8757
8792
|
* ```
|
|
8758
8793
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8759
8794
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8760
|
-
*
|
|
8795
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8761
8796
|
*/
|
|
8762
8797
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8763
8798
|
/**
|
|
@@ -8769,7 +8804,7 @@ declare namespace CodeceptJS {
|
|
|
8769
8804
|
* ```
|
|
8770
8805
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
8771
8806
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8772
|
-
*
|
|
8807
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8773
8808
|
*/
|
|
8774
8809
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
8775
8810
|
/**
|
|
@@ -8784,7 +8819,7 @@ declare namespace CodeceptJS {
|
|
|
8784
8819
|
* @param text - to wait for.
|
|
8785
8820
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
8786
8821
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
8787
|
-
*
|
|
8822
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
8788
8823
|
*/
|
|
8789
8824
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
8790
8825
|
}
|
|
@@ -8815,7 +8850,7 @@ declare namespace CodeceptJS {
|
|
|
8815
8850
|
* WebDriver port to connect.
|
|
8816
8851
|
* @defaultValue 4444
|
|
8817
8852
|
*/
|
|
8818
|
-
port?:
|
|
8853
|
+
port?: number;
|
|
8819
8854
|
/**
|
|
8820
8855
|
* protocol for WebDriver server.
|
|
8821
8856
|
* @defaultValue http
|
|
@@ -8834,7 +8869,7 @@ declare namespace CodeceptJS {
|
|
|
8834
8869
|
/**
|
|
8835
8870
|
* **enables [SmartWait](http://codecept.io/acceptance/#smartwait)**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000.
|
|
8836
8871
|
*/
|
|
8837
|
-
smartWait?: boolean;
|
|
8872
|
+
smartWait?: boolean | number;
|
|
8838
8873
|
/**
|
|
8839
8874
|
* don't save screenshots on failure.
|
|
8840
8875
|
*/
|
|
@@ -9315,7 +9350,7 @@ declare namespace CodeceptJS {
|
|
|
9315
9350
|
* ```
|
|
9316
9351
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9317
9352
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9318
|
-
*
|
|
9353
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9319
9354
|
*
|
|
9320
9355
|
*
|
|
9321
9356
|
* {{ react }}
|
|
@@ -9348,7 +9383,7 @@ declare namespace CodeceptJS {
|
|
|
9348
9383
|
* ```
|
|
9349
9384
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9350
9385
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9351
|
-
*
|
|
9386
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9352
9387
|
*
|
|
9353
9388
|
*
|
|
9354
9389
|
* {{ react }}
|
|
@@ -9366,7 +9401,8 @@ declare namespace CodeceptJS {
|
|
|
9366
9401
|
* ```
|
|
9367
9402
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9368
9403
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9369
|
-
*
|
|
9404
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9405
|
+
*
|
|
9370
9406
|
*
|
|
9371
9407
|
* {{ react }}
|
|
9372
9408
|
*/
|
|
@@ -9384,7 +9420,8 @@ declare namespace CodeceptJS {
|
|
|
9384
9420
|
* ```
|
|
9385
9421
|
* @param locator - clickable element located by CSS|XPath|strict locator.
|
|
9386
9422
|
* @param [context = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
9387
|
-
*
|
|
9423
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9424
|
+
*
|
|
9388
9425
|
*
|
|
9389
9426
|
* {{ react }}
|
|
9390
9427
|
*/
|
|
@@ -9406,7 +9443,8 @@ declare namespace CodeceptJS {
|
|
|
9406
9443
|
* ```
|
|
9407
9444
|
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
9408
9445
|
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
9409
|
-
*
|
|
9446
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9447
|
+
*
|
|
9410
9448
|
*
|
|
9411
9449
|
* {{ react }}
|
|
9412
9450
|
*/
|
|
@@ -9427,7 +9465,8 @@ declare namespace CodeceptJS {
|
|
|
9427
9465
|
* ```
|
|
9428
9466
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9429
9467
|
* @param value - text value to fill.
|
|
9430
|
-
*
|
|
9468
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9469
|
+
*
|
|
9431
9470
|
* {{ react }}
|
|
9432
9471
|
* {{ custom }}
|
|
9433
9472
|
*/
|
|
@@ -9441,7 +9480,8 @@ declare namespace CodeceptJS {
|
|
|
9441
9480
|
* ```
|
|
9442
9481
|
* @param field - located by label|name|CSS|XPath|strict locator
|
|
9443
9482
|
* @param value - text value to append.
|
|
9444
|
-
*
|
|
9483
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9484
|
+
*
|
|
9445
9485
|
* {{ react }}
|
|
9446
9486
|
*/
|
|
9447
9487
|
appendField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
@@ -9454,7 +9494,7 @@ declare namespace CodeceptJS {
|
|
|
9454
9494
|
* I.clearField('#email');
|
|
9455
9495
|
* ```
|
|
9456
9496
|
* @param editable - field located by label|name|CSS|XPath|strict locator.
|
|
9457
|
-
*
|
|
9497
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder.
|
|
9458
9498
|
*/
|
|
9459
9499
|
clearField(editable: LocatorOrString): void;
|
|
9460
9500
|
/**
|
|
@@ -9478,12 +9518,12 @@ declare namespace CodeceptJS {
|
|
|
9478
9518
|
* ```
|
|
9479
9519
|
* @param select - field located by label|name|CSS|XPath|strict locator.
|
|
9480
9520
|
* @param option - visible text or value of option.
|
|
9481
|
-
*
|
|
9521
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9482
9522
|
*/
|
|
9483
9523
|
selectOption(select: LocatorOrString, option: string | any[]): void;
|
|
9484
9524
|
/**
|
|
9485
9525
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
9486
|
-
* Path to file is relative current codecept directory (where codecept.
|
|
9526
|
+
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
9487
9527
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
9488
9528
|
*
|
|
9489
9529
|
* ```js
|
|
@@ -9491,8 +9531,9 @@ declare namespace CodeceptJS {
|
|
|
9491
9531
|
* I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
9492
9532
|
* ```
|
|
9493
9533
|
* @param locator - field located by label|name|CSS|XPath|strict locator.
|
|
9494
|
-
* @param pathToFile - local file path relative to codecept.
|
|
9495
|
-
*
|
|
9534
|
+
* @param pathToFile - local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
9535
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9536
|
+
*
|
|
9496
9537
|
* Appium: not tested
|
|
9497
9538
|
*/
|
|
9498
9539
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): void;
|
|
@@ -9509,7 +9550,8 @@ declare namespace CodeceptJS {
|
|
|
9509
9550
|
* ```
|
|
9510
9551
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9511
9552
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9512
|
-
*
|
|
9553
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9554
|
+
*
|
|
9513
9555
|
* Appium: not tested
|
|
9514
9556
|
*/
|
|
9515
9557
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
@@ -9526,7 +9568,8 @@ declare namespace CodeceptJS {
|
|
|
9526
9568
|
* ```
|
|
9527
9569
|
* @param field - checkbox located by label | name | CSS | XPath | strict locator.
|
|
9528
9570
|
* @param [context = null] - (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
9529
|
-
*
|
|
9571
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9572
|
+
*
|
|
9530
9573
|
* Appium: not tested
|
|
9531
9574
|
*/
|
|
9532
9575
|
uncheckOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): void;
|
|
@@ -9656,7 +9699,7 @@ declare namespace CodeceptJS {
|
|
|
9656
9699
|
* I.seeInTitle('Home Page');
|
|
9657
9700
|
* ```
|
|
9658
9701
|
* @param text - text value to check.
|
|
9659
|
-
*
|
|
9702
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9660
9703
|
*/
|
|
9661
9704
|
seeInTitle(text: string): void;
|
|
9662
9705
|
/**
|
|
@@ -9666,7 +9709,7 @@ declare namespace CodeceptJS {
|
|
|
9666
9709
|
* I.seeTitleEquals('Test title.');
|
|
9667
9710
|
* ```
|
|
9668
9711
|
* @param text - value to check.
|
|
9669
|
-
*
|
|
9712
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9670
9713
|
*/
|
|
9671
9714
|
seeTitleEquals(text: string): void;
|
|
9672
9715
|
/**
|
|
@@ -9676,7 +9719,7 @@ declare namespace CodeceptJS {
|
|
|
9676
9719
|
* I.dontSeeInTitle('Error');
|
|
9677
9720
|
* ```
|
|
9678
9721
|
* @param text - value to check.
|
|
9679
|
-
*
|
|
9722
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9680
9723
|
*/
|
|
9681
9724
|
dontSeeInTitle(text: string): void;
|
|
9682
9725
|
/**
|
|
@@ -9700,7 +9743,8 @@ declare namespace CodeceptJS {
|
|
|
9700
9743
|
* ```
|
|
9701
9744
|
* @param text - expected on page.
|
|
9702
9745
|
* @param [context = null] - (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
9703
|
-
*
|
|
9746
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9747
|
+
*
|
|
9704
9748
|
*
|
|
9705
9749
|
* {{ react }}
|
|
9706
9750
|
*/
|
|
@@ -9713,7 +9757,7 @@ declare namespace CodeceptJS {
|
|
|
9713
9757
|
* ```
|
|
9714
9758
|
* @param text - element value to check.
|
|
9715
9759
|
* @param [context = null] - element located by CSS|XPath|strict locator.
|
|
9716
|
-
*
|
|
9760
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9717
9761
|
*/
|
|
9718
9762
|
seeTextEquals(text: string, context?: CodeceptJS.LocatorOrString): void;
|
|
9719
9763
|
/**
|
|
@@ -9726,7 +9770,8 @@ declare namespace CodeceptJS {
|
|
|
9726
9770
|
* ```
|
|
9727
9771
|
* @param text - which is not present.
|
|
9728
9772
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
9729
|
-
*
|
|
9773
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9774
|
+
*
|
|
9730
9775
|
*
|
|
9731
9776
|
* {{ react }}
|
|
9732
9777
|
*/
|
|
@@ -9743,7 +9788,7 @@ declare namespace CodeceptJS {
|
|
|
9743
9788
|
* ```
|
|
9744
9789
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9745
9790
|
* @param value - value to check.
|
|
9746
|
-
*
|
|
9791
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9747
9792
|
*/
|
|
9748
9793
|
seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
9749
9794
|
/**
|
|
@@ -9756,7 +9801,7 @@ declare namespace CodeceptJS {
|
|
|
9756
9801
|
* ```
|
|
9757
9802
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9758
9803
|
* @param value - value to check.
|
|
9759
|
-
*
|
|
9804
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9760
9805
|
*/
|
|
9761
9806
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
|
|
9762
9807
|
/**
|
|
@@ -9768,7 +9813,8 @@ declare namespace CodeceptJS {
|
|
|
9768
9813
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
9769
9814
|
* ```
|
|
9770
9815
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9771
|
-
*
|
|
9816
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9817
|
+
*
|
|
9772
9818
|
* Appium: not tested
|
|
9773
9819
|
*/
|
|
9774
9820
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
@@ -9781,7 +9827,8 @@ declare namespace CodeceptJS {
|
|
|
9781
9827
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
9782
9828
|
* ```
|
|
9783
9829
|
* @param field - located by label|name|CSS|XPath|strict locator.
|
|
9784
|
-
*
|
|
9830
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9831
|
+
*
|
|
9785
9832
|
* Appium: not tested
|
|
9786
9833
|
*/
|
|
9787
9834
|
dontSeeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): void;
|
|
@@ -9793,7 +9840,8 @@ declare namespace CodeceptJS {
|
|
|
9793
9840
|
* I.seeElement('#modal');
|
|
9794
9841
|
* ```
|
|
9795
9842
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9796
|
-
*
|
|
9843
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9844
|
+
*
|
|
9797
9845
|
* {{ react }}
|
|
9798
9846
|
*/
|
|
9799
9847
|
seeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -9804,7 +9852,8 @@ declare namespace CodeceptJS {
|
|
|
9804
9852
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
9805
9853
|
* ```
|
|
9806
9854
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9807
|
-
*
|
|
9855
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9856
|
+
*
|
|
9808
9857
|
* {{ react }}
|
|
9809
9858
|
*/
|
|
9810
9859
|
dontSeeElement(locator: CodeceptJS.LocatorOrString): void;
|
|
@@ -9816,7 +9865,7 @@ declare namespace CodeceptJS {
|
|
|
9816
9865
|
* I.seeElementInDOM('#modal');
|
|
9817
9866
|
* ```
|
|
9818
9867
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9819
|
-
*
|
|
9868
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9820
9869
|
*/
|
|
9821
9870
|
seeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
9822
9871
|
/**
|
|
@@ -9826,7 +9875,7 @@ declare namespace CodeceptJS {
|
|
|
9826
9875
|
* I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or not
|
|
9827
9876
|
* ```
|
|
9828
9877
|
* @param locator - located by CSS|XPath|Strict locator.
|
|
9829
|
-
*
|
|
9878
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9830
9879
|
*/
|
|
9831
9880
|
dontSeeElementInDOM(locator: CodeceptJS.LocatorOrString): void;
|
|
9832
9881
|
/**
|
|
@@ -9836,7 +9885,7 @@ declare namespace CodeceptJS {
|
|
|
9836
9885
|
* I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
9837
9886
|
* ```
|
|
9838
9887
|
* @param text - value to check.
|
|
9839
|
-
*
|
|
9888
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9840
9889
|
*/
|
|
9841
9890
|
seeInSource(text: string): void;
|
|
9842
9891
|
/**
|
|
@@ -9878,7 +9927,7 @@ declare namespace CodeceptJS {
|
|
|
9878
9927
|
* I.dontSeeInSource('<!--'); // no comments in source
|
|
9879
9928
|
* ```
|
|
9880
9929
|
* @param value - to check.
|
|
9881
|
-
*
|
|
9930
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9882
9931
|
*/
|
|
9883
9932
|
dontSeeInSource(value: string): void;
|
|
9884
9933
|
/**
|
|
@@ -9891,7 +9940,8 @@ declare namespace CodeceptJS {
|
|
|
9891
9940
|
* ```
|
|
9892
9941
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9893
9942
|
* @param num - number of elements.
|
|
9894
|
-
*
|
|
9943
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9944
|
+
*
|
|
9895
9945
|
* {{ react }}
|
|
9896
9946
|
*/
|
|
9897
9947
|
seeNumberOfElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
@@ -9904,7 +9954,8 @@ declare namespace CodeceptJS {
|
|
|
9904
9954
|
* ```
|
|
9905
9955
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
9906
9956
|
* @param num - number of elements.
|
|
9907
|
-
*
|
|
9957
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9958
|
+
*
|
|
9908
9959
|
* {{ react }}
|
|
9909
9960
|
*/
|
|
9910
9961
|
seeNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number): void;
|
|
@@ -9916,7 +9967,7 @@ declare namespace CodeceptJS {
|
|
|
9916
9967
|
* ```
|
|
9917
9968
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9918
9969
|
* @param cssProperties - object with CSS properties and their values to check.
|
|
9919
|
-
*
|
|
9970
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9920
9971
|
*/
|
|
9921
9972
|
seeCssPropertiesOnElements(locator: CodeceptJS.LocatorOrString, cssProperties: any): void;
|
|
9922
9973
|
/**
|
|
@@ -9927,7 +9978,7 @@ declare namespace CodeceptJS {
|
|
|
9927
9978
|
* ```
|
|
9928
9979
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9929
9980
|
* @param attributes - attributes and their values to check.
|
|
9930
|
-
*
|
|
9981
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9931
9982
|
*/
|
|
9932
9983
|
seeAttributesOnElements(locator: CodeceptJS.LocatorOrString, attributes: any): void;
|
|
9933
9984
|
/**
|
|
@@ -9948,13 +9999,13 @@ declare namespace CodeceptJS {
|
|
|
9948
9999
|
* I.seeInCurrentUrl('/register'); // we are on registration page
|
|
9949
10000
|
* ```
|
|
9950
10001
|
* @param url - a fragment to check
|
|
9951
|
-
*
|
|
10002
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9952
10003
|
*/
|
|
9953
10004
|
seeInCurrentUrl(url: string): void;
|
|
9954
10005
|
/**
|
|
9955
10006
|
* Checks that current url does not contain a provided fragment.
|
|
9956
10007
|
* @param url - value to check.
|
|
9957
|
-
*
|
|
10008
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9958
10009
|
*/
|
|
9959
10010
|
dontSeeInCurrentUrl(url: string): void;
|
|
9960
10011
|
/**
|
|
@@ -9967,7 +10018,7 @@ declare namespace CodeceptJS {
|
|
|
9967
10018
|
* I.seeCurrentUrlEquals('http://my.site.com/register');
|
|
9968
10019
|
* ```
|
|
9969
10020
|
* @param url - value to check.
|
|
9970
|
-
*
|
|
10021
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9971
10022
|
*/
|
|
9972
10023
|
seeCurrentUrlEquals(url: string): void;
|
|
9973
10024
|
/**
|
|
@@ -9979,7 +10030,7 @@ declare namespace CodeceptJS {
|
|
|
9979
10030
|
* I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ok
|
|
9980
10031
|
* ```
|
|
9981
10032
|
* @param url - value to check.
|
|
9982
|
-
*
|
|
10033
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
9983
10034
|
*/
|
|
9984
10035
|
dontSeeCurrentUrlEquals(url: string): void;
|
|
9985
10036
|
/**
|
|
@@ -10007,7 +10058,7 @@ declare namespace CodeceptJS {
|
|
|
10007
10058
|
* ```
|
|
10008
10059
|
* @param fn - function to be executed in browser context.
|
|
10009
10060
|
* @param args - to be passed to function.
|
|
10010
|
-
*
|
|
10061
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10011
10062
|
*
|
|
10012
10063
|
*
|
|
10013
10064
|
*
|
|
@@ -10037,7 +10088,7 @@ declare namespace CodeceptJS {
|
|
|
10037
10088
|
* ```
|
|
10038
10089
|
* @param fn - function to be executed in browser context.
|
|
10039
10090
|
* @param args - to be passed to function.
|
|
10040
|
-
*
|
|
10091
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10041
10092
|
*/
|
|
10042
10093
|
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): void;
|
|
10043
10094
|
/**
|
|
@@ -10050,7 +10101,7 @@ declare namespace CodeceptJS {
|
|
|
10050
10101
|
* ```
|
|
10051
10102
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10052
10103
|
* @param scrollIntoViewOptions - see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
10053
|
-
*
|
|
10104
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10054
10105
|
*/
|
|
10055
10106
|
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): void;
|
|
10056
10107
|
/**
|
|
@@ -10064,7 +10115,7 @@ declare namespace CodeceptJS {
|
|
|
10064
10115
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10065
10116
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
10066
10117
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
10067
|
-
*
|
|
10118
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10068
10119
|
*/
|
|
10069
10120
|
scrollTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
10070
10121
|
/**
|
|
@@ -10078,11 +10129,11 @@ declare namespace CodeceptJS {
|
|
|
10078
10129
|
* @param locator - located by CSS|XPath|strict locator.
|
|
10079
10130
|
* @param [offsetX = 0] - (optional, `0` by default) X-axis offset.
|
|
10080
10131
|
* @param [offsetY = 0] - (optional, `0` by default) Y-axis offset.
|
|
10081
|
-
*
|
|
10132
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10082
10133
|
*/
|
|
10083
10134
|
moveCursorTo(locator: CodeceptJS.LocatorOrString, offsetX?: number, offsetY?: number): void;
|
|
10084
10135
|
/**
|
|
10085
|
-
* Saves screenshot of the specified locator to ouput folder (set in codecept.
|
|
10136
|
+
* Saves screenshot of the specified locator to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10086
10137
|
* Filename is relative to output folder.
|
|
10087
10138
|
*
|
|
10088
10139
|
* ```js
|
|
@@ -10090,11 +10141,11 @@ declare namespace CodeceptJS {
|
|
|
10090
10141
|
* ```
|
|
10091
10142
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10092
10143
|
* @param fileName - file name to save.
|
|
10093
|
-
*
|
|
10144
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10094
10145
|
*/
|
|
10095
10146
|
saveElementScreenshot(locator: CodeceptJS.LocatorOrString, fileName: string): void;
|
|
10096
10147
|
/**
|
|
10097
|
-
* Saves a screenshot to ouput folder (set in codecept.
|
|
10148
|
+
* Saves a screenshot to ouput folder (set in codecept.conf.ts or codecept.conf.js).
|
|
10098
10149
|
* Filename is relative to output folder.
|
|
10099
10150
|
* Optionally resize the window to the full available page `scrollHeight` and `scrollWidth` to capture the entire page by passing `true` in as the second argument.
|
|
10100
10151
|
*
|
|
@@ -10104,7 +10155,7 @@ declare namespace CodeceptJS {
|
|
|
10104
10155
|
* ```
|
|
10105
10156
|
* @param fileName - file name to save.
|
|
10106
10157
|
* @param [fullPage = false] - (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
10107
|
-
*
|
|
10158
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10108
10159
|
*/
|
|
10109
10160
|
saveScreenshot(fileName: string, fullPage?: boolean): void;
|
|
10110
10161
|
/**
|
|
@@ -10122,7 +10173,8 @@ declare namespace CodeceptJS {
|
|
|
10122
10173
|
* ]);
|
|
10123
10174
|
* ```
|
|
10124
10175
|
* @param cookie - a cookie object or array of cookie objects.
|
|
10125
|
-
*
|
|
10176
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10177
|
+
*
|
|
10126
10178
|
*
|
|
10127
10179
|
*
|
|
10128
10180
|
* Uses Selenium's JSON [cookie
|
|
@@ -10138,7 +10190,7 @@ declare namespace CodeceptJS {
|
|
|
10138
10190
|
* I.clearCookie('test');
|
|
10139
10191
|
* ```
|
|
10140
10192
|
* @param [cookie = null] - (optional, `null` by default) cookie name
|
|
10141
|
-
*
|
|
10193
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10142
10194
|
*/
|
|
10143
10195
|
clearCookie(cookie?: string): void;
|
|
10144
10196
|
/**
|
|
@@ -10148,7 +10200,7 @@ declare namespace CodeceptJS {
|
|
|
10148
10200
|
* I.seeCookie('Auth');
|
|
10149
10201
|
* ```
|
|
10150
10202
|
* @param name - cookie name.
|
|
10151
|
-
*
|
|
10203
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10152
10204
|
*/
|
|
10153
10205
|
seeCookie(name: string): void;
|
|
10154
10206
|
/**
|
|
@@ -10158,7 +10210,7 @@ declare namespace CodeceptJS {
|
|
|
10158
10210
|
* I.dontSeeCookie('auth'); // no auth cookie
|
|
10159
10211
|
* ```
|
|
10160
10212
|
* @param name - cookie name.
|
|
10161
|
-
*
|
|
10213
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10162
10214
|
*/
|
|
10163
10215
|
dontSeeCookie(name: string): void;
|
|
10164
10216
|
/**
|
|
@@ -10208,7 +10260,7 @@ declare namespace CodeceptJS {
|
|
|
10208
10260
|
* I.pressKeyUp('Control');
|
|
10209
10261
|
* ```
|
|
10210
10262
|
* @param key - name of key to press down.
|
|
10211
|
-
*
|
|
10263
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10212
10264
|
*/
|
|
10213
10265
|
pressKeyDown(key: string): void;
|
|
10214
10266
|
/**
|
|
@@ -10222,7 +10274,7 @@ declare namespace CodeceptJS {
|
|
|
10222
10274
|
* I.pressKeyUp('Control');
|
|
10223
10275
|
* ```
|
|
10224
10276
|
* @param key - name of key to release.
|
|
10225
|
-
*
|
|
10277
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10226
10278
|
*/
|
|
10227
10279
|
pressKeyUp(key: string): void;
|
|
10228
10280
|
/**
|
|
@@ -10284,7 +10336,7 @@ declare namespace CodeceptJS {
|
|
|
10284
10336
|
* - `'Space'`
|
|
10285
10337
|
* - `'Tab'`
|
|
10286
10338
|
* @param key - key or array of keys to press.
|
|
10287
|
-
*
|
|
10339
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10288
10340
|
*
|
|
10289
10341
|
*
|
|
10290
10342
|
* _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.
|
|
@@ -10307,7 +10359,7 @@ declare namespace CodeceptJS {
|
|
|
10307
10359
|
* ```
|
|
10308
10360
|
* @param key - or array of keys to type.
|
|
10309
10361
|
* @param [delay = null] - (optional) delay in ms between key presses
|
|
10310
|
-
*
|
|
10362
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10311
10363
|
*/
|
|
10312
10364
|
type(key: string | string[], delay?: number): void;
|
|
10313
10365
|
/**
|
|
@@ -10315,7 +10367,8 @@ declare namespace CodeceptJS {
|
|
|
10315
10367
|
* First parameter can be set to `maximize`.
|
|
10316
10368
|
* @param width - width in pixels or `maximize`.
|
|
10317
10369
|
* @param height - height in pixels.
|
|
10318
|
-
*
|
|
10370
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10371
|
+
*
|
|
10319
10372
|
* Appium: not tested in web, in apps doesn't work
|
|
10320
10373
|
*/
|
|
10321
10374
|
resizeWindow(width: number, height: number): void;
|
|
@@ -10327,7 +10380,8 @@ declare namespace CodeceptJS {
|
|
|
10327
10380
|
* ```
|
|
10328
10381
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
10329
10382
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
10330
|
-
*
|
|
10383
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10384
|
+
*
|
|
10331
10385
|
* Appium: not tested
|
|
10332
10386
|
*/
|
|
10333
10387
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString): void;
|
|
@@ -10341,7 +10395,7 @@ declare namespace CodeceptJS {
|
|
|
10341
10395
|
* ```
|
|
10342
10396
|
* @param locator - located by label|name|CSS|XPath|strict locator.
|
|
10343
10397
|
* @param offsetX - position to drag.
|
|
10344
|
-
*
|
|
10398
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10345
10399
|
*/
|
|
10346
10400
|
dragSlider(locator: CodeceptJS.LocatorOrString, offsetX: number): void;
|
|
10347
10401
|
/**
|
|
@@ -10384,7 +10438,7 @@ declare namespace CodeceptJS {
|
|
|
10384
10438
|
* I.closeOtherTabs();
|
|
10385
10439
|
* ```
|
|
10386
10440
|
*
|
|
10387
|
-
*
|
|
10441
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10388
10442
|
*/
|
|
10389
10443
|
closeOtherTabs(): void;
|
|
10390
10444
|
/**
|
|
@@ -10394,7 +10448,7 @@ declare namespace CodeceptJS {
|
|
|
10394
10448
|
* I.wait(2); // wait 2 secs
|
|
10395
10449
|
* ```
|
|
10396
10450
|
* @param sec - number of second to wait.
|
|
10397
|
-
*
|
|
10451
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10398
10452
|
*/
|
|
10399
10453
|
wait(sec: number): void;
|
|
10400
10454
|
/**
|
|
@@ -10402,7 +10456,7 @@ declare namespace CodeceptJS {
|
|
|
10402
10456
|
* Element can be located by CSS or XPath.
|
|
10403
10457
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10404
10458
|
* @param [sec = 1] - (optional) time in seconds to wait, 1 by default.
|
|
10405
|
-
*
|
|
10459
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10406
10460
|
*/
|
|
10407
10461
|
waitForEnabled(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10408
10462
|
/**
|
|
@@ -10415,7 +10469,7 @@ declare namespace CodeceptJS {
|
|
|
10415
10469
|
* ```
|
|
10416
10470
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10417
10471
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10418
|
-
*
|
|
10472
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10419
10473
|
*/
|
|
10420
10474
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10421
10475
|
/**
|
|
@@ -10428,7 +10482,7 @@ declare namespace CodeceptJS {
|
|
|
10428
10482
|
* ```
|
|
10429
10483
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10430
10484
|
* @param [sec] - (optional, `1` by default) time in seconds to wait
|
|
10431
|
-
*
|
|
10485
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10432
10486
|
*/
|
|
10433
10487
|
waitForClickable(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10434
10488
|
/**
|
|
@@ -10439,7 +10493,7 @@ declare namespace CodeceptJS {
|
|
|
10439
10493
|
* ```
|
|
10440
10494
|
* @param urlPart - value to check.
|
|
10441
10495
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10442
|
-
*
|
|
10496
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10443
10497
|
*/
|
|
10444
10498
|
waitInUrl(urlPart: string, sec?: number): void;
|
|
10445
10499
|
/**
|
|
@@ -10451,7 +10505,7 @@ declare namespace CodeceptJS {
|
|
|
10451
10505
|
* ```
|
|
10452
10506
|
* @param urlPart - value to check.
|
|
10453
10507
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10454
|
-
*
|
|
10508
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10455
10509
|
*/
|
|
10456
10510
|
waitUrlEquals(urlPart: string, sec?: number): void;
|
|
10457
10511
|
/**
|
|
@@ -10466,7 +10520,7 @@ declare namespace CodeceptJS {
|
|
|
10466
10520
|
* @param text - to wait for.
|
|
10467
10521
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10468
10522
|
* @param [context = null] - (optional) element located by CSS|XPath|strict locator.
|
|
10469
|
-
*
|
|
10523
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10470
10524
|
*/
|
|
10471
10525
|
waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
|
|
10472
10526
|
/**
|
|
@@ -10478,7 +10532,7 @@ declare namespace CodeceptJS {
|
|
|
10478
10532
|
* @param field - input field.
|
|
10479
10533
|
* @param value - expected value.
|
|
10480
10534
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10481
|
-
*
|
|
10535
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10482
10536
|
*/
|
|
10483
10537
|
waitForValue(field: LocatorOrString, value: string, sec?: number): void;
|
|
10484
10538
|
/**
|
|
@@ -10490,7 +10544,7 @@ declare namespace CodeceptJS {
|
|
|
10490
10544
|
* ```
|
|
10491
10545
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10492
10546
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10493
|
-
*
|
|
10547
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10494
10548
|
*/
|
|
10495
10549
|
waitForVisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10496
10550
|
/**
|
|
@@ -10502,7 +10556,7 @@ declare namespace CodeceptJS {
|
|
|
10502
10556
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10503
10557
|
* @param num - number of elements.
|
|
10504
10558
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10505
|
-
*
|
|
10559
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10506
10560
|
*/
|
|
10507
10561
|
waitNumberOfVisibleElements(locator: CodeceptJS.LocatorOrString, num: number, sec?: number): void;
|
|
10508
10562
|
/**
|
|
@@ -10514,7 +10568,7 @@ declare namespace CodeceptJS {
|
|
|
10514
10568
|
* ```
|
|
10515
10569
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10516
10570
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10517
|
-
*
|
|
10571
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10518
10572
|
*/
|
|
10519
10573
|
waitForInvisible(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10520
10574
|
/**
|
|
@@ -10526,7 +10580,7 @@ declare namespace CodeceptJS {
|
|
|
10526
10580
|
* ```
|
|
10527
10581
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10528
10582
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10529
|
-
*
|
|
10583
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10530
10584
|
*/
|
|
10531
10585
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10532
10586
|
/**
|
|
@@ -10538,7 +10592,7 @@ declare namespace CodeceptJS {
|
|
|
10538
10592
|
* ```
|
|
10539
10593
|
* @param locator - element located by CSS|XPath|strict locator.
|
|
10540
10594
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
10541
|
-
*
|
|
10595
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10542
10596
|
*/
|
|
10543
10597
|
waitForDetached(locator: CodeceptJS.LocatorOrString, sec?: number): void;
|
|
10544
10598
|
/**
|
|
@@ -10557,7 +10611,7 @@ declare namespace CodeceptJS {
|
|
|
10557
10611
|
* @param fn - to be executed in browser context.
|
|
10558
10612
|
* @param [argsOrSec = null] - (optional, `1` by default) arguments for function or seconds.
|
|
10559
10613
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10560
|
-
*
|
|
10614
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10561
10615
|
*/
|
|
10562
10616
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
|
|
10563
10617
|
/**
|
|
@@ -10568,7 +10622,7 @@ declare namespace CodeceptJS {
|
|
|
10568
10622
|
* I.switchTo(); // switch back to main page
|
|
10569
10623
|
* ```
|
|
10570
10624
|
* @param [locator = null] - (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
10571
|
-
*
|
|
10625
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10572
10626
|
*/
|
|
10573
10627
|
switchTo(locator?: CodeceptJS.LocatorOrString): void;
|
|
10574
10628
|
/**
|
|
@@ -10580,7 +10634,7 @@ declare namespace CodeceptJS {
|
|
|
10580
10634
|
* ```
|
|
10581
10635
|
* @param [num = 1] - (optional) number of tabs to switch forward, default: 1.
|
|
10582
10636
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10583
|
-
*
|
|
10637
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10584
10638
|
*/
|
|
10585
10639
|
switchToNextTab(num?: number, sec?: number | null): void;
|
|
10586
10640
|
/**
|
|
@@ -10592,7 +10646,7 @@ declare namespace CodeceptJS {
|
|
|
10592
10646
|
* ```
|
|
10593
10647
|
* @param [num = 1] - (optional) number of tabs to switch backward, default: 1.
|
|
10594
10648
|
* @param [sec = null] - (optional) time in seconds to wait.
|
|
10595
|
-
*
|
|
10649
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10596
10650
|
*/
|
|
10597
10651
|
switchToPreviousTab(num?: number, sec?: number): void;
|
|
10598
10652
|
/**
|
|
@@ -10602,7 +10656,7 @@ declare namespace CodeceptJS {
|
|
|
10602
10656
|
* I.closeCurrentTab();
|
|
10603
10657
|
* ```
|
|
10604
10658
|
*
|
|
10605
|
-
*
|
|
10659
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10606
10660
|
*/
|
|
10607
10661
|
closeCurrentTab(): void;
|
|
10608
10662
|
/**
|
|
@@ -10612,7 +10666,7 @@ declare namespace CodeceptJS {
|
|
|
10612
10666
|
* I.openNewTab();
|
|
10613
10667
|
* ```
|
|
10614
10668
|
*
|
|
10615
|
-
*
|
|
10669
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10616
10670
|
*/
|
|
10617
10671
|
openNewTab(): void;
|
|
10618
10672
|
/**
|
|
@@ -10631,7 +10685,7 @@ declare namespace CodeceptJS {
|
|
|
10631
10685
|
* ```js
|
|
10632
10686
|
* I.refreshPage();
|
|
10633
10687
|
* ```
|
|
10634
|
-
*
|
|
10688
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10635
10689
|
*/
|
|
10636
10690
|
refreshPage(): void;
|
|
10637
10691
|
/**
|
|
@@ -10640,7 +10694,7 @@ declare namespace CodeceptJS {
|
|
|
10640
10694
|
* ```js
|
|
10641
10695
|
* I.scrollPageToTop();
|
|
10642
10696
|
* ```
|
|
10643
|
-
*
|
|
10697
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10644
10698
|
*/
|
|
10645
10699
|
scrollPageToTop(): void;
|
|
10646
10700
|
/**
|
|
@@ -10649,7 +10703,7 @@ declare namespace CodeceptJS {
|
|
|
10649
10703
|
* ```js
|
|
10650
10704
|
* I.scrollPageToBottom();
|
|
10651
10705
|
* ```
|
|
10652
|
-
*
|
|
10706
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10653
10707
|
*/
|
|
10654
10708
|
scrollPageToBottom(): void;
|
|
10655
10709
|
/**
|
|
@@ -10673,7 +10727,7 @@ declare namespace CodeceptJS {
|
|
|
10673
10727
|
* @param latitude - to set.
|
|
10674
10728
|
* @param longitude - to set
|
|
10675
10729
|
* @param [altitude = null] - (optional, null by default) to set
|
|
10676
|
-
*
|
|
10730
|
+
* ⚠️ returns a _promise_ which is synchronized internally by recorder
|
|
10677
10731
|
*/
|
|
10678
10732
|
setGeoLocation(latitude: number, longitude: number, altitude?: number): void;
|
|
10679
10733
|
/**
|
|
@@ -10786,7 +10840,7 @@ declare namespace CodeceptJS {
|
|
|
10786
10840
|
* If directory provided:
|
|
10787
10841
|
* * try to load `codecept.config.js` from it
|
|
10788
10842
|
* * try to load `codecept.conf.js` from it
|
|
10789
|
-
* * try to load `codecept.
|
|
10843
|
+
* * try to load `codecept.js` from it
|
|
10790
10844
|
* If none of above: fail.
|
|
10791
10845
|
*/
|
|
10792
10846
|
static load(configFile: string): any;
|