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.
Files changed (211) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.d.ts.map +1 -0
  3. package/build/cjs/index.js +13 -0
  4. package/build/cjs/package.json +3 -0
  5. package/build/commands/browser/$$.js +6 -9
  6. package/build/commands/browser/$.js +8 -11
  7. package/build/commands/browser/action.d.ts +128 -0
  8. package/build/commands/browser/action.d.ts.map +1 -0
  9. package/build/commands/browser/action.js +13 -0
  10. package/build/commands/browser/actions.d.ts +29 -0
  11. package/build/commands/browser/actions.d.ts.map +1 -0
  12. package/build/commands/browser/actions.js +30 -0
  13. package/build/commands/browser/call.js +1 -4
  14. package/build/commands/browser/custom$$.js +7 -10
  15. package/build/commands/browser/custom$.js +5 -8
  16. package/build/commands/browser/debug.js +8 -14
  17. package/build/commands/browser/deleteCookies.js +1 -4
  18. package/build/commands/browser/execute.js +3 -6
  19. package/build/commands/browser/executeAsync.js +3 -6
  20. package/build/commands/browser/getCookies.js +1 -4
  21. package/build/commands/browser/getPuppeteer.d.ts +1 -1
  22. package/build/commands/browser/getPuppeteer.d.ts.map +1 -1
  23. package/build/commands/browser/getPuppeteer.js +14 -21
  24. package/build/commands/browser/getWindowSize.js +3 -6
  25. package/build/commands/browser/keys.d.ts +20 -10
  26. package/build/commands/browser/keys.d.ts.map +1 -1
  27. package/build/commands/browser/keys.js +29 -24
  28. package/build/commands/browser/mock.d.ts +1 -1
  29. package/build/commands/browser/mock.d.ts.map +1 -1
  30. package/build/commands/browser/mock.js +12 -19
  31. package/build/commands/browser/mockClearAll.js +5 -11
  32. package/build/commands/browser/mockRestoreAll.js +5 -11
  33. package/build/commands/browser/newWindow.js +5 -11
  34. package/build/commands/browser/pause.js +1 -4
  35. package/build/commands/browser/react$$.d.ts.map +1 -1
  36. package/build/commands/browser/react$$.js +12 -16
  37. package/build/commands/browser/react$.d.ts.map +1 -1
  38. package/build/commands/browser/react$.js +10 -14
  39. package/build/commands/browser/reloadSession.js +5 -12
  40. package/build/commands/browser/savePDF.js +7 -13
  41. package/build/commands/browser/saveRecordingScreen.js +6 -12
  42. package/build/commands/browser/saveScreenshot.js +6 -12
  43. package/build/commands/browser/scroll.d.ts +25 -0
  44. package/build/commands/browser/scroll.d.ts.map +1 -0
  45. package/build/commands/browser/scroll.js +41 -0
  46. package/build/commands/browser/setCookies.js +1 -4
  47. package/build/commands/browser/setTimeout.js +1 -4
  48. package/build/commands/browser/setWindowSize.js +3 -6
  49. package/build/commands/browser/switchWindow.js +1 -4
  50. package/build/commands/browser/throttle.js +3 -6
  51. package/build/commands/browser/touchAction.d.ts +1 -1
  52. package/build/commands/browser/touchAction.d.ts.map +1 -1
  53. package/build/commands/browser/touchAction.js +3 -6
  54. package/build/commands/browser/uploadFile.d.ts +1 -1
  55. package/build/commands/browser/uploadFile.d.ts.map +1 -1
  56. package/build/commands/browser/uploadFile.js +10 -15
  57. package/build/commands/browser/url.js +3 -6
  58. package/build/commands/browser/waitUntil.js +3 -9
  59. package/build/commands/browser.d.ts +39 -33
  60. package/build/commands/browser.d.ts.map +1 -1
  61. package/build/commands/browser.js +42 -43
  62. package/build/commands/constant.d.ts +1 -1
  63. package/build/commands/constant.d.ts.map +1 -1
  64. package/build/commands/constant.js +6 -12
  65. package/build/commands/element/$$.d.ts +1 -1
  66. package/build/commands/element/$$.d.ts.map +1 -1
  67. package/build/commands/element/$$.js +2 -7
  68. package/build/commands/element/$.d.ts +1 -1
  69. package/build/commands/element/$.d.ts.map +1 -1
  70. package/build/commands/element/$.js +2 -7
  71. package/build/commands/element/addValue.d.ts +10 -14
  72. package/build/commands/element/addValue.d.ts.map +1 -1
  73. package/build/commands/element/addValue.js +23 -27
  74. package/build/commands/element/clearValue.d.ts +1 -1
  75. package/build/commands/element/clearValue.js +2 -5
  76. package/build/commands/element/click.d.ts +1 -1
  77. package/build/commands/element/click.d.ts.map +1 -1
  78. package/build/commands/element/click.js +19 -34
  79. package/build/commands/element/custom$$.js +9 -11
  80. package/build/commands/element/custom$.js +8 -10
  81. package/build/commands/element/doubleClick.d.ts.map +1 -1
  82. package/build/commands/element/doubleClick.js +11 -17
  83. package/build/commands/element/dragAndDrop.d.ts.map +1 -1
  84. package/build/commands/element/dragAndDrop.js +13 -19
  85. package/build/commands/element/getAttribute.js +1 -4
  86. package/build/commands/element/getCSSProperty.d.ts +1 -1
  87. package/build/commands/element/getCSSProperty.d.ts.map +1 -1
  88. package/build/commands/element/getCSSProperty.js +7 -13
  89. package/build/commands/element/getComputedLabel.js +1 -4
  90. package/build/commands/element/getComputedRole.js +1 -4
  91. package/build/commands/element/getHTML.js +7 -13
  92. package/build/commands/element/getLocation.js +3 -5
  93. package/build/commands/element/getProperty.d.ts +8 -8
  94. package/build/commands/element/getProperty.d.ts.map +1 -1
  95. package/build/commands/element/getProperty.js +5 -11
  96. package/build/commands/element/getSize.js +3 -5
  97. package/build/commands/element/getTagName.js +1 -4
  98. package/build/commands/element/getText.js +1 -4
  99. package/build/commands/element/getValue.js +1 -4
  100. package/build/commands/element/isClickable.js +7 -13
  101. package/build/commands/element/isDisplayed.js +9 -16
  102. package/build/commands/element/isDisplayedInViewport.js +7 -13
  103. package/build/commands/element/isEnabled.js +1 -4
  104. package/build/commands/element/isEqual.d.ts.map +1 -1
  105. package/build/commands/element/isEqual.js +9 -9
  106. package/build/commands/element/isExisting.js +1 -4
  107. package/build/commands/element/isFocused.js +7 -13
  108. package/build/commands/element/isSelected.js +1 -4
  109. package/build/commands/element/moveTo.d.ts.map +1 -1
  110. package/build/commands/element/moveTo.js +8 -13
  111. package/build/commands/element/nextElement.js +2 -5
  112. package/build/commands/element/parentElement.js +2 -5
  113. package/build/commands/element/previousElement.js +2 -5
  114. package/build/commands/element/react$$.d.ts.map +1 -1
  115. package/build/commands/element/react$$.js +13 -16
  116. package/build/commands/element/react$.d.ts.map +1 -1
  117. package/build/commands/element/react$.js +12 -14
  118. package/build/commands/element/saveScreenshot.js +6 -12
  119. package/build/commands/element/scrollIntoView.d.ts +3 -2
  120. package/build/commands/element/scrollIntoView.d.ts.map +1 -1
  121. package/build/commands/element/scrollIntoView.js +32 -12
  122. package/build/commands/element/selectByAttribute.js +3 -6
  123. package/build/commands/element/selectByIndex.js +3 -6
  124. package/build/commands/element/selectByVisibleText.js +3 -6
  125. package/build/commands/element/setValue.d.ts +13 -14
  126. package/build/commands/element/setValue.d.ts.map +1 -1
  127. package/build/commands/element/setValue.js +14 -17
  128. package/build/commands/element/shadow$$.d.ts +1 -1
  129. package/build/commands/element/shadow$$.d.ts.map +1 -1
  130. package/build/commands/element/shadow$$.js +3 -6
  131. package/build/commands/element/shadow$.js +3 -6
  132. package/build/commands/element/touchAction.js +3 -6
  133. package/build/commands/element/waitForClickable.js +1 -4
  134. package/build/commands/element/waitForDisplayed.js +1 -4
  135. package/build/commands/element/waitForEnabled.js +1 -4
  136. package/build/commands/element/waitForExist.js +1 -4
  137. package/build/commands/element/waitUntil.d.ts +1 -1
  138. package/build/commands/element/waitUntil.d.ts.map +1 -1
  139. package/build/commands/element/waitUntil.js +2 -7
  140. package/build/commands/element.d.ts +48 -48
  141. package/build/commands/element.d.ts.map +1 -1
  142. package/build/commands/element.js +57 -62
  143. package/build/constants.d.ts +66 -0
  144. package/build/constants.d.ts.map +1 -1
  145. package/build/constants.js +91 -12
  146. package/build/index.d.ts +64 -5
  147. package/build/index.d.ts.map +1 -1
  148. package/build/index.js +47 -85
  149. package/build/middlewares.d.ts +1 -1
  150. package/build/middlewares.js +11 -19
  151. package/build/multiremote.js +12 -20
  152. package/build/protocol-stub.d.ts.map +1 -1
  153. package/build/protocol-stub.js +4 -6
  154. package/build/scripts/getHTML.js +1 -4
  155. package/build/scripts/getProperty.d.ts +8 -8
  156. package/build/scripts/getProperty.d.ts.map +1 -1
  157. package/build/scripts/getProperty.js +1 -4
  158. package/build/scripts/isElementClickable.js +1 -4
  159. package/build/scripts/isElementDisplayed.js +1 -4
  160. package/build/scripts/isElementInViewport.js +1 -4
  161. package/build/scripts/isFocused.js +1 -4
  162. package/build/scripts/newWindow.js +1 -4
  163. package/build/scripts/resq.js +3 -9
  164. package/build/scripts/shadowFnFactory.js +2 -6
  165. package/build/types.d.ts +1 -5
  166. package/build/types.d.ts.map +1 -1
  167. package/build/types.js +1 -2
  168. package/build/utils/SevereServiceError.js +1 -4
  169. package/build/utils/Timer.d.ts.map +1 -1
  170. package/build/utils/Timer.js +1 -25
  171. package/build/utils/actions/base.d.ts +32 -0
  172. package/build/utils/actions/base.d.ts.map +1 -0
  173. package/build/utils/actions/base.js +78 -0
  174. package/build/utils/actions/index.d.ts +6 -0
  175. package/build/utils/actions/index.d.ts.map +1 -0
  176. package/build/utils/actions/index.js +5 -0
  177. package/build/utils/actions/key.d.ts +15 -0
  178. package/build/utils/actions/key.d.ts.map +1 -0
  179. package/build/utils/actions/key.js +22 -0
  180. package/build/utils/actions/pointer.d.ts +62 -0
  181. package/build/utils/actions/pointer.d.ts.map +1 -0
  182. package/build/utils/actions/pointer.js +76 -0
  183. package/build/utils/actions/wheel.d.ts +36 -0
  184. package/build/utils/actions/wheel.d.ts.map +1 -0
  185. package/build/utils/actions/wheel.js +20 -0
  186. package/build/utils/detectBackend.d.ts +1 -1
  187. package/build/utils/detectBackend.d.ts.map +1 -1
  188. package/build/utils/detectBackend.js +3 -7
  189. package/build/utils/findStrategy.js +11 -19
  190. package/build/utils/getElementObject.d.ts.map +1 -1
  191. package/build/utils/getElementObject.js +42 -31
  192. package/build/utils/implicitWait.js +3 -9
  193. package/build/utils/index.d.ts +2 -6
  194. package/build/utils/index.d.ts.map +1 -1
  195. package/build/utils/index.js +92 -142
  196. package/build/utils/interception/devtools.d.ts +1 -1
  197. package/build/utils/interception/devtools.d.ts.map +1 -1
  198. package/build/utils/interception/devtools.js +17 -23
  199. package/build/utils/interception/index.d.ts +2 -2
  200. package/build/utils/interception/index.d.ts.map +1 -1
  201. package/build/utils/interception/index.js +5 -11
  202. package/build/utils/interception/types.d.ts +1 -1
  203. package/build/utils/interception/types.d.ts.map +1 -1
  204. package/build/utils/interception/types.js +1 -2
  205. package/build/utils/interception/webdriver.d.ts +1 -1
  206. package/build/utils/interception/webdriver.d.ts.map +1 -1
  207. package/build/utils/interception/webdriver.js +5 -11
  208. package/build/utils/refetchElement.js +3 -9
  209. package/package.json +22 -11
  210. package/async.d.ts +0 -24
  211. package/sync.d.ts +0 -24
