webdriverio 9.25.0 → 9.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/build/commands/browser.d.ts +36 -0
  2. package/build/commands/browser.d.ts.map +1 -1
  3. package/build/commands/mobile/background.d.ts +26 -0
  4. package/build/commands/mobile/background.d.ts.map +1 -0
  5. package/build/commands/mobile/closeApp.d.ts +35 -0
  6. package/build/commands/mobile/closeApp.d.ts.map +1 -0
  7. package/build/commands/mobile/deepLink.d.ts +10 -3
  8. package/build/commands/mobile/deepLink.d.ts.map +1 -1
  9. package/build/commands/mobile/dragAndDrop.d.ts +2 -0
  10. package/build/commands/mobile/dragAndDrop.d.ts.map +1 -1
  11. package/build/commands/mobile/fingerPrint.d.ts +20 -0
  12. package/build/commands/mobile/fingerPrint.d.ts.map +1 -0
  13. package/build/commands/mobile/getClipboard.d.ts +24 -0
  14. package/build/commands/mobile/getClipboard.d.ts.map +1 -0
  15. package/build/commands/mobile/getContext.d.ts +2 -0
  16. package/build/commands/mobile/getContext.d.ts.map +1 -1
  17. package/build/commands/mobile/getContexts.d.ts +2 -0
  18. package/build/commands/mobile/getContexts.d.ts.map +1 -1
  19. package/build/commands/mobile/getCurrentActivity.d.ts +20 -0
  20. package/build/commands/mobile/getCurrentActivity.d.ts.map +1 -0
  21. package/build/commands/mobile/getCurrentPackage.d.ts +20 -0
  22. package/build/commands/mobile/getCurrentPackage.d.ts.map +1 -0
  23. package/build/commands/mobile/getDisplayDensity.d.ts +18 -0
  24. package/build/commands/mobile/getDisplayDensity.d.ts.map +1 -0
  25. package/build/commands/mobile/getPerformanceData.d.ts +28 -0
  26. package/build/commands/mobile/getPerformanceData.d.ts.map +1 -0
  27. package/build/commands/mobile/getPerformanceDataTypes.d.ts +21 -0
  28. package/build/commands/mobile/getPerformanceDataTypes.d.ts.map +1 -0
  29. package/build/commands/mobile/getStrings.d.ts +26 -0
  30. package/build/commands/mobile/getStrings.d.ts.map +1 -0
  31. package/build/commands/mobile/getSystemBars.d.ts +19 -0
  32. package/build/commands/mobile/getSystemBars.d.ts.map +1 -0
  33. package/build/commands/mobile/gsmCall.d.ts +23 -0
  34. package/build/commands/mobile/gsmCall.d.ts.map +1 -0
  35. package/build/commands/mobile/gsmSignal.d.ts +22 -0
  36. package/build/commands/mobile/gsmSignal.d.ts.map +1 -0
  37. package/build/commands/mobile/gsmVoice.d.ts +20 -0
  38. package/build/commands/mobile/gsmVoice.d.ts.map +1 -0
  39. package/build/commands/mobile/isLocked.d.ts +20 -0
  40. package/build/commands/mobile/isLocked.d.ts.map +1 -0
  41. package/build/commands/mobile/launchApp.d.ts +46 -0
  42. package/build/commands/mobile/launchApp.d.ts.map +1 -0
  43. package/build/commands/mobile/lock.d.ts +28 -0
  44. package/build/commands/mobile/lock.d.ts.map +1 -0
  45. package/build/commands/mobile/longPress.d.ts +2 -0
  46. package/build/commands/mobile/longPress.d.ts.map +1 -1
  47. package/build/commands/mobile/longPressKeyCode.d.ts +21 -0
  48. package/build/commands/mobile/longPressKeyCode.d.ts.map +1 -0
  49. package/build/commands/mobile/openNotifications.d.ts +17 -0
  50. package/build/commands/mobile/openNotifications.d.ts.map +1 -0
  51. package/build/commands/mobile/pinch.d.ts +2 -0
  52. package/build/commands/mobile/pinch.d.ts.map +1 -1
  53. package/build/commands/mobile/powerAC.d.ts +19 -0
  54. package/build/commands/mobile/powerAC.d.ts.map +1 -0
  55. package/build/commands/mobile/powerCapacity.d.ts +19 -0
  56. package/build/commands/mobile/powerCapacity.d.ts.map +1 -0
  57. package/build/commands/mobile/pressKeyCode.d.ts +24 -0
  58. package/build/commands/mobile/pressKeyCode.d.ts.map +1 -0
  59. package/build/commands/mobile/queryAppState.d.ts +32 -0
  60. package/build/commands/mobile/queryAppState.d.ts.map +1 -0
  61. package/build/commands/mobile/relaunchActiveApp.d.ts +2 -0
  62. package/build/commands/mobile/relaunchActiveApp.d.ts.map +1 -1
  63. package/build/commands/mobile/sendKeyEvent.d.ts +26 -0
  64. package/build/commands/mobile/sendKeyEvent.d.ts.map +1 -0
  65. package/build/commands/mobile/sendSms.d.ts +20 -0
  66. package/build/commands/mobile/sendSms.d.ts.map +1 -0
  67. package/build/commands/mobile/setClipboard.d.ts +26 -0
  68. package/build/commands/mobile/setClipboard.d.ts.map +1 -0
  69. package/build/commands/mobile/shake.d.ts +17 -0
  70. package/build/commands/mobile/shake.d.ts.map +1 -0
  71. package/build/commands/mobile/startActivity.d.ts +90 -0
  72. package/build/commands/mobile/startActivity.d.ts.map +1 -0
  73. package/build/commands/mobile/swipe.d.ts +2 -0
  74. package/build/commands/mobile/swipe.d.ts.map +1 -1
  75. package/build/commands/mobile/switchContext.d.ts +2 -0
  76. package/build/commands/mobile/switchContext.d.ts.map +1 -1
  77. package/build/commands/mobile/tap.d.ts +2 -0
  78. package/build/commands/mobile/tap.d.ts.map +1 -1
  79. package/build/commands/mobile/toggleAirplaneMode.d.ts +29 -0
  80. package/build/commands/mobile/toggleAirplaneMode.d.ts.map +1 -0
  81. package/build/commands/mobile/toggleData.d.ts +27 -0
  82. package/build/commands/mobile/toggleData.d.ts.map +1 -0
  83. package/build/commands/mobile/toggleEnrollTouchId.d.ts +27 -0
  84. package/build/commands/mobile/toggleEnrollTouchId.d.ts.map +1 -0
  85. package/build/commands/mobile/toggleLocationServices.d.ts +17 -0
  86. package/build/commands/mobile/toggleLocationServices.d.ts.map +1 -0
  87. package/build/commands/mobile/toggleNetworkSpeed.d.ts +20 -0
  88. package/build/commands/mobile/toggleNetworkSpeed.d.ts.map +1 -0
  89. package/build/commands/mobile/toggleWiFi.d.ts +27 -0
  90. package/build/commands/mobile/toggleWiFi.d.ts.map +1 -0
  91. package/build/commands/mobile/touchId.d.ts +34 -0
  92. package/build/commands/mobile/touchId.d.ts.map +1 -0
  93. package/build/commands/mobile/unlock.d.ts +41 -0
  94. package/build/commands/mobile/unlock.d.ts.map +1 -0
  95. package/build/commands/mobile/zoom.d.ts +2 -0
  96. package/build/commands/mobile/zoom.d.ts.map +1 -1
  97. package/build/commands/mobile.d.ts +36 -0
  98. package/build/commands/mobile.d.ts.map +1 -1
  99. package/build/index.js +950 -138
  100. package/build/node.js +958 -148
  101. package/build/utils/mobile.d.ts +15 -0
  102. package/build/utils/mobile.d.ts.map +1 -1
  103. package/package.json +7 -7
