appium-android-driver 5.14.7 → 6.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 (192) hide show
  1. package/build/index.d.ts +282 -0
  2. package/build/index.d.ts.map +1 -0
  3. package/build/index.js.map +1 -0
  4. package/build/lib/commands/actions.d.ts +6 -224
  5. package/build/lib/commands/actions.d.ts.map +1 -1
  6. package/build/lib/commands/actions.js +306 -405
  7. package/build/lib/commands/actions.js.map +1 -1
  8. package/build/lib/commands/alert.d.ts +7 -9
  9. package/build/lib/commands/alert.d.ts.map +1 -1
  10. package/build/lib/commands/alert.js +24 -18
  11. package/build/lib/commands/alert.js.map +1 -1
  12. package/build/lib/commands/app-management.d.ts +7 -313
  13. package/build/lib/commands/app-management.d.ts.map +1 -1
  14. package/build/lib/commands/app-management.js +135 -293
  15. package/build/lib/commands/app-management.js.map +1 -1
  16. package/build/lib/commands/context.d.ts +8 -92
  17. package/build/lib/commands/context.d.ts.map +1 -1
  18. package/build/lib/commands/context.js +381 -439
  19. package/build/lib/commands/context.js.map +1 -1
  20. package/build/lib/commands/element.d.ts +8 -35
  21. package/build/lib/commands/element.d.ts.map +1 -1
  22. package/build/lib/commands/element.js +153 -136
  23. package/build/lib/commands/element.js.map +1 -1
  24. package/build/lib/commands/emu-console.d.ts +6 -48
  25. package/build/lib/commands/emu-console.d.ts.map +1 -1
  26. package/build/lib/commands/emu-console.js +19 -34
  27. package/build/lib/commands/emu-console.js.map +1 -1
  28. package/build/lib/commands/execute.d.ts +6 -5
  29. package/build/lib/commands/execute.d.ts.map +1 -1
  30. package/build/lib/commands/execute.js +77 -66
  31. package/build/lib/commands/execute.js.map +1 -1
  32. package/build/lib/commands/file-actions.d.ts +7 -128
  33. package/build/lib/commands/file-actions.d.ts.map +1 -1
  34. package/build/lib/commands/file-actions.js +183 -219
  35. package/build/lib/commands/file-actions.js.map +1 -1
  36. package/build/lib/commands/find.d.ts +8 -12
  37. package/build/lib/commands/find.d.ts.map +1 -1
  38. package/build/lib/commands/find.js +19 -23
  39. package/build/lib/commands/find.js.map +1 -1
  40. package/build/lib/commands/general.d.ts +9 -132
  41. package/build/lib/commands/general.d.ts.map +1 -1
  42. package/build/lib/commands/general.js +281 -312
  43. package/build/lib/commands/general.js.map +1 -1
  44. package/build/lib/commands/ime.d.ts +7 -10
  45. package/build/lib/commands/ime.d.ts.map +1 -1
  46. package/build/lib/commands/ime.js +47 -35
  47. package/build/lib/commands/ime.js.map +1 -1
  48. package/build/lib/commands/index.d.ts +27 -2
  49. package/build/lib/commands/index.d.ts.map +1 -1
  50. package/build/lib/commands/index.js +41 -19
  51. package/build/lib/commands/index.js.map +1 -1
  52. package/build/lib/commands/intent.d.ts +7 -417
  53. package/build/lib/commands/intent.d.ts.map +1 -1
  54. package/build/lib/commands/intent.js +104 -216
  55. package/build/lib/commands/intent.js.map +1 -1
  56. package/build/lib/commands/keyboard.d.ts +6 -5
  57. package/build/lib/commands/keyboard.d.ts.map +1 -1
  58. package/build/lib/commands/keyboard.js +16 -8
  59. package/build/lib/commands/keyboard.js.map +1 -1
  60. package/build/lib/commands/log.d.ts +7 -44
  61. package/build/lib/commands/log.d.ts.map +1 -1
  62. package/build/lib/commands/log.js +146 -108
  63. package/build/lib/commands/log.js.map +1 -1
  64. package/build/lib/commands/media-projection.d.ts +7 -143
  65. package/build/lib/commands/media-projection.d.ts.map +1 -1
  66. package/build/lib/commands/media-projection.js +113 -140
  67. package/build/lib/commands/media-projection.js.map +1 -1
  68. package/build/lib/commands/mixins.d.ts +740 -0
  69. package/build/lib/commands/mixins.d.ts.map +1 -0
  70. package/build/lib/commands/mixins.js +19 -0
  71. package/build/lib/commands/mixins.js.map +1 -0
  72. package/build/lib/commands/network.d.ts +7 -138
  73. package/build/lib/commands/network.d.ts.map +1 -1
  74. package/build/lib/commands/network.js +212 -254
  75. package/build/lib/commands/network.js.map +1 -1
  76. package/build/lib/commands/performance.d.ts +24 -70
  77. package/build/lib/commands/performance.d.ts.map +1 -1
  78. package/build/lib/commands/performance.js +144 -100
  79. package/build/lib/commands/performance.js.map +1 -1
  80. package/build/lib/commands/permissions.d.ts +8 -92
  81. package/build/lib/commands/permissions.d.ts.map +1 -1
  82. package/build/lib/commands/permissions.js +75 -87
  83. package/build/lib/commands/permissions.js.map +1 -1
  84. package/build/lib/commands/recordscreen.d.ts +7 -193
  85. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  86. package/build/lib/commands/recordscreen.js +151 -182
  87. package/build/lib/commands/recordscreen.js.map +1 -1
  88. package/build/lib/commands/shell.d.ts +7 -7
  89. package/build/lib/commands/shell.d.ts.map +1 -1
  90. package/build/lib/commands/shell.js +40 -33
  91. package/build/lib/commands/shell.js.map +1 -1
  92. package/build/lib/commands/streamscreen.d.ts +9 -103
  93. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  94. package/build/lib/commands/streamscreen.js +261 -218
  95. package/build/lib/commands/streamscreen.js.map +1 -1
  96. package/build/lib/commands/system-bars.d.ts +22 -90
  97. package/build/lib/commands/system-bars.d.ts.map +1 -1
  98. package/build/lib/commands/system-bars.js +76 -74
  99. package/build/lib/commands/system-bars.js.map +1 -1
  100. package/build/lib/commands/touch.d.ts +10 -29
  101. package/build/lib/commands/touch.d.ts.map +1 -1
  102. package/build/lib/commands/touch.js +301 -285
  103. package/build/lib/commands/touch.js.map +1 -1
  104. package/build/lib/commands/types.d.ts +978 -0
  105. package/build/lib/commands/types.d.ts.map +1 -0
  106. package/build/lib/commands/types.js +3 -0
  107. package/build/lib/commands/types.js.map +1 -0
  108. package/build/lib/constraints.d.ts +291 -0
  109. package/build/lib/constraints.d.ts.map +1 -0
  110. package/build/lib/constraints.js +300 -0
  111. package/build/lib/constraints.js.map +1 -0
  112. package/build/lib/driver.d.ts +68 -37
  113. package/build/lib/driver.d.ts.map +1 -1
  114. package/build/lib/driver.js +123 -80
  115. package/build/lib/driver.js.map +1 -1
  116. package/build/lib/helpers/android.d.ts +164 -0
  117. package/build/lib/helpers/android.d.ts.map +1 -0
  118. package/build/lib/helpers/android.js +819 -0
  119. package/build/lib/helpers/android.js.map +1 -0
  120. package/build/lib/helpers/index.d.ts +7 -0
  121. package/build/lib/helpers/index.d.ts.map +1 -0
  122. package/build/lib/helpers/index.js +29 -0
  123. package/build/lib/helpers/index.js.map +1 -0
  124. package/build/lib/helpers/types.d.ts +121 -0
  125. package/build/lib/helpers/types.d.ts.map +1 -0
  126. package/build/lib/helpers/types.js +3 -0
  127. package/build/lib/helpers/types.js.map +1 -0
  128. package/build/lib/helpers/unlock.d.ts +32 -0
  129. package/build/lib/helpers/unlock.d.ts.map +1 -0
  130. package/build/lib/helpers/unlock.js +273 -0
  131. package/build/lib/helpers/unlock.js.map +1 -0
  132. package/build/lib/helpers/webview.d.ts +74 -0
  133. package/build/lib/helpers/webview.d.ts.map +1 -0
  134. package/build/lib/helpers/webview.js +421 -0
  135. package/build/lib/helpers/webview.js.map +1 -0
  136. package/build/lib/index.d.ts +9 -0
  137. package/build/lib/index.d.ts.map +1 -0
  138. package/build/lib/index.js +37 -0
  139. package/build/lib/index.js.map +1 -0
  140. package/build/lib/method-map.d.ts +0 -8
  141. package/build/lib/method-map.d.ts.map +1 -1
  142. package/build/lib/method-map.js +63 -74
  143. package/build/lib/method-map.js.map +1 -1
  144. package/build/lib/stubs.d.ts +0 -1
  145. package/build/lib/stubs.d.ts.map +1 -1
  146. package/build/lib/stubs.js +1 -0
  147. package/build/lib/stubs.js.map +1 -1
  148. package/build/lib/utils.d.ts +1 -1
  149. package/build/lib/utils.d.ts.map +1 -1
  150. package/lib/commands/actions.js +351 -464
  151. package/lib/commands/alert.js +27 -17
  152. package/lib/commands/app-management.js +156 -314
  153. package/lib/commands/context.js +457 -441
  154. package/lib/commands/element.js +201 -157
  155. package/lib/commands/emu-console.js +25 -45
  156. package/lib/commands/execute.js +106 -90
  157. package/lib/commands/file-actions.js +222 -240
  158. package/lib/commands/find.ts +103 -0
  159. package/lib/commands/general.js +327 -339
  160. package/lib/commands/ime.js +50 -34
  161. package/lib/commands/{index.js → index.ts} +20 -24
  162. package/lib/commands/intent.js +108 -249
  163. package/lib/commands/keyboard.js +20 -8
  164. package/lib/commands/log.js +172 -116
  165. package/lib/commands/media-projection.js +134 -161
  166. package/lib/commands/mixins.ts +966 -0
  167. package/lib/commands/network.js +252 -281
  168. package/lib/commands/performance.js +203 -132
  169. package/lib/commands/permissions.js +108 -109
  170. package/lib/commands/recordscreen.js +212 -209
  171. package/lib/commands/shell.js +51 -40
  172. package/lib/commands/streamscreen.js +355 -289
  173. package/lib/commands/system-bars.js +92 -83
  174. package/lib/commands/touch.js +357 -294
  175. package/lib/commands/types.ts +1097 -0
  176. package/lib/{desired-caps.js → constraints.ts} +106 -103
  177. package/lib/{driver.js → driver.ts} +278 -132
  178. package/lib/helpers/android.ts +1143 -0
  179. package/lib/helpers/index.ts +6 -0
  180. package/lib/helpers/types.ts +134 -0
  181. package/lib/helpers/unlock.ts +329 -0
  182. package/lib/helpers/webview.ts +582 -0
  183. package/lib/index.ts +18 -0
  184. package/lib/method-map.js +87 -98
  185. package/lib/stubs.ts +0 -1
  186. package/package.json +27 -20
  187. package/index.js +0 -24
  188. package/lib/android-helpers.js +0 -983
  189. package/lib/commands/coverage.js +0 -18
  190. package/lib/commands/find.js +0 -82
  191. package/lib/unlock-helpers.js +0 -278
  192. package/lib/webview-helpers.js +0 -602
