appium-android-driver 5.14.7 → 6.0.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 (210) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/lib/commands/actions.d.ts +6 -224
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +306 -405
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +7 -9
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +24 -18
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +7 -313
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +135 -293
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/context.d.ts +8 -92
  15. package/build/lib/commands/context.d.ts.map +1 -1
  16. package/build/lib/commands/context.js +381 -439
  17. package/build/lib/commands/context.js.map +1 -1
  18. package/build/lib/commands/element.d.ts +8 -35
  19. package/build/lib/commands/element.d.ts.map +1 -1
  20. package/build/lib/commands/element.js +153 -136
  21. package/build/lib/commands/element.js.map +1 -1
  22. package/build/lib/commands/emu-console.d.ts +6 -48
  23. package/build/lib/commands/emu-console.d.ts.map +1 -1
  24. package/build/lib/commands/emu-console.js +19 -34
  25. package/build/lib/commands/emu-console.js.map +1 -1
  26. package/build/lib/commands/execute.d.ts +6 -5
  27. package/build/lib/commands/execute.d.ts.map +1 -1
  28. package/build/lib/commands/execute.js +77 -66
  29. package/build/lib/commands/execute.js.map +1 -1
  30. package/build/lib/commands/file-actions.d.ts +7 -128
  31. package/build/lib/commands/file-actions.d.ts.map +1 -1
  32. package/build/lib/commands/file-actions.js +183 -219
  33. package/build/lib/commands/file-actions.js.map +1 -1
  34. package/build/lib/commands/find.d.ts +8 -12
  35. package/build/lib/commands/find.d.ts.map +1 -1
  36. package/build/lib/commands/find.js +19 -23
  37. package/build/lib/commands/find.js.map +1 -1
  38. package/build/lib/commands/general.d.ts +9 -132
  39. package/build/lib/commands/general.d.ts.map +1 -1
  40. package/build/lib/commands/general.js +281 -312
  41. package/build/lib/commands/general.js.map +1 -1
  42. package/build/lib/commands/ime.d.ts +7 -10
  43. package/build/lib/commands/ime.d.ts.map +1 -1
  44. package/build/lib/commands/ime.js +47 -35
  45. package/build/lib/commands/ime.js.map +1 -1
  46. package/build/lib/commands/index.d.ts +27 -2
  47. package/build/lib/commands/index.d.ts.map +1 -1
  48. package/build/lib/commands/index.js +41 -19
  49. package/build/lib/commands/index.js.map +1 -1
  50. package/build/lib/commands/intent.d.ts +7 -417
  51. package/build/lib/commands/intent.d.ts.map +1 -1
  52. package/build/lib/commands/intent.js +104 -216
  53. package/build/lib/commands/intent.js.map +1 -1
  54. package/build/lib/commands/keyboard.d.ts +6 -5
  55. package/build/lib/commands/keyboard.d.ts.map +1 -1
  56. package/build/lib/commands/keyboard.js +16 -8
  57. package/build/lib/commands/keyboard.js.map +1 -1
  58. package/build/lib/commands/log.d.ts +7 -44
  59. package/build/lib/commands/log.d.ts.map +1 -1
  60. package/build/lib/commands/log.js +146 -108
  61. package/build/lib/commands/log.js.map +1 -1
  62. package/build/lib/commands/media-projection.d.ts +7 -143
  63. package/build/lib/commands/media-projection.d.ts.map +1 -1
  64. package/build/lib/commands/media-projection.js +113 -140
  65. package/build/lib/commands/media-projection.js.map +1 -1
  66. package/build/lib/commands/mixins.d.ts +740 -0
  67. package/build/lib/commands/mixins.d.ts.map +1 -0
  68. package/build/lib/commands/mixins.js +19 -0
  69. package/build/lib/commands/mixins.js.map +1 -0
  70. package/build/lib/commands/network.d.ts +7 -138
  71. package/build/lib/commands/network.d.ts.map +1 -1
  72. package/build/lib/commands/network.js +212 -254
  73. package/build/lib/commands/network.js.map +1 -1
  74. package/build/lib/commands/performance.d.ts +24 -70
  75. package/build/lib/commands/performance.d.ts.map +1 -1
  76. package/build/lib/commands/performance.js +144 -100
  77. package/build/lib/commands/performance.js.map +1 -1
  78. package/build/lib/commands/permissions.d.ts +8 -92
  79. package/build/lib/commands/permissions.d.ts.map +1 -1
  80. package/build/lib/commands/permissions.js +75 -87
  81. package/build/lib/commands/permissions.js.map +1 -1
  82. package/build/lib/commands/recordscreen.d.ts +7 -193
  83. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  84. package/build/lib/commands/recordscreen.js +151 -182
  85. package/build/lib/commands/recordscreen.js.map +1 -1
  86. package/build/lib/commands/shell.d.ts +7 -7
  87. package/build/lib/commands/shell.d.ts.map +1 -1
  88. package/build/lib/commands/shell.js +40 -33
  89. package/build/lib/commands/shell.js.map +1 -1
  90. package/build/lib/commands/streamscreen.d.ts +9 -103
  91. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  92. package/build/lib/commands/streamscreen.js +261 -218
  93. package/build/lib/commands/streamscreen.js.map +1 -1
  94. package/build/lib/commands/system-bars.d.ts +22 -90
  95. package/build/lib/commands/system-bars.d.ts.map +1 -1
  96. package/build/lib/commands/system-bars.js +76 -74
  97. package/build/lib/commands/system-bars.js.map +1 -1
  98. package/build/lib/commands/touch.d.ts +10 -29
  99. package/build/lib/commands/touch.d.ts.map +1 -1
  100. package/build/lib/commands/touch.js +301 -285
  101. package/build/lib/commands/touch.js.map +1 -1
  102. package/build/lib/commands/types.d.ts +978 -0
  103. package/build/lib/commands/types.d.ts.map +1 -0
  104. package/build/lib/commands/types.js +3 -0
  105. package/build/lib/commands/types.js.map +1 -0
  106. package/build/lib/constraints.d.ts +291 -0
  107. package/build/lib/constraints.d.ts.map +1 -0
  108. package/build/lib/{desired-caps.js → constraints.js} +103 -102
  109. package/build/lib/constraints.js.map +1 -0
  110. package/build/lib/driver.d.ts +68 -37
  111. package/build/lib/driver.d.ts.map +1 -1
  112. package/build/lib/driver.js +123 -80
  113. package/build/lib/driver.js.map +1 -1
  114. package/build/lib/helpers/android.d.ts +164 -0
  115. package/build/lib/helpers/android.d.ts.map +1 -0
  116. package/build/lib/helpers/android.js +819 -0
  117. package/build/lib/helpers/android.js.map +1 -0
  118. package/build/lib/helpers/index.d.ts +7 -0
  119. package/build/lib/helpers/index.d.ts.map +1 -0
  120. package/build/lib/helpers/index.js +29 -0
  121. package/build/lib/helpers/index.js.map +1 -0
  122. package/build/lib/helpers/types.d.ts +121 -0
  123. package/build/lib/helpers/types.d.ts.map +1 -0
  124. package/build/lib/helpers/types.js +3 -0
  125. package/build/lib/helpers/types.js.map +1 -0
  126. package/build/lib/helpers/unlock.d.ts +32 -0
  127. package/build/lib/helpers/unlock.d.ts.map +1 -0
  128. package/build/lib/helpers/unlock.js +273 -0
  129. package/build/lib/helpers/unlock.js.map +1 -0
  130. package/build/lib/helpers/webview.d.ts +74 -0
  131. package/build/lib/helpers/webview.d.ts.map +1 -0
  132. package/build/lib/helpers/webview.js +421 -0
  133. package/build/lib/helpers/webview.js.map +1 -0
  134. package/build/lib/index.d.ts +9 -0
  135. package/build/lib/index.d.ts.map +1 -0
  136. package/build/lib/index.js +37 -0
  137. package/build/lib/index.js.map +1 -0
  138. package/build/lib/method-map.d.ts +0 -8
  139. package/build/lib/method-map.d.ts.map +1 -1
  140. package/build/lib/method-map.js +63 -74
  141. package/build/lib/method-map.js.map +1 -1
  142. package/build/lib/stubs.d.ts +0 -1
  143. package/build/lib/stubs.d.ts.map +1 -1
  144. package/build/lib/stubs.js +1 -0
  145. package/build/lib/stubs.js.map +1 -1
  146. package/build/lib/utils.d.ts +1 -1
  147. package/build/lib/utils.d.ts.map +1 -1
  148. package/lib/commands/actions.js +351 -464
  149. package/lib/commands/alert.js +27 -17
  150. package/lib/commands/app-management.js +156 -314
  151. package/lib/commands/context.js +457 -441
  152. package/lib/commands/element.js +201 -157
  153. package/lib/commands/emu-console.js +25 -45
  154. package/lib/commands/execute.js +106 -90
  155. package/lib/commands/file-actions.js +222 -240
  156. package/lib/commands/find.ts +103 -0
  157. package/lib/commands/general.js +327 -339
  158. package/lib/commands/ime.js +50 -34
  159. package/lib/commands/{index.js → index.ts} +20 -24
  160. package/lib/commands/intent.js +108 -249
  161. package/lib/commands/keyboard.js +20 -8
  162. package/lib/commands/log.js +172 -116
  163. package/lib/commands/media-projection.js +134 -161
  164. package/lib/commands/mixins.ts +966 -0
  165. package/lib/commands/network.js +252 -281
  166. package/lib/commands/performance.js +203 -132
  167. package/lib/commands/permissions.js +108 -109
  168. package/lib/commands/recordscreen.js +212 -209
  169. package/lib/commands/shell.js +51 -40
  170. package/lib/commands/streamscreen.js +355 -289
  171. package/lib/commands/system-bars.js +92 -83
  172. package/lib/commands/touch.js +357 -294
  173. package/lib/commands/types.ts +1097 -0
  174. package/lib/{desired-caps.js → constraints.ts} +106 -103
  175. package/lib/{driver.js → driver.ts} +278 -132
  176. package/lib/helpers/android.ts +1143 -0
  177. package/lib/helpers/index.ts +6 -0
  178. package/lib/helpers/types.ts +134 -0
  179. package/lib/helpers/unlock.ts +329 -0
  180. package/lib/helpers/webview.ts +582 -0
  181. package/lib/index.ts +18 -0
  182. package/lib/method-map.js +87 -98
  183. package/lib/stubs.ts +0 -1
  184. package/package.json +26 -19
  185. package/build/index.js +0 -51
  186. package/build/lib/android-helpers.d.ts +0 -136
  187. package/build/lib/android-helpers.d.ts.map +0 -1
  188. package/build/lib/android-helpers.js +0 -855
  189. package/build/lib/android-helpers.js.map +0 -1
  190. package/build/lib/commands/coverage.d.ts +0 -5
  191. package/build/lib/commands/coverage.d.ts.map +0 -1
  192. package/build/lib/commands/coverage.js +0 -19
  193. package/build/lib/commands/coverage.js.map +0 -1
  194. package/build/lib/desired-caps.d.ts +0 -353
  195. package/build/lib/desired-caps.d.ts.map +0 -1
  196. package/build/lib/desired-caps.js.map +0 -1
  197. package/build/lib/unlock-helpers.d.ts +0 -38
  198. package/build/lib/unlock-helpers.d.ts.map +0 -1
  199. package/build/lib/unlock-helpers.js +0 -266
  200. package/build/lib/unlock-helpers.js.map +0 -1
  201. package/build/lib/webview-helpers.d.ts +0 -224
  202. package/build/lib/webview-helpers.d.ts.map +0 -1
  203. package/build/lib/webview-helpers.js +0 -528
  204. package/build/lib/webview-helpers.js.map +0 -1
  205. package/index.js +0 -24
  206. package/lib/android-helpers.js +0 -983
  207. package/lib/commands/coverage.js +0 -18
  208. package/lib/commands/find.js +0 -82
  209. package/lib/unlock-helpers.js +0 -278
  210. package/lib/webview-helpers.js +0 -602
