webdriverio 7.16.16 → 7.17.0
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/package.json +7 -7
- package/build/commands/browser/$$.d.ts +0 -50
- package/build/commands/browser/$$.d.ts.map +0 -1
- package/build/commands/browser/$$.js +0 -57
- package/build/commands/browser/$.d.ts +0 -77
- package/build/commands/browser/$.d.ts.map +0 -1
- package/build/commands/browser/$.js +0 -91
- package/build/commands/browser/addCommand.d.ts +0 -37
- package/build/commands/browser/addCommand.d.ts.map +0 -1
- package/build/commands/browser/addCommand.js +0 -37
- package/build/commands/browser/call.d.ts +0 -42
- package/build/commands/browser/call.d.ts.map +0 -1
- package/build/commands/browser/call.js +0 -49
- package/build/commands/browser/custom$$.d.ts +0 -26
- package/build/commands/browser/custom$$.d.ts.map +0 -1
- package/build/commands/browser/custom$$.js +0 -47
- package/build/commands/browser/custom$.d.ts +0 -25
- package/build/commands/browser/custom$.d.ts.map +0 -1
- package/build/commands/browser/custom$.js +0 -47
- package/build/commands/browser/debug.d.ts +0 -32
- package/build/commands/browser/debug.d.ts.map +0 -1
- package/build/commands/browser/debug.js +0 -108
- package/build/commands/browser/deleteCookies.d.ts +0 -45
- package/build/commands/browser/deleteCookies.d.ts.map +0 -1
- package/build/commands/browser/deleteCookies.js +0 -56
- package/build/commands/browser/execute.d.ts +0 -37
- package/build/commands/browser/execute.d.ts.map +0 -1
- package/build/commands/browser/execute.js +0 -55
- package/build/commands/browser/executeAsync.d.ts +0 -45
- package/build/commands/browser/executeAsync.d.ts.map +0 -1
- package/build/commands/browser/executeAsync.js +0 -63
- package/build/commands/browser/getCookies.d.ts +0 -34
- package/build/commands/browser/getCookies.d.ts.map +0 -1
- package/build/commands/browser/getCookies.js +0 -46
- package/build/commands/browser/getPuppeteer.d.ts +0 -38
- package/build/commands/browser/getPuppeteer.d.ts.map +0 -1
- package/build/commands/browser/getPuppeteer.js +0 -119
- package/build/commands/browser/getWindowSize.d.ts +0 -25
- package/build/commands/browser/getWindowSize.d.ts.map +0 -1
- package/build/commands/browser/getWindowSize.js +0 -30
- package/build/commands/browser/keys.d.ts +0 -28
- package/build/commands/browser/keys.d.ts.map +0 -1
- package/build/commands/browser/keys.js +0 -64
- package/build/commands/browser/mock.d.ts +0 -111
- package/build/commands/browser/mock.d.ts.map +0 -1
- package/build/commands/browser/mock.js +0 -164
- package/build/commands/browser/mockClearAll.d.ts +0 -28
- package/build/commands/browser/mockClearAll.d.ts.map +0 -1
- package/build/commands/browser/mockClearAll.js +0 -43
- package/build/commands/browser/mockRestoreAll.d.ts +0 -26
- package/build/commands/browser/mockRestoreAll.d.ts.map +0 -1
- package/build/commands/browser/mockRestoreAll.js +0 -41
- package/build/commands/browser/newWindow.d.ts +0 -41
- package/build/commands/browser/newWindow.d.ts.map +0 -1
- package/build/commands/browser/newWindow.js +0 -83
- package/build/commands/browser/overwriteCommand.d.ts +0 -32
- package/build/commands/browser/overwriteCommand.d.ts.map +0 -1
- package/build/commands/browser/overwriteCommand.js +0 -32
- package/build/commands/browser/pause.d.ts +0 -23
- package/build/commands/browser/pause.d.ts.map +0 -1
- package/build/commands/browser/pause.js +0 -27
- package/build/commands/browser/react$$.d.ts +0 -36
- package/build/commands/browser/react$$.d.ts.map +0 -1
- package/build/commands/browser/react$$.js +0 -51
- package/build/commands/browser/react$.d.ts +0 -46
- package/build/commands/browser/react$.d.ts.map +0 -1
- package/build/commands/browser/react$.js +0 -59
- package/build/commands/browser/reloadSession.d.ts +0 -23
- package/build/commands/browser/reloadSession.d.ts.map +0 -1
- package/build/commands/browser/reloadSession.js +0 -58
- package/build/commands/browser/savePDF.d.ts +0 -46
- package/build/commands/browser/savePDF.d.ts.map +0 -1
- package/build/commands/browser/savePDF.js +0 -51
- package/build/commands/browser/saveRecordingScreen.d.ts +0 -28
- package/build/commands/browser/saveRecordingScreen.d.ts.map +0 -1
- package/build/commands/browser/saveRecordingScreen.js +0 -47
- package/build/commands/browser/saveScreenshot.d.ts +0 -22
- package/build/commands/browser/saveScreenshot.d.ts.map +0 -1
- package/build/commands/browser/saveScreenshot.js +0 -41
- package/build/commands/browser/setCookies.d.ts +0 -57
- package/build/commands/browser/setCookies.d.ts.map +0 -1
- package/build/commands/browser/setCookies.js +0 -66
- package/build/commands/browser/setTimeout.d.ts +0 -31
- package/build/commands/browser/setTimeout.d.ts.map +0 -1
- package/build/commands/browser/setTimeout.js +0 -61
- package/build/commands/browser/setWindowSize.d.ts +0 -20
- package/build/commands/browser/setWindowSize.d.ts.map +0 -1
- package/build/commands/browser/setWindowSize.js +0 -43
- package/build/commands/browser/switchWindow.d.ts +0 -30
- package/build/commands/browser/switchWindow.d.ts.map +0 -1
- package/build/commands/browser/switchWindow.js +0 -73
- package/build/commands/browser/throttle.d.ts +0 -3
- package/build/commands/browser/throttle.d.ts.map +0 -1
- package/build/commands/browser/throttle.js +0 -144
- package/build/commands/browser/touchAction.d.ts +0 -61
- package/build/commands/browser/touchAction.d.ts.map +0 -1
- package/build/commands/browser/touchAction.js +0 -65
- package/build/commands/browser/uploadFile.d.ts +0 -32
- package/build/commands/browser/uploadFile.d.ts.map +0 -1
- package/build/commands/browser/uploadFile.js +0 -63
- package/build/commands/browser/url.d.ts +0 -38
- package/build/commands/browser/url.d.ts.map +0 -1
- package/build/commands/browser/url.js +0 -49
- package/build/commands/browser/waitUntil.d.ts +0 -44
- package/build/commands/browser/waitUntil.d.ts.map +0 -1
- package/build/commands/browser/waitUntil.js +0 -73
- package/build/commands/browser.d.ts +0 -70
- package/build/commands/browser.d.ts.map +0 -1
- package/build/commands/browser.js +0 -44
- package/build/commands/constant.d.ts +0 -19
- package/build/commands/constant.d.ts.map +0 -1
- package/build/commands/constant.js +0 -91
- package/build/commands/element/$$.d.ts +0 -46
- package/build/commands/element/$$.d.ts.map +0 -1
- package/build/commands/element/$$.js +0 -50
- package/build/commands/element/$.d.ts +0 -72
- package/build/commands/element/$.d.ts.map +0 -1
- package/build/commands/element/$.js +0 -76
- package/build/commands/element/addValue.d.ts +0 -33
- package/build/commands/element/addValue.d.ts.map +0 -1
- package/build/commands/element/addValue.js +0 -48
- package/build/commands/element/clearValue.d.ts +0 -28
- package/build/commands/element/clearValue.d.ts.map +0 -1
- package/build/commands/element/clearValue.js +0 -32
- package/build/commands/element/click.d.ts +0 -73
- package/build/commands/element/click.d.ts.map +0 -1
- package/build/commands/element/click.js +0 -134
- package/build/commands/element/custom$$.d.ts +0 -28
- package/build/commands/element/custom$$.d.ts.map +0 -1
- package/build/commands/element/custom$$.js +0 -57
- package/build/commands/element/custom$.d.ts +0 -27
- package/build/commands/element/custom$.d.ts.map +0 -1
- package/build/commands/element/custom$.js +0 -57
- package/build/commands/element/doubleClick.d.ts +0 -25
- package/build/commands/element/doubleClick.d.ts.map +0 -1
- package/build/commands/element/doubleClick.js +0 -51
- package/build/commands/element/dragAndDrop.d.ts +0 -41
- package/build/commands/element/dragAndDrop.d.ts.map +0 -1
- package/build/commands/element/dragAndDrop.js +0 -98
- package/build/commands/element/getAttribute.d.ts +0 -28
- package/build/commands/element/getAttribute.d.ts.map +0 -1
- package/build/commands/element/getAttribute.js +0 -32
- package/build/commands/element/getCSSProperty.d.ts +0 -71
- package/build/commands/element/getCSSProperty.d.ts.map +0 -1
- package/build/commands/element/getCSSProperty.js +0 -108
- package/build/commands/element/getComputedLabel.d.ts +0 -20
- package/build/commands/element/getComputedLabel.d.ts.map +0 -1
- package/build/commands/element/getComputedLabel.js +0 -24
- package/build/commands/element/getComputedRole.d.ts +0 -20
- package/build/commands/element/getComputedRole.d.ts.map +0 -1
- package/build/commands/element/getComputedRole.js +0 -24
- package/build/commands/element/getHTML.d.ts +0 -32
- package/build/commands/element/getHTML.d.ts.map +0 -1
- package/build/commands/element/getHTML.js +0 -46
- package/build/commands/element/getLocation.d.ts +0 -6
- package/build/commands/element/getLocation.d.ts.map +0 -1
- package/build/commands/element/getLocation.js +0 -46
- package/build/commands/element/getProperty.d.ts +0 -53
- package/build/commands/element/getProperty.d.ts.map +0 -1
- package/build/commands/element/getProperty.js +0 -31
- package/build/commands/element/getSize.d.ts +0 -6
- package/build/commands/element/getSize.d.ts.map +0 -1
- package/build/commands/element/getSize.js +0 -47
- package/build/commands/element/getTagName.d.ts +0 -25
- package/build/commands/element/getTagName.d.ts.map +0 -1
- package/build/commands/element/getTagName.js +0 -29
- package/build/commands/element/getText.d.ts +0 -42
- package/build/commands/element/getText.d.ts.map +0 -1
- package/build/commands/element/getText.js +0 -46
- package/build/commands/element/getValue.d.ts +0 -25
- package/build/commands/element/getValue.d.ts.map +0 -1
- package/build/commands/element/getValue.js +0 -33
- package/build/commands/element/isClickable.d.ts +0 -40
- package/build/commands/element/isClickable.d.ts.map +0 -1
- package/build/commands/element/isClickable.js +0 -57
- package/build/commands/element/isDisplayed.d.ts +0 -50
- package/build/commands/element/isDisplayed.d.ts.map +0 -1
- package/build/commands/element/isDisplayed.js +0 -85
- package/build/commands/element/isDisplayedInViewport.d.ts +0 -38
- package/build/commands/element/isDisplayedInViewport.d.ts.map +0 -1
- package/build/commands/element/isDisplayedInViewport.js +0 -55
- package/build/commands/element/isEnabled.d.ts +0 -34
- package/build/commands/element/isEnabled.d.ts.map +0 -1
- package/build/commands/element/isEnabled.js +0 -38
- package/build/commands/element/isEqual.d.ts +0 -24
- package/build/commands/element/isEqual.d.ts.map +0 -1
- package/build/commands/element/isEqual.js +0 -52
- package/build/commands/element/isExisting.d.ts +0 -49
- package/build/commands/element/isExisting.d.ts.map +0 -1
- package/build/commands/element/isExisting.js +0 -65
- package/build/commands/element/isFocused.d.ts +0 -28
- package/build/commands/element/isFocused.d.ts.map +0 -1
- package/build/commands/element/isFocused.js +0 -42
- package/build/commands/element/isSelected.d.ts +0 -31
- package/build/commands/element/isSelected.d.ts.map +0 -1
- package/build/commands/element/isSelected.js +0 -35
- package/build/commands/element/moveTo.d.ts +0 -21
- package/build/commands/element/moveTo.d.ts.map +0 -1
- package/build/commands/element/moveTo.js +0 -39
- package/build/commands/element/nextElement.d.ts +0 -25
- package/build/commands/element/nextElement.d.ts.map +0 -1
- package/build/commands/element/nextElement.js +0 -31
- package/build/commands/element/parentElement.d.ts +0 -25
- package/build/commands/element/parentElement.d.ts.map +0 -1
- package/build/commands/element/parentElement.js +0 -31
- package/build/commands/element/previousElement.d.ts +0 -25
- package/build/commands/element/previousElement.d.ts.map +0 -1
- package/build/commands/element/previousElement.js +0 -31
- package/build/commands/element/react$$.d.ts +0 -36
- package/build/commands/element/react$$.d.ts.map +0 -1
- package/build/commands/element/react$$.js +0 -51
- package/build/commands/element/react$.d.ts +0 -46
- package/build/commands/element/react$.d.ts.map +0 -1
- package/build/commands/element/react$.js +0 -59
- package/build/commands/element/saveScreenshot.d.ts +0 -21
- package/build/commands/element/saveScreenshot.d.ts.map +0 -1
- package/build/commands/element/saveScreenshot.js +0 -40
- package/build/commands/element/scrollIntoView.d.ts +0 -21
- package/build/commands/element/scrollIntoView.d.ts.map +0 -1
- package/build/commands/element/scrollIntoView.js +0 -31
- package/build/commands/element/selectByAttribute.d.ts +0 -37
- package/build/commands/element/selectByAttribute.d.ts.map +0 -1
- package/build/commands/element/selectByAttribute.js +0 -59
- package/build/commands/element/selectByIndex.d.ts +0 -31
- package/build/commands/element/selectByIndex.d.ts.map +0 -1
- package/build/commands/element/selectByIndex.js +0 -55
- package/build/commands/element/selectByVisibleText.d.ts +0 -31
- package/build/commands/element/selectByVisibleText.d.ts.map +0 -1
- package/build/commands/element/selectByVisibleText.js +0 -66
- package/build/commands/element/setValue.d.ts +0 -29
- package/build/commands/element/setValue.d.ts.map +0 -1
- package/build/commands/element/setValue.js +0 -33
- package/build/commands/element/shadow$$.d.ts +0 -22
- package/build/commands/element/shadow$$.d.ts.map +0 -1
- package/build/commands/element/shadow$$.js +0 -27
- package/build/commands/element/shadow$.d.ts +0 -22
- package/build/commands/element/shadow$.d.ts.map +0 -1
- package/build/commands/element/shadow$.js +0 -27
- package/build/commands/element/touchAction.d.ts +0 -54
- package/build/commands/element/touchAction.d.ts.map +0 -1
- package/build/commands/element/touchAction.js +0 -58
- package/build/commands/element/waitForClickable.d.ts +0 -34
- package/build/commands/element/waitForClickable.d.ts.map +0 -1
- package/build/commands/element/waitForClickable.js +0 -37
- package/build/commands/element/waitForDisplayed.d.ts +0 -44
- package/build/commands/element/waitForDisplayed.d.ts.map +0 -1
- package/build/commands/element/waitForDisplayed.js +0 -47
- package/build/commands/element/waitForEnabled.d.ts +0 -46
- package/build/commands/element/waitForEnabled.d.ts.map +0 -1
- package/build/commands/element/waitForEnabled.js +0 -55
- package/build/commands/element/waitForExist.d.ts +0 -46
- package/build/commands/element/waitForExist.d.ts.map +0 -1
- package/build/commands/element/waitForExist.js +0 -49
- package/build/commands/element/waitUntil.d.ts +0 -49
- package/build/commands/element/waitUntil.d.ts.map +0 -1
- package/build/commands/element/waitUntil.js +0 -53
- package/build/commands/element.d.ts +0 -100
- package/build/commands/element.d.ts.map +0 -1
- package/build/commands/element.js +0 -63
- package/build/commands/mock/abort.d.ts +0 -19
- package/build/commands/mock/abort.d.ts.map +0 -1
- package/build/commands/mock/abort.js +0 -20
- package/build/commands/mock/abortOnce.d.ts +0 -27
- package/build/commands/mock/abortOnce.d.ts.map +0 -1
- package/build/commands/mock/abortOnce.js +0 -28
- package/build/commands/mock/clear.d.ts +0 -18
- package/build/commands/mock/clear.d.ts.map +0 -1
- package/build/commands/mock/clear.js +0 -19
- package/build/commands/mock/respond.d.ts +0 -54
- package/build/commands/mock/respond.d.ts.map +0 -1
- package/build/commands/mock/respond.js +0 -55
- package/build/commands/mock/respondOnce.d.ts +0 -55
- package/build/commands/mock/respondOnce.d.ts.map +0 -1
- package/build/commands/mock/respondOnce.js +0 -56
- package/build/commands/mock/restore.d.ts +0 -18
- package/build/commands/mock/restore.d.ts.map +0 -1
- package/build/commands/mock/restore.js +0 -19
- package/build/constants.d.ts +0 -14
- package/build/constants.d.ts.map +0 -1
- package/build/constants.js +0 -286
- package/build/index.d.ts +0 -45
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -171
- package/build/middlewares.d.ts +0 -12
- package/build/middlewares.d.ts.map +0 -1
- package/build/middlewares.js +0 -65
- package/build/multiremote.d.ts +0 -71
- package/build/multiremote.d.ts.map +0 -1
- package/build/multiremote.js +0 -160
- package/build/protocol-stub.d.ts +0 -16
- package/build/protocol-stub.d.ts.map +0 -1
- package/build/protocol-stub.js +0 -77
- package/build/scripts/getHTML.d.ts +0 -9
- package/build/scripts/getHTML.d.ts.map +0 -1
- package/build/scripts/getHTML.js +0 -13
- package/build/scripts/getProperty.d.ts +0 -43
- package/build/scripts/getProperty.d.ts.map +0 -1
- package/build/scripts/getProperty.js +0 -12
- package/build/scripts/isElementClickable.d.ts +0 -7
- package/build/scripts/isElementClickable.d.ts.map +0 -1
- package/build/scripts/isElementClickable.js +0 -121
- package/build/scripts/isElementDisplayed.d.ts +0 -7
- package/build/scripts/isElementDisplayed.d.ts.map +0 -1
- package/build/scripts/isElementDisplayed.js +0 -216
- package/build/scripts/isElementInViewport.d.ts +0 -10
- package/build/scripts/isElementInViewport.d.ts.map +0 -1
- package/build/scripts/isElementInViewport.js +0 -22
- package/build/scripts/isFocused.d.ts +0 -7
- package/build/scripts/isFocused.d.ts.map +0 -1
- package/build/scripts/isFocused.js +0 -11
- package/build/scripts/newWindow.d.ts +0 -10
- package/build/scripts/newWindow.d.ts.map +0 -1
- package/build/scripts/newWindow.js +0 -14
- package/build/scripts/resq.d.ts +0 -6
- package/build/scripts/resq.d.ts.map +0 -1
- package/build/scripts/resq.js +0 -58
- package/build/scripts/shadowFnFactory.d.ts +0 -2
- package/build/scripts/shadowFnFactory.d.ts.map +0 -1
- package/build/scripts/shadowFnFactory.js +0 -17
- package/build/types.d.ts +0 -402
- package/build/types.d.ts.map +0 -1
- package/build/types.js +0 -2
- package/build/utils/SevereServiceError.d.ts +0 -7
- package/build/utils/SevereServiceError.d.ts.map +0 -1
- package/build/utils/SevereServiceError.js +0 -12
- package/build/utils/Timer.d.ts +0 -33
- package/build/utils/Timer.d.ts.map +0 -1
- package/build/utils/Timer.js +0 -126
- package/build/utils/detectBackend.d.ts +0 -23
- package/build/utils/detectBackend.d.ts.map +0 -1
- package/build/utils/detectBackend.js +0 -119
- package/build/utils/findStrategy.d.ts +0 -10
- package/build/utils/findStrategy.d.ts.map +0 -1
- package/build/utils/findStrategy.js +0 -267
- package/build/utils/getElementObject.d.ts +0 -17
- package/build/utils/getElementObject.d.ts.map +0 -1
- package/build/utils/getElementObject.js +0 -107
- package/build/utils/implicitWait.d.ts +0 -7
- package/build/utils/implicitWait.d.ts.map +0 -1
- package/build/utils/implicitWait.js +0 -39
- package/build/utils/index.d.ts +0 -102
- package/build/utils/index.d.ts.map +0 -1
- package/build/utils/index.js +0 -543
- package/build/utils/interception/devtools.d.ts +0 -61
- package/build/utils/interception/devtools.d.ts.map +0 -1
- package/build/utils/interception/devtools.js +0 -247
- package/build/utils/interception/index.d.ts +0 -26
- package/build/utils/interception/index.d.ts.map +0 -1
- package/build/utils/interception/index.js +0 -49
- package/build/utils/interception/types.d.ts +0 -94
- package/build/utils/interception/types.d.ts.map +0 -1
- package/build/utils/interception/types.js +0 -2
- package/build/utils/interception/webdriver.d.ts +0 -48
- package/build/utils/interception/webdriver.d.ts.map +0 -1
- package/build/utils/interception/webdriver.js +0 -75
- package/build/utils/refetchElement.d.ts +0 -6
- package/build/utils/refetchElement.d.ts.map +0 -1
- package/build/utils/refetchElement.js +0 -32
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const getElementObject_1 = require("../../utils/getElementObject");
|
|
8
|
-
const resq_1 = require("../../scripts/resq");
|
|
9
|
-
const resqScript = fs_1.default.readFileSync(require.resolve('resq'));
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* The `react$` command is a useful command to query React Components by their
|
|
13
|
-
* actual name and filter them by props and state.
|
|
14
|
-
*
|
|
15
|
-
* :::info
|
|
16
|
-
*
|
|
17
|
-
* The command only works with applications using React v16.x. Read more about React
|
|
18
|
-
* selectors in the [Selectors](/docs/selectors#react-selectors) guide.
|
|
19
|
-
*
|
|
20
|
-
* :::
|
|
21
|
-
*
|
|
22
|
-
* <example>
|
|
23
|
-
:pause.js
|
|
24
|
-
it('should calculate 7 * 6', async () => {
|
|
25
|
-
await browser.url('https://ahfarmer.github.io/calculator/');
|
|
26
|
-
const appWrapper = await browser.$('div#root')
|
|
27
|
-
|
|
28
|
-
await browser.react$('t', {
|
|
29
|
-
props: { name: '7' }
|
|
30
|
-
}).click()
|
|
31
|
-
await browser.react$('t', {
|
|
32
|
-
props: { name: 'x' }
|
|
33
|
-
}).click()
|
|
34
|
-
await browser.react$('t', {
|
|
35
|
-
props: { name: '6' }
|
|
36
|
-
}).click()
|
|
37
|
-
await browser.react$('t', {
|
|
38
|
-
props: { name: '=' }
|
|
39
|
-
}).click()
|
|
40
|
-
|
|
41
|
-
console.log(await $('.component-display').getText()); // prints "42"
|
|
42
|
-
});
|
|
43
|
-
* </example>
|
|
44
|
-
*
|
|
45
|
-
* @alias react$
|
|
46
|
-
* @param {String} selector of React component
|
|
47
|
-
* @param {ReactSelectorOptions=} options React selector options
|
|
48
|
-
* @param {Object=} options.props React props the element should contain
|
|
49
|
-
* @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
|
|
50
|
-
* @return {Element}
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
async function react$(selector, { props = {}, state = {} } = {}) {
|
|
54
|
-
await this.executeScript(resqScript.toString(), []);
|
|
55
|
-
await this.execute(resq_1.waitToLoadReact);
|
|
56
|
-
const res = await this.execute(resq_1.react$, selector, props, state, this);
|
|
57
|
-
return getElementObject_1.getElement.call(this, selector, res, true);
|
|
58
|
-
}
|
|
59
|
-
exports.default = react$;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Save a screenshot of an element to a PNG file on your OS.
|
|
5
|
-
*
|
|
6
|
-
* <example>
|
|
7
|
-
:saveScreenshot.js
|
|
8
|
-
it('should save a screenshot of the browser view', async () => {
|
|
9
|
-
const elem = await $('#someElem');
|
|
10
|
-
await elem.saveScreenshot('./some/path/elemScreenshot.png');
|
|
11
|
-
});
|
|
12
|
-
* </example>
|
|
13
|
-
*
|
|
14
|
-
* @alias element.saveScreenshot
|
|
15
|
-
* @param {String} filename path to the generated image (`.png` suffix is required) relative to the execution directory
|
|
16
|
-
* @return {Buffer} screenshot buffer
|
|
17
|
-
* @type utility
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export default function saveScreenshot(this: WebdriverIO.Element, filepath: string): Promise<Buffer>;
|
|
21
|
-
//# sourceMappingURL=saveScreenshot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"saveScreenshot.d.ts","sourceRoot":"","sources":["../../../src/commands/element/saveScreenshot.ts"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAA8B,cAAc,CACxC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,mBAiBnB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* Save a screenshot of an element to a PNG file on your OS.
|
|
11
|
-
*
|
|
12
|
-
* <example>
|
|
13
|
-
:saveScreenshot.js
|
|
14
|
-
it('should save a screenshot of the browser view', async () => {
|
|
15
|
-
const elem = await $('#someElem');
|
|
16
|
-
await elem.saveScreenshot('./some/path/elemScreenshot.png');
|
|
17
|
-
});
|
|
18
|
-
* </example>
|
|
19
|
-
*
|
|
20
|
-
* @alias element.saveScreenshot
|
|
21
|
-
* @param {String} filename path to the generated image (`.png` suffix is required) relative to the execution directory
|
|
22
|
-
* @return {Buffer} screenshot buffer
|
|
23
|
-
* @type utility
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
async function saveScreenshot(filepath) {
|
|
27
|
-
/**
|
|
28
|
-
* type check
|
|
29
|
-
*/
|
|
30
|
-
if (typeof filepath !== 'string' || !filepath.endsWith('.png')) {
|
|
31
|
-
throw new Error('saveScreenshot expects a filepath of type string and ".png" file ending');
|
|
32
|
-
}
|
|
33
|
-
const absoluteFilepath = (0, utils_1.getAbsoluteFilepath)(filepath);
|
|
34
|
-
(0, utils_1.assertDirectoryExists)(absoluteFilepath);
|
|
35
|
-
const screenBuffer = await this.takeElementScreenshot(this.elementId);
|
|
36
|
-
const screenshot = Buffer.from(screenBuffer, 'base64');
|
|
37
|
-
fs_1.default.writeFileSync(absoluteFilepath, screenshot);
|
|
38
|
-
return screenshot;
|
|
39
|
-
}
|
|
40
|
-
exports.default = saveScreenshot;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Scroll element into viewport ([MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)).
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:scrollIntoView.js
|
|
7
|
-
it('should demonstrate the scrollIntoView command', async () => {
|
|
8
|
-
const elem = await $('#myElement');
|
|
9
|
-
// scroll to specific element
|
|
10
|
-
await elem.scrollIntoView();
|
|
11
|
-
});
|
|
12
|
-
* </example>
|
|
13
|
-
*
|
|
14
|
-
* @alias element.scrollIntoView
|
|
15
|
-
* @param {object|boolean=} scrollIntoViewOptions options for `Element.scrollIntoView()` (default: `true`)
|
|
16
|
-
* @uses protocol/execute
|
|
17
|
-
* @type utility
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export default function scrollIntoView(this: WebdriverIO.Element, scrollIntoViewOptions?: boolean | ScrollIntoViewOptions): Promise<void>;
|
|
21
|
-
//# sourceMappingURL=scrollIntoView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollIntoView.d.ts","sourceRoot":"","sources":["../../../src/commands/element/scrollIntoView.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,qBAAqB,GAAE,OAAO,GAAG,qBAA4B,iBAQhE"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("../../constants");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Scroll element into viewport ([MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)).
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:scrollIntoView.js
|
|
10
|
-
it('should demonstrate the scrollIntoView command', async () => {
|
|
11
|
-
const elem = await $('#myElement');
|
|
12
|
-
// scroll to specific element
|
|
13
|
-
await elem.scrollIntoView();
|
|
14
|
-
});
|
|
15
|
-
* </example>
|
|
16
|
-
*
|
|
17
|
-
* @alias element.scrollIntoView
|
|
18
|
-
* @param {object|boolean=} scrollIntoViewOptions options for `Element.scrollIntoView()` (default: `true`)
|
|
19
|
-
* @uses protocol/execute
|
|
20
|
-
* @type utility
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
function scrollIntoView(scrollIntoViewOptions = true) {
|
|
24
|
-
return this.parent.execute(/* istanbul ignore next */ function (elem, options) {
|
|
25
|
-
elem.scrollIntoView(options);
|
|
26
|
-
}, {
|
|
27
|
-
[constants_1.ELEMENT_KEY]: this.elementId,
|
|
28
|
-
ELEMENT: this.elementId // jsonwp compatible
|
|
29
|
-
}, scrollIntoViewOptions);
|
|
30
|
-
}
|
|
31
|
-
exports.default = scrollIntoView;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Select option with a specific value.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:example.html
|
|
7
|
-
<select id="selectbox">
|
|
8
|
-
<option value="someValue0">uno</option>
|
|
9
|
-
<option value="someValue1">dos</option>
|
|
10
|
-
<option value="someValue2">tres</option>
|
|
11
|
-
<option value="someValue3">cuatro</option>
|
|
12
|
-
<option value="someValue4">cinco</option>
|
|
13
|
-
<option name="someName5" value="someValue5">seis</option>
|
|
14
|
-
</select>
|
|
15
|
-
:selectByAttribute.js
|
|
16
|
-
it('Should demonstrate the selectByAttribute command', async () => {
|
|
17
|
-
const selectBox = await $('#selectbox');
|
|
18
|
-
const value = await selectBox.getValue();
|
|
19
|
-
console.log(value); // returns "someValue0"
|
|
20
|
-
|
|
21
|
-
await selectBox.selectByAttribute('value', 'someValue3');
|
|
22
|
-
console.log(await selectBox.getValue()); // returns "someValue3"
|
|
23
|
-
|
|
24
|
-
await selectBox.selectByAttribute('name', 'someName5');
|
|
25
|
-
console.log(await selectBox.getValue()); // returns "someValue5"
|
|
26
|
-
});
|
|
27
|
-
* </example>
|
|
28
|
-
*
|
|
29
|
-
* @alias element.selectByAttribute
|
|
30
|
-
* @param {String} attribute attribute of option element to get selected
|
|
31
|
-
* @param {String|Number} value value of option element to get selected
|
|
32
|
-
* @uses protocol/findElementFromElement, protocol/elementClick
|
|
33
|
-
* @type action
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
export default function selectByAttribute(this: WebdriverIO.Element, attribute: string, value: string | number): Promise<void>;
|
|
37
|
-
//# sourceMappingURL=selectByAttribute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectByAttribute.d.ts","sourceRoot":"","sources":["../../../src/commands/element/selectByAttribute.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAA8B,iBAAiB,CAC3C,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,MAAM,iBA2BzB"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Select option with a specific value.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:example.html
|
|
10
|
-
<select id="selectbox">
|
|
11
|
-
<option value="someValue0">uno</option>
|
|
12
|
-
<option value="someValue1">dos</option>
|
|
13
|
-
<option value="someValue2">tres</option>
|
|
14
|
-
<option value="someValue3">cuatro</option>
|
|
15
|
-
<option value="someValue4">cinco</option>
|
|
16
|
-
<option name="someName5" value="someValue5">seis</option>
|
|
17
|
-
</select>
|
|
18
|
-
:selectByAttribute.js
|
|
19
|
-
it('Should demonstrate the selectByAttribute command', async () => {
|
|
20
|
-
const selectBox = await $('#selectbox');
|
|
21
|
-
const value = await selectBox.getValue();
|
|
22
|
-
console.log(value); // returns "someValue0"
|
|
23
|
-
|
|
24
|
-
await selectBox.selectByAttribute('value', 'someValue3');
|
|
25
|
-
console.log(await selectBox.getValue()); // returns "someValue3"
|
|
26
|
-
|
|
27
|
-
await selectBox.selectByAttribute('name', 'someName5');
|
|
28
|
-
console.log(await selectBox.getValue()); // returns "someValue5"
|
|
29
|
-
});
|
|
30
|
-
* </example>
|
|
31
|
-
*
|
|
32
|
-
* @alias element.selectByAttribute
|
|
33
|
-
* @param {String} attribute attribute of option element to get selected
|
|
34
|
-
* @param {String|Number} value value of option element to get selected
|
|
35
|
-
* @uses protocol/findElementFromElement, protocol/elementClick
|
|
36
|
-
* @type action
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
async function selectByAttribute(attribute, value) {
|
|
40
|
-
/**
|
|
41
|
-
* convert value into string
|
|
42
|
-
*/
|
|
43
|
-
value = typeof value === 'number'
|
|
44
|
-
? value.toString()
|
|
45
|
-
: value;
|
|
46
|
-
/**
|
|
47
|
-
* find option elememnt using xpath
|
|
48
|
-
*/
|
|
49
|
-
const normalized = `[normalize-space(@${attribute.trim()}) = "${value.trim()}"]`;
|
|
50
|
-
const optionElement = await this.findElementFromElement(this.elementId, 'xpath', `./option${normalized}|./optgroup/option${normalized}`);
|
|
51
|
-
if (optionElement && optionElement.error === 'no such element') {
|
|
52
|
-
throw new Error(`Option with attribute "${attribute}=${value}" not found.`);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* select option
|
|
56
|
-
*/
|
|
57
|
-
return this.elementClick((0, utils_1.getElementFromResponse)(optionElement));
|
|
58
|
-
}
|
|
59
|
-
exports.default = selectByAttribute;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Select option with a specific index.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:example.html
|
|
7
|
-
<select id="selectbox">
|
|
8
|
-
<option value="someValue0">uno</option>
|
|
9
|
-
<option value="someValue1">dos</option>
|
|
10
|
-
<option value="someValue2">tres</option>
|
|
11
|
-
<option value="someValue3">cuatro</option>
|
|
12
|
-
<option value="someValue4">cinco</option>
|
|
13
|
-
<option value="someValue5">seis</option>
|
|
14
|
-
</select>
|
|
15
|
-
:selectByIndex.js
|
|
16
|
-
it('Should demonstrate the selectByIndex command', async () => {
|
|
17
|
-
const selectBox = await $('#selectbox');
|
|
18
|
-
console.log(await selectBox.getValue()); // returns "someValue0"
|
|
19
|
-
await selectBox.selectByIndex(4);
|
|
20
|
-
console.log(await selectBox.getValue()); // returns "someValue4"
|
|
21
|
-
});
|
|
22
|
-
* </example>
|
|
23
|
-
*
|
|
24
|
-
* @alias element.selectByIndexs
|
|
25
|
-
* @param {Number} index option index
|
|
26
|
-
* @uses protocol/findElementsFromElement, protocol/elementClick
|
|
27
|
-
* @type action
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export default function selectByIndex(this: WebdriverIO.Element, index: number): Promise<void>;
|
|
31
|
-
//# sourceMappingURL=selectByIndex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectByIndex.d.ts","sourceRoot":"","sources":["../../../src/commands/element/selectByIndex.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAA8B,aAAa,CACvC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,MAAM,iBA0BhB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Select option with a specific index.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:example.html
|
|
10
|
-
<select id="selectbox">
|
|
11
|
-
<option value="someValue0">uno</option>
|
|
12
|
-
<option value="someValue1">dos</option>
|
|
13
|
-
<option value="someValue2">tres</option>
|
|
14
|
-
<option value="someValue3">cuatro</option>
|
|
15
|
-
<option value="someValue4">cinco</option>
|
|
16
|
-
<option value="someValue5">seis</option>
|
|
17
|
-
</select>
|
|
18
|
-
:selectByIndex.js
|
|
19
|
-
it('Should demonstrate the selectByIndex command', async () => {
|
|
20
|
-
const selectBox = await $('#selectbox');
|
|
21
|
-
console.log(await selectBox.getValue()); // returns "someValue0"
|
|
22
|
-
await selectBox.selectByIndex(4);
|
|
23
|
-
console.log(await selectBox.getValue()); // returns "someValue4"
|
|
24
|
-
});
|
|
25
|
-
* </example>
|
|
26
|
-
*
|
|
27
|
-
* @alias element.selectByIndexs
|
|
28
|
-
* @param {Number} index option index
|
|
29
|
-
* @uses protocol/findElementsFromElement, protocol/elementClick
|
|
30
|
-
* @type action
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
async function selectByIndex(index) {
|
|
34
|
-
/**
|
|
35
|
-
* negative index check
|
|
36
|
-
*/
|
|
37
|
-
if (index < 0) {
|
|
38
|
-
throw new Error('Index needs to be 0 or any other positive number');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* get option elememnts using css
|
|
42
|
-
*/
|
|
43
|
-
const optionElements = await this.findElementsFromElement(this.elementId, 'css selector', 'option');
|
|
44
|
-
if (optionElements.length === 0) {
|
|
45
|
-
throw new Error('Select element doesn\'t contain any option element');
|
|
46
|
-
}
|
|
47
|
-
if (optionElements.length - 1 < index) {
|
|
48
|
-
throw new Error(`Option with index "${index}" not found. Select element only contains ${optionElements.length} option elements`);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* select option
|
|
52
|
-
*/
|
|
53
|
-
return this.elementClick((0, utils_1.getElementFromResponse)(optionElements[index]));
|
|
54
|
-
}
|
|
55
|
-
exports.default = selectByIndex;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Select option with displayed text matching the argument.
|
|
4
|
-
*
|
|
5
|
-
* <example>
|
|
6
|
-
:example.html
|
|
7
|
-
<select id="selectbox">
|
|
8
|
-
<option value="someValue0">uno</option>
|
|
9
|
-
<option value="someValue1">dos</option>
|
|
10
|
-
<option value="someValue2">tres</option>
|
|
11
|
-
<option value="someValue3">cuatro</option>
|
|
12
|
-
<option value="someValue4">cinco</option>
|
|
13
|
-
<option value="someValue5">seis</option>
|
|
14
|
-
</select>
|
|
15
|
-
:selectByVisibleText.js
|
|
16
|
-
it('demonstrate the selectByVisibleText command', async () => {
|
|
17
|
-
const selectBox = await $('#selectbox');
|
|
18
|
-
console.log(await selectBox.getText('option:checked')); // returns "uno"
|
|
19
|
-
await selectBox.selectByVisibleText('cuatro');
|
|
20
|
-
console.log(await selectBox.getText('option:checked')); // returns "cuatro"
|
|
21
|
-
})
|
|
22
|
-
* </example>
|
|
23
|
-
*
|
|
24
|
-
* @alias element.selectByVisibleText
|
|
25
|
-
* @param {String|Number} text text of option element to get selected
|
|
26
|
-
* @uses protocol/findElementsFromElement, protocol/elementClick
|
|
27
|
-
* @type action
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
export default function selectByVisibleText(this: WebdriverIO.Element, text: string | number): Promise<void>;
|
|
31
|
-
//# sourceMappingURL=selectByVisibleText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectByVisibleText.d.ts","sourceRoot":"","sources":["../../../src/commands/element/selectByVisibleText.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAA8B,mBAAmB,CAC7C,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,IAAI,EAAE,MAAM,GAAG,MAAM,iBAuCxB"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("../../utils");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Select option with displayed text matching the argument.
|
|
7
|
-
*
|
|
8
|
-
* <example>
|
|
9
|
-
:example.html
|
|
10
|
-
<select id="selectbox">
|
|
11
|
-
<option value="someValue0">uno</option>
|
|
12
|
-
<option value="someValue1">dos</option>
|
|
13
|
-
<option value="someValue2">tres</option>
|
|
14
|
-
<option value="someValue3">cuatro</option>
|
|
15
|
-
<option value="someValue4">cinco</option>
|
|
16
|
-
<option value="someValue5">seis</option>
|
|
17
|
-
</select>
|
|
18
|
-
:selectByVisibleText.js
|
|
19
|
-
it('demonstrate the selectByVisibleText command', async () => {
|
|
20
|
-
const selectBox = await $('#selectbox');
|
|
21
|
-
console.log(await selectBox.getText('option:checked')); // returns "uno"
|
|
22
|
-
await selectBox.selectByVisibleText('cuatro');
|
|
23
|
-
console.log(await selectBox.getText('option:checked')); // returns "cuatro"
|
|
24
|
-
})
|
|
25
|
-
* </example>
|
|
26
|
-
*
|
|
27
|
-
* @alias element.selectByVisibleText
|
|
28
|
-
* @param {String|Number} text text of option element to get selected
|
|
29
|
-
* @uses protocol/findElementsFromElement, protocol/elementClick
|
|
30
|
-
* @type action
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
async function selectByVisibleText(text) {
|
|
34
|
-
/**
|
|
35
|
-
* convert value into string
|
|
36
|
-
*/
|
|
37
|
-
text = typeof text === 'number'
|
|
38
|
-
? text.toString()
|
|
39
|
-
: text;
|
|
40
|
-
const normalized = text
|
|
41
|
-
.trim() // strip leading and trailing white-space characters
|
|
42
|
-
.replace(/\s+/, ' '); // replace sequences of whitespace characters by a single space
|
|
43
|
-
/**
|
|
44
|
-
* find option element using xpath
|
|
45
|
-
*/
|
|
46
|
-
const formatted = /"/.test(normalized)
|
|
47
|
-
? 'concat("' + normalized.split('"').join('", \'"\', "') + '")'
|
|
48
|
-
: `"${normalized}"`;
|
|
49
|
-
const dotFormat = `[. = ${formatted}]`;
|
|
50
|
-
const spaceFormat = `[normalize-space(text()) = ${formatted}]`;
|
|
51
|
-
const selections = [
|
|
52
|
-
`./option${dotFormat}`,
|
|
53
|
-
`./option${spaceFormat}`,
|
|
54
|
-
`./optgroup/option${dotFormat}`,
|
|
55
|
-
`./optgroup/option${spaceFormat}`,
|
|
56
|
-
];
|
|
57
|
-
const optionElement = await this.findElementFromElement(this.elementId, 'xpath', selections.join('|'));
|
|
58
|
-
if (optionElement && optionElement.error === 'no such element') {
|
|
59
|
-
throw new Error(`Option with text "${text}" not found.`);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* select option
|
|
63
|
-
*/
|
|
64
|
-
return this.elementClick((0, utils_1.getElementFromResponse)(optionElement));
|
|
65
|
-
}
|
|
66
|
-
exports.default = selectByVisibleText;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CommandOptions, Value } from './addValue';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* Send a sequence of key strokes to an element (clears value before). If the element
|
|
5
|
-
* doesn't need to be cleared first then use addValue. You can also use
|
|
6
|
-
* unicode characters like Left arrow or Back space. WebdriverIO will take care of
|
|
7
|
-
* translating them into unicode characters. You’ll find all supported characters
|
|
8
|
-
* [here](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions).
|
|
9
|
-
* To do that, the value has to correspond to a key from the table. It can be disabled
|
|
10
|
-
* by setting `translateToUnicode` optional parameter to false.
|
|
11
|
-
*
|
|
12
|
-
* <example>
|
|
13
|
-
:setValue.js
|
|
14
|
-
it('should set value for a certain element', async () => {
|
|
15
|
-
const input = await $('.input');
|
|
16
|
-
await input.setValue('test123');
|
|
17
|
-
|
|
18
|
-
console.log(await input.getValue()); // outputs: 'test123'
|
|
19
|
-
});
|
|
20
|
-
* </example>
|
|
21
|
-
*
|
|
22
|
-
* @alias element.setValue
|
|
23
|
-
* @param {string | number | Array<string | number>} value value to be added
|
|
24
|
-
* @param {CommandOptions=} options command options (optional)
|
|
25
|
-
* @param {boolean} options.translateToUnicode enable translation string to unicode value automatically
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export default function setValue(this: WebdriverIO.Element, value: Value | Value[], { translateToUnicode }?: CommandOptions): Promise<void>;
|
|
29
|
-
//# sourceMappingURL=setValue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setValue.d.ts","sourceRoot":"","sources":["../../../src/commands/element/setValue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAA8B,QAAQ,CAClC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,EACtB,EAAE,kBAAyB,EAAE,GAAE,cAAmB,iBAIrD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* Send a sequence of key strokes to an element (clears value before). If the element
|
|
6
|
-
* doesn't need to be cleared first then use addValue. You can also use
|
|
7
|
-
* unicode characters like Left arrow or Back space. WebdriverIO will take care of
|
|
8
|
-
* translating them into unicode characters. You’ll find all supported characters
|
|
9
|
-
* [here](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions).
|
|
10
|
-
* To do that, the value has to correspond to a key from the table. It can be disabled
|
|
11
|
-
* by setting `translateToUnicode` optional parameter to false.
|
|
12
|
-
*
|
|
13
|
-
* <example>
|
|
14
|
-
:setValue.js
|
|
15
|
-
it('should set value for a certain element', async () => {
|
|
16
|
-
const input = await $('.input');
|
|
17
|
-
await input.setValue('test123');
|
|
18
|
-
|
|
19
|
-
console.log(await input.getValue()); // outputs: 'test123'
|
|
20
|
-
});
|
|
21
|
-
* </example>
|
|
22
|
-
*
|
|
23
|
-
* @alias element.setValue
|
|
24
|
-
* @param {string | number | Array<string | number>} value value to be added
|
|
25
|
-
* @param {CommandOptions=} options command options (optional)
|
|
26
|
-
* @param {boolean} options.translateToUnicode enable translation string to unicode value automatically
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
async function setValue(value, { translateToUnicode = true } = {}) {
|
|
30
|
-
await this.clearValue();
|
|
31
|
-
return this.addValue(value, { translateToUnicode });
|
|
32
|
-
}
|
|
33
|
-
exports.default = setValue;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Access elements inside a given element's shadowRoot. If you are working
|
|
4
|
-
* with lots of nested shadow roots, an alternative approach to `shadow$$`
|
|
5
|
-
* is to use the [deep selector](https://webdriver.io/docs/selectors#deep-selectors).
|
|
6
|
-
*
|
|
7
|
-
* <example>
|
|
8
|
-
:shadow$$.js
|
|
9
|
-
it('should return elements inside a shadowRoot', async () => {
|
|
10
|
-
const innerEl = await $('.input').shadow$$('#innerEl');
|
|
11
|
-
console.log(await innerEl.getValue()); // outputs: 'test123'
|
|
12
|
-
});
|
|
13
|
-
* </example>
|
|
14
|
-
*
|
|
15
|
-
* @alias element.shadow$$
|
|
16
|
-
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
|
17
|
-
* @return {ElementArray}
|
|
18
|
-
* @type utility
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export default function shadowRoot(this: WebdriverIO.Element, selector: string): Promise<import("../..").ElementArray>;
|
|
22
|
-
//# sourceMappingURL=shadow$$.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/shadow$$.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAA8B,UAAU,CACpC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,yCAGnB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const shadowFnFactory_1 = require("../../scripts/shadowFnFactory");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Access elements inside a given element's shadowRoot. If you are working
|
|
7
|
-
* with lots of nested shadow roots, an alternative approach to `shadow$$`
|
|
8
|
-
* is to use the [deep selector](https://webdriver.io/docs/selectors#deep-selectors).
|
|
9
|
-
*
|
|
10
|
-
* <example>
|
|
11
|
-
:shadow$$.js
|
|
12
|
-
it('should return elements inside a shadowRoot', async () => {
|
|
13
|
-
const innerEl = await $('.input').shadow$$('#innerEl');
|
|
14
|
-
console.log(await innerEl.getValue()); // outputs: 'test123'
|
|
15
|
-
});
|
|
16
|
-
* </example>
|
|
17
|
-
*
|
|
18
|
-
* @alias element.shadow$$
|
|
19
|
-
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
|
20
|
-
* @return {ElementArray}
|
|
21
|
-
* @type utility
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
async function shadowRoot(selector) {
|
|
25
|
-
return await this.$$((0, shadowFnFactory_1.shadowFnFactory)(selector, true));
|
|
26
|
-
}
|
|
27
|
-
exports.default = shadowRoot;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Access an element inside a given element's shadowRoot. If you are working
|
|
4
|
-
* with lots of nested shadow roots, an alternative approach to `shadow$` is
|
|
5
|
-
* to use the [deep selector](https://webdriver.io/docs/selectors#deep-selectors).
|
|
6
|
-
*
|
|
7
|
-
* <example>
|
|
8
|
-
:shadow$$.js
|
|
9
|
-
it('should return an element inside a shadowRoot', async () => {
|
|
10
|
-
const innerEl = await $('.input').shadow$('#innerEl');
|
|
11
|
-
console.log(await innerEl.getValue()); // outputs: 'test123'
|
|
12
|
-
});
|
|
13
|
-
* </example>
|
|
14
|
-
*
|
|
15
|
-
* @alias element.shadow$
|
|
16
|
-
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
|
17
|
-
* @return {Element}
|
|
18
|
-
* @type utility
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export default function shadowRoot(this: WebdriverIO.Element, selector: string): Promise<WebdriverIO.Element>;
|
|
22
|
-
//# sourceMappingURL=shadow$.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/shadow$.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAA8B,UAAU,CACpC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,gCAGnB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const shadowFnFactory_1 = require("../../scripts/shadowFnFactory");
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* Access an element inside a given element's shadowRoot. If you are working
|
|
7
|
-
* with lots of nested shadow roots, an alternative approach to `shadow$` is
|
|
8
|
-
* to use the [deep selector](https://webdriver.io/docs/selectors#deep-selectors).
|
|
9
|
-
*
|
|
10
|
-
* <example>
|
|
11
|
-
:shadow$$.js
|
|
12
|
-
it('should return an element inside a shadowRoot', async () => {
|
|
13
|
-
const innerEl = await $('.input').shadow$('#innerEl');
|
|
14
|
-
console.log(await innerEl.getValue()); // outputs: 'test123'
|
|
15
|
-
});
|
|
16
|
-
* </example>
|
|
17
|
-
*
|
|
18
|
-
* @alias element.shadow$
|
|
19
|
-
* @param {String|Function} selector selector or JS Function to fetch a certain element
|
|
20
|
-
* @return {Element}
|
|
21
|
-
* @type utility
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
async function shadowRoot(selector) {
|
|
25
|
-
return await this.$((0, shadowFnFactory_1.shadowFnFactory)(selector));
|
|
26
|
-
}
|
|
27
|
-
exports.default = shadowRoot;
|