package/lib/method-map.js CHANGED
@@ -1,169 +1,164 @@
1
1
  export const newMethodMap = /** @type {const} */ ({
2
2
  '/session/:sessionId/timeouts/implicit_wait': {
3
- POST: { command: 'implicitWait', payloadParams: { required: ['ms'] } }
3
+ POST: {command: 'implicitWait', payloadParams: {required: ['ms']}},
4
4
  },
5
- '/session/:sessionId/ime/available_engines': { GET: { command: 'availableIMEEngines' } },
6
- '/session/:sessionId/ime/active_engine': { GET: { command: 'getActiveIMEEngine' } },
7
- '/session/:sessionId/ime/activated': { GET: { command: 'isIMEActivated' } },
8
- '/session/:sessionId/ime/deactivate': { POST: { command: 'deactivateIMEEngine' } },
5
+ '/session/:sessionId/ime/available_engines': {GET: {command: 'availableIMEEngines'}},
6
+ '/session/:sessionId/ime/active_engine': {GET: {command: 'getActiveIMEEngine'}},
7
+ '/session/:sessionId/ime/activated': {GET: {command: 'isIMEActivated'}},
8
+ '/session/:sessionId/ime/deactivate': {POST: {command: 'deactivateIMEEngine'}},
9
9
  '/session/:sessionId/ime/activate': {
10
10
  POST: {
11
11
  command: 'activateIMEEngine',
12
- payloadParams: { required: ['engine'] }
13
- }
12
+ payloadParams: {required: ['engine']},
13
+ },
14
14
  },
15
- '/session/:sessionId/window/:windowhandle/size': { GET: { command: 'getWindowSize' } },
15
+ '/session/:sessionId/window/:windowhandle/size': {GET: {command: 'getWindowSize'}},
16
16
  '/session/:sessionId/keys': {
17
- POST: { command: 'keys', payloadParams: { required: ['value'] } }
17
+ POST: {command: 'keys', payloadParams: {required: ['value']}},
18
18
  },
19
- '/session/:sessionId/element/:elementId/location': { GET: { command: 'getLocation' } },
20
- '/session/:sessionId/element/:elementId/location_in_view': { GET: { command: 'getLocationInView' } },
21
- '/session/:sessionId/element/:elementId/size': { GET: { command: 'getSize' } },
19
+ '/session/:sessionId/element/:elementId/location': {GET: {command: 'getLocation'}},
20
+ '/session/:sessionId/element/:elementId/location_in_view': {GET: {command: 'getLocationInView'}},
21
+ '/session/:sessionId/element/:elementId/size': {GET: {command: 'getSize'}},
22
22
  '/session/:sessionId/touch/click': {
23
- POST: { command: 'click', payloadParams: { required: ['element'] } }
23
+ POST: {command: 'click', payloadParams: {required: ['element']}},
24
24
  },
25
25
  '/session/:sessionId/touch/down': {
26
- POST: { command: 'touchDown', payloadParams: { required: ['x', 'y'] } }
26
+ POST: {command: 'touchDown', payloadParams: {required: ['x', 'y']}},
27
27
  },
28
28
  '/session/:sessionId/touch/up': {
29
- POST: { command: 'touchUp', payloadParams: { required: ['x', 'y'] } }
29
+ POST: {command: 'touchUp', payloadParams: {required: ['x', 'y']}},
30
30
  },
31
31
  '/session/:sessionId/touch/move': {
32
- POST: { command: 'touchMove', payloadParams: { required: ['x', 'y'] } }
32
+ POST: {command: 'touchMove', payloadParams: {required: ['x', 'y']}},
33
33
  },
34
34
  '/session/:sessionId/touch/longclick': {
35
35
  POST: {
36
36
  command: 'touchLongClick',
37
- payloadParams: { required: ['elements'] }
38
- }
37
+ payloadParams: {required: ['elements']},
38
+ },
39
39
  },
