webdriverio 7.21.0 → 8.0.0-alpha.239
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/build/cjs/index.d.ts +3 -0
- package/build/cjs/index.d.ts.map +1 -0
- package/build/cjs/index.js +13 -0
- package/build/cjs/package.json +3 -0
- package/build/commands/browser/$$.js +6 -9
- package/build/commands/browser/$.js +8 -11
- package/build/commands/browser/action.d.ts +128 -0
- package/build/commands/browser/action.d.ts.map +1 -0
- package/build/commands/browser/action.js +13 -0
- package/build/commands/browser/actions.d.ts +29 -0
- package/build/commands/browser/actions.d.ts.map +1 -0
- package/build/commands/browser/actions.js +30 -0
- package/build/commands/browser/call.js +1 -4
- package/build/commands/browser/custom$$.js +7 -10
- package/build/commands/browser/custom$.js +5 -8
- package/build/commands/browser/debug.js +8 -14
- package/build/commands/browser/deleteCookies.js +1 -4
- package/build/commands/browser/execute.js +3 -6
- package/build/commands/browser/executeAsync.js +3 -6
- package/build/commands/browser/getCookies.js +1 -4
- package/build/commands/browser/getPuppeteer.d.ts +1 -1
- package/build/commands/browser/getPuppeteer.d.ts.map +1 -1
- package/build/commands/browser/getPuppeteer.js +14 -21
- package/build/commands/browser/getWindowSize.js +3 -6
- package/build/commands/browser/keys.d.ts +20 -10
- package/build/commands/browser/keys.d.ts.map +1 -1
- package/build/commands/browser/keys.js +29 -24
- package/build/commands/browser/mock.d.ts +1 -1
- package/build/commands/browser/mock.d.ts.map +1 -1
- package/build/commands/browser/mock.js +12 -19
- package/build/commands/browser/mockClearAll.js +5 -11
- package/build/commands/browser/mockRestoreAll.js +5 -11
- package/build/commands/browser/newWindow.js +5 -11
- package/build/commands/browser/pause.js +1 -4
- package/build/commands/browser/react$$.d.ts.map +1 -1
- package/build/commands/browser/react$$.js +12 -16
- package/build/commands/browser/react$.d.ts.map +1 -1
- package/build/commands/browser/react$.js +10 -14
- package/build/commands/browser/reloadSession.js +5 -12
- package/build/commands/browser/savePDF.js +7 -13
- package/build/commands/browser/saveRecordingScreen.js +6 -12
- package/build/commands/browser/saveScreenshot.js +6 -12
- package/build/commands/browser/scroll.d.ts +25 -0
- package/build/commands/browser/scroll.d.ts.map +1 -0
- package/build/commands/browser/scroll.js +41 -0
- package/build/commands/browser/setCookies.js +1 -4
- package/build/commands/browser/setTimeout.js +1 -4
- package/build/commands/browser/setWindowSize.js +3 -6
- package/build/commands/browser/switchWindow.js +1 -4
- package/build/commands/browser/throttle.js +3 -6
- package/build/commands/browser/touchAction.d.ts +1 -1
- package/build/commands/browser/touchAction.d.ts.map +1 -1
- package/build/commands/browser/touchAction.js +3 -6
- package/build/commands/browser/uploadFile.d.ts +1 -1
- package/build/commands/browser/uploadFile.d.ts.map +1 -1
- package/build/commands/browser/uploadFile.js +10 -15
- package/build/commands/browser/url.js +3 -6
- package/build/commands/browser/waitUntil.js +3 -9
- package/build/commands/browser.d.ts +39 -33
- package/build/commands/browser.d.ts.map +1 -1
- package/build/commands/browser.js +42 -43
- package/build/commands/constant.d.ts +1 -1
- package/build/commands/constant.d.ts.map +1 -1
- package/build/commands/constant.js +6 -12
- package/build/commands/element/$$.d.ts +1 -1
- package/build/commands/element/$$.d.ts.map +1 -1
- package/build/commands/element/$$.js +2 -7
- package/build/commands/element/$.d.ts +1 -1
- package/build/commands/element/$.d.ts.map +1 -1
- package/build/commands/element/$.js +2 -7
- package/build/commands/element/addValue.d.ts +10 -14
- package/build/commands/element/addValue.d.ts.map +1 -1
- package/build/commands/element/addValue.js +23 -27
- package/build/commands/element/clearValue.d.ts +1 -1
- package/build/commands/element/clearValue.js +2 -5
- package/build/commands/element/click.d.ts +1 -1
- package/build/commands/element/click.d.ts.map +1 -1
- package/build/commands/element/click.js +19 -34
- package/build/commands/element/custom$$.js +9 -11
- package/build/commands/element/custom$.js +8 -10
- package/build/commands/element/doubleClick.d.ts.map +1 -1
- package/build/commands/element/doubleClick.js +11 -17
- package/build/commands/element/dragAndDrop.d.ts.map +1 -1
- package/build/commands/element/dragAndDrop.js +13 -19
- package/build/commands/element/getAttribute.js +1 -4
- package/build/commands/element/getCSSProperty.d.ts +1 -1
- package/build/commands/element/getCSSProperty.d.ts.map +1 -1
- package/build/commands/element/getCSSProperty.js +7 -13
- package/build/commands/element/getComputedLabel.js +1 -4
- package/build/commands/element/getComputedRole.js +1 -4
- package/build/commands/element/getHTML.js +7 -13
- package/build/commands/element/getLocation.js +3 -5
- package/build/commands/element/getProperty.d.ts +8 -8
- package/build/commands/element/getProperty.d.ts.map +1 -1
- package/build/commands/element/getProperty.js +5 -11
- package/build/commands/element/getSize.js +3 -5
- package/build/commands/element/getTagName.js +1 -4
- package/build/commands/element/getText.js +1 -4
- package/build/commands/element/getValue.js +1 -4
- package/build/commands/element/isClickable.js +7 -13
- package/build/commands/element/isDisplayed.js +9 -16
- package/build/commands/element/isDisplayedInViewport.js +7 -13
- package/build/commands/element/isEnabled.js +1 -4
- package/build/commands/element/isEqual.d.ts.map +1 -1
- package/build/commands/element/isEqual.js +9 -9
- package/build/commands/element/isExisting.js +1 -4
- package/build/commands/element/isFocused.js +7 -13
- package/build/commands/element/isSelected.js +1 -4
- package/build/commands/element/moveTo.d.ts.map +1 -1
- package/build/commands/element/moveTo.js +8 -13
- package/build/commands/element/nextElement.js +2 -5
- package/build/commands/element/parentElement.js +2 -5
- package/build/commands/element/previousElement.js +2 -5
- package/build/commands/element/react$$.d.ts.map +1 -1
- package/build/commands/element/react$$.js +13 -16
- package/build/commands/element/react$.d.ts.map +1 -1
- package/build/commands/element/react$.js +12 -14
- package/build/commands/element/saveScreenshot.js +6 -12
- package/build/commands/element/scrollIntoView.d.ts +3 -2
- package/build/commands/element/scrollIntoView.d.ts.map +1 -1
- package/build/commands/element/scrollIntoView.js +32 -12
- package/build/commands/element/selectByAttribute.js +3 -6
- package/build/commands/element/selectByIndex.js +3 -6
- package/build/commands/element/selectByVisibleText.js +3 -6
- package/build/commands/element/setValue.d.ts +13 -14
- package/build/commands/element/setValue.d.ts.map +1 -1
- package/build/commands/element/setValue.js +14 -17
- package/build/commands/element/shadow$$.d.ts +1 -1
- package/build/commands/element/shadow$$.d.ts.map +1 -1
- package/build/commands/element/shadow$$.js +3 -6
- package/build/commands/element/shadow$.js +3 -6
- package/build/commands/element/touchAction.js +3 -6
- package/build/commands/element/waitForClickable.js +1 -4
- package/build/commands/element/waitForDisplayed.js +1 -4
- package/build/commands/element/waitForEnabled.js +1 -4
- package/build/commands/element/waitForExist.js +1 -4
- package/build/commands/element/waitUntil.d.ts +1 -1
- package/build/commands/element/waitUntil.d.ts.map +1 -1
- package/build/commands/element/waitUntil.js +2 -7
- package/build/commands/element.d.ts +48 -48
- package/build/commands/element.d.ts.map +1 -1
- package/build/commands/element.js +57 -62
- package/build/constants.d.ts +66 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +91 -12
- package/build/index.d.ts +64 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +47 -85
- package/build/middlewares.d.ts +1 -1
- package/build/middlewares.js +11 -19
- package/build/multiremote.js +12 -20
- package/build/protocol-stub.d.ts.map +1 -1
- package/build/protocol-stub.js +4 -6
- package/build/scripts/getHTML.js +1 -4
- package/build/scripts/getProperty.d.ts +8 -8
- package/build/scripts/getProperty.d.ts.map +1 -1
- package/build/scripts/getProperty.js +1 -4
- package/build/scripts/isElementClickable.js +1 -4
- package/build/scripts/isElementDisplayed.js +1 -4
- package/build/scripts/isElementInViewport.js +1 -4
- package/build/scripts/isFocused.js +1 -4
- package/build/scripts/newWindow.js +1 -4
- package/build/scripts/resq.js +3 -9
- package/build/scripts/shadowFnFactory.js +2 -6
- package/build/types.d.ts +1 -5
- package/build/types.d.ts.map +1 -1
- package/build/types.js +1 -2
- package/build/utils/SevereServiceError.js +1 -4
- package/build/utils/Timer.d.ts.map +1 -1
- package/build/utils/Timer.js +1 -25
- package/build/utils/actions/base.d.ts +32 -0
- package/build/utils/actions/base.d.ts.map +1 -0
- package/build/utils/actions/base.js +78 -0
- package/build/utils/actions/index.d.ts +6 -0
- package/build/utils/actions/index.d.ts.map +1 -0
- package/build/utils/actions/index.js +5 -0
- package/build/utils/actions/key.d.ts +15 -0
- package/build/utils/actions/key.d.ts.map +1 -0
- package/build/utils/actions/key.js +22 -0
- package/build/utils/actions/pointer.d.ts +62 -0
- package/build/utils/actions/pointer.d.ts.map +1 -0
- package/build/utils/actions/pointer.js +76 -0
- package/build/utils/actions/wheel.d.ts +36 -0
- package/build/utils/actions/wheel.d.ts.map +1 -0
- package/build/utils/actions/wheel.js +20 -0
- package/build/utils/detectBackend.d.ts +1 -1
- package/build/utils/detectBackend.d.ts.map +1 -1
- package/build/utils/detectBackend.js +3 -7
- package/build/utils/findStrategy.js +11 -19
- package/build/utils/getElementObject.d.ts.map +1 -1
- package/build/utils/getElementObject.js +42 -31
- package/build/utils/implicitWait.js +3 -9
- package/build/utils/index.d.ts +2 -6
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +92 -142
- package/build/utils/interception/devtools.d.ts +1 -1
- package/build/utils/interception/devtools.d.ts.map +1 -1
- package/build/utils/interception/devtools.js +17 -23
- package/build/utils/interception/index.d.ts +2 -2
- package/build/utils/interception/index.d.ts.map +1 -1
- package/build/utils/interception/index.js +5 -11
- package/build/utils/interception/types.d.ts +1 -1
- package/build/utils/interception/types.d.ts.map +1 -1
- package/build/utils/interception/types.js +1 -2
- package/build/utils/interception/webdriver.d.ts +1 -1
- package/build/utils/interception/webdriver.d.ts.map +1 -1
- package/build/utils/interception/webdriver.js +5 -11
- package/build/utils/refetchElement.js +3 -9
- package/package.json +22 -11
- package/async.d.ts +0 -24
- package/sync.d.ts +0 -24
|
@@ -1,63 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
isDisplayedInViewport: isDisplayedInViewport_1.default, isEnabled: isEnabled_1.default, isEqual: isEqual_1.default, isExisting: isExisting_1.default, isFocused: isFocused_1.default, isSelected: isSelected_1.default,
|
|
59
|
-
moveTo: moveTo_1.default, nextElement: nextElement_1.default, parentElement: parentElement_1.default, previousElement: previousElement_1.default, react$: react_1.default, react$$: react__1.default, saveScreenshot: saveScreenshot_1.default,
|
|
60
|
-
scrollIntoView: scrollIntoView_1.default, selectByAttribute: selectByAttribute_1.default, selectByIndex: selectByIndex_1.default, selectByVisibleText: selectByVisibleText_1.default, setValue: setValue_1.default,
|
|
61
|
-
shadow$: shadow_1.default, shadow$$: shadow__1.default, touchAction: touchAction_1.default, waitForClickable: waitForClickable_1.default, waitForDisplayed: waitForDisplayed_1.default, waitForEnabled: waitForEnabled_1.default,
|
|
62
|
-
waitForExist: waitForExist_1.default, waitUntil: waitUntil_1.default
|
|
1
|
+
import $$ from './element/$$.js';
|
|
2
|
+
import $ from './element/$.js';
|
|
3
|
+
import addValue from './element/addValue.js';
|
|
4
|
+
import clearValue from './element/clearValue.js';
|
|
5
|
+
import click from './element/click.js';
|
|
6
|
+
import custom$$ from './element/custom$$.js';
|
|
7
|
+
import custom$ from './element/custom$.js';
|
|
8
|
+
import doubleClick from './element/doubleClick.js';
|
|
9
|
+
import dragAndDrop from './element/dragAndDrop.js';
|
|
10
|
+
import getAttribute from './element/getAttribute.js';
|
|
11
|
+
import getCSSProperty from './element/getCSSProperty.js';
|
|
12
|
+
import getComputedRole from './element/getComputedRole.js';
|
|
13
|
+
import getComputedLabel from './element/getComputedLabel.js';
|
|
14
|
+
import getHTML from './element/getHTML.js';
|
|
15
|
+
import getLocation from './element/getLocation.js';
|
|
16
|
+
import getProperty from './element/getProperty.js';
|
|
17
|
+
import getSize from './element/getSize.js';
|
|
18
|
+
import getTagName from './element/getTagName.js';
|
|
19
|
+
import getText from './element/getText.js';
|
|
20
|
+
import getValue from './element/getValue.js';
|
|
21
|
+
import isClickable from './element/isClickable.js';
|
|
22
|
+
import isDisplayed from './element/isDisplayed.js';
|
|
23
|
+
import isDisplayedInViewport from './element/isDisplayedInViewport.js';
|
|
24
|
+
import isEnabled from './element/isEnabled.js';
|
|
25
|
+
import isEqual from './element/isEqual.js';
|
|
26
|
+
import isExisting from './element/isExisting.js';
|
|
27
|
+
import isFocused from './element/isFocused.js';
|
|
28
|
+
import isSelected from './element/isSelected.js';
|
|
29
|
+
import moveTo from './element/moveTo.js';
|
|
30
|
+
import nextElement from './element/nextElement.js';
|
|
31
|
+
import parentElement from './element/parentElement.js';
|
|
32
|
+
import previousElement from './element/previousElement.js';
|
|
33
|
+
import react$$ from './element/react$$.js';
|
|
34
|
+
import react$ from './element/react$.js';
|
|
35
|
+
import saveScreenshot from './element/saveScreenshot.js';
|
|
36
|
+
import scrollIntoView from './element/scrollIntoView.js';
|
|
37
|
+
import selectByAttribute from './element/selectByAttribute.js';
|
|
38
|
+
import selectByIndex from './element/selectByIndex.js';
|
|
39
|
+
import selectByVisibleText from './element/selectByVisibleText.js';
|
|
40
|
+
import setValue from './element/setValue.js';
|
|
41
|
+
import shadow$$ from './element/shadow$$.js';
|
|
42
|
+
import shadow$ from './element/shadow$.js';
|
|
43
|
+
import touchAction from './element/touchAction.js';
|
|
44
|
+
import waitForClickable from './element/waitForClickable.js';
|
|
45
|
+
import waitForDisplayed from './element/waitForDisplayed.js';
|
|
46
|
+
import waitForEnabled from './element/waitForEnabled.js';
|
|
47
|
+
import waitForExist from './element/waitForExist.js';
|
|
48
|
+
import waitUntil from './element/waitUntil.js';
|
|
49
|
+
export default {
|
|
50
|
+
$$, $, addValue, clearValue, click, custom$, custom$$, doubleClick, dragAndDrop,
|
|
51
|
+
getAttribute, getCSSProperty, getComputedRole, getComputedLabel, getHTML, getLocation,
|
|
52
|
+
getProperty, getSize, getTagName, getText, getValue, isClickable, isDisplayed,
|
|
53
|
+
isDisplayedInViewport, isEnabled, isEqual, isExisting, isFocused, isSelected,
|
|
54
|
+
moveTo, nextElement, parentElement, previousElement, react$, react$$, saveScreenshot,
|
|
55
|
+
scrollIntoView, selectByAttribute, selectByIndex, selectByVisibleText, setValue,
|
|
56
|
+
shadow$, shadow$$, touchAction, waitForClickable, waitForDisplayed, waitForEnabled,
|
|
57
|
+
waitForExist, waitUntil
|
|
63
58
|
};
|
package/build/constants.d.ts
CHANGED
|
@@ -11,4 +11,70 @@ export declare const DRIVER_DEFAULT_ENDPOINT: {
|
|
|
11
11
|
export declare const FF_REMOTE_DEBUG_ARG = "-remote-debugging-port";
|
|
12
12
|
export declare const DEEP_SELECTOR = ">>>";
|
|
13
13
|
export declare const ERROR_REASON: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Special Characters
|
|
16
|
+
*/
|
|
17
|
+
export declare const Key: {
|
|
18
|
+
/**
|
|
19
|
+
* Special control key that works cross browser for Mac, where it's the command key, and for
|
|
20
|
+
* Windows or Linux, where it is the control key.
|
|
21
|
+
*/
|
|
22
|
+
readonly Ctrl: "WDIO_CONTROL";
|
|
23
|
+
readonly NULL: "";
|
|
24
|
+
readonly Cancel: "";
|
|
25
|
+
readonly Help: "";
|
|
26
|
+
readonly Backspace: "";
|
|
27
|
+
readonly Tab: "";
|
|
28
|
+
readonly Clear: "";
|
|
29
|
+
readonly Return: "";
|
|
30
|
+
readonly Enter: "";
|
|
31
|
+
readonly Shift: "";
|
|
32
|
+
readonly Control: "";
|
|
33
|
+
readonly Alt: "";
|
|
34
|
+
readonly Pause: "";
|
|
35
|
+
readonly Escape: "";
|
|
36
|
+
readonly Space: "";
|
|
37
|
+
readonly PageUp: "";
|
|
38
|
+
readonly PageDown: "";
|
|
39
|
+
readonly End: "";
|
|
40
|
+
readonly Home: "";
|
|
41
|
+
readonly ArrowLeft: "";
|
|
42
|
+
readonly ArrowUp: "";
|
|
43
|
+
readonly ArrowRight: "";
|
|
44
|
+
readonly ArrowDown: "";
|
|
45
|
+
readonly Insert: "";
|
|
46
|
+
readonly Delete: "";
|
|
47
|
+
readonly Semicolon: "";
|
|
48
|
+
readonly Equals: "";
|
|
49
|
+
readonly Numpad0: "";
|
|
50
|
+
readonly Numpad1: "";
|
|
51
|
+
readonly Numpad2: "";
|
|
52
|
+
readonly Numpad3: "";
|
|
53
|
+
readonly Numpad4: "";
|
|
54
|
+
readonly Numpad5: "";
|
|
55
|
+
readonly Numpad6: "";
|
|
56
|
+
readonly Numpad7: "";
|
|
57
|
+
readonly Numpad8: "";
|
|
58
|
+
readonly Numpad9: "";
|
|
59
|
+
readonly Multiply: "";
|
|
60
|
+
readonly Add: "";
|
|
61
|
+
readonly Separator: "";
|
|
62
|
+
readonly Subtract: "";
|
|
63
|
+
readonly Decimal: "";
|
|
64
|
+
readonly Divide: "";
|
|
65
|
+
readonly F1: "";
|
|
66
|
+
readonly F2: "";
|
|
67
|
+
readonly F3: "";
|
|
68
|
+
readonly F4: "";
|
|
69
|
+
readonly F5: "";
|
|
70
|
+
readonly F6: "";
|
|
71
|
+
readonly F7: "";
|
|
72
|
+
readonly F8: "";
|
|
73
|
+
readonly F9: "";
|
|
74
|
+
readonly F10: "";
|
|
75
|
+
readonly F11: "";
|
|
76
|
+
readonly F12: "";
|
|
77
|
+
readonly Command: "";
|
|
78
|
+
readonly ZenkakuHankaku: "";
|
|
79
|
+
};
|
|
14
80
|
//# sourceMappingURL=constants.d.ts.map
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,aAAa,CAAA;AA+B7E,eAAO,MAAM,WAAW,wCAAwC,CAAA;AAEhE,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAiRtF,CAAA;AAED,eAAO,MAAM,uBAAuB,UAA0E,CAAA;AAE9G,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAA;AAED,eAAO,MAAM,mBAAmB,2BAA2B,CAAA;AAC3D,eAAO,MAAM,aAAa,QAAQ,CAAA;AAElC,eAAO,MAAM,YAAY,UAKxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;IACZ;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DG,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { UNICODE_CHARACTERS } from '@wdio/utils';
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
4
7
|
/* istanbul ignore next */
|
|
5
8
|
const HOOK_DEFINITION = {
|
|
6
9
|
type: 'object',
|
|
@@ -25,19 +28,22 @@ const HOOK_DEFINITION = {
|
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
};
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
export const ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';
|
|
32
|
+
export const WDIO_DEFAULTS = {
|
|
30
33
|
/**
|
|
31
34
|
* allows to specify automation protocol
|
|
32
35
|
*/
|
|
33
36
|
automationProtocol: {
|
|
34
37
|
type: 'string',
|
|
35
38
|
validate: (param) => {
|
|
36
|
-
if (!['webdriver', 'devtools', './protocol-stub'].includes(param.toLowerCase())) {
|
|
39
|
+
if (!['webdriver', 'devtools', './protocol-stub.js'].includes(param.toLowerCase())) {
|
|
37
40
|
throw new Error(`Currently only "webdriver" and "devtools" is supproted as automationProtocol, you set "${param}"`);
|
|
38
41
|
}
|
|
39
42
|
try {
|
|
40
|
-
|
|
43
|
+
const id = param === './protocol-stub.js'
|
|
44
|
+
? resolve(__dirname, '..', 'build', param)
|
|
45
|
+
: param;
|
|
46
|
+
require.resolve(id);
|
|
41
47
|
}
|
|
42
48
|
catch (err) {
|
|
43
49
|
/* istanbul ignore next */
|
|
@@ -238,6 +244,13 @@ exports.WDIO_DEFAULTS = {
|
|
|
238
244
|
maxInstancesPerCapability: {
|
|
239
245
|
type: 'number'
|
|
240
246
|
},
|
|
247
|
+
/**
|
|
248
|
+
* whether or not testrunner should inject `browser`, `$` and `$$` as
|
|
249
|
+
* global environment variables
|
|
250
|
+
*/
|
|
251
|
+
injectGlobals: {
|
|
252
|
+
type: 'boolean'
|
|
253
|
+
},
|
|
241
254
|
/**
|
|
242
255
|
* list of strings to watch of `wdio` command is called with `--watch` flag
|
|
243
256
|
*/
|
|
@@ -270,18 +283,84 @@ exports.WDIO_DEFAULTS = {
|
|
|
270
283
|
onComplete: HOOK_DEFINITION,
|
|
271
284
|
onReload: HOOK_DEFINITION
|
|
272
285
|
};
|
|
273
|
-
|
|
274
|
-
|
|
286
|
+
export const W3C_SELECTOR_STRATEGIES = ['css selector', 'link text', 'partial link text', 'tag name', 'xpath'];
|
|
287
|
+
export const DRIVER_DEFAULT_ENDPOINT = {
|
|
275
288
|
method: 'GET',
|
|
276
289
|
host: 'localhost',
|
|
277
290
|
port: 4444,
|
|
278
291
|
path: '/status'
|
|
279
292
|
};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
293
|
+
export const FF_REMOTE_DEBUG_ARG = '-remote-debugging-port';
|
|
294
|
+
export const DEEP_SELECTOR = '>>>';
|
|
295
|
+
export const ERROR_REASON = [
|
|
283
296
|
'Failed', 'Aborted', 'TimedOut', 'AccessDenied', 'ConnectionClosed',
|
|
284
297
|
'ConnectionReset', 'ConnectionRefused', 'ConnectionAborted',
|
|
285
298
|
'ConnectionFailed', 'NameNotResolved', 'InternetDisconnected',
|
|
286
299
|
'AddressUnreachable', 'BlockedByClient', 'BlockedByResponse'
|
|
287
300
|
];
|
|
301
|
+
/**
|
|
302
|
+
* Special Characters
|
|
303
|
+
*/
|
|
304
|
+
export const Key = {
|
|
305
|
+
/**
|
|
306
|
+
* Special control key that works cross browser for Mac, where it's the command key, and for
|
|
307
|
+
* Windows or Linux, where it is the control key.
|
|
308
|
+
*/
|
|
309
|
+
Ctrl: 'WDIO_CONTROL',
|
|
310
|
+
NULL: UNICODE_CHARACTERS.NULL,
|
|
311
|
+
Cancel: UNICODE_CHARACTERS.Cancel,
|
|
312
|
+
Help: UNICODE_CHARACTERS.Help,
|
|
313
|
+
Backspace: UNICODE_CHARACTERS.Backspace,
|
|
314
|
+
Tab: UNICODE_CHARACTERS.Tab,
|
|
315
|
+
Clear: UNICODE_CHARACTERS.Clear,
|
|
316
|
+
Return: UNICODE_CHARACTERS.Return,
|
|
317
|
+
Enter: UNICODE_CHARACTERS.Enter,
|
|
318
|
+
Shift: UNICODE_CHARACTERS.Shift,
|
|
319
|
+
Control: UNICODE_CHARACTERS.Control,
|
|
320
|
+
Alt: UNICODE_CHARACTERS.Alt,
|
|
321
|
+
Pause: UNICODE_CHARACTERS.Pause,
|
|
322
|
+
Escape: UNICODE_CHARACTERS.Escape,
|
|
323
|
+
Space: UNICODE_CHARACTERS.Space,
|
|
324
|
+
PageUp: UNICODE_CHARACTERS.PageUp,
|
|
325
|
+
PageDown: UNICODE_CHARACTERS.PageDown,
|
|
326
|
+
End: UNICODE_CHARACTERS.End,
|
|
327
|
+
Home: UNICODE_CHARACTERS.Home,
|
|
328
|
+
ArrowLeft: UNICODE_CHARACTERS.ArrowLeft,
|
|
329
|
+
ArrowUp: UNICODE_CHARACTERS.ArrowUp,
|
|
330
|
+
ArrowRight: UNICODE_CHARACTERS.ArrowRight,
|
|
331
|
+
ArrowDown: UNICODE_CHARACTERS.ArrowDown,
|
|
332
|
+
Insert: UNICODE_CHARACTERS.Insert,
|
|
333
|
+
Delete: UNICODE_CHARACTERS.Delete,
|
|
334
|
+
Semicolon: UNICODE_CHARACTERS.Semicolon,
|
|
335
|
+
Equals: UNICODE_CHARACTERS.Equals,
|
|
336
|
+
Numpad0: UNICODE_CHARACTERS['Numpad 0'],
|
|
337
|
+
Numpad1: UNICODE_CHARACTERS['Numpad 1'],
|
|
338
|
+
Numpad2: UNICODE_CHARACTERS['Numpad 2'],
|
|
339
|
+
Numpad3: UNICODE_CHARACTERS['Numpad 3'],
|
|
340
|
+
Numpad4: UNICODE_CHARACTERS['Numpad 4'],
|
|
341
|
+
Numpad5: UNICODE_CHARACTERS['Numpad 5'],
|
|
342
|
+
Numpad6: UNICODE_CHARACTERS['Numpad 6'],
|
|
343
|
+
Numpad7: UNICODE_CHARACTERS['Numpad 7'],
|
|
344
|
+
Numpad8: UNICODE_CHARACTERS['Numpad 8'],
|
|
345
|
+
Numpad9: UNICODE_CHARACTERS['Numpad 9'],
|
|
346
|
+
Multiply: UNICODE_CHARACTERS.Multiply,
|
|
347
|
+
Add: UNICODE_CHARACTERS.Add,
|
|
348
|
+
Separator: UNICODE_CHARACTERS.Separator,
|
|
349
|
+
Subtract: UNICODE_CHARACTERS.Subtract,
|
|
350
|
+
Decimal: UNICODE_CHARACTERS.Decimal,
|
|
351
|
+
Divide: UNICODE_CHARACTERS.Divide,
|
|
352
|
+
F1: UNICODE_CHARACTERS.F1,
|
|
353
|
+
F2: UNICODE_CHARACTERS.F2,
|
|
354
|
+
F3: UNICODE_CHARACTERS.F3,
|
|
355
|
+
F4: UNICODE_CHARACTERS.F4,
|
|
356
|
+
F5: UNICODE_CHARACTERS.F5,
|
|
357
|
+
F6: UNICODE_CHARACTERS.F6,
|
|
358
|
+
F7: UNICODE_CHARACTERS.F7,
|
|
359
|
+
F8: UNICODE_CHARACTERS.F8,
|
|
360
|
+
F9: UNICODE_CHARACTERS.F9,
|
|
361
|
+
F10: UNICODE_CHARACTERS.F10,
|
|
362
|
+
F11: UNICODE_CHARACTERS.F11,
|
|
363
|
+
F12: UNICODE_CHARACTERS.F12,
|
|
364
|
+
Command: UNICODE_CHARACTERS.Command,
|
|
365
|
+
ZenkakuHankaku: UNICODE_CHARACTERS.ZenkakuHankaku
|
|
366
|
+
};
|
package/build/index.d.ts
CHANGED
|
@@ -1,13 +1,72 @@
|
|
|
1
|
-
import { Options, Capabilities } from '@wdio/types';
|
|
2
|
-
import SevereServiceErrorImport from './utils/SevereServiceError';
|
|
1
|
+
import type { Options, Capabilities } from '@wdio/types';
|
|
2
|
+
import SevereServiceErrorImport from './utils/SevereServiceError.js';
|
|
3
3
|
import type { AttachOptions } from './types';
|
|
4
4
|
export declare type RemoteOptions = Options.WebdriverIO & Omit<Options.Testrunner, 'capabilities'>;
|
|
5
|
+
export declare const Key: {
|
|
6
|
+
readonly Ctrl: "WDIO_CONTROL";
|
|
7
|
+
readonly NULL: "";
|
|
8
|
+
readonly Cancel: "";
|
|
9
|
+
readonly Help: "";
|
|
10
|
+
readonly Backspace: "";
|
|
11
|
+
readonly Tab: "";
|
|
12
|
+
readonly Clear: "";
|
|
13
|
+
readonly Return: "";
|
|
14
|
+
readonly Enter: "";
|
|
15
|
+
readonly Shift: "";
|
|
16
|
+
readonly Control: "";
|
|
17
|
+
readonly Alt: "";
|
|
18
|
+
readonly Pause: "";
|
|
19
|
+
readonly Escape: "";
|
|
20
|
+
readonly Space: "";
|
|
21
|
+
readonly PageUp: "";
|
|
22
|
+
readonly PageDown: "";
|
|
23
|
+
readonly End: "";
|
|
24
|
+
readonly Home: "";
|
|
25
|
+
readonly ArrowLeft: "";
|
|
26
|
+
readonly ArrowUp: "";
|
|
27
|
+
readonly ArrowRight: "";
|
|
28
|
+
readonly ArrowDown: "";
|
|
29
|
+
readonly Insert: "";
|
|
30
|
+
readonly Delete: "";
|
|
31
|
+
readonly Semicolon: "";
|
|
32
|
+
readonly Equals: "";
|
|
33
|
+
readonly Numpad0: "";
|
|
34
|
+
readonly Numpad1: "";
|
|
35
|
+
readonly Numpad2: "";
|
|
36
|
+
readonly Numpad3: "";
|
|
37
|
+
readonly Numpad4: "";
|
|
38
|
+
readonly Numpad5: "";
|
|
39
|
+
readonly Numpad6: "";
|
|
40
|
+
readonly Numpad7: "";
|
|
41
|
+
readonly Numpad8: "";
|
|
42
|
+
readonly Numpad9: "";
|
|
43
|
+
readonly Multiply: "";
|
|
44
|
+
readonly Add: "";
|
|
45
|
+
readonly Separator: "";
|
|
46
|
+
readonly Subtract: "";
|
|
47
|
+
readonly Decimal: "";
|
|
48
|
+
readonly Divide: "";
|
|
49
|
+
readonly F1: "";
|
|
50
|
+
readonly F2: "";
|
|
51
|
+
readonly F3: "";
|
|
52
|
+
readonly F4: "";
|
|
53
|
+
readonly F5: "";
|
|
54
|
+
readonly F6: "";
|
|
55
|
+
readonly F7: "";
|
|
56
|
+
readonly F8: "";
|
|
57
|
+
readonly F9: "";
|
|
58
|
+
readonly F10: "";
|
|
59
|
+
readonly F11: "";
|
|
60
|
+
readonly F12: "";
|
|
61
|
+
readonly Command: "";
|
|
62
|
+
readonly ZenkakuHankaku: "";
|
|
63
|
+
};
|
|
5
64
|
/**
|
|
6
65
|
* A method to create a new session with WebdriverIO.
|
|
7
66
|
*
|
|
8
67
|
* <b>
|
|
9
68
|
* NOTE: If you hit "error TS2694: Namespace 'global.WebdriverIO' has no exported member 'Browser'" when using typescript,
|
|
10
|
-
* add "
|
|
69
|
+
* add "@wdio/globals/types" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["@wdio/globals/types"] } } </code>
|
|
11
70
|
* </b>
|
|
12
71
|
*
|
|
13
72
|
* @param {Object} [params={}] Options to create the session with
|
|
@@ -40,6 +99,6 @@ export declare const multiremote: (params: Capabilities.MultiRemoteCapabilities,
|
|
|
40
99
|
automationProtocol?: string | undefined;
|
|
41
100
|
}) => Promise<WebdriverIO.MultiRemoteBrowser>;
|
|
42
101
|
export declare const SevereServiceError: typeof SevereServiceErrorImport;
|
|
43
|
-
export * from './types';
|
|
44
|
-
export * from './utils/interception/types';
|
|
102
|
+
export * from './types.js';
|
|
103
|
+
export * from './utils/interception/types.js';
|
|
45
104
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKxD,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAOpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,aAAa,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAA;AAC1F,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAc,CAAA;AAE9B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WAA2B,aAAa,mBAAmB,QAAQ,KAAG,QAAQ,YAAY,OAAO,CA6CnH,CAAA;AAED,eAAO,MAAM,MAAM,kBAAkC,aAAa,KAAG,QAAQ,YAAY,OAAO,CAmB/F,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,WACZ,aAAa,uBAAuB;;MAE7C,QAAQ,YAAY,kBAAkB,CAgExC,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAA2B,CAAA;AAC1D,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA"}
|