@@ -1,300 +1,303 @@
1
- let commonCapConstraints = {
1
+ import {type Constraints} from '@appium/types';
2
+
3
+ export const ANDROID_DRIVER_CONSTRAINTS = {
2
4
  platformName: {
3
5
  isString: true,
4
6
  inclusionCaseInsensitive: ['Android'],
5
- presence: true
7
+ presence: true,
6
8
  },
7
- app: {
8
- isString: true
9
+ deviceName: {
10
+ isString: true,
9
11
  },
10
12
  appActivity: {
11
- isString: true
13
+ isString: true,
12
14
  },
13
15
  appPackage: {
14
- isString: true
16
+ isString: true,
15
17
  },
16
18
  appWaitActivity: {
17
- isString: true
19
+ isString: true,
18
20
  },
19
21
  appWaitPackage: {
20
- isString: true
22
+ isString: true,
21
23
  },
22
24
  appWaitDuration: {
23
- isNumber: true
25
+ isNumber: true,
24
26
  },
25
27
  deviceReadyTimeout: {
26
- isNumber: true
28
+ isNumber: true,
27
29
  },
28
30
  androidCoverage: {
29
- isString: true
31
+ isString: true,
30
32
  },
31
33
  androidDeviceReadyTimeout: {
32
- isNumber: true
34
+ isNumber: true,
33
35
  },
34
36
  androidDeviceSocket: {
35
- isString: true
37
+ isString: true,
36
38
  },
37
39
  androidInstallTimeout: {
38
- isNumber: true
40
+ isNumber: true,
39
41
  },
40
42
  adbPort: {
41
- isNumber: true
43
+ isNumber: true,
42
44
  },
43
45
  remoteAdbHost: {
44
- isString: true
46
+ isString: true,
45
47
  },
46
48
  adbExecTimeout: {
47
- isNumber: true
49
+ isNumber: true,
48
50
  },
49
51
  avd: {
50
- isString: true
52
+ isString: true,
51
53
  },
52
54
  avdLaunchTimeout: {
53
- isNumber: true
55
+ isNumber: true,
54
56
  },
55
57
  avdReadyTimeout: {
56
- isNumber: true
58
+ isNumber: true,
57
59
  },
58
60
  avdArgs: {
59
61
  // could be a string or an array
60
62
  },
61
63
  avdEnv: {
62
- isObject: true
64
+ isObject: true,
63
65
  },
64
66
  useKeystore: {
65
- isBoolean: true
67
+ isBoolean: true,
66
68
  },
67
69
  keystorePath: {
68
- isString: true
70
+ isString: true,
69
71
  },
70
72
  keystorePassword: {
71
- isString: true
73
+ isString: true,
72
74
  },
73
75
  keyAlias: {
74
- isString: true
76
+ isString: true,
75
77
  },
76
78
  keyPassword: {
77
- isString: true
79
+ isString: true,
78
80
  },
79
81
  webviewDevtoolsPort: {
80
- isNumber: true
82
+ isNumber: true,
81
83
  },
82
84
  ensureWebviewsHavePages: {
83
- isBoolean: true
85
+ isBoolean: true,
84
86
  },
85
87
  enableWebviewDetailsCollection: {
86
- isBoolean: true
88
+ isBoolean: true,
87
89
  },
88
90
  // this one is deprecated
89
91
  chromeDriverPort: {
90
- isNumber: true
92
+ isNumber: true,
91
93
  },
92
94
  // duplicate of above with better spelling
93
95
  chromedriverPort: {
94
- isNumber: true
96
+ isNumber: true,
95
97
  },
96
98
  chromedriverPorts: {
97
- isArray: true
99
+ isArray: true,
98
100
  },
99
101
  chromedriverArgs: {
100
102
  isObject: true,
101
103
  },
102
104
  chromedriverExecutable: {
103
- isString: true
105
+ isString: true,
104
106
  },
105
107
  chromedriverExecutableDir: {
106
- isString: true
108
+ isString: true,
107
109
  },
108
110
  chromedriverChromeMappingFile: {
109
- isString: true
111
+ isString: true,
110
112
  },
111
113
  chromedriverUseSystemExecutable: {
112
- isBoolean: true
114
+ isBoolean: true,
113
115
  },
114
116
  chromedriverDisableBuildCheck: {
115
- isBoolean: true
117
+ isBoolean: true,
116
118
  },
117
119
  chromeLoggingPrefs: {
118
- isObject: true
120
+ isObject: true,
119
121
  },
120
122
  autoWebviewTimeout: {
121
- isNumber: true
123
+ isNumber: true,
122
124
  },
123
125
  autoWebviewName: {
124
- isString: true
126
+ isString: true,
125
127
  },
126
128
  intentAction: {
127
- isString: true
129
+ isString: true,
128
130
  },
129
131
  intentCategory: {
130
- isString: true
132
+ isString: true,
131
133
  },
132
134
  intentFlags: {
133
- isString: true
135
+ isString: true,
134
136
  },
135
137
  optionalIntentArguments: {
136
- isString: true
138
+ isString: true,
137
139
  },
138
140
  dontStopAppOnReset: {
139
- isBoolean: true
141
+ isBoolean: true,
140
142
  },
141
143
  unicodeKeyboard: {
142
- isBoolean: true
144
+ isBoolean: true,
143
145
  },
144
146
  resetKeyboard: {
145
- isBoolean: true
147
+ isBoolean: true,
146
148
  },
147
149
  noSign: {
148
- isBoolean: true
150
+ isBoolean: true,
149
151
  },
150
152
  recreateChromeDriverSessions: {
151
- isBoolean: false
153
+ isBoolean: false,
152
154
  },
153
155
  autoLaunch: {
154
- isBoolean: true
156
+ isBoolean: true,
155
157
  },
156
158
  nativeWebScreenshot: {
157
- isBoolean: true
159
+ isBoolean: true,
158
160
  },
159
161
  androidScreenshotPath: {
160
- isString: true
162
+ isString: true,
161
163
  },
162
164
  androidInstallPath: {
163
- isString: true
165
+ isString: true,
164
166
  },
165
167
  clearSystemFiles: {
166
- isBoolean: true
168
+ isBoolean: true,
167
169
  },
168
170
  extractChromeAndroidPackageFromContextName: {
169
- isBoolean: true
171
+ isBoolean: true,
170
172
  },
171
173
  autoGrantPermissions: {
172
- isBoolean: true
174
+ isBoolean: true,
173
175
  },
174
176
  sharedPreferences: {
175
- isObject: true
177
+ isObject: true,
176
178
  },
177
179
  networkSpeed: {
178
- isString: true
180
+ isString: true,
179
181
  },
180
182
  gpsEnabled: {
181
- isBoolean: true
183
+ isBoolean: true,
182
184
  },
183
185
  isHeadless: {
184
- isBoolean: true
186
+ isBoolean: true,
185
187
  },
186
188
  showChromedriverLog: {
187
- isBoolean: true
189
+ isBoolean: true,
188
190
  },
189
191
  skipUnlock: {
190
- isBoolean: true
192
+ isBoolean: true,
191
193
  },
192
194
  clearDeviceLogsOnStart: {
193
- isBoolean: true
195
+ isBoolean: true,
194
196
  },
195
197
  unlockType: {
196
- isString: true
198
+ isString: true,
197
199
  },
198
200
  unlockKey: {
199
- isString: true
201
+ isString: true,
200
202
  },
201
203
  unlockStrategy: {
202
204
  isString: true,
203
205
  inclusionCaseInsensitive: ['locksettings', 'uiautomator'],
204
206
  },
205
207
  otherApps: {
206
- isString: true
208
+ isString: true,
207
209
  },
208
210
  uninstallOtherPackages: {
209
- isString: true
211
+ isString: true,
210
212
  },
211
213
  allowTestPackages: {
212
- isBoolean: true
214
+ isBoolean: true,
213
215
  },
214
216
  pageLoadStrategy: {
215
- isString: true
217
+ isString: true,
216
218
  },
217
219
  localeScript: {
218
- isString: true
220
+ isString: true,
219
221
  },
220
222
  skipDeviceInitialization: {
221
- isBoolean: true
223
+ isBoolean: true,
222
224
  },
223
225
  remoteAppsCacheLimit: {
224
- isNumber: true
226
+ isNumber: true,
225
227
  },
226
228
  buildToolsVersion: {
227
- isString: true
229
+ isString: true,
228
230
  },
229
231
  skipLogcatCapture: {
230
- isBoolean: true
232
+ isBoolean: true,
231
233
  },
232
234
  chromeOptions: {
233
- isObject: true
235
+ isObject: true,
234
236
  },
235
237
  enablePerformanceLogging: {
236
- isBoolean: true
238
+ isBoolean: true,
237
239
  },
238
240
  userProfile: {
239
- isNumber: true
241
+ isNumber: true,
240
242
  },
241
243
  browserName: {
242
- isString: true
244
+ isString: true,
243
245
  },
244
246
  enforceAppInstall: {
245
- isBoolean: true
247
+ isBoolean: true,
246
248
  },
247
249
  suppressKillServer: {
248
- isBoolean: true
250
+ isBoolean: true,
249
251
  },
250
252
  allowOfflineDevices: {
251
- isBoolean: true
253
+ isBoolean: true,
252
254
  },
253
255
  ignoreHiddenApiPolicyError: {
254
- isBoolean: true
256
+ isBoolean: true,
255
257
  },
256
258
  unlockSuccessTimeout: {
257
- isNumber: true
259
+ isNumber: true,
258
260
  },
259
261
  mockLocationApp: {
260
- isString: true
262
+ isString: true,
261
263
  },
262
264
  logcatFormat: {
263
- isString: true
265
+ isString: true,
264
266
  },
265
267
  logcatFilterSpecs: {
266
- isArray: true
268
+ isArray: true,
267
269
  },
268
270
  allowDelayAdb: {
269
- isBoolean: true
270
- }
271
- };
271
+ isBoolean: true,
272
+ },
273
+
274
+ /*-----------------------------------+
275
+ | UI-AUTOMATOR-SPECIFIC CONSTRAINTS |
276
+ +-----------------------------------+*/
272
277
 
273
- let uiautomatorCapConstraints = {
274
278
  ignoreUnimportantViews: {
275
- isBoolean: true
279
+ isBoolean: true,
276
280
  },
277
281
  disableAndroidWatchers: {
278
- isBoolean: true
282
+ isBoolean: true,
279
283
  },
280
284
  acceptSslCerts: {
281
- isBoolean: true
285
+ isBoolean: true,
282
286
  },
283
287
  androidNaturalOrientation: {
284
- isBoolean: true
288
+ isBoolean: true,
285
289
  },
286
290
  disableWindowAnimation: {
287
- isBoolean: true
291
+ isBoolean: true,
288
292
  },
289
293
  bootstrapPort: {
290
- isNumber: true
294
+ isNumber: true,
291
295
  },
292
- };
293
-
294
- let desiredCapConstraints = {};
296
+ appWaitForLaunch: {
297
+ isBoolean: true,
298
+ },
299
+ } as const satisfies Constraints;
295
300
 
296
- Object.assign(desiredCapConstraints, commonCapConstraints,
297
- uiautomatorCapConstraints);
301
+ export default ANDROID_DRIVER_CONSTRAINTS;
298
302
 
299
- export default desiredCapConstraints;
300
- export { commonCapConstraints };
303
+ export type AndroidDriverConstraints = typeof ANDROID_DRIVER_CONSTRAINTS;