40
40
  '/session/:sessionId/touch/flick': {
41
41
  POST: {
42
42
  command: 'flick',
43
43
  payloadParams: {
44
- optional: [
45
- 'element',
46
- 'xspeed',
47
- 'yspeed',
48
- 'xoffset',
49
- 'yoffset',
50
- 'speed'
51
- ]
52
- }
53
- }
44
+ optional: ['element', 'xspeed', 'yspeed', 'xoffset', 'yoffset', 'speed'],
45
+ },
46
+ },
54
47
  },
55
48
  '/session/:sessionId/touch/perform': {
56
49
  POST: {
57
50
  command: 'performTouch',
58
- payloadParams: { wrap: 'actions', required: ['actions'] }
59
- }
51
+ payloadParams: {wrap: 'actions', required: ['actions']},
52
+ },
60
53
  },
61
54
  '/session/:sessionId/touch/multi/perform': {
62
55
  POST: {
63
56
  command: 'performMultiAction',
64
- payloadParams: { required: ['actions'], optional: ['elementId'] }
65
- }
57
+ payloadParams: {required: ['actions'], optional: ['elementId']},
58
+ },
66
59
  },
67
60
  '/session/:sessionId/appium/device/lock': {
68
- POST: { command: 'lock', payloadParams: { optional: ['seconds'] } }
61
+ POST: {command: 'lock', payloadParams: {optional: ['seconds']}},
69
62
  },
