codeceptjs 3.5.10 → 3.5.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/command/run-multiple.js +3 -1
- package/lib/command/run-workers.js +32 -1
- package/lib/command/workers/runTests.js +18 -2
- package/lib/helper/Expect.js +33 -33
- package/lib/helper/Playwright.js +49 -26
- package/lib/helper/Puppeteer.js +41 -19
- package/lib/helper/WebDriver.js +155 -48
- package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
- package/lib/locator.js +17 -4
- package/lib/plugin/retryFailedStep.js +6 -2
- package/lib/plugin/retryTo.js +2 -2
- package/lib/plugin/tryTo.js +5 -4
- package/package.json +25 -22
- package/typings/index.d.ts +8 -5
- package/typings/promiseBasedTypes.d.ts +203 -75
- package/typings/types.d.ts +213 -145
- package/docs/advanced.md +0 -351
- package/docs/ai.md +0 -248
- package/docs/api.md +0 -323
- package/docs/basics.md +0 -979
- package/docs/bdd.md +0 -539
- package/docs/best.md +0 -237
- package/docs/books.md +0 -37
- package/docs/bootstrap.md +0 -135
- package/docs/build/ApiDataFactory.js +0 -410
- package/docs/build/Appium.js +0 -2027
- package/docs/build/Expect.js +0 -422
- package/docs/build/FileSystem.js +0 -228
- package/docs/build/GraphQL.js +0 -229
- package/docs/build/GraphQLDataFactory.js +0 -309
- package/docs/build/JSONResponse.js +0 -338
- package/docs/build/Mochawesome.js +0 -71
- package/docs/build/Nightmare.js +0 -2152
- package/docs/build/OpenAI.js +0 -126
- package/docs/build/Playwright.js +0 -5078
- package/docs/build/Protractor.js +0 -2706
- package/docs/build/Puppeteer.js +0 -3874
- package/docs/build/REST.js +0 -344
- package/docs/build/TestCafe.js +0 -2125
- package/docs/build/WebDriver.js +0 -4124
- package/docs/changelog.md +0 -2572
- package/docs/commands.md +0 -266
- package/docs/community-helpers.md +0 -58
- package/docs/configuration.md +0 -157
- package/docs/continuous-integration.md +0 -22
- package/docs/custom-helpers.md +0 -306
- package/docs/data.md +0 -379
- package/docs/detox.md +0 -235
- package/docs/docker.md +0 -136
- package/docs/email.md +0 -183
- package/docs/examples.md +0 -149
- package/docs/helpers/ApiDataFactory.md +0 -266
- package/docs/helpers/Appium.md +0 -1374
- package/docs/helpers/Detox.md +0 -586
- package/docs/helpers/Expect.md +0 -275
- package/docs/helpers/FileSystem.md +0 -152
- package/docs/helpers/GraphQL.md +0 -151
- package/docs/helpers/GraphQLDataFactory.md +0 -226
- package/docs/helpers/JSONResponse.md +0 -254
- package/docs/helpers/Mochawesome.md +0 -8
- package/docs/helpers/MockRequest.md +0 -377
- package/docs/helpers/Nightmare.md +0 -1305
- package/docs/helpers/OpenAI.md +0 -70
- package/docs/helpers/Playwright.md +0 -2706
- package/docs/helpers/Polly.md +0 -44
- package/docs/helpers/Protractor.md +0 -1769
- package/docs/helpers/Puppeteer-firefox.md +0 -86
- package/docs/helpers/Puppeteer.md +0 -2291
- package/docs/helpers/REST.md +0 -218
- package/docs/helpers/TestCafe.md +0 -1321
- package/docs/helpers/WebDriver.md +0 -2460
- package/docs/hooks.md +0 -340
- package/docs/index.md +0 -111
- package/docs/installation.md +0 -75
- package/docs/internal-api.md +0 -266
- package/docs/locators.md +0 -331
- package/docs/mobile-react-native-locators.md +0 -67
- package/docs/mobile.md +0 -338
- package/docs/pageobjects.md +0 -291
- package/docs/parallel.md +0 -400
- package/docs/playwright.md +0 -632
- package/docs/plugins.md +0 -1259
- package/docs/puppeteer.md +0 -316
- package/docs/quickstart.md +0 -162
- package/docs/react.md +0 -69
- package/docs/reports.md +0 -392
- package/docs/secrets.md +0 -36
- package/docs/shadow.md +0 -68
- package/docs/shared/keys.mustache +0 -31
- package/docs/shared/react.mustache +0 -1
- package/docs/testcafe.md +0 -174
- package/docs/translation.md +0 -247
- package/docs/tutorial.md +0 -271
- package/docs/typescript.md +0 -180
- package/docs/ui.md +0 -59
- package/docs/videos.md +0 -28
- package/docs/visual.md +0 -202
- package/docs/vue.md +0 -121
- package/docs/webapi/amOnPage.mustache +0 -11
- package/docs/webapi/appendField.mustache +0 -11
- package/docs/webapi/attachFile.mustache +0 -12
- package/docs/webapi/blur.mustache +0 -18
- package/docs/webapi/checkOption.mustache +0 -13
- package/docs/webapi/clearCookie.mustache +0 -9
- package/docs/webapi/clearField.mustache +0 -9
- package/docs/webapi/click.mustache +0 -25
- package/docs/webapi/clickLink.mustache +0 -8
- package/docs/webapi/closeCurrentTab.mustache +0 -7
- package/docs/webapi/closeOtherTabs.mustache +0 -8
- package/docs/webapi/dontSee.mustache +0 -11
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +0 -10
- package/docs/webapi/dontSeeCookie.mustache +0 -8
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +0 -10
- package/docs/webapi/dontSeeElement.mustache +0 -8
- package/docs/webapi/dontSeeElementInDOM.mustache +0 -8
- package/docs/webapi/dontSeeInCurrentUrl.mustache +0 -4
- package/docs/webapi/dontSeeInField.mustache +0 -11
- package/docs/webapi/dontSeeInSource.mustache +0 -8
- package/docs/webapi/dontSeeInTitle.mustache +0 -8
- package/docs/webapi/doubleClick.mustache +0 -13
- package/docs/webapi/downloadFile.mustache +0 -12
- package/docs/webapi/dragAndDrop.mustache +0 -9
- package/docs/webapi/dragSlider.mustache +0 -11
- package/docs/webapi/executeAsyncScript.mustache +0 -24
- package/docs/webapi/executeScript.mustache +0 -26
- package/docs/webapi/fillField.mustache +0 -16
- package/docs/webapi/focus.mustache +0 -13
- package/docs/webapi/forceClick.mustache +0 -28
- package/docs/webapi/forceRightClick.mustache +0 -18
- package/docs/webapi/grabAllWindowHandles.mustache +0 -7
- package/docs/webapi/grabAttributeFrom.mustache +0 -10
- package/docs/webapi/grabAttributeFromAll.mustache +0 -9
- package/docs/webapi/grabBrowserLogs.mustache +0 -9
- package/docs/webapi/grabCookie.mustache +0 -11
- package/docs/webapi/grabCssPropertyFrom.mustache +0 -11
- package/docs/webapi/grabCssPropertyFromAll.mustache +0 -10
- package/docs/webapi/grabCurrentUrl.mustache +0 -9
- package/docs/webapi/grabCurrentWindowHandle.mustache +0 -6
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +0 -20
- package/docs/webapi/grabElementBoundingRect.mustache +0 -20
- package/docs/webapi/grabGeoLocation.mustache +0 -8
- package/docs/webapi/grabHTMLFrom.mustache +0 -10
- package/docs/webapi/grabHTMLFromAll.mustache +0 -9
- package/docs/webapi/grabNumberOfOpenTabs.mustache +0 -8
- package/docs/webapi/grabNumberOfVisibleElements.mustache +0 -9
- package/docs/webapi/grabPageScrollPosition.mustache +0 -8
- package/docs/webapi/grabPopupText.mustache +0 -5
- package/docs/webapi/grabSource.mustache +0 -8
- package/docs/webapi/grabTextFrom.mustache +0 -10
- package/docs/webapi/grabTextFromAll.mustache +0 -9
- package/docs/webapi/grabTitle.mustache +0 -8
- package/docs/webapi/grabValueFrom.mustache +0 -9
- package/docs/webapi/grabValueFromAll.mustache +0 -8
- package/docs/webapi/grabWebElement.mustache +0 -9
- package/docs/webapi/grabWebElements.mustache +0 -9
- package/docs/webapi/moveCursorTo.mustache +0 -12
- package/docs/webapi/openNewTab.mustache +0 -7
- package/docs/webapi/pressKey.mustache +0 -12
- package/docs/webapi/pressKeyDown.mustache +0 -12
- package/docs/webapi/pressKeyUp.mustache +0 -12
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +0 -60
- package/docs/webapi/refreshPage.mustache +0 -6
- package/docs/webapi/resizeWindow.mustache +0 -6
- package/docs/webapi/rightClick.mustache +0 -14
- package/docs/webapi/saveElementScreenshot.mustache +0 -10
- package/docs/webapi/saveScreenshot.mustache +0 -12
- package/docs/webapi/say.mustache +0 -10
- package/docs/webapi/scrollIntoView.mustache +0 -11
- package/docs/webapi/scrollPageToBottom.mustache +0 -6
- package/docs/webapi/scrollPageToTop.mustache +0 -6
- package/docs/webapi/scrollTo.mustache +0 -12
- package/docs/webapi/see.mustache +0 -11
- package/docs/webapi/seeAttributesOnElements.mustache +0 -9
- package/docs/webapi/seeCheckboxIsChecked.mustache +0 -10
- package/docs/webapi/seeCookie.mustache +0 -8
- package/docs/webapi/seeCssPropertiesOnElements.mustache +0 -9
- package/docs/webapi/seeCurrentUrlEquals.mustache +0 -11
- package/docs/webapi/seeElement.mustache +0 -8
- package/docs/webapi/seeElementInDOM.mustache +0 -8
- package/docs/webapi/seeInCurrentUrl.mustache +0 -8
- package/docs/webapi/seeInField.mustache +0 -12
- package/docs/webapi/seeInPopup.mustache +0 -8
- package/docs/webapi/seeInSource.mustache +0 -7
- package/docs/webapi/seeInTitle.mustache +0 -8
- package/docs/webapi/seeNumberOfElements.mustache +0 -11
- package/docs/webapi/seeNumberOfVisibleElements.mustache +0 -10
- package/docs/webapi/seeTextEquals.mustache +0 -9
- package/docs/webapi/seeTitleEquals.mustache +0 -8
- package/docs/webapi/selectOption.mustache +0 -21
- package/docs/webapi/setCookie.mustache +0 -16
- package/docs/webapi/setGeoLocation.mustache +0 -12
- package/docs/webapi/switchTo.mustache +0 -9
- package/docs/webapi/switchToNextTab.mustache +0 -10
- package/docs/webapi/switchToPreviousTab.mustache +0 -10
- package/docs/webapi/type.mustache +0 -21
- package/docs/webapi/uncheckOption.mustache +0 -13
- package/docs/webapi/wait.mustache +0 -8
- package/docs/webapi/waitForClickable.mustache +0 -11
- package/docs/webapi/waitForDetached.mustache +0 -10
- package/docs/webapi/waitForElement.mustache +0 -11
- package/docs/webapi/waitForEnabled.mustache +0 -6
- package/docs/webapi/waitForFunction.mustache +0 -17
- package/docs/webapi/waitForInvisible.mustache +0 -10
- package/docs/webapi/waitForText.mustache +0 -13
- package/docs/webapi/waitForValue.mustache +0 -10
- package/docs/webapi/waitForVisible.mustache +0 -10
- package/docs/webapi/waitInUrl.mustache +0 -9
- package/docs/webapi/waitNumberOfVisibleElements.mustache +0 -10
- package/docs/webapi/waitToHide.mustache +0 -10
- package/docs/webapi/waitUrlEquals.mustache +0 -10
- package/docs/webdriver.md +0 -655
- package/docs/wiki/Books-&-Posts.md +0 -27
- package/docs/wiki/Community-Helpers-&-Plugins.md +0 -53
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +0 -61
- package/docs/wiki/Examples.md +0 -145
- package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -68
- package/docs/wiki/Home.md +0 -16
- package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +0 -83
- package/docs/wiki/Release-Process.md +0 -24
- package/docs/wiki/Roadmap.md +0 -23
- package/docs/wiki/Tests.md +0 -1393
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -153
- package/docs/wiki/Videos.md +0 -19
- package/lib/helper/extras/PlaywrightReact.js +0 -9
|
@@ -972,9 +972,9 @@ declare namespace CodeceptJS {
|
|
|
972
972
|
* I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
|
|
973
973
|
* ```
|
|
974
974
|
* @param locator - located by CSS|XPath|strict locator.
|
|
975
|
-
* @param scrollIntoViewOptions -
|
|
975
|
+
* @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
976
976
|
*/
|
|
977
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
|
|
977
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): Promise<any>;
|
|
978
978
|
/**
|
|
979
979
|
* Verifies that the specified checkbox is checked.
|
|
980
980
|
*
|
|
@@ -1107,7 +1107,7 @@ declare namespace CodeceptJS {
|
|
|
1107
1107
|
* {
|
|
1108
1108
|
* helpers: {
|
|
1109
1109
|
* Playwright: {...},
|
|
1110
|
-
*
|
|
1110
|
+
* Expect: {},
|
|
1111
1111
|
* }
|
|
1112
1112
|
* }
|
|
1113
1113
|
* ```
|
|
@@ -1115,57 +1115,51 @@ declare namespace CodeceptJS {
|
|
|
1115
1115
|
* ## Methods
|
|
1116
1116
|
*/
|
|
1117
1117
|
class ExpectHelper {
|
|
1118
|
-
expectEqual(actualValue: any, expectedValue: any, customErrorMsg
|
|
1119
|
-
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg
|
|
1120
|
-
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg
|
|
1121
|
-
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg
|
|
1122
|
-
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg
|
|
1123
|
-
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg
|
|
1124
|
-
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg
|
|
1125
|
-
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg
|
|
1126
|
-
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg
|
|
1127
|
-
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg
|
|
1128
|
-
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg
|
|
1118
|
+
expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1119
|
+
expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1120
|
+
expectDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1121
|
+
expectNotDeepEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1122
|
+
expectContain(actualValue: any, expectedValueToContain: any, customErrorMsg?: any): Promise<any>;
|
|
1123
|
+
expectNotContain(actualValue: any, expectedValueToNotContain: any, customErrorMsg?: any): Promise<any>;
|
|
1124
|
+
expectStartsWith(actualValue: any, expectedValueToStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1125
|
+
expectNotStartsWith(actualValue: any, expectedValueToNotStartWith: any, customErrorMsg?: any): Promise<any>;
|
|
1126
|
+
expectEndsWith(actualValue: any, expectedValueToEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1127
|
+
expectNotEndsWith(actualValue: any, expectedValueToNotEndWith: any, customErrorMsg?: any): Promise<any>;
|
|
1128
|
+
expectJsonSchema(targetData: any, jsonSchema: any, customErrorMsg?: any): Promise<any>;
|
|
1129
1129
|
/**
|
|
1130
1130
|
* @param ajvOptions - Pass AJV options
|
|
1131
1131
|
*/
|
|
1132
|
-
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg
|
|
1133
|
-
expectHasProperty(targetData: any, propertyName: any, customErrorMsg
|
|
1134
|
-
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg
|
|
1135
|
-
expectToBeA(targetData: any, type: any, customErrorMsg
|
|
1136
|
-
expectToBeAn(targetData: any, type: any, customErrorMsg
|
|
1137
|
-
expectMatchRegex(targetData: any, regex: any, customErrorMsg
|
|
1138
|
-
expectLengthOf(targetData: any, length: any, customErrorMsg
|
|
1139
|
-
expectEmpty(targetData: any, customErrorMsg
|
|
1140
|
-
expectTrue(targetData: any, customErrorMsg
|
|
1141
|
-
expectFalse(targetData: any, customErrorMsg
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
* @param belowThan - number | Date
|
|
1148
|
-
*/
|
|
1149
|
-
expectBelow(targetData: any, belowThan: any, customErrorMsg: any): Promise<any>;
|
|
1150
|
-
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg: any): Promise<any>;
|
|
1151
|
-
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg: any): Promise<any>;
|
|
1152
|
-
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg: any): Promise<any>;
|
|
1132
|
+
expectJsonSchemaUsingAJV(targetData: any, jsonSchema: any, customErrorMsg?: any, ajvOptions: any): Promise<any>;
|
|
1133
|
+
expectHasProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1134
|
+
expectHasAProperty(targetData: any, propertyName: any, customErrorMsg?: any): Promise<any>;
|
|
1135
|
+
expectToBeA(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1136
|
+
expectToBeAn(targetData: any, type: any, customErrorMsg?: any): Promise<any>;
|
|
1137
|
+
expectMatchRegex(targetData: any, regex: any, customErrorMsg?: any): Promise<any>;
|
|
1138
|
+
expectLengthOf(targetData: any, length: any, customErrorMsg?: any): Promise<any>;
|
|
1139
|
+
expectEmpty(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1140
|
+
expectTrue(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1141
|
+
expectFalse(targetData: any, customErrorMsg?: any): Promise<any>;
|
|
1142
|
+
expectAbove(targetData: any, aboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1143
|
+
expectBelow(targetData: any, belowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1144
|
+
expectLengthAboveThan(targetData: any, lengthAboveThan: any, customErrorMsg?: any): Promise<any>;
|
|
1145
|
+
expectLengthBelowThan(targetData: any, lengthBelowThan: any, customErrorMsg?: any): Promise<any>;
|
|
1146
|
+
expectEqualIgnoreCase(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1153
1147
|
/**
|
|
1154
1148
|
* expects members of two arrays are deeply equal
|
|
1155
1149
|
*/
|
|
1156
|
-
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg
|
|
1150
|
+
expectDeepMembers(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
|
|
1157
1151
|
/**
|
|
1158
1152
|
* expects an array to be a superset of another array
|
|
1159
1153
|
*/
|
|
1160
|
-
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg
|
|
1154
|
+
expectDeepIncludeMembers(superset: any, set: any, customErrorMsg?: any): Promise<any>;
|
|
1161
1155
|
/**
|
|
1162
1156
|
* expects members of two JSON objects are deeply equal excluding some properties
|
|
1163
1157
|
*/
|
|
1164
|
-
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg
|
|
1158
|
+
expectDeepEqualExcluding(actualValue: any, expectedValue: any, fieldsToExclude: any, customErrorMsg?: any): Promise<any>;
|
|
1165
1159
|
/**
|
|
1166
1160
|
* expects a JSON object matches a provided pattern
|
|
1167
1161
|
*/
|
|
1168
|
-
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg
|
|
1162
|
+
expectMatchesPattern(actualValue: any, expectedPattern: any, customErrorMsg?: any): Promise<any>;
|
|
1169
1163
|
}
|
|
1170
1164
|
/**
|
|
1171
1165
|
* Helper for testing filesystem.
|
|
@@ -2950,7 +2944,7 @@ declare namespace CodeceptJS {
|
|
|
2950
2944
|
* });
|
|
2951
2945
|
* ```
|
|
2952
2946
|
* @param description - used to show in logs.
|
|
2953
|
-
* @param fn - async function that executed with Playwright helper as
|
|
2947
|
+
* @param fn - async function that executed with Playwright helper as arguments
|
|
2954
2948
|
*/
|
|
2955
2949
|
usePlaywrightTo(description: string, fn: (...params: any[]) => any): Promise<any>;
|
|
2956
2950
|
/**
|
|
@@ -3035,6 +3029,18 @@ declare namespace CodeceptJS {
|
|
|
3035
3029
|
*/
|
|
3036
3030
|
amOnPage(url: string): Promise<any>;
|
|
3037
3031
|
/**
|
|
3032
|
+
* Unlike other drivers Playwright changes the size of a viewport, not the window!
|
|
3033
|
+
* Playwright does not control the window of a browser, so it can't adjust its real size.
|
|
3034
|
+
* It also can't maximize a window.
|
|
3035
|
+
*
|
|
3036
|
+
* Update configuration to change real window size on start:
|
|
3037
|
+
*
|
|
3038
|
+
* ```js
|
|
3039
|
+
* // inside codecept.conf.js
|
|
3040
|
+
* // @codeceptjs/configure package must be installed
|
|
3041
|
+
* { setWindowSize } = require('@codeceptjs/configure');
|
|
3042
|
+
* ````
|
|
3043
|
+
*
|
|
3038
3044
|
* Resize the current window to provided width and height.
|
|
3039
3045
|
* First parameter can be set to `maximize`.
|
|
3040
3046
|
* @param width - width in pixels or `maximize`.
|
|
@@ -3111,6 +3117,13 @@ declare namespace CodeceptJS {
|
|
|
3111
3117
|
*/
|
|
3112
3118
|
grabDisabledElementStatus(locator: CodeceptJS.LocatorOrString, options?: any): Promise<boolean>;
|
|
3113
3119
|
/**
|
|
3120
|
+
* ```js
|
|
3121
|
+
* // specify coordinates for source position
|
|
3122
|
+
* I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
|
|
3123
|
+
* ```
|
|
3124
|
+
*
|
|
3125
|
+
* > When no option is set, custom drag and drop would be used, to use the dragAndDrop API from Playwright, please set options, for example `force: true`
|
|
3126
|
+
*
|
|
3114
3127
|
* Drag an item to a destination element.
|
|
3115
3128
|
*
|
|
3116
3129
|
* ```js
|
|
@@ -3119,13 +3132,6 @@ declare namespace CodeceptJS {
|
|
|
3119
3132
|
* @param srcElement - located by CSS|XPath|strict locator.
|
|
3120
3133
|
* @param destElement - located by CSS|XPath|strict locator.
|
|
3121
3134
|
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-drag-and-drop) can be passed as 3rd argument.
|
|
3122
|
-
*
|
|
3123
|
-
* ```js
|
|
3124
|
-
* // specify coordinates for source position
|
|
3125
|
-
* I.dragAndDrop('img.src', 'img.dst', { sourcePosition: {x: 10, y: 10} })
|
|
3126
|
-
* ```
|
|
3127
|
-
*
|
|
3128
|
-
* > When no option is set, custom drag and drop would be used, to use the dragAndDrop API from Playwright, please set options, for example `force: true`
|
|
3129
3135
|
*/
|
|
3130
3136
|
dragAndDrop(srcElement: LocatorOrString, destElement: LocatorOrString, options?: any): Promise<any>;
|
|
3131
3137
|
/**
|
|
@@ -3441,12 +3447,7 @@ declare namespace CodeceptJS {
|
|
|
3441
3447
|
* // using strict locator
|
|
3442
3448
|
* I.click({css: 'nav a.login'});
|
|
3443
3449
|
* ```
|
|
3444
|
-
* @
|
|
3445
|
-
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3446
|
-
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
3447
|
-
*
|
|
3448
|
-
* Examples:
|
|
3449
|
-
*
|
|
3450
|
+
* @example
|
|
3450
3451
|
* ```js
|
|
3451
3452
|
* // click on element at position
|
|
3452
3453
|
* I.click('canvas', '.model', { position: { x: 20, y: 40 } })
|
|
@@ -3454,6 +3455,9 @@ declare namespace CodeceptJS {
|
|
|
3454
3455
|
* // make ctrl-click
|
|
3455
3456
|
* I.click('.edit', null, { modifiers: ['Ctrl'] } )
|
|
3456
3457
|
* ```
|
|
3458
|
+
* @param locator - clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
3459
|
+
* @param [context = null] - (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
3460
|
+
* @param [options] - [Additional options](https://playwright.dev/docs/api/class-page#page-click) for click available as 3rd argument.
|
|
3457
3461
|
*/
|
|
3458
3462
|
click(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString | null, options?: any): Promise<any>;
|
|
3459
3463
|
/**
|
|
@@ -3519,6 +3523,16 @@ declare namespace CodeceptJS {
|
|
|
3519
3523
|
*/
|
|
3520
3524
|
rightClick(locator: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3521
3525
|
/**
|
|
3526
|
+
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-check) for check available as 3rd argument.
|
|
3527
|
+
*
|
|
3528
|
+
* Examples:
|
|
3529
|
+
*
|
|
3530
|
+
* ```js
|
|
3531
|
+
* // click on element at position
|
|
3532
|
+
* I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
3533
|
+
* ```
|
|
3534
|
+
* > ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
3535
|
+
*
|
|
3522
3536
|
* Selects a checkbox or radio button.
|
|
3523
3537
|
* Element is located by label or name or CSS or XPath.
|
|
3524
3538
|
*
|
|
@@ -3534,6 +3548,16 @@ declare namespace CodeceptJS {
|
|
|
3534
3548
|
*/
|
|
3535
3549
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
3536
3550
|
/**
|
|
3551
|
+
* [Additional options](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck) for uncheck available as 3rd argument.
|
|
3552
|
+
*
|
|
3553
|
+
* Examples:
|
|
3554
|
+
*
|
|
3555
|
+
* ```js
|
|
3556
|
+
* // click on element at position
|
|
3557
|
+
* I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
|
|
3558
|
+
* ```
|
|
3559
|
+
* > ⚠️ To avoid flakiness, option `force: true` is set by default
|
|
3560
|
+
*
|
|
3537
3561
|
* Unselects a checkbox or radio button.
|
|
3538
3562
|
* Element is located by label or name or CSS or XPath.
|
|
3539
3563
|
*
|
|
@@ -3597,6 +3621,8 @@ declare namespace CodeceptJS {
|
|
|
3597
3621
|
*/
|
|
3598
3622
|
pressKeyUp(key: string): Promise<any>;
|
|
3599
3623
|
/**
|
|
3624
|
+
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/Puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
3625
|
+
*
|
|
3600
3626
|
* Presses a key in the browser (on a focused element).
|
|
3601
3627
|
*
|
|
3602
3628
|
* _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
|
|
@@ -3981,6 +4007,8 @@ declare namespace CodeceptJS {
|
|
|
3981
4007
|
*/
|
|
3982
4008
|
dontSeeCookie(name: string): Promise<any>;
|
|
3983
4009
|
/**
|
|
4010
|
+
* Returns cookie in JSON format. If name not passed returns all cookies for this domain.
|
|
4011
|
+
*
|
|
3984
4012
|
* Gets a cookie object by name.
|
|
3985
4013
|
* If none provided gets all cookies.
|
|
3986
4014
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
@@ -4015,8 +4043,8 @@ declare namespace CodeceptJS {
|
|
|
4015
4043
|
* ```js
|
|
4016
4044
|
* I.executeScript(({x, y}) => x + y, {x, y});
|
|
4017
4045
|
* ```
|
|
4018
|
-
* You can pass only one parameter into a function
|
|
4019
|
-
*
|
|
4046
|
+
* You can pass only one parameter into a function,
|
|
4047
|
+
* or you can pass in array or object.
|
|
4020
4048
|
*
|
|
4021
4049
|
* ```js
|
|
4022
4050
|
* I.executeScript(([x, y]) => x + y, [x, y]);
|
|
@@ -4285,6 +4313,8 @@ declare namespace CodeceptJS {
|
|
|
4285
4313
|
*/
|
|
4286
4314
|
waitForElement(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4287
4315
|
/**
|
|
4316
|
+
* This method accepts [React selectors](https://codecept.io/react).
|
|
4317
|
+
*
|
|
4288
4318
|
* Waits for an element to become visible on a page (by default waits for 1sec).
|
|
4289
4319
|
* Element can be located by CSS or XPath.
|
|
4290
4320
|
*
|
|
@@ -4317,6 +4347,16 @@ declare namespace CodeceptJS {
|
|
|
4317
4347
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
4318
4348
|
*/
|
|
4319
4349
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
4350
|
+
/**
|
|
4351
|
+
* Waits for number of tabs.
|
|
4352
|
+
*
|
|
4353
|
+
* ```js
|
|
4354
|
+
* I.waitForNumberOfTabs(2);
|
|
4355
|
+
* ```
|
|
4356
|
+
* @param expectedTabs - expecting the number of tabs.
|
|
4357
|
+
* @param sec - number of secs to wait.
|
|
4358
|
+
*/
|
|
4359
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
|
|
4320
4360
|
/**
|
|
4321
4361
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
4322
4362
|
*
|
|
@@ -6188,6 +6228,10 @@ declare namespace CodeceptJS {
|
|
|
6188
6228
|
*/
|
|
6189
6229
|
amOnPage(url: string): Promise<any>;
|
|
6190
6230
|
/**
|
|
6231
|
+
* Unlike other drivers Puppeteer changes the size of a viewport, not the window!
|
|
6232
|
+
* Puppeteer does not control the window of a browser, so it can't adjust its real size.
|
|
6233
|
+
* It also can't maximize a window.
|
|
6234
|
+
*
|
|
6191
6235
|
* Resize the current window to provided width and height.
|
|
6192
6236
|
* First parameter can be set to `maximize`.
|
|
6193
6237
|
* @param width - width in pixels or `maximize`.
|
|
@@ -6357,7 +6401,7 @@ declare namespace CodeceptJS {
|
|
|
6357
6401
|
*/
|
|
6358
6402
|
_locate(): Promise<any>;
|
|
6359
6403
|
/**
|
|
6360
|
-
* Find a checkbox by providing human
|
|
6404
|
+
* Find a checkbox by providing human-readable text:
|
|
6361
6405
|
* NOTE: Assumes the checkable element exists
|
|
6362
6406
|
*
|
|
6363
6407
|
* ```js
|
|
@@ -6366,7 +6410,7 @@ declare namespace CodeceptJS {
|
|
|
6366
6410
|
*/
|
|
6367
6411
|
_locateCheckable(): Promise<any>;
|
|
6368
6412
|
/**
|
|
6369
|
-
* Find a clickable element by providing human
|
|
6413
|
+
* Find a clickable element by providing human-readable text:
|
|
6370
6414
|
*
|
|
6371
6415
|
* ```js
|
|
6372
6416
|
* this.helpers['Puppeteer']._locateClickable('Next page').then // ...
|
|
@@ -6374,7 +6418,7 @@ declare namespace CodeceptJS {
|
|
|
6374
6418
|
*/
|
|
6375
6419
|
_locateClickable(): Promise<any>;
|
|
6376
6420
|
/**
|
|
6377
|
-
* Find field elements by providing human
|
|
6421
|
+
* Find field elements by providing human-readable text:
|
|
6378
6422
|
*
|
|
6379
6423
|
* ```js
|
|
6380
6424
|
* this.helpers['Puppeteer']._locateFields('Your email').then // ...
|
|
@@ -6551,7 +6595,7 @@ declare namespace CodeceptJS {
|
|
|
6551
6595
|
* Sets a directory to where save files. Allows to test file downloads.
|
|
6552
6596
|
* Should be used with [FileSystem helper](https://codecept.io/helpers/FileSystem) to check that file were downloaded correctly.
|
|
6553
6597
|
*
|
|
6554
|
-
* By default files are saved to `output/downloads`.
|
|
6598
|
+
* By default, files are saved to `output/downloads`.
|
|
6555
6599
|
* This directory is cleaned on every `handleDownloads` call, to ensure no old files are kept.
|
|
6556
6600
|
*
|
|
6557
6601
|
* ```js
|
|
@@ -6678,6 +6722,8 @@ declare namespace CodeceptJS {
|
|
|
6678
6722
|
*/
|
|
6679
6723
|
pressKeyUp(key: string): Promise<any>;
|
|
6680
6724
|
/**
|
|
6725
|
+
* _Note:_ Shortcuts like `'Meta'` + `'A'` do not work on macOS ([GoogleChrome/puppeteer#1313](https://github.com/GoogleChrome/puppeteer/issues/1313)).
|
|
6726
|
+
*
|
|
6681
6727
|
* Presses a key in the browser (on a focused element).
|
|
6682
6728
|
*
|
|
6683
6729
|
* _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
|
|
@@ -6829,6 +6875,8 @@ declare namespace CodeceptJS {
|
|
|
6829
6875
|
*/
|
|
6830
6876
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
6831
6877
|
/**
|
|
6878
|
+
* > ⚠ 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.
|
|
6879
|
+
*
|
|
6832
6880
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
6833
6881
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
6834
6882
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
@@ -7078,6 +7126,8 @@ declare namespace CodeceptJS {
|
|
|
7078
7126
|
*/
|
|
7079
7127
|
clearCookie(cookie?: string): Promise<any>;
|
|
7080
7128
|
/**
|
|
7129
|
+
* If a function returns a Promise, tt will wait for its resolution.
|
|
7130
|
+
*
|
|
7081
7131
|
* Executes sync script on a page.
|
|
7082
7132
|
* Pass arguments to function as additional parameters.
|
|
7083
7133
|
* Will return execution result to a test.
|
|
@@ -7103,12 +7153,10 @@ declare namespace CodeceptJS {
|
|
|
7103
7153
|
* @param fn - function to be executed in browser context.
|
|
7104
7154
|
* @param args - to be passed to function.
|
|
7105
7155
|
* @returns script return value
|
|
7106
|
-
*
|
|
7107
|
-
*
|
|
7108
|
-
* If a function returns a Promise It will wait for it resolution.
|
|
7109
7156
|
*/
|
|
7110
7157
|
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
|
|
7111
7158
|
/**
|
|
7159
|
+
* Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
|
|
7112
7160
|
* Executes async script on page.
|
|
7113
7161
|
* Provided function should execute a passed callback (as first argument) to signal it is finished.
|
|
7114
7162
|
*
|
|
@@ -7132,9 +7180,6 @@ declare namespace CodeceptJS {
|
|
|
7132
7180
|
* @param fn - function to be executed in browser context.
|
|
7133
7181
|
* @param args - to be passed to function.
|
|
7134
7182
|
* @returns script return value
|
|
7135
|
-
*
|
|
7136
|
-
*
|
|
7137
|
-
* Asynchronous scripts can also be executed with `executeScript` if a function returns a Promise.
|
|
7138
7183
|
*/
|
|
7139
7184
|
executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
|
|
7140
7185
|
/**
|
|
@@ -7419,6 +7464,16 @@ declare namespace CodeceptJS {
|
|
|
7419
7464
|
* @param [sec = 1] - (optional, `1` by default) time in seconds to wait
|
|
7420
7465
|
*/
|
|
7421
7466
|
waitToHide(locator: CodeceptJS.LocatorOrString, sec?: number): Promise<any>;
|
|
7467
|
+
/**
|
|
7468
|
+
* Waits for number of tabs.
|
|
7469
|
+
*
|
|
7470
|
+
* ```js
|
|
7471
|
+
* I.waitForNumberOfTabs(2);
|
|
7472
|
+
* ```
|
|
7473
|
+
* @param expectedTabs - expecting the number of tabs.
|
|
7474
|
+
* @param sec - number of secs to wait.
|
|
7475
|
+
*/
|
|
7476
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
|
|
7422
7477
|
/**
|
|
7423
7478
|
* Waiting for the part of the URL to match the expected. Useful for SPA to understand that page was changed.
|
|
7424
7479
|
*
|
|
@@ -7503,9 +7558,9 @@ declare namespace CodeceptJS {
|
|
|
7503
7558
|
*/
|
|
7504
7559
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
7505
7560
|
/**
|
|
7506
|
-
* Waits for navigation to finish. By default takes configured `waitForNavigation` option.
|
|
7561
|
+
* Waits for navigation to finish. By default, takes configured `waitForNavigation` option.
|
|
7507
7562
|
*
|
|
7508
|
-
* See [
|
|
7563
|
+
* See [Puppeteer's reference](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
|
|
7509
7564
|
*/
|
|
7510
7565
|
waitForNavigation(opts: any): Promise<any>;
|
|
7511
7566
|
/**
|
|
@@ -8632,6 +8687,13 @@ declare namespace CodeceptJS {
|
|
|
8632
8687
|
*
|
|
8633
8688
|
* WebDriver requires Selenium Server and ChromeDriver/GeckoDriver to be installed. Those tools can be easily installed via NPM. Please check [Testing with WebDriver](https://codecept.io/webdriver/#testing-with-webdriver) for more details.
|
|
8634
8689
|
*
|
|
8690
|
+
* With the release of WebdriverIO version v8.14.0, and onwards, all driver management hassles are now a thing of the past 🙌. Read more [here](https://webdriver.io/blog/2023/07/31/driver-management/).
|
|
8691
|
+
* One of the significant advantages of this update is that you can now get rid of any driver services you previously had to manage, such as
|
|
8692
|
+
* `wdio-chromedriver-service`, `wdio-geckodriver-service`, `wdio-edgedriver-service`, `wdio-safaridriver-service`, and even `@wdio/selenium-standalone-service`.
|
|
8693
|
+
*
|
|
8694
|
+
* For those who require custom driver options, fear not; WebDriver Helper allows you to pass in driver options through custom WebDriver configuration.
|
|
8695
|
+
* If you have a custom grid, use a cloud service, or prefer to run your own driver, there's no need to worry since WebDriver Helper will only start a driver when there are no other connection information settings like hostname or port specified.
|
|
8696
|
+
*
|
|
8635
8697
|
* <!-- configuration -->
|
|
8636
8698
|
*
|
|
8637
8699
|
* Example:
|
|
@@ -8653,6 +8715,28 @@ declare namespace CodeceptJS {
|
|
|
8653
8715
|
* }
|
|
8654
8716
|
* ```
|
|
8655
8717
|
*
|
|
8718
|
+
* Testing Chrome locally is now more convenient than ever. You can define a browser channel, and WebDriver Helper will take care of downloading the specified browser version for you.
|
|
8719
|
+
* For example:
|
|
8720
|
+
*
|
|
8721
|
+
* ```js
|
|
8722
|
+
* {
|
|
8723
|
+
* helpers: {
|
|
8724
|
+
* WebDriver : {
|
|
8725
|
+
* smartWait: 5000,
|
|
8726
|
+
* browser: "chrome",
|
|
8727
|
+
* browserVersion: '116.0.5793.0', // or 'stable', 'beta', 'dev' or 'canary'
|
|
8728
|
+
* restart: false,
|
|
8729
|
+
* windowSize: "maximize",
|
|
8730
|
+
* timeouts: {
|
|
8731
|
+
* "script": 60000,
|
|
8732
|
+
* "page load": 10000
|
|
8733
|
+
* }
|
|
8734
|
+
* }
|
|
8735
|
+
* }
|
|
8736
|
+
* }
|
|
8737
|
+
* ```
|
|
8738
|
+
*
|
|
8739
|
+
*
|
|
8656
8740
|
* Example with basic authentication
|
|
8657
8741
|
* ```js
|
|
8658
8742
|
* {
|
|
@@ -8693,6 +8777,25 @@ declare namespace CodeceptJS {
|
|
|
8693
8777
|
* }
|
|
8694
8778
|
* ```
|
|
8695
8779
|
*
|
|
8780
|
+
* ### Running with devtools protocol
|
|
8781
|
+
*
|
|
8782
|
+
* ```js
|
|
8783
|
+
* {
|
|
8784
|
+
* helpers: {
|
|
8785
|
+
* WebDriver : {
|
|
8786
|
+
* url: "http://localhost",
|
|
8787
|
+
* browser: "chrome",
|
|
8788
|
+
* devtoolsProtocol: true,
|
|
8789
|
+
* desiredCapabilities: {
|
|
8790
|
+
* chromeOptions: {
|
|
8791
|
+
* args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
|
|
8792
|
+
* }
|
|
8793
|
+
* }
|
|
8794
|
+
* }
|
|
8795
|
+
* }
|
|
8796
|
+
* }
|
|
8797
|
+
* ```
|
|
8798
|
+
*
|
|
8696
8799
|
* ### Internet Explorer
|
|
8697
8800
|
*
|
|
8698
8801
|
* Additional configuration params can be used from [IE options](https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/IE/Options.html)
|
|
@@ -9218,6 +9321,8 @@ declare namespace CodeceptJS {
|
|
|
9218
9321
|
*/
|
|
9219
9322
|
selectOption(select: LocatorOrString, option: string | any[]): Promise<any>;
|
|
9220
9323
|
/**
|
|
9324
|
+
* Appium: not tested
|
|
9325
|
+
*
|
|
9221
9326
|
* Attaches a file to element located by label, name, CSS or XPath
|
|
9222
9327
|
* Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
|
|
9223
9328
|
* File will be uploaded to remote system (if tests are running remotely).
|
|
@@ -9231,6 +9336,7 @@ declare namespace CodeceptJS {
|
|
|
9231
9336
|
*/
|
|
9232
9337
|
attachFile(locator: CodeceptJS.LocatorOrString, pathToFile: string): Promise<any>;
|
|
9233
9338
|
/**
|
|
9339
|
+
* Appium: not tested
|
|
9234
9340
|
* Selects a checkbox or radio button.
|
|
9235
9341
|
* Element is located by label or name or CSS or XPath.
|
|
9236
9342
|
*
|
|
@@ -9246,6 +9352,7 @@ declare namespace CodeceptJS {
|
|
|
9246
9352
|
*/
|
|
9247
9353
|
checkOption(field: CodeceptJS.LocatorOrString, context?: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9248
9354
|
/**
|
|
9355
|
+
* Appium: not tested
|
|
9249
9356
|
* Unselects a checkbox or radio button.
|
|
9250
9357
|
* Element is located by label or name or CSS or XPath.
|
|
9251
9358
|
*
|
|
@@ -9478,6 +9585,7 @@ declare namespace CodeceptJS {
|
|
|
9478
9585
|
*/
|
|
9479
9586
|
dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
|
|
9480
9587
|
/**
|
|
9588
|
+
* Appium: not tested
|
|
9481
9589
|
* Verifies that the specified checkbox is checked.
|
|
9482
9590
|
*
|
|
9483
9591
|
* ```js
|
|
@@ -9489,6 +9597,7 @@ declare namespace CodeceptJS {
|
|
|
9489
9597
|
*/
|
|
9490
9598
|
seeCheckboxIsChecked(field: CodeceptJS.LocatorOrString): Promise<any>;
|
|
9491
9599
|
/**
|
|
9600
|
+
* Appium: not tested
|
|
9492
9601
|
* Verifies that the specified checkbox is not checked.
|
|
9493
9602
|
*
|
|
9494
9603
|
* ```js
|
|
@@ -9679,6 +9788,8 @@ declare namespace CodeceptJS {
|
|
|
9679
9788
|
*/
|
|
9680
9789
|
dontSeeCurrentUrlEquals(url: string): Promise<any>;
|
|
9681
9790
|
/**
|
|
9791
|
+
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
9792
|
+
*
|
|
9682
9793
|
* Executes sync script on a page.
|
|
9683
9794
|
* Pass arguments to function as additional parameters.
|
|
9684
9795
|
* Will return execution result to a test.
|
|
@@ -9704,10 +9815,6 @@ declare namespace CodeceptJS {
|
|
|
9704
9815
|
* @param fn - function to be executed in browser context.
|
|
9705
9816
|
* @param args - to be passed to function.
|
|
9706
9817
|
* @returns script return value
|
|
9707
|
-
*
|
|
9708
|
-
*
|
|
9709
|
-
*
|
|
9710
|
-
* Wraps [execute](http://webdriver.io/api/protocol/execute.html) command.
|
|
9711
9818
|
*/
|
|
9712
9819
|
executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
|
|
9713
9820
|
/**
|
|
@@ -9745,9 +9852,9 @@ declare namespace CodeceptJS {
|
|
|
9745
9852
|
* I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
|
|
9746
9853
|
* ```
|
|
9747
9854
|
* @param locator - located by CSS|XPath|strict locator.
|
|
9748
|
-
* @param scrollIntoViewOptions -
|
|
9855
|
+
* @param scrollIntoViewOptions - either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
9749
9856
|
*/
|
|
9750
|
-
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions): Promise<any>;
|
|
9857
|
+
scrollIntoView(locator: LocatorOrString, scrollIntoViewOptions: ScrollIntoViewOptions | boolean): Promise<any>;
|
|
9751
9858
|
/**
|
|
9752
9859
|
* Scrolls to element matched by locator.
|
|
9753
9860
|
* Extra shift can be set with offsetX and offsetY options.
|
|
@@ -9799,6 +9906,7 @@ declare namespace CodeceptJS {
|
|
|
9799
9906
|
*/
|
|
9800
9907
|
saveScreenshot(fileName: string, fullPage?: boolean): Promise<any>;
|
|
9801
9908
|
/**
|
|
9909
|
+
* Uses Selenium's JSON [cookie format](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object).
|
|
9802
9910
|
* Sets cookie(s).
|
|
9803
9911
|
*
|
|
9804
9912
|
* Can be a single cookie object or an array of cookies:
|
|
@@ -9863,7 +9971,7 @@ declare namespace CodeceptJS {
|
|
|
9863
9971
|
*/
|
|
9864
9972
|
acceptPopup(): Promise<any>;
|
|
9865
9973
|
/**
|
|
9866
|
-
* Dismisses the active JavaScript popup, as created by window.alert|window.confirm|window.prompt
|
|
9974
|
+
* Dismisses the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`.
|
|
9867
9975
|
*/
|
|
9868
9976
|
cancelPopup(): Promise<any>;
|
|
9869
9977
|
/**
|
|
@@ -9906,6 +10014,8 @@ declare namespace CodeceptJS {
|
|
|
9906
10014
|
*/
|
|
9907
10015
|
pressKeyUp(key: string): Promise<any>;
|
|
9908
10016
|
/**
|
|
10017
|
+
* _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.
|
|
10018
|
+
*
|
|
9909
10019
|
* Presses a key in the browser (on a focused element).
|
|
9910
10020
|
*
|
|
9911
10021
|
* _Hint:_ For populating text field or textarea, it is recommended to use [`fillField`](#fillfield).
|
|
@@ -9989,6 +10099,8 @@ declare namespace CodeceptJS {
|
|
|
9989
10099
|
*/
|
|
9990
10100
|
type(key: string | string[], delay?: number): Promise<any>;
|
|
9991
10101
|
/**
|
|
10102
|
+
* Appium: not tested in web, in apps doesn't work
|
|
10103
|
+
*
|
|
9992
10104
|
* Resize the current window to provided width and height.
|
|
9993
10105
|
* First parameter can be set to `maximize`.
|
|
9994
10106
|
* @param width - width in pixels or `maximize`.
|
|
@@ -10029,6 +10141,7 @@ declare namespace CodeceptJS {
|
|
|
10029
10141
|
*/
|
|
10030
10142
|
blur(locator: CodeceptJS.LocatorOrString, options?: any): Promise<any>;
|
|
10031
10143
|
/**
|
|
10144
|
+
* Appium: not tested
|
|
10032
10145
|
* Drag an item to a destination element.
|
|
10033
10146
|
*
|
|
10034
10147
|
* ```js
|
|
@@ -10250,6 +10363,16 @@ declare namespace CodeceptJS {
|
|
|
10250
10363
|
* @param [sec = null] - (optional, `1` by default) time in seconds to wait
|
|
10251
10364
|
*/
|
|
10252
10365
|
waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
|
|
10366
|
+
/**
|
|
10367
|
+
* Waits for number of tabs.
|
|
10368
|
+
*
|
|
10369
|
+
* ```js
|
|
10370
|
+
* I.waitForNumberOfTabs(2);
|
|
10371
|
+
* ```
|
|
10372
|
+
* @param expectedTabs - expecting the number of tabs.
|
|
10373
|
+
* @param sec - number of secs to wait.
|
|
10374
|
+
*/
|
|
10375
|
+
waitForNumberOfTabs(expectedTabs: number, sec: number): Promise<any>;
|
|
10253
10376
|
/**
|
|
10254
10377
|
* Switches frame or in case of null locator reverts to parent.
|
|
10255
10378
|
*
|
|
@@ -10343,6 +10466,9 @@ declare namespace CodeceptJS {
|
|
|
10343
10466
|
*/
|
|
10344
10467
|
grabPageScrollPosition(): Promise<PageScrollPosition>;
|
|
10345
10468
|
/**
|
|
10469
|
+
* This method is **deprecated**.
|
|
10470
|
+
*
|
|
10471
|
+
*
|
|
10346
10472
|
* Set the current geo location
|
|
10347
10473
|
*
|
|
10348
10474
|
*
|
|
@@ -10352,10 +10478,12 @@ declare namespace CodeceptJS {
|
|
|
10352
10478
|
* ```
|
|
10353
10479
|
* @param latitude - to set.
|
|
10354
10480
|
* @param longitude - to set
|
|
10355
|
-
* @param [altitude
|
|
10481
|
+
* @param [altitude] - (optional, null by default) to set
|
|
10356
10482
|
*/
|
|
10357
10483
|
setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<any>;
|
|
10358
10484
|
/**
|
|
10485
|
+
* This method is **deprecated**.
|
|
10486
|
+
*
|
|
10359
10487
|
* Return the current geo location
|
|
10360
10488
|
* Resumes test execution, so **should be used inside async function with `await`** operator.
|
|
10361
10489
|
*
|