@@ -1,63 +1,58 @@
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 __1 = __importDefault(require("./element/$$"));
7
- const _1 = __importDefault(require("./element/$"));
8
- const addValue_1 = __importDefault(require("./element/addValue"));
9
- const clearValue_1 = __importDefault(require("./element/clearValue"));
10
- const click_1 = __importDefault(require("./element/click"));
11
- const custom__1 = __importDefault(require("./element/custom$$"));
12
- const custom_1 = __importDefault(require("./element/custom$"));
13
- const doubleClick_1 = __importDefault(require("./element/doubleClick"));
14
- const dragAndDrop_1 = __importDefault(require("./element/dragAndDrop"));
15
- const getAttribute_1 = __importDefault(require("./element/getAttribute"));
16
- const getCSSProperty_1 = __importDefault(require("./element/getCSSProperty"));
17
- const getComputedRole_1 = __importDefault(require("./element/getComputedRole"));
18
- const getComputedLabel_1 = __importDefault(require("./element/getComputedLabel"));
19
- const getHTML_1 = __importDefault(require("./element/getHTML"));
20
- const getLocation_1 = __importDefault(require("./element/getLocation"));
21
- const getProperty_1 = __importDefault(require("./element/getProperty"));
22
- const getSize_1 = __importDefault(require("./element/getSize"));
23
- const getTagName_1 = __importDefault(require("./element/getTagName"));
24
- const getText_1 = __importDefault(require("./element/getText"));
25
- const getValue_1 = __importDefault(require("./element/getValue"));
26
- const isClickable_1 = __importDefault(require("./element/isClickable"));
27
- const isDisplayed_1 = __importDefault(require("./element/isDisplayed"));
28
- const isDisplayedInViewport_1 = __importDefault(require("./element/isDisplayedInViewport"));
29
- const isEnabled_1 = __importDefault(require("./element/isEnabled"));
30
- const isEqual_1 = __importDefault(require("./element/isEqual"));
31
- const isExisting_1 = __importDefault(require("./element/isExisting"));
32
- const isFocused_1 = __importDefault(require("./element/isFocused"));
33
- const isSelected_1 = __importDefault(require("./element/isSelected"));
34
- const moveTo_1 = __importDefault(require("./element/moveTo"));
35
- const nextElement_1 = __importDefault(require("./element/nextElement"));
36
- const parentElement_1 = __importDefault(require("./element/parentElement"));
37
- const previousElement_1 = __importDefault(require("./element/previousElement"));
38
- const react__1 = __importDefault(require("./element/react$$"));
39
- const react_1 = __importDefault(require("./element/react$"));
40
- const saveScreenshot_1 = __importDefault(require("./element/saveScreenshot"));
41
- const scrollIntoView_1 = __importDefault(require("./element/scrollIntoView"));
42
- const selectByAttribute_1 = __importDefault(require("./element/selectByAttribute"));
43
- const selectByIndex_1 = __importDefault(require("./element/selectByIndex"));
44
- const selectByVisibleText_1 = __importDefault(require("./element/selectByVisibleText"));
45
- const setValue_1 = __importDefault(require("./element/setValue"));
46
- const shadow__1 = __importDefault(require("./element/shadow$$"));
47
- const shadow_1 = __importDefault(require("./element/shadow$"));
48
- const touchAction_1 = __importDefault(require("./element/touchAction"));
49
- const waitForClickable_1 = __importDefault(require("./element/waitForClickable"));
50
- const waitForDisplayed_1 = __importDefault(require("./element/waitForDisplayed"));
51
- const waitForEnabled_1 = __importDefault(require("./element/waitForEnabled"));
52
- const waitForExist_1 = __importDefault(require("./element/waitForExist"));
53
- const waitUntil_1 = __importDefault(require("./element/waitUntil"));
54
- exports.default = {
55
- $$: __1.default, $: _1.default, addValue: addValue_1.default, clearValue: clearValue_1.default, click: click_1.default, custom$: custom_1.default, custom$$: custom__1.default, doubleClick: doubleClick_1.default, dragAndDrop: dragAndDrop_1.default,
56
- getAttribute: getAttribute_1.default, getCSSProperty: getCSSProperty_1.default, getComputedRole: getComputedRole_1.default, getComputedLabel: getComputedLabel_1.default, getHTML: getHTML_1.default, getLocation: getLocation_1.default,
57
- getProperty: getProperty_1.default, getSize: getSize_1.default, getTagName: getTagName_1.default, getText: getText_1.default, getValue: getValue_1.default, isClickable: isClickable_1.default, isDisplayed: isDisplayed_1.default,
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
  };
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,aAAa,CAAA;AA4B7E,eAAO,MAAM,WAAW,wCAAwC,CAAA;AAEhE,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAuQtF,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"}
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"}
@@ -1,6 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERROR_REASON = exports.DEEP_SELECTOR = exports.FF_REMOTE_DEBUG_ARG = exports.DRIVER_DEFAULT_ENDPOINT = exports.W3C_SELECTOR_STRATEGIES = exports.WDIO_DEFAULTS = exports.ELEMENT_KEY = void 0;
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
- exports.ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';
29
- exports.WDIO_DEFAULTS = {
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
- require.resolve(param);
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
- exports.W3C_SELECTOR_STRATEGIES = ['css selector', 'link text', 'partial link text', 'tag name', 'xpath'];
274
- exports.DRIVER_DEFAULT_ENDPOINT = {
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
- exports.FF_REMOTE_DEBUG_ARG = '-remote-debugging-port';
281
- exports.DEEP_SELECTOR = '>>>';
282
- exports.ERROR_REASON = [
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 "webdriverio/async" into tsconfig.json's "types" array will solve it: <code> { "compilerOptions": { "types": ["webdriverio/async"] } } </code>
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKnD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAOjE,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;AAE1F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,WAA2B,aAAa,mBAAmB,QAAQ,KAAG,QAAQ,YAAY,OAAO,CA+CnH,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,SAAS,CAAA;AACvB,cAAc,4BAA4B,CAAA"}
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"}