70
- '/session/:sessionId/appium/device/unlock': { POST: { command: 'unlock' } },
71
- '/session/:sessionId/appium/device/is_locked': { POST: { command: 'isLocked' } },
63
+ '/session/:sessionId/appium/device/unlock': {POST: {command: 'unlock'}},
64
+ '/session/:sessionId/appium/device/is_locked': {POST: {command: 'isLocked'}},
72
65
  '/session/:sessionId/appium/start_recording_screen': {
73
66
  POST: {
74
67
  command: 'startRecordingScreen',
75
- payloadParams: { optional: ['options'] }
76
- }
68
+ payloadParams: {optional: ['options']},
69
+ },
77
70
  },
78
71
  '/session/:sessionId/appium/stop_recording_screen': {
79
72
  POST: {
80
73
  command: 'stopRecordingScreen',
81
- payloadParams: { optional: ['options'] }
82
- }
74
+ payloadParams: {optional: ['options']},
75
+ },
83
76
  },
84
- '/session/:sessionId/appium/performanceData/types': { POST: { command: 'getPerformanceDataTypes' } },
77
+ '/session/:sessionId/appium/performanceData/types': {POST: {command: 'getPerformanceDataTypes'}},
85
78
  '/session/:sessionId/appium/getPerformanceData': {
86
79
  POST: {
87
80
  command: 'getPerformanceData',
88
81
  payloadParams: {
89
82
  required: ['packageName', 'dataType'],
90
- optional: ['dataReadTimeout']
91
- }
92
- }
83
+ optional: ['dataReadTimeout'],
84
+ },
85
+ },
93
86
  },