@@ -0,0 +1,20 @@
1
+ /**
2
+ *
3
+ * Set the network speed for the Android emulator. Valid values: 'full', 'gsm', 'edge', 'hscsd',
4
+ * 'gprs', 'umts', 'hsdpa', 'lte', 'evdo'.
5
+ *
6
+ * > **Note:** Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the `mobile:` execute method.
7
+ *
8
+ * <example>
9
+ :toggleNetworkSpeed.js
10
+ it('should set network speed to LTE', async () => {
11
+ await browser.toggleNetworkSpeed('lte')
12
+ })
13
+ * </example>
14
+ *
15
+ * @param {string} netspeed The network speed preset to apply ('full', 'gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo')
16
+ *
17
+ * @support ["android"]
18
+ */
19
+ export declare function toggleNetworkSpeed(this: WebdriverIO.Browser, netspeed: string): Promise<unknown>;
20
+ //# sourceMappingURL=toggleNetworkSpeed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggleNetworkSpeed.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/toggleNetworkSpeed.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,kBAAkB,CACpC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,oBAsBnB"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ *
3
+ * Set the WiFi state on the device.
4
+ *
5
+ * > **Note:** Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the `mobile:` execute method.
6
+ *
7
+ * :::note
8
+ * Unlike the deprecated API which toggled the WiFi state, this command requires an explicit
9
+ * `enabled` parameter to set the desired state directly.
10
+ *
11
+ * This command is only supported on Android.
12
+ * :::
13
+ *
14
+ * <example>
15
+ :toggleWiFi.js
16
+ it('should set WiFi state', async () => {
17
+ await browser.toggleWiFi(true) // enable WiFi
18
+ await browser.toggleWiFi(false) // disable WiFi
19
+ })
20
+ * </example>
21
+ *
22
+ * @param {boolean} enabled Set to `true` to enable WiFi, `false` to disable it.
23
+ *
24
+ * @support ["android"]
25
+ */
26
+ export declare function toggleWiFi(this: WebdriverIO.Browser, enabled: boolean): Promise<unknown>;
27
+ //# sourceMappingURL=toggleWiFi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggleWiFi.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/toggleWiFi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,UAAU,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,EAAE,OAAO,oBAsBnB"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ *
3
+ * Simulate a Touch ID or Face ID biometric match event on iOS Simulator.
4
+ *
5
+ * > **Note:** Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the `mobile:` execute method.
6
+ *
7
+ * :::note
8
+ * This command requires the `allowTouchIdEnroll` capability to be set to `true` in the session.
9
+ * It is only supported on iOS Simulator.
10
+ * :::
11
+ *
12
+ * <example>
13
+ :touchId.js
14
+ it('should simulate a Touch ID fingerprint match', async () => {
15
+ // Simulate a successful Touch ID match
16
+ await browser.touchId(true)
17
+ // Simulate a failed Touch ID match
18
+ await browser.touchId(false)
19
+ })
20
+ it('should simulate a Face ID match', async () => {
21
+ // Simulate a successful Face ID match
22
+ await browser.touchId(true, 'faceId')
23
+ // Simulate a failed Face ID match
24
+ await browser.touchId(false, 'faceId')
25
+ })
26
+ * </example>
27
+ *
28
+ * @param {boolean} match Whether the biometric match should succeed (`true`) or fail (`false`)
29
+ * @param {string} [type] The biometric type to simulate. Use `'touchId'` for Touch ID (default) or `'faceId'` for Face ID. <br /><strong>iOS-ONLY</strong>
30
+ *
31
+ * @support ["ios"]
32
+ */
33
+ export declare function touchId(this: WebdriverIO.Browser, match: boolean, type?: 'touchId' | 'faceId'): Promise<unknown>;
34
+ //# sourceMappingURL=touchId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touchId.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/touchId.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,OAAO,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,OAAO,EACd,IAAI,GAAE,SAAS,GAAG,QAAoB,oBAsBzC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ *
3
+ * Unlock the device screen.
4
+ *
5
+ * > **Note:** Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the `mobile:` execute method.
6
+ *
7
+ * <example>
8
+ :unlock.js
9
+ it('should unlock the device screen', async () => {
10
+ // Unlock with no arguments (iOS or Android with default settings)
11
+ await browser.unlock()
12
+ })
13
+ it('should unlock Android with a PIN', async () => {
14
+ // Android-only: unlock using locksettings strategy with a PIN
15
+ await browser.unlock({
16
+ strategy: 'locksettings',
17
+ unlockType: 'pin',
18
+ unlockKey: '1234'
19
+ })
20
+ })
21
+ it('should unlock Android with a custom timeout', async () => {
22
+ // Android-only: unlock with a custom timeout
23
+ await browser.unlock({ timeoutMs: 5000 })
24
+ })
25
+ * </example>
26
+ *
27
+ * @param {object} [options] Unlock options (Android only)
28
+ * @param {string} [options.strategy] The unlock strategy to use. Accepted values: `'locksettings'` (default) or `'uiautomator'`. <br /><strong>ANDROID-ONLY</strong>
29
+ * @param {number} [options.timeoutMs] The timeout in milliseconds to wait for the unlock to complete. Default is `2000`. <br /><strong>ANDROID-ONLY</strong>
30
+ * @param {string} [options.unlockKey] The PIN, password, or pattern to use for unlocking. Required when the device has a PIN/password lock. <br /><strong>ANDROID-ONLY</strong>
31
+ * @param {string} [options.unlockType] The type of lock mechanism on the device (e.g. `'pin'`, `'password'`, `'pattern'`). <br /><strong>ANDROID-ONLY</strong>
32
+ *
33
+ * @support ["ios","android"]
34
+ */
35
+ export declare function unlock(this: WebdriverIO.Browser, options?: {
36
+ strategy?: 'locksettings' | 'uiautomator';
37
+ timeoutMs?: number;
38
+ unlockKey?: string;
39
+ unlockType?: string;
40
+ }): Promise<unknown>;
41
+ //# sourceMappingURL=unlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/unlock.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,MAAM,CACxB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,CAAC,EAAE;IACN,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACtB,oBAsBJ"}
@@ -34,6 +34,8 @@ import type { PinchAndZoomOptions } from '../../types.js';
34
34
  * @param {number=} options.duration The duration in millisecond of how fast the zoom should be executed, minimal is 500 ms and max is 10000 ms. The default is 1500 ms (1.5 seconds) (optional)
