appium-android-driver 13.3.4 → 14.0.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.
Files changed (236) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/build/lib/commands/app-management.d.ts +2 -2
  3. package/build/lib/commands/app-management.d.ts.map +1 -1
  4. package/build/lib/commands/app-management.js +41 -67
  5. package/build/lib/commands/app-management.js.map +1 -1
  6. package/build/lib/commands/appearance.d.ts +1 -1
  7. package/build/lib/commands/appearance.d.ts.map +1 -1
  8. package/build/lib/commands/appearance.js +2 -6
  9. package/build/lib/commands/appearance.js.map +1 -1
  10. package/build/lib/commands/bidi/constants.js +4 -8
  11. package/build/lib/commands/bidi/constants.js.map +1 -1
  12. package/build/lib/commands/bidi/models.d.ts +1 -1
  13. package/build/lib/commands/bidi/models.d.ts.map +1 -1
  14. package/build/lib/commands/bidi/models.js +7 -13
  15. package/build/lib/commands/bidi/models.js.map +1 -1
  16. package/build/lib/commands/bidi/types.js +1 -2
  17. package/build/lib/commands/bluetooth.d.ts +1 -1
  18. package/build/lib/commands/bluetooth.d.ts.map +1 -1
  19. package/build/lib/commands/bluetooth.js +3 -6
  20. package/build/lib/commands/bluetooth.js.map +1 -1
  21. package/build/lib/commands/context/cache.d.ts +1 -1
  22. package/build/lib/commands/context/cache.d.ts.map +1 -1
  23. package/build/lib/commands/context/cache.js +5 -10
  24. package/build/lib/commands/context/cache.js.map +1 -1
  25. package/build/lib/commands/context/exports.d.ts +2 -2
  26. package/build/lib/commands/context/exports.d.ts.map +1 -1
  27. package/build/lib/commands/context/exports.js +64 -86
  28. package/build/lib/commands/context/exports.js.map +1 -1
  29. package/build/lib/commands/context/helpers.d.ts +2 -2
  30. package/build/lib/commands/context/helpers.d.ts.map +1 -1
  31. package/build/lib/commands/context/helpers.js +69 -82
  32. package/build/lib/commands/context/helpers.js.map +1 -1
  33. package/build/lib/commands/device/common.d.ts +2 -2
  34. package/build/lib/commands/device/common.d.ts.map +1 -1
  35. package/build/lib/commands/device/common.js +47 -77
  36. package/build/lib/commands/device/common.js.map +1 -1
  37. package/build/lib/commands/device/emulator-actions.d.ts +2 -2
  38. package/build/lib/commands/device/emulator-actions.d.ts.map +1 -1
  39. package/build/lib/commands/device/emulator-actions.js +33 -52
  40. package/build/lib/commands/device/emulator-actions.js.map +1 -1
  41. package/build/lib/commands/device/emulator-console.d.ts +1 -1
  42. package/build/lib/commands/device/emulator-console.d.ts.map +1 -1
  43. package/build/lib/commands/device/emulator-console.js +3 -6
  44. package/build/lib/commands/device/emulator-console.js.map +1 -1
  45. package/build/lib/commands/device/utils.d.ts +1 -1
  46. package/build/lib/commands/device/utils.d.ts.map +1 -1
  47. package/build/lib/commands/device/utils.js +27 -37
  48. package/build/lib/commands/device/utils.js.map +1 -1
  49. package/build/lib/commands/deviceidle.d.ts +1 -1
  50. package/build/lib/commands/deviceidle.d.ts.map +1 -1
  51. package/build/lib/commands/deviceidle.js +4 -7
  52. package/build/lib/commands/deviceidle.js.map +1 -1
  53. package/build/lib/commands/element.d.ts +2 -2
  54. package/build/lib/commands/element.d.ts.map +1 -1
  55. package/build/lib/commands/element.js +22 -39
  56. package/build/lib/commands/element.js.map +1 -1
  57. package/build/lib/commands/execute.d.ts +1 -1
  58. package/build/lib/commands/execute.d.ts.map +1 -1
  59. package/build/lib/commands/execute.js +6 -9
  60. package/build/lib/commands/execute.js.map +1 -1
  61. package/build/lib/commands/file-actions.d.ts +1 -1
  62. package/build/lib/commands/file-actions.d.ts.map +1 -1
  63. package/build/lib/commands/file-actions.js +25 -34
  64. package/build/lib/commands/file-actions.js.map +1 -1
  65. package/build/lib/commands/find.d.ts +2 -2
  66. package/build/lib/commands/find.d.ts.map +1 -1
  67. package/build/lib/commands/find.js +10 -14
  68. package/build/lib/commands/find.js.map +1 -1
  69. package/build/lib/commands/geolocation.d.ts +1 -1
  70. package/build/lib/commands/geolocation.d.ts.map +1 -1
  71. package/build/lib/commands/geolocation.js +21 -35
  72. package/build/lib/commands/geolocation.js.map +1 -1
  73. package/build/lib/commands/gestures.d.ts +1 -1
  74. package/build/lib/commands/gestures.d.ts.map +1 -1
  75. package/build/lib/commands/gestures.js +4 -7
  76. package/build/lib/commands/gestures.js.map +1 -1
  77. package/build/lib/commands/image-injection.d.ts +1 -1
  78. package/build/lib/commands/image-injection.d.ts.map +1 -1
  79. package/build/lib/commands/image-injection.js +16 -23
  80. package/build/lib/commands/image-injection.js.map +1 -1
  81. package/build/lib/commands/ime.d.ts +1 -1
  82. package/build/lib/commands/ime.d.ts.map +1 -1
  83. package/build/lib/commands/ime.js +10 -18
  84. package/build/lib/commands/ime.js.map +1 -1
  85. package/build/lib/commands/intent.d.ts +1 -1
  86. package/build/lib/commands/intent.d.ts.map +1 -1
  87. package/build/lib/commands/intent.js +22 -29
  88. package/build/lib/commands/intent.js.map +1 -1
  89. package/build/lib/commands/keyboard.d.ts +2 -2
  90. package/build/lib/commands/keyboard.d.ts.map +1 -1
  91. package/build/lib/commands/keyboard.js +21 -33
  92. package/build/lib/commands/keyboard.js.map +1 -1
  93. package/build/lib/commands/legacy.d.ts +1 -1
  94. package/build/lib/commands/legacy.d.ts.map +1 -1
  95. package/build/lib/commands/legacy.js +7 -12
  96. package/build/lib/commands/legacy.js.map +1 -1
  97. package/build/lib/commands/lock/exports.d.ts +2 -2
  98. package/build/lib/commands/lock/exports.d.ts.map +1 -1
  99. package/build/lib/commands/lock/exports.js +18 -25
  100. package/build/lib/commands/lock/exports.js.map +1 -1
  101. package/build/lib/commands/lock/helpers.d.ts +2 -2
  102. package/build/lib/commands/lock/helpers.d.ts.map +1 -1
  103. package/build/lib/commands/lock/helpers.js +48 -64
  104. package/build/lib/commands/lock/helpers.js.map +1 -1
  105. package/build/lib/commands/log.d.ts +2 -2
  106. package/build/lib/commands/log.d.ts.map +1 -1
  107. package/build/lib/commands/log.js +38 -42
  108. package/build/lib/commands/log.js.map +1 -1
  109. package/build/lib/commands/media-projection.d.ts +2 -2
  110. package/build/lib/commands/media-projection.d.ts.map +1 -1
  111. package/build/lib/commands/media-projection.js +14 -22
  112. package/build/lib/commands/media-projection.js.map +1 -1
  113. package/build/lib/commands/memory.d.ts +2 -2
  114. package/build/lib/commands/memory.d.ts.map +1 -1
  115. package/build/lib/commands/memory.js +4 -7
  116. package/build/lib/commands/memory.js.map +1 -1
  117. package/build/lib/commands/misc.d.ts +2 -2
  118. package/build/lib/commands/misc.d.ts.map +1 -1
  119. package/build/lib/commands/misc.js +10 -19
  120. package/build/lib/commands/misc.js.map +1 -1
  121. package/build/lib/commands/network.d.ts +2 -2
  122. package/build/lib/commands/network.d.ts.map +1 -1
  123. package/build/lib/commands/network.js +14 -26
  124. package/build/lib/commands/network.js.map +1 -1
  125. package/build/lib/commands/nfc.d.ts +2 -2
  126. package/build/lib/commands/nfc.d.ts.map +1 -1
  127. package/build/lib/commands/nfc.js +3 -6
  128. package/build/lib/commands/nfc.js.map +1 -1
  129. package/build/lib/commands/performance.d.ts +2 -2
  130. package/build/lib/commands/performance.d.ts.map +1 -1
  131. package/build/lib/commands/performance.js +48 -58
  132. package/build/lib/commands/performance.js.map +1 -1
  133. package/build/lib/commands/permissions.d.ts +1 -1
  134. package/build/lib/commands/permissions.d.ts.map +1 -1
  135. package/build/lib/commands/permissions.js +16 -20
  136. package/build/lib/commands/permissions.js.map +1 -1
  137. package/build/lib/commands/recordscreen.d.ts +2 -2
  138. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  139. package/build/lib/commands/recordscreen.js +32 -39
  140. package/build/lib/commands/recordscreen.js.map +1 -1
  141. package/build/lib/commands/resources.d.ts +1 -1
  142. package/build/lib/commands/resources.d.ts.map +1 -1
  143. package/build/lib/commands/resources.js +7 -11
  144. package/build/lib/commands/resources.js.map +1 -1
  145. package/build/lib/commands/shell.d.ts +1 -1
  146. package/build/lib/commands/shell.d.ts.map +1 -1
  147. package/build/lib/commands/shell.js +9 -12
  148. package/build/lib/commands/shell.js.map +1 -1
  149. package/build/lib/commands/streamscreen.d.ts +1 -1
  150. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  151. package/build/lib/commands/streamscreen.js +32 -37
  152. package/build/lib/commands/streamscreen.js.map +1 -1
  153. package/build/lib/commands/system-bars.d.ts +2 -2
  154. package/build/lib/commands/system-bars.d.ts.map +1 -1
  155. package/build/lib/commands/system-bars.js +10 -16
  156. package/build/lib/commands/system-bars.js.map +1 -1
  157. package/build/lib/commands/time.d.ts +1 -1
  158. package/build/lib/commands/time.d.ts.map +1 -1
  159. package/build/lib/commands/time.js +9 -17
  160. package/build/lib/commands/time.js.map +1 -1
  161. package/build/lib/commands/types.d.ts +15 -1
  162. package/build/lib/commands/types.d.ts.map +1 -1
  163. package/build/lib/commands/types.js +1 -2
  164. package/build/lib/constraints.d.ts +3 -0
  165. package/build/lib/constraints.d.ts.map +1 -1
  166. package/build/lib/constraints.js +5 -5
  167. package/build/lib/constraints.js.map +1 -1
  168. package/build/lib/doctor/checks.js +54 -65
  169. package/build/lib/doctor/checks.js.map +1 -1
  170. package/build/lib/doctor/utils.js +4 -7
  171. package/build/lib/doctor/utils.js.map +1 -1
  172. package/build/lib/driver.d.ts +39 -39
  173. package/build/lib/driver.d.ts.map +1 -1
  174. package/build/lib/driver.js +220 -223
  175. package/build/lib/driver.js.map +1 -1
  176. package/build/lib/execute-method-map.js +1 -4
  177. package/build/lib/execute-method-map.js.map +1 -1
  178. package/build/lib/index.d.ts +7 -7
  179. package/build/lib/index.d.ts.map +1 -1
  180. package/build/lib/index.js +11 -51
  181. package/build/lib/index.js.map +1 -1
  182. package/build/lib/logger.js +2 -5
  183. package/build/lib/logger.js.map +1 -1
  184. package/build/lib/method-map.js +1 -4
  185. package/build/lib/method-map.js.map +1 -1
  186. package/build/lib/utils.d.ts +9 -7
  187. package/build/lib/utils.d.ts.map +1 -1
  188. package/build/lib/utils.js +22 -28
  189. package/build/lib/utils.js.map +1 -1
  190. package/lib/commands/app-management.ts +5 -11
  191. package/lib/commands/appearance.ts +1 -1
  192. package/lib/commands/bidi/models.ts +3 -3
  193. package/lib/commands/bluetooth.ts +2 -2
  194. package/lib/commands/context/cache.ts +1 -1
  195. package/lib/commands/context/exports.ts +7 -7
  196. package/lib/commands/context/helpers.ts +4 -4
  197. package/lib/commands/device/common.ts +36 -20
  198. package/lib/commands/device/emulator-actions.ts +4 -4
  199. package/lib/commands/device/emulator-console.ts +2 -2
  200. package/lib/commands/device/utils.ts +3 -3
  201. package/lib/commands/deviceidle.ts +2 -2
  202. package/lib/commands/element.ts +3 -3
  203. package/lib/commands/execute.ts +2 -2
  204. package/lib/commands/file-actions.ts +2 -2
  205. package/lib/commands/find.ts +4 -4
  206. package/lib/commands/geolocation.ts +2 -2
  207. package/lib/commands/gestures.ts +3 -3
  208. package/lib/commands/image-injection.ts +2 -2
  209. package/lib/commands/ime.ts +3 -3
  210. package/lib/commands/intent.ts +3 -3
  211. package/lib/commands/keyboard.ts +3 -3
  212. package/lib/commands/legacy.ts +2 -2
  213. package/lib/commands/lock/exports.ts +3 -3
  214. package/lib/commands/lock/helpers.ts +2 -2
  215. package/lib/commands/log.ts +18 -11
  216. package/lib/commands/media-projection.ts +2 -2
  217. package/lib/commands/memory.ts +3 -3
  218. package/lib/commands/misc.ts +3 -3
  219. package/lib/commands/network.ts +3 -3
  220. package/lib/commands/nfc.ts +3 -3
  221. package/lib/commands/performance.ts +4 -4
  222. package/lib/commands/permissions.ts +3 -3
  223. package/lib/commands/recordscreen.ts +5 -5
  224. package/lib/commands/resources.ts +2 -2
  225. package/lib/commands/shell.ts +3 -3
  226. package/lib/commands/streamscreen.ts +6 -4
  227. package/lib/commands/system-bars.ts +6 -6
  228. package/lib/commands/time.ts +3 -3
  229. package/lib/commands/types.ts +15 -1
  230. package/lib/constraints.ts +3 -0
  231. package/lib/doctor/checks.ts +1 -1
  232. package/lib/driver.ts +44 -44
  233. package/lib/index.ts +7 -7
  234. package/lib/method-map.ts +1 -1
  235. package/lib/utils.ts +10 -8
  236. package/package.json +12 -3