94
87
  '/session/:sessionId/appium/device/press_keycode': {
95
88
  POST: {
96
89
  command: 'pressKeyCode',
97
- payloadParams: { required: ['keycode'], optional: ['metastate', 'flags'] }
98
- }
90
+ payloadParams: {required: ['keycode'], optional: ['metastate', 'flags']},
91
+ },
99
92
  },
100
93
  '/session/:sessionId/appium/device/long_press_keycode': {
101
94
  POST: {
102
95
  command: 'longPressKeyCode',
103
- payloadParams: { required: ['keycode'], optional: ['metastate', 'flags'] }
104
- }
96
+ payloadParams: {required: ['keycode'], optional: ['metastate', 'flags']},
97
+ },
105
98
  },
106
99
  '/session/:sessionId/appium/device/finger_print': {
107
100
  POST: {
108
101
  command: 'fingerprint',
109
- payloadParams: { required: ['fingerprintId'] }
110
- }
102
+ payloadParams: {required: ['fingerprintId']},
103
+ },
111
104
  },
112
105
  '/session/:sessionId/appium/device/send_sms': {
113
106
  POST: {
114
107
  command: 'sendSMS',
115
- payloadParams: { required: ['phoneNumber', 'message'] }
116
- }
108
+ payloadParams: {required: ['phoneNumber', 'message']},
109
+ },
117
110
  },
118
111
  '/session/:sessionId/appium/device/gsm_call': {
119
112
  POST: {
120
113
  command: 'gsmCall',
121
- payloadParams: { required: ['phoneNumber', 'action'] }
122
- }
114
+ payloadParams: {required: ['phoneNumber', 'action']},
115
+ },
123
116
  },
124
117
  '/session/:sessionId/appium/device/gsm_signal': {
125
118
  POST: {
126
119
  command: 'gsmSignal',
127
- payloadParams: { required: ['signalStrength'] }
128
- }
120
+ payloadParams: {required: ['signalStrength']},
121
+ },
129
122
  },