35
35
  * @param {number=} options.scale The scale of how big the zoom should be according to the screen. Valid values must be float numbers in range 0..1, where 1.0 is 100% (optional)
36
36
  * @mobileElement
37
+ *
38
+ * @support ["ios","android"]
37
39
  */
38
40
  export declare function zoom(this: WebdriverIO.Element, options?: Partial<PinchAndZoomOptions>): Promise<unknown>;
39
41
  //# sourceMappingURL=zoom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/zoom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,IAAI,CACtB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,oBAuB7C"}
1
+ {"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/commands/mobile/zoom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,IAAI,CACtB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM,oBAuB7C"}
@@ -7,4 +7,40 @@ export * from './mobile/getContext.js';
7
7
  export * from './mobile/getContexts.js';
8
8
  export * from './mobile/switchContext.js';
9
9
  export * from './mobile/deepLink.js';
10
+ export * from './mobile/lock.js';
11
+ export * from './mobile/touchId.js';
12
+ export * from './mobile/toggleEnrollTouchId.js';
13
+ export * from './mobile/launchApp.js';
14
+ export * from './mobile/background.js';
15
+ export * from './mobile/getStrings.js';
16
+ export * from './mobile/setClipboard.js';
17
+ export * from './mobile/getClipboard.js';
18
+ export * from './mobile/queryAppState.js';
19
+ export * from './mobile/toggleAirplaneMode.js';
20
+ export * from './mobile/toggleData.js';
21
+ export * from './mobile/toggleWiFi.js';
22
+ export * from './mobile/unlock.js';
23
+ export * from './mobile/isLocked.js';
24
+ export * from './mobile/shake.js';
25
+ export * from './mobile/closeApp.js';
26
+ export * from './mobile/getCurrentActivity.js';
27
+ export * from './mobile/getCurrentPackage.js';
28
+ export * from './mobile/getPerformanceData.js';
29
+ export * from './mobile/getPerformanceDataTypes.js';
30
+ export * from './mobile/getSystemBars.js';
31
+ export * from './mobile/getDisplayDensity.js';
32
+ export * from './mobile/pressKeyCode.js';
33
+ export * from './mobile/longPressKeyCode.js';
34
+ export * from './mobile/sendKeyEvent.js';
35
+ export * from './mobile/startActivity.js';
36
+ export * from './mobile/openNotifications.js';
37
+ export * from './mobile/toggleLocationServices.js';
38
+ export * from './mobile/toggleNetworkSpeed.js';
39
+ export * from './mobile/gsmCall.js';
40
+ export * from './mobile/gsmSignal.js';
41
+ export * from './mobile/gsmVoice.js';
42
+ export * from './mobile/sendSms.js';
43
+ export * from './mobile/fingerPrint.js';
44
+ export * from './mobile/powerCapacity.js';
45
+ export * from './mobile/powerAC.js';
10
46
  //# sourceMappingURL=mobile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../src/commands/mobile.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA"}
1
+ {"version":3,"file":"mobile.d.ts","sourceRoot":"","sources":["../../src/commands/mobile.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA"}