package/lib/driver.ts CHANGED
@@ -8,14 +8,14 @@ import type {
8
8
  W3CDriverCaps,
9
9
  } from '@appium/types';
10
10
  import type {ADB, LogcatListener} from 'appium-adb';
11
- import type {default as AppiumChromedriver} from 'appium-chromedriver';
12
- import {BaseDriver} from 'appium/driver';
13
- import {ANDROID_DRIVER_CONSTRAINTS} from './constraints';
14
- import type {AndroidDriverConstraints} from './constraints';
15
- import {newMethodMap} from './method-map';
11
+ import type {Chromedriver as AppiumChromedriver} from 'appium-chromedriver';
12
+ import {BaseDriver} from 'appium/driver.js';
13
+ import {ANDROID_DRIVER_CONSTRAINTS} from './constraints.js';
14
+ import type {AndroidDriverConstraints} from './constraints.js';
15
+ import {newMethodMap} from './method-map.js';
16
16
  import {SettingsApp} from 'io.appium.settings';
17
- import {parseArray, removeAllSessionWebSocketHandlers} from './utils';
18
- import {CHROME_BROWSER_PACKAGE_ACTIVITY} from './commands/context/helpers';
17
+ import {parseArray, removeAllSessionWebSocketHandlers} from './utils.js';
18
+ import {CHROME_BROWSER_PACKAGE_ACTIVITY} from './commands/context/helpers.js';
19
19
  import {
20
20
  getContexts,
21
21
  setContext,
@@ -37,13 +37,13 @@ import {
37
37
  getWindowHandles,
38
38
  setWindow,
39
39
  notifyBiDiContextChange,
40
- } from './commands/context/exports';
40
+ } from './commands/context/exports.js';
41
41
  import {
42
42
  getDeviceInfoFromCaps,
43
43
  createADB,
44
44
  getLaunchInfo,
45
45
  initDevice,
46
- } from './commands/device/common';
46
+ } from './commands/device/common.js';
47
47
  import {
48
48
  fingerprint,
49
49
  mobileFingerprint,
@@ -62,8 +62,8 @@ import {
62
62
  networkSpeed,
63
63
  mobileNetworkSpeed,
64
64
  sensorSet,
65
- } from './commands/device/emulator-actions';
66
- import {mobileExecEmuConsoleCommand} from './commands/device/emulator-console';
65
+ } from './commands/device/emulator-actions.js';
66
+ import {mobileExecEmuConsoleCommand} from './commands/device/emulator-console.js';
67
67
  import {
68
68
  getThirdPartyPackages,
69
69
  uninstallOtherPackages,
@@ -86,10 +86,10 @@ import {
86
86
  activateApp,
87
87
  queryAppState,
88
88
  isAppInstalled,
89
- } from './commands/app-management';
90
- import {mobileGetUiMode, mobileSetUiMode} from './commands/appearance';
91
- import {mobileDeviceidle} from './commands/deviceidle';
92
- import {mobileBluetooth} from './commands/bluetooth';
89
+ } from './commands/app-management.js';
90
+ import {mobileGetUiMode, mobileSetUiMode} from './commands/appearance.js';
91
+ import {mobileDeviceidle} from './commands/deviceidle.js';
92
+ import {mobileBluetooth} from './commands/bluetooth.js';
93
93
  import {
94
94
  getAttribute,
95
95
  getName,
@@ -106,10 +106,10 @@ import {
106
106
  getText,
107
107
  getLocation,
108
108
  getSize,
109
- } from './commands/element';
110
- import {execute} from './commands/execute';
111
- import {pullFile, pullFolder, pushFile, mobileDeleteFile} from './commands/file-actions';
112
- import {findElOrEls, doFindElementOrEls} from './commands/find';
109
+ } from './commands/element.js';
110
+ import {execute} from './commands/execute.js';
111
+ import {pullFile, pullFolder, pushFile, mobileDeleteFile} from './commands/file-actions.js';
112
+ import {findElOrEls, doFindElementOrEls} from './commands/find.js';
113
113
  import {
114
114
  setGeoLocation,
115
115
  getGeoLocation,
@@ -119,8 +119,8 @@ import {
119
119
  mobileGetGeolocation,
120
120
  mobileSetGeolocation,
121
121
  mobileResetGeolocation,
122
- } from './commands/geolocation';
123
- import {performActions} from './commands/gestures';
122
+ } from './commands/geolocation.js';
123
+ import {performActions} from './commands/gestures.js';
124
124
  import {
125
125
  isIMEActivated,
126
126
  availableIMEEngines,
@@ -128,14 +128,14 @@ import {
128
128
  activateIMEEngine,
129
129
  deactivateIMEEngine,
130
130
  setStylusHandwriting,
131
- } from './commands/ime';
131
+ } from './commands/ime.js';
132
132
  import {
133
133
  startActivity,
134
134
  mobileStartActivity,
135
135
  mobileBroadcast,
136
136
  mobileStartService,
137
137
  mobileStopService,
138
- } from './commands/intent';
138
+ } from './commands/intent.js';
139
139
  import {
140
140
  hideKeyboard,
141
141
  isKeyboardShown,
@@ -144,8 +144,8 @@ import {
144
144
  pressKeyCode,
145
145
  longPressKeyCode,
146
146
  mobilePerformEditorAction,
147
- } from './commands/keyboard';
148
- import {lock, unlock, mobileUnlock, isLocked} from './commands/lock/exports';
147
+ } from './commands/keyboard.js';
148
+ import {lock, unlock, mobileUnlock, isLocked} from './commands/lock/exports.js';
149
149
  import {
150
150
  supportedLogTypes,
151
151
  mobileStartLogsBroadcast,
@@ -153,15 +153,15 @@ import {
153
153
  getLogTypes,
154
154
  getLog,
155
155
  assignBiDiLogListener,
156
- } from './commands/log';
156
+ } from './commands/log.js';
157
157
  import {
158
158
  mobileIsMediaProjectionRecordingRunning,
159
159
  mobileStartMediaProjectionRecording,
160
160
  mobileStopMediaProjectionRecording,
161
- } from './commands/media-projection';
162
- import {mobileSendTrimMemory} from './commands/memory';
163
- import {mobileNfc} from './commands/nfc';
164
- import {mobileInjectEmulatorCameraImage} from './commands/image-injection';
161
+ } from './commands/media-projection.js';
162
+ import {mobileSendTrimMemory} from './commands/memory.js';
163
+ import {mobileNfc} from './commands/nfc.js';
164
+ import {mobileInjectEmulatorCameraImage} from './commands/image-injection.js';
165
165
  import {
166
166
  getWindowRect,
167
167
  getWindowSize,
@@ -170,7 +170,7 @@ import {
170
170
  mobileListSms,
171
171
  openNotifications,
172
172
  setUrl,
173
- } from './commands/misc';
173
+ } from './commands/misc.js';
174
174
  import {
175
175
  getNetworkConnection,
176
176
  isWifiOn,
@@ -182,23 +182,23 @@ import {
182
182
  toggleData,
183
183
  toggleFlightMode,
184
184
  toggleWiFi,
185
- } from './commands/network';
185
+ } from './commands/network.js';
186
186
  import {
187
187
  getPerformanceData,
188
188
  getPerformanceDataTypes,
189
189
  mobileGetPerformanceData,
190
- } from './commands/performance';
191
- import {reset, closeApp, launchApp} from './commands/legacy';
192
- import {mobileChangePermissions, mobileGetPermissions} from './commands/permissions';
193
- import {startRecordingScreen, stopRecordingScreen} from './commands/recordscreen';
194
- import {getStrings, ensureDeviceLocale} from './commands/resources';
195
- import {mobileShell} from './commands/shell';
196
- import {mobileStartScreenStreaming, mobileStopScreenStreaming} from './commands/streamscreen';
197
- import {getSystemBars, mobilePerformStatusBarCommand} from './commands/system-bars';
198
- import {getDeviceTime, mobileGetDeviceTime} from './commands/time';
199
- import {executeMethodMap} from './execute-method-map';
190
+ } from './commands/performance.js';
191
+ import {reset, closeApp, launchApp} from './commands/legacy.js';
192
+ import {mobileChangePermissions, mobileGetPermissions} from './commands/permissions.js';
193
+ import {startRecordingScreen, stopRecordingScreen} from './commands/recordscreen.js';
194
+ import {getStrings, ensureDeviceLocale} from './commands/resources.js';
195
+ import {mobileShell} from './commands/shell.js';
196
+ import {mobileStartScreenStreaming, mobileStopScreenStreaming} from './commands/streamscreen.js';
197
+ import {getSystemBars, mobilePerformStatusBarCommand} from './commands/system-bars.js';
198
+ import {getDeviceTime, mobileGetDeviceTime} from './commands/time.js';
199
+ import {executeMethodMap} from './execute-method-map.js';
200
200
  import {LRUCache} from 'lru-cache';