130
123
  '/session/:sessionId/appium/device/gsm_voice': {
131
- POST: { command: 'gsmVoice', payloadParams: { required: ['state'] } }
124
+ POST: {command: 'gsmVoice', payloadParams: {required: ['state']}},
132
125
  },
133
126
  '/session/:sessionId/appium/device/power_capacity': {
134
127
  POST: {
135
128
  command: 'powerCapacity',
136
- payloadParams: { required: ['percent'] }
137
- }
129
+ payloadParams: {required: ['percent']},
130
+ },
138
131
  },
139
132
  '/session/:sessionId/appium/device/power_ac': {
140
- POST: { command: 'powerAC', payloadParams: { required: ['state'] } }
133
+ POST: {command: 'powerAC', payloadParams: {required: ['state']}},
141
134
  },
142
135
  '/session/:sessionId/appium/device/network_speed': {
143
136
  POST: {
144
137
  command: 'networkSpeed',
145
- payloadParams: { required: ['netspeed'] }
146
- }
138
+ payloadParams: {required: ['netspeed']},
139
+ },
147
140
  },
148
141
  '/session/:sessionId/appium/device/keyevent': {
149
142
  POST: {
150
143
  command: 'keyevent',
151
- payloadParams: { required: ['keycode'], optional: ['metastate'] }
152
- }
144
+ payloadParams: {required: ['keycode'], optional: ['metastate']},
145
+ },
153
146
  },
154
- '/session/:sessionId/appium/device/current_activity': { GET: { command: 'getCurrentActivity' } },
155
- '/session/:sessionId/appium/device/current_package': { GET: { command: 'getCurrentPackage' } },
147
+ '/session/:sessionId/appium/device/current_activity': {GET: {command: 'getCurrentActivity'}},
148
+ '/session/:sessionId/appium/device/current_package': {GET: {command: 'getCurrentPackage'}},
156
149
  '/session/:sessionId/appium/device/app_state': {
157
150
  POST: {
158
151
  command: 'queryAppState',
159
- payloadParams: { required: [['appId'], ['bundleId']] }
160
- }
161
- },
162
- '/session/:sessionId/appium/device/toggle_airplane_mode': { POST: { command: 'toggleFlightMode' } },
163
- '/session/:sessionId/appium/device/toggle_data': { POST: { command: 'toggleData' } },
164
- '/session/:sessionId/appium/device/toggle_wifi': { POST: { command: 'toggleWiFi' } },
165
- '/session/:sessionId/appium/device/toggle_location_services': { POST: { command: 'toggleLocationServices' } },
166
- '/session/:sessionId/appium/device/open_notifications': { POST: { command: 'openNotifications' } },
152
+ payloadParams: {required: [['appId'], ['bundleId']]},
153
+ },
154
+ },
155
+ '/session/:sessionId/appium/device/toggle_airplane_mode': {POST: {command: 'toggleFlightMode'}},
156
+ '/session/:sessionId/appium/device/toggle_data': {POST: {command: 'toggleData'}},
157
+ '/session/:sessionId/appium/device/toggle_wifi': {POST: {command: 'toggleWiFi'}},
158
+ '/session/:sessionId/appium/device/toggle_location_services': {
159
+ POST: {command: 'toggleLocationServices'},
160
+ },
161
+ '/session/:sessionId/appium/device/open_notifications': {POST: {command: 'openNotifications'}},
167
162
  '/session/:sessionId/appium/device/start_activity': {
168
163
  POST: {
169
164
  command: 'startActivity',
@@ -176,44 +171,38 @@ export const newMethodMap = /** @type {const} */ ({
176
171
  'intentCategory',
177
172
  'intentFlags',
178
173
  'optionalIntentArguments',
179
- 'dontStopAppOnReset'
180
- ]
181
- }
182
- }
183
- },
184
- '/session/:sessionId/appium/device/system_bars': { GET: { command: 'getSystemBars' } },
185
- '/session/:sessionId/appium/device/display_density': { GET: { command: 'getDisplayDensity' } },
186
- '/session/:sessionId/appium/app/launch': { POST: { command: 'launchApp' } },
187
- '/session/:sessionId/appium/app/close': { POST: { command: 'closeApp' } },
188
- '/session/:sessionId/appium/app/reset': { POST: { command: 'reset' } },
174
+ 'dontStopAppOnReset',
175
+ ],
176
+ },
177
+ },
178
+ },
179
+ '/session/:sessionId/appium/device/system_bars': {GET: {command: 'getSystemBars'}},
180
+ '/session/:sessionId/appium/device/display_density': {GET: {command: 'getDisplayDensity'}},
181
+ '/session/:sessionId/appium/app/launch': {POST: {command: 'launchApp'}},
182
+ '/session/:sessionId/appium/app/close': {POST: {command: 'closeApp'}},
183
+ '/session/:sessionId/appium/app/reset': {POST: {command: 'reset'}},
189
184
  '/session/:sessionId/appium/app/background': {
190
185
  POST: {
191
186
  command: 'background',
192
- payloadParams: { required: ['seconds'] }
193
- }
194
- },
195
- '/session/:sessionId/appium/app/end_test_coverage': {
196
- POST: {
197
- command: 'endCoverage',
198
- payloadParams: { required: ['intent', 'path'] }
199
- }
187
+ payloadParams: {required: ['seconds']},
188
+ },
200
189
  },
201
190
  '/session/:sessionId/appium/app/strings': {
202
191
  POST: {
203
192
  command: 'getStrings',
204
- payloadParams: { optional: ['language', 'stringFile'] }
205
- }
193
+ payloadParams: {optional: ['language', 'stringFile']},
194
+ },
206
195
  },
207
196
  '/session/:sessionId/appium/element/:elementId/value': {
208
197
  POST: {
209
198
  command: 'setValueImmediate',
210
- payloadParams: { required: ['text'] }
211
- }
199
+ payloadParams: {required: ['text']},
200
+ },
212
201
  },
213
202
  '/session/:sessionId/appium/element/:elementId/replace_value': {
214
203
  POST: {
215
204
  command: 'replaceValue',
216
- payloadParams: { required: ['text'] }
217
- }
218
- }
205
+ payloadParams: {required: ['text']},
206
+ },
207
+ },
219
208
  });
package/lib/stubs.ts CHANGED
@@ -3,6 +3,5 @@
3
3
  * @module
4
4
  */
5
5
 
6
- declare module 'appium-adb';
7
6
  declare module 'shared-preferences-builder';
8
7
  declare module 'io.appium.settings';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-android-driver",
3
- "version": "5.14.7",
3
+ "version": "6.0.0",
4
4
  "description": "Android UiAutomator and Chrome support for Appium",