201
- import type {ScreenRecordingProperties} from './commands/types';
201
+ import type {ScreenRecordingProperties, ScreenStreamingProps} from './commands/types.js';
202
202
 
203
203
  export type AndroidDriverCaps = DriverCaps<AndroidDriverConstraints>;
204
204
  export type W3CAndroidDriverCaps = W3CDriverCaps<AndroidDriverConstraints>;
@@ -228,7 +228,7 @@ class AndroidDriver
228
228
  defaultIME?: string;
229
229
  _wasWindowAnimationDisabled?: boolean;
230
230
  _cachedActivityArgs: StringRecord;
231
- _screenStreamingProps?: StringRecord;
231
+ _screenStreamingProps?: ScreenStreamingProps;
232
232
  _screenRecordingProperties?: ScreenRecordingProperties;
233
233
  _logcatWebsocketListener?: LogcatListener;
234
234
  _bidiServerLogListener?: (...args: any[]) => void;
package/lib/index.ts CHANGED
@@ -1,14 +1,14 @@
1
- import {AndroidDriver} from './driver';
2
- import {getChromePkg} from './commands/context/helpers';
3
- import {parseArray, requireArgs} from './utils';
1
+ import {AndroidDriver} from './driver.js';
2
+ import {getChromePkg} from './commands/context/helpers.js';
3
+ import {parseArray, requireArgs} from './utils.js';
4
4
  export const utils = {
5
5
  getChromePkg,
6
6
  parseArray,
7
7
  requireArgs,
8
8
  } as const;