5
5
  "keywords": [
6
6
  "appium",
@@ -19,18 +19,18 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "author": "Appium Contributors",
22
- "main": "./build/index.js",
22
+ "main": "./build/lib/index.js",
23
23
  "bin": {},
24
24
  "directories": {
25
25
  "lib": "lib"
26
26
  },
27
27
  "files": [
28
- "index.js",
29
28
  "lib",
30
- "build/index.js",
31
- "build/lib",
29
+ "build",
32
30
  "bootstrap/bin/AppiumBootstrap.jar",
33
- "CHANGELOG.md"
31
+ "CHANGELOG.md",
32
+ "!build/test",
33
+ "!build/tsconfig.tsbuildinfo"
34
34
  ],
35
35
  "scripts": {
36
36
  "build": "tsc -b",
@@ -41,8 +41,8 @@
41
41
  "lint:commit": "commitlint",
42
42
  "lint:fix": "npm run lint -- --fix",
43
43
  "lint:staged": "lint-staged",
44
- "prepare": "husky install && npm run rebuild",
45
- "rebuild": "npm run clean && npm run build",
44
+ "prepare": "husky install; npm run rebuild",
45
+ "rebuild": "npm run clean; npm run build",
46
46
  "test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.js\""
47
47
  },
48
48
  "lint-staged": {
@@ -57,8 +57,8 @@
57
57
  "singleQuote": true
58
58
  },
59
59
  "dependencies": {
60
- "appium-adb": "^9.11.2",
61
- "appium-chromedriver": "^5.2.0",
60
+ "appium-adb": "^9.12.0",
61
+ "appium-chromedriver": "^5.5.1",
62
62
  "asyncbox": "^2.8.0",
63
63
  "axios": "^1.x",
64
64
  "bluebird": "^3.4.7",
@@ -73,12 +73,14 @@
73
73
  "shared-preferences-builder": "^0.x",
74
74
  "source-map-support": "^0.x",
75
75
  "teen_process": "^2.0.0",
76
+ "type-fest": "^3.11.1",
76
77
  "ws": "^8.0.0"
77
78
  },
78
79
  "devDependencies": {
79
- "@appium/eslint-config-appium": "^6.0.0",
80
- "@appium/support": "^4.0.1",
81
- "@appium/test-support": "^3.0.0",
80
+ "@appium/eslint-config-appium": "^8.0.4",
81
+ "@appium/eslint-config-appium-ts": "^0.3.1",
82
+ "@appium/support": "^4.1.2",
83
+ "@appium/test-support": "^3.0.20",
82
84
  "@appium/tsconfig": "^0.3.0",
83
85
  "@appium/types": "^0.13.4",
84
86
  "@commitlint/cli": "^17.6.3",
@@ -97,16 +99,20 @@
97
99
  "@types/source-map-support": "^0.5.6",
98
100
  "@types/teen_process": "^2.0.0",
99
101
  "@types/ws": "^8.5.4",
102
+ "@typescript-eslint/eslint-plugin": "^5.59.5",
103
+ "@typescript-eslint/parser": "^5.59.5",
100
104
  "@xmldom/xmldom": "^0.x",
101
105
  "android-apidemos": "^4.1.0",
106
+ "appium": "^2.0.0-rc.5",
102
107
  "chai": "^4.1.2",
103
108
  "chai-as-promised": "^7.1.1",
104
- "conventional-changelog-conventionalcommits": "^7.0.1",
105
- "eslint": "^7.32.0",
106
- "eslint-config-prettier": "^8.5.0",
107
- "eslint-plugin-import": "^2.26.0",
108
- "eslint-plugin-mocha": "^9.0.0",
109
- "eslint-plugin-promise": "^6.0.0",
109
+ "conventional-changelog-conventionalcommits": "^6.0.0",
110
+ "eslint": "^8.40.0",
111
+ "eslint-config-prettier": "^8.8.0",
112
+ "eslint-import-resolver-typescript": "^3.5.5",
113
+ "eslint-plugin-import": "^2.27.5",
114
+ "eslint-plugin-mocha": "^10.1.0",
115
+ "eslint-plugin-promise": "^6.1.1",
110
116
  "husky": "^8.0.3",
111
117
  "lint-staged": "^14.0.0",
112
118
  "mocha": "^10.0.0",
@@ -124,5 +130,6 @@
124
130
  "engines": {
125
131
  "node": ">=14",
126
132
  "npm": ">=8"
127
- }
133
+ },
134
+ "types": "./build/lib/index.d.ts"
128
135
  }
package/index.js DELETED
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import {install} from 'source-map-support';
3
- install();
4
-
5
- import * as driver from './lib/driver';
6
- import * as androidHelperIndex from './lib/android-helpers';
7
- import * as commandIndex from './lib/commands/index';
8
- import * as webview from './lib/webview-helpers';
9
- import * as caps from './lib/desired-caps';
10
-
11
- const { AndroidDriver } = driver;
12
- const { helpers: webviewHelpers, NATIVE_WIN, WEBVIEW_WIN, WEBVIEW_BASE,
13
- CHROMIUM_WIN } = webview;
14
- const { commonCapConstraints } = caps;
15
- const { commands: androidCommands } = commandIndex;
16
- const { helpers: androidHelpers, SETTINGS_HELPER_PKG_ID } = androidHelperIndex;
17
-
18
-
19
- export default AndroidDriver;
20
- export {
21
- androidHelpers, androidCommands, AndroidDriver,
22
- commonCapConstraints, webviewHelpers, NATIVE_WIN, WEBVIEW_WIN,
23
- WEBVIEW_BASE, CHROMIUM_WIN, SETTINGS_HELPER_PKG_ID,
24
- };