9
- export type * from './commands/types';
10
- export {ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints} from './constraints';
11
- export * from './driver';
12
- export * as doctor from './doctor/checks';
9
+ export type * from './commands/types.js';
10
+ export {ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints} from './constraints.js';
11
+ export * from './driver.js';
12
+ export * as doctor from './doctor/checks.js';
13
13
 
14
14
  export default AndroidDriver;
package/lib/method-map.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type {MethodMap} from '@appium/types';
2
- import type {AndroidDriver} from './driver';
2
+ import type {AndroidDriver} from './driver.js';
3
3
 
4
4
  export const newMethodMap = {
5
5
  '/session/:sessionId/timeouts/implicit_wait': {
package/lib/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
- import {errors} from 'appium/driver';
1
+ import {errors} from 'appium/driver.js';
2
2
  import type {LogEntry} from 'appium-adb';
3
- import type {AndroidDriver} from './driver';
3
+ import type {AndroidDriver} from './driver.js';
4
4
  import {util} from '@appium/support';
5
5
 
6
6
  export type {LogEntry};
@@ -38,9 +38,10 @@ export function requireArgs(
38
38
  }
39
39
 
40
40
  /**
41
+ * Parses a capability into an array
41
42
  *
42
- * @param cap
43
- * @returns
43
+ * @param cap - The capability to parse
44
+ * @returns The parsed capability
44
45
  */
45
46
  export function parseArray(cap: string | string[]): string[] {
46
47
  let parsedCaps;
@@ -58,8 +59,7 @@ export function parseArray(cap: string | string[]): string[] {
58
59
  }
59
60
 
60
61
  /**
61
- * @this AndroidDriver
62
- * @returns
62
+ * Removes all session web socket handlers
63
63
  */
64
64
  export async function removeAllSessionWebSocketHandlers(this: AndroidDriver): Promise<void> {
65
65
  if (!this.sessionId || typeof this.server?.getWebSocketHandlers !== 'function') {
@@ -73,9 +73,10 @@ export async function removeAllSessionWebSocketHandlers(this: AndroidDriver): Pr
73
73
  }
74
74
 
75
75
  /**
76
+ * Converts a native log entry to a Selenium log entry
76
77
  *
77
- * @param x
78
- * @returns
78
+ * @param x - The native log entry
79
+ * @returns The Selenium log entry
79
80
  */
80
81
  export function nativeLogEntryToSeleniumEntry(x: LogEntryWithPrefix): LogEntry {
81
82
  const msg = util.isEmpty(x.prefix) ? x.message : `[${x.prefix}] ${x.message}`;
@@ -83,6 +84,7 @@ export function nativeLogEntryToSeleniumEntry(x: LogEntryWithPrefix): LogEntry {
83
84
  }
84
85
 
85
86
  /**
87
+ * Converts a timestamp and message to a Selenium log entry
86
88
  *
87
89
  * @see {@link https://github.com/SeleniumHQ/selenium/blob/0d425676b3c9df261dd641917f867d4d5ce7774d/java/client/src/org/openqa/selenium/logging/LogEntry.java}
88
90
  * @param timestamp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-android-driver",
3
- "version": "13.3.4",
3
+ "version": "14.0.0",
4
4
  "description": "Android UiAutomator and Chrome support for Appium",
5
5
  "keywords": [
6
6
  "appium",
@@ -39,7 +39,7 @@
39
39
  "rebuild": "npm run clean; npm run build",
40
40
  "format": "prettier -w ./lib ./test",
41
41
  "format:check": "prettier --check ./lib ./test",
42
- "test": "node --test --test-force-exit --test-concurrency=1 --test-timeout=60000 \"./build/test/unit/**/*.spec.js\""
42
+ "test": "node --test --test-force-exit --test-timeout=60000 \"./build/test/unit/**/*.spec.js\""
43
43
  },
44
44
  "prettier": {
45
45
  "bracketSpacing": false,
@@ -76,6 +76,7 @@
76
76
  "chai": "^6.0.0",
77
77
  "chai-as-promised": "^8.0.0",
78
78
  "conventional-changelog-conventionalcommits": "^9.3.1",
79
+ "esmock": "^2.7.6",
79
80
  "prettier": "^3.0.1",
80
81
  "semantic-release": "^25.0.2",
81
82
  "sinon": "^22.0.0",
@@ -88,5 +89,13 @@
88
89
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
89
90
  "npm": ">=10"
90
91
  },
91
- "types": "./build/lib/index.d.ts"
92
+ "types": "./build/lib/index.d.ts",
93
+ "type": "module",
94
+ "exports": {
95
+ ".": {
96
+ "types": "./build/lib/index.d.ts",
97
+ "import": "./build/lib/index.js"
98
+ },
99
+ "./package.json": "./package.json"
100
+ }
92
101
  }