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
@@ -0,0 +1,740 @@
1
+ /// <reference types="node" />
2
+ import type { Element, ExternalDriver, LogDefRecord, Orientation, Position, Rect, Size, StringRecord, Location } from '@appium/types';
3
+ import type { ADB, InstallOptions, LogcatListener, SmsListResult, UninstallOptions } from 'appium-adb';
4
+ import { AndroidDriverOpts, AndroidDriver } from '../driver';
5
+ import type * as types from './types';
6
+ export interface ActionsMixin {
7
+ keyevent(keycode: string | number, metastate?: number): Promise<void>;
8
+ pressKeyCode(keycode: string | number, metastate?: number, flags?: any): Promise<void>;
9
+ longPressKeyCode(keycode: string | number, metastate?: number, flags?: any): Promise<void>;
10
+ getOrientation(): Promise<Orientation>;
11
+ setOrientation(orientation: Orientation): Promise<void>;
12
+ fakeFlick(xSpeed: number, ySpeed: number): Promise<void>;
13
+ fakeFlickElement(elementId: string, xoffset: number, yoffset: number, speed: number): Promise<void>;
14
+ swipe(startX: number | 'null', startY: number | 'null', endX: number, endY: number, duration: number, touchCount: number, elId: string): Promise<void>;
15
+ doSwipe(opts: types.SwipeOpts): Promise<void>;
16
+ pinchClose(startX: number, startY: number, endX: number, endY: number, duration: number, percent: number, steps: number, elId: string): Promise<void>;
17
+ pinchOpen(startX: number, startY: number, endX: number, endY: number, duration: number, percent: number, steps: number, elId: string): Promise<void>;
18
+ flick(element: string, xSpeed: number, ySpeed: number, xOffset: number, yOffset: number, speed: number): Promise<void>;
19
+ drag(startX: number, startY: number, endX: number, endY: number, duration: number, touchCount: number, elementId?: string | number, destElId?: string | number): Promise<void>;
20
+ doDrag(opts: types.DragOpts): Promise<void>;
21
+ lock(seconds?: number): Promise<void>;
22
+ /**
23
+ * Lock the device (and optionally unlock it after a certain amount of time).
24
+ * @throws {Error} if lock or unlock operation fails
25
+ */
26
+ mobileLock(opts: types.LockOpts): Promise<void>;
27
+ unlock(): Promise<void>;
28
+ isLocked(): Promise<boolean>;
29
+ openNotifications(): Promise<void>;
30
+ setLocation(latitude: number, longitude: number): Promise<void>;
31
+ /**
32
+ * @group Emulator Only
33
+ */
34
+ fingerprint(fingerprintId: string | number): Promise<void>;
35
+ /**
36
+ * Emulate fingerprint on Android Emulator.
37
+ * Only works on API 23+
38
+ * @group Emulator Only
39
+ */
40
+ mobileFingerprint(opts: types.FingerprintOpts): Promise<void>;
41
+ /**
42
+ * @group Emulator Only
43
+ */
44
+ sendSMS(phoneNumber: string, message: string): Promise<void>;
45
+ /**
46
+ * Emulate sending an SMS to the given phone number.
47
+ * Only works on emulators.
48
+ *
49
+ * @group Emulator Only
50
+ */
51
+ mobileSendSms(opts: types.SendSMSOpts): Promise<void>;
52
+ /**
53
+ * @group Emulator Only
54
+ */
55
+ gsmCall(phoneNumber: string, action: string): Promise<void>;
56
+ /**
57
+ * Emulate a GSM call to the given phone number.
58
+ * Only works on emulators.
59
+ *
60
+ * @group Emulator Only
61
+ */
62
+ mobileGsmCall(opts: types.GsmCallOpts): Promise<void>;
63
+ /**
64
+ * @group Emulator Only
65
+ */
66
+ gsmSignal(signalStrength: types.GsmSignalStrength): Promise<void>;
67
+ /**
68
+ * Emulate GSM signal strength change event.
69
+ * Only works on emulators.
70
+ *
71
+ * @group Emulator Only
72
+ */
73
+ mobileGsmSignal(opts: types.GsmSignalStrengthOpts): Promise<void>;
74
+ /**
75
+ * @group Emulator Only
76
+ */
77
+ gsmVoice(state: types.GsmVoiceState): Promise<void>;
78
+ /**
79
+ * Emulate GSM voice state change event.
80
+ * Only works on emulators.
81
+ */
82
+ mobileGsmVoice(opts: types.GsmVoiceOpts): Promise<void>;
83
+ /**
84
+ * @group Emulator Only
85
+ */
86
+ powerAC(state: types.PowerACState): Promise<void>;
87
+ /**
88
+ * Emulate AC power state change.
89
+ * Only works on emulators.
90
+ *
91
+ * @group Emulator Only
92
+ */
93
+ mobilePowerAc(opts: types.PowerACOpts): Promise<void>;
94
+ /**
95
+ * @group Emulator Only
96
+ */
97
+ powerCapacity(percent: number): Promise<void>;
98
+ /**
99
+ * Emulate power capacity change.
100
+ * Only works on emulators.
101
+ *
102
+ * @group Emulator Only
103
+ */
104
+ mobilePowerCapacity(opts: types.PowerCapacityOpts): Promise<void>;
105
+ /**
106
+ * @group Emulator Only
107
+ */
108
+ networkSpeed(networkSpeed: types.NetworkSpeed): Promise<void>;
109
+ /**
110
+ * Emulate different network connection speed modes.
111
+ Only works on emulators.
112
+ *
113
+ * @group Emulator Only
114
+ */
115
+ mobileNetworkSpeed(opts: types.NetworkSpeedOpts): Promise<void>;
116
+ /**
117
+ * Emulate sensors values on the connected emulator.
118
+ * @group Emulator Only
119
+ * @throws {Error} - If sensorType is not defined
120
+ * @throws {Error} - If value for the sensor is not defined
121
+ * @throws {Error} - If deviceType is not an emulator
122
+ */
123
+ sensorSet(opts: types.SensorSetOpts): Promise<void>;
124
+ getScreenshotDataWithAdbShell(adb: ADB, opts: AndroidDriverOpts): Promise<Buffer>;
125
+ getScreenshotDataWithAdbExecOut(adb: ADB): Promise<Buffer>;
126
+ getScreenshot(): Promise<string>;
127
+ }
128
+ export type AlertMixin = Required<Pick<ExternalDriver, 'getAlertText' | 'setAlertText' | 'postAcceptAlert' | 'postDismissAlert'>>;
129
+ export interface AppManagementMixin {
130
+ /**
131
+ * Installs the given application to the device under test
132
+ * @throws {Error} if the given apk does not exist or is not reachable
133
+ */
134
+ installApp(appId: string, opts?: Omit<InstallOptions, 'appId'>): Promise<void>;
135
+ /**
136
+ * Terminates the app if it is running.
137
+ *
138
+ * If the given timeout was lower or equal to zero, it returns true after
139
+ * terminating the app without checking the app state.
140
+ * @throws {Error} if the app has not been terminated within the given timeout.
141
+ */
142
+ terminateApp(appId: string, opts?: Omit<types.TerminateAppOpts, 'appId'>): Promise<boolean>;
143
+ /**
144
+ * Remove the corresponding application if is installed.
145
+ *
146
+ * The call is ignored if the app is not installed.
147
+ *
148
+ * @returns `true` if the package was found on the device and
149
+ * successfully uninstalled.
150
+ */
151
+ removeApp(appId: string, opts: Omit<UninstallOptions, 'appId'>): Promise<boolean>;
152
+ /**
153
+ * Activates the given application or launches it if necessary.
154
+ *
155
+ * The action literally simulates clicking the corresponding application
156
+ * icon on the dashboard.
157
+ *
158
+ * @throws {Error} If the app cannot be activated
159
+ */
160
+ activateApp(appId: string): Promise<void>;
161
+ /**
162
+ * Queries the current state of the app.
163
+ * @returns The corresponding constant, which describes the current application state.
164
+ */
165
+ queryAppState(appId: string): Promise<types.AppState>;
166
+ /**
167
+ * Determine whether an app is installed
168
+ */
169
+ isAppInstalled(appId: string): Promise<boolean>;
170
+ /**
171
+ * Installs the given application to the device under test
172
+ * @throws {Error} if the given apk does not exist or is not reachable
173
+ */
174
+ mobileInstallApp(opts: types.InstallAppOpts): Promise<void>;
175
+ /**
176
+ * Terminates the app if it is running.
177
+ *
178
+ * If the given timeout was lower or equal to zero, it returns true after
179
+ * terminating the app without checking the app state.
180
+ * @throws {Error} if the app has not been terminated within the given timeout.
181
+ */
182
+ mobileTerminateApp(opts: types.TerminateAppOpts): Promise<boolean>;
183
+ /**
184
+ * Remove the corresponding application if is installed.
185
+ *
186
+ * The call is ignored if the app is not installed.
187
+ *
188
+ * @returns `true` if the package was found on the device and
189
+ * successfully uninstalled.
190
+ */
191
+ mobileRemoveApp(opts: types.RemoveAppOpts): Promise<boolean>;
192
+ /**
193
+ *
194
+ * Activates the given application or launches it if necessary.
195
+ *
196
+ * The action literally simulates clicking the corresponding application
197
+ * icon on the dashboard.
198
+ *
199
+ * @throws {Error} If the app cannot be activated
200
+ */
201
+ mobileActivateApp(opts: types.ActivateAppOpts): Promise<void>;
202
+ /**
203
+ * Queries the current state of the app.
204
+ * @returns The corresponding constant, which describes the current application state.
205
+ */
206
+ mobileQueryAppState(opts: types.QueryAppStateOpts): Promise<types.AppState>;
207
+ /**
208
+ * Determine whether an app is installed
209
+ */
210
+ mobileIsAppInstalled(opts: types.IsAppInstalledOpts): Promise<boolean>;
211
+ /**
212
+ * Deletes all data associated with a package.
213
+ *
214
+ * @throws {Error} If cleaning of the app data fails
215
+ */
216
+ mobileClearApp(opts: types.ClearAppOpts): Promise<void>;
217
+ }
218
+ export interface ContextMixin {
219
+ getCurrentContext(): Promise<string>;
220
+ getContexts(): Promise<string[]>;
221
+ setContext(name?: string): Promise<void>;
222
+ defaultContextName(): string;
223
+ defaultWebviewName(): string;
224
+ assignContexts(mappings: types.WebviewsMapping[]): string[];
225
+ /**
226
+ * Returns a webviewsMapping based on CDP endpoints
227
+ */
228
+ mobileGetContexts(): Promise<types.WebviewsMapping[]>;
229
+ switchContext(name: string, mappings: types.WebviewsMapping[]): Promise<void>;
230
+ isWebContext(): boolean;
231
+ startChromedriverProxy(context: string, mappings: types.WebviewsMapping[]): Promise<void>;
232
+ onChromedriverStop(context: string): Promise<void>;
233
+ isChromedriverContext(viewName: string): boolean;
234
+ shouldDismissChromeWelcome(): boolean;
235
+ dismissChromeWelcome(): Promise<void>;
236
+ startChromeSession(): Promise<void>;
237
+ suspendChromedriverProxy(): void;
238
+ stopChromedriverProxies(): Promise<void>;
239
+ }
240
+ export interface ElementMixin {
241
+ getAttribute(attribute: string, elementId: string): Promise<string>;
242
+ getName(elementId: string): Promise<string>;
243
+ elementDisplayed(elementId: string): Promise<boolean>;
244
+ elementEnabled(elementId: string): Promise<boolean>;
245
+ elementSelected(elementId: string): Promise<boolean>;
246
+ setElementValue(keys: string | string[], elementId: string, replace?: boolean): Promise<void>;
247
+ doSetElementValue(opts: types.DoSetElementValueOpts): Promise<void>;
248
+ setValue(keys: string | string[], elementId: string): Promise<void>;
249
+ replaceValue(keys: string | string[], elementId: string): Promise<void>;
250
+ setValueImmediate(keys: string | string[], elementId: string): Promise<void>;
251
+ getText(elementId: string): Promise<string>;
252
+ clear(elementId: string): Promise<void>;
253
+ click(elementId: string): Promise<void>;
254
+ getLocation(elementId: string): Promise<Position>;
255
+ getLocationInView(elementId: string): Promise<Position>;
256
+ getSize(elementId: string): Promise<Size>;
257
+ getElementRect(elementId: string): Promise<Rect>;
258
+ touchLongClick(elementId: string, x: number, y: number, duration: number): Promise<void>;
259
+ touchDown(elementId: string, x: number, y: number): Promise<void>;
260
+ touchUp(elementId: string, x: number, y: number): Promise<void>;
261
+ touchMove(elementId: string, x: number, y: number): Promise<void>;
262
+ complexTap(tapCount: number, touchCount: number, duration: number, x: number, y: number): Promise<void>;
263
+ tap(elementId?: string | null, x?: number | null, y?: number | null, count?: number): Promise<void>;
264
+ }
265
+ export interface EmulatorConsoleMixin {
266
+ /**
267
+ * Executes a command through emulator telnet console interface and returns its output.
268
+ * The `emulator_console` server feature must be enabled in order to use this method.
269
+ *
270
+ * @returns The command output
271
+ * @throws {Error} If there was an error while connecting to the Telnet console
272
+ * or if the given command returned non-OK response
273
+ */
274
+ mobileExecEmuConsoleCommand(opts: types.ExecOptions): Promise<string>;
275
+ }
276
+ export interface ExecuteMixin {
277
+ execute(script: string, args?: unknown[]): Promise<unknown>;
278
+ executeMobile(mobileCommand: string, opts?: StringRecord): Promise<unknown>;
279
+ }
280
+ export interface FileActionsMixin {
281
+ /**
282
+ * Pulls a remote file from the device.
283
+ *
284
+ * It is required that a package has debugging flag enabled in order to access its files.
285
+ *
286
+ * @param remotePath The full path to the remote file or a specially formatted path, which points to an item inside app bundle
287
+ * @returns Base64 encoded content of the pulled file
288
+ * @throws {Error} If the pull operation failed
289
+ */
290
+ pullFile(remotePath: string): Promise<string>;
291
+ /**
292
+ * Pulls a remote file from the device.
293
+ *
294
+ * @param opts
295
+ * @returns The same as {@linkcode pullFile}
296
+ */
297
+ mobilePullFile(opts: types.PullFileOpts): Promise<string>;
298
+ /**
299
+ * Pushes the given data to a file on the remote device
300
+ *
301
+ * It is required that a package has debugging flag enabled in order to access
302
+ * its files.
303
+ *
304
+ * After a file is pushed, it gets automatically scanned for possible media
305
+ * occurrences. The file is added to the media library if the scan succeeds.
306
+ *
307
+ * @param remotePath The full path to the remote file or a file
308
+ * inside a package bundle
309
+ * @param base64Data Base64 encoded data to be written to the remote
310
+ * file. The remote file will be silently overridden if it already exists.
311
+ * @throws {Error} If there was an error while pushing the data
312
+ */
313
+ pushFile(remotePath: string, base64Data: string): Promise<void>;
314
+ /**
315
+ * Pushes the given data to a file on the remote device.
316
+ */
317
+ mobilePushFile(opts: types.PushFileOpts): Promise<void>;
318
+ /**
319
+ * Pulls the whole folder from the remote device
320
+ *
321
+ * @param remotePath The full path to a folder on the remote device or a folder inside an application bundle
322
+ * @returns Base64-encoded and zipped content of the folder
323
+ * @throws {Error} If there was a failure while getting the folder content
324
+ */
325
+ pullFolder(remotePath: string): Promise<string>;
326
+ /**
327
+ * Pulls the whole folder from the device under test.
328
+ *
329
+ * @returns The same as {@linkcode pullFolder}
330
+ */
331
+ mobilePullFolder(opts: types.PullFolderOpts): Promise<string>;
332
+ /**
333
+ * Deletes a file on the remote device
334
+ *
335
+ * @returns `true` if the remote file has been successfully deleted. If the
336
+ * path to a remote file is valid, but the file itself does not exist then
337
+ * `false` is returned.
338
+ * @throws {Error} If the argument is invalid or there was an error while
339
+ * deleting the file
340
+ */
341
+ mobileDeleteFile(opts: types.DeleteFileOpts): Promise<boolean>;
342
+ }
343
+ export interface FindMixin {
344
+ /**
345
+ * @remarks The reason for isolating `doFindElementOrEls` from {@linkcode findElOrEls} is for reusing `findElOrEls`
346
+ * across android-drivers (like `appium-uiautomator2-driver`) to avoid code duplication.
347
+ * Other android-drivers (like `appium-uiautomator2-driver`) need to override `doFindElementOrEls`
348
+ * to facilitate `findElOrEls`.
349
+ */
350
+ doFindElementOrEls(opts: types.FindElementOpts): Promise<Element | Element[]>;
351
+ /**
352
+ * Find an element or elements
353
+ * @param strategy locator strategy
354
+ * @param selector actual selector for finding an element
355
+ * @param mult multiple elements or just one?
356
+ * @param context finding an element from the root context? or starting from another element
357
+ */
358
+ findElOrEls(strategy: string, selector: string, mult: true, context?: any): Promise<Element[]>;
359
+ findElOrEls(strategy: string, selector: string, mult: false, context?: any): Promise<Element>;
360
+ }
361
+ export interface GeneralMixin {
362
+ keys(keys: string | string[]): Promise<void>;
363
+ doSendKeys(opts: types.SendKeysOpts): Promise<void>;
364
+ /**
365
+ * Retrieves the current device's timestamp.
366
+ *
367
+ * @param format - The set of format specifiers. Read {@link https://momentjs.com/docs/} to get the full list of supported format specifiers. The default format is `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601
368
+ * @return Formatted datetime string or the raw command output if formatting fails
369
+ */
370
+ getDeviceTime(format?: string): Promise<string>;
371
+ /**
372
+ * Retrieves the current device time
373
+ *
374
+ * @return Formatted datetime string or the raw command output if formatting fails
375
+ */
376
+ mobileGetDeviceTime(opts: types.DeviceTimeOpts): Promise<string>;
377
+ getPageSource(): Promise<string>;
378
+ openSettingsActivity(setting: string): Promise<void>;
379
+ getWindowSize(): Promise<Size>;
380
+ back(): Promise<void>;
381
+ getWindowRect(): Promise<Rect>;
382
+ getCurrentActivity(): Promise<string>;
383
+ getCurrentPackage(): Promise<string>;
384
+ background(seconds: number): Promise<string | true>;
385
+ getStrings(language?: string | null): Promise<StringRecord>;
386
+ launchApp(): Promise<void>;
387
+ startActivity(appPackage: string, appActivity?: string, appWaitPackage?: string, appWaitActivity?: string, intentAction?: string, intentCategory?: string, intentFlags?: string, optionalIntentArguments?: string, dontStopAppOnReset?: boolean): Promise<void>;
388
+ _cachedActivityArgs: StringRecord;
389
+ reset(): Promise<void>;
390
+ startAUT(): Promise<void>;
391
+ setUrl(uri: string): Promise<void>;
392
+ closeApp(): Promise<void>;
393
+ getDisplayDensity(): Promise<number>;
394
+ mobilePerformEditorAction(opts: types.PerformEditorActionOpts): Promise<void>;
395
+ /**
396
+ * Retrieves the list of recent system notifications.
397
+ *
398
+ * @returns See the documentation on `adb.getNotifications` for more details
399
+ */
400
+ mobileGetNotifications(): Promise<StringRecord>;
401
+ /**
402
+ * Retrieves the list of recent SMS messages with their properties.
403
+ * @returns See the documentation on `adb.getSmsList` for more details
404
+ */
405
+ mobileListSms(opts: types.ListSmsOpts): Promise<SmsListResult>;
406
+ /**
407
+ * Unlocks the device if it is locked. Noop if the device's screen is not locked.
408
+ *
409
+ * @throws {Error} if unlock operation fails or the provided arguments are not valid
410
+ */
411
+ mobileUnlock(opts: types.UnlockOptions): Promise<void>;
412
+ }
413
+ export interface IMEMixin {
414
+ isIMEActivated: () => Promise<boolean>;
415
+ availableIMEEngines: () => Promise<string[]>;
416
+ getActiveIMEEngine: () => Promise<string>;
417
+ activateIMEEngine: (imeId: string) => Promise<void>;
418
+ deactivateIMEEngine: () => Promise<void>;
419
+ }
420
+ export interface ActivityMixin {
421
+ /**
422
+ * Starts the given activity intent.
423
+ *
424
+ * @param opts
425
+ * @returns The command output
426
+ * @throws {Error} If there was a failure while starting the activity
427
+ * or required options are missing
428
+ */
429
+ mobileStartActivity(opts?: types.StartActivityOpts): Promise<string>;
430
+ /**
431
+ * Send a broadcast intent.
432
+ *
433
+ * @returns The command output
434
+ * @throws {Error} If there was a failure while starting the activity
435
+ * or required options are missing
436
+ */
437
+ mobileBroadcast(opts?: types.BroadcastOpts): Promise<string>;
438
+ /**
439
+ * Starts the given service intent.
440
+ *
441
+ * @returns The command output
442
+ * @throws {Error} If there was a failure while starting the service
443
+ * or required options are missing
444
+ */
445
+ mobileStartService(opts?: types.StartServiceOpts): Promise<string>;
446
+ /**
447
+ * Stops the given service intent.
448
+ *
449
+ * @returns The command output
450
+ * @throws {Error} If there was a failure while stopping the service
451
+ * or required options are missing
452
+ */
453
+ mobileStopService(opts?: types.StopServiceOpts): Promise<string>;
454
+ }
455
+ export interface KeyboardMixin {
456
+ hideKeyboard(): Promise<boolean>;
457
+ isKeyboardShown(): Promise<boolean>;
458
+ }
459
+ export interface LogMixin {
460
+ supportedLogTypes: Readonly<LogDefRecord>;
461
+ mobileStartLogsBroadcast(): Promise<void>;
462
+ mobileStopLogsBroadcast(): Promise<void>;
463
+ getLogTypes(): Promise<string[]>;
464
+ getLog(logType: string): Promise<any>;
465
+ _logcatWebsocketListener?: LogcatListener;
466
+ }
467
+ export interface MediaProjectionMixin {
468
+ /**
469
+ * Record the display of a real devices running Android 10 (API level 29) and higher.
470
+ * The screen activity is recorded to a MPEG-4 file. Audio is also recorded by default
471
+ * (only for apps that allow it in their manifests).
472
+ * If another recording has been already started then the command will exit silently.
473
+ * The previously recorded video file is deleted when a new recording session is started.
474
+ * Recording continues it is stopped explicitly or until the timeout happens.
475
+ *
476
+ * @param opts Available options.
477
+ * @returns `true` if a new recording has successfully started.
478
+ * @throws {Error} If recording has failed to start or is not supported on the device under test.
479
+ */
480
+ mobileStartMediaProjectionRecording(opts?: types.StartMediaProjectionRecordingOpts): Promise<boolean>;
481
+ /**
482
+ * Checks if a media projection-based recording is currently running.
483
+ *
484
+ * @returns `true` if a recording is in progress.
485
+ * @throws {Error} If a recording is not supported on the device under test.
486
+ */
487
+ mobileIsMediaProjectionRecordingRunning(): Promise<boolean>;
488
+ /**
489
+ * Stop a media projection-based recording.
490
+ * If no recording has been started before then an error is thrown.
491
+ * If the recording has been already finished before this API has been called
492
+ * then the most recent recorded file is returned.
493
+ *
494
+ * @param opts Available options.
495
+ * @returns Base64-encoded content of the recorded media file if 'remotePath'
496
+ * parameter is falsy or an empty string.
497
+ * @throws {Error} If there was an error while stopping a recording,
498
+ * fetching the content of the remote media file,
499
+ * or if a recording is not supported on the device under test.
500
+ */
501
+ mobileStopMediaProjectionRecording(opts?: types.StopMediaProjectionRecordingOpts): Promise<string>;
502
+ }
503
+ export interface NetworkMixin {
504
+ getNetworkConnection(): Promise<number>;
505
+ /**
506
+ * decoupling to override the behaviour in other drivers like UiAutomator2.
507
+ */
508
+ isWifiOn(): Promise<boolean>;
509
+ /**
510
+ * Set the connectivity state for different services
511
+ *
512
+ * @throws {Error} If none of known properties were provided or there was an error
513
+ * while changing connectivity states
514
+ */
515
+ mobileSetConnectivity(opts?: types.SetConnectivityOpts): Promise<void>;
516
+ /**
517
+ * Retrieves the connectivity properties from the device under test
518
+ *
519
+ * @param opts If no service names are provided then the connectivity state is
520
+ * returned for all of them.
521
+ */
522
+ mobileGetConnectivity(opts?: types.GetConnectivityOpts): Promise<types.GetConnectivityResult>;
523
+ setNetworkConnection(type: number): Promise<number>;
524
+ /**
525
+ * decoupling to override behaviour in other drivers like UiAutomator2.
526
+ */
527
+ setWifiState(state: boolean): Promise<void>;
528
+ toggleData(): Promise<void>;
529
+ toggleWiFi(): Promise<void>;
530
+ toggleFlightMode(): Promise<void>;
531
+ setGeoLocation(location: Location): Promise<Location>;
532
+ getGeoLocation(): Promise<Location>;
533
+ /**
534
+ * Sends an async request to refresh the GPS cache.
535
+ *
536
+ * This feature only works if the device under test has Google Play Services
537
+ * installed. In case the vanilla LocationManager is used the device API level
538
+ * must be at version 30 (Android R) or higher.
539
+ *
540
+ */
541
+ mobileRefreshGpsCache(opts: types.GpsCacheRefreshOpts): Promise<void>;
542
+ /**
543
+ * Checks if GPS is enabled
544
+ *
545
+ * @returns True if yes
546
+ */
547
+ isLocationServicesEnabled(): Promise<boolean>;
548
+ /**
549
+ * Toggles GPS state
550
+ */
551
+ toggleLocationServices(): Promise<void>;
552
+ wrapBootstrapDisconnect(fn: () => Promise<void>): Promise<void>;
553
+ }
554
+ export interface PerformanceMixin {
555
+ getPerformanceDataTypes(): Promise<types.PerformanceDataType[]>;
556
+ /**
557
+ * @returns The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.
558
+ * input - (packageName) the package name of the application
559
+ * (dataType) the type of system state which wants to read. It should be one of the keys of the SUPPORTED_PERFORMANCE_DATA_TYPES
560
+ * (dataReadTimeout) the number of attempts to read
561
+ * output - table of the performance data, The first line of the table represents the type of data. The remaining lines represent the values of the data.
562
+ *
563
+ * in case of battery info : [[power], [23]]
564
+ * in case of memory info : [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, totalPss,
565
+ * nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]]
566
+ * in case of network info : [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,],
567
+ * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]]
568
+ * in case of network info : [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600],
569
+ * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600],
570
+ * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]]
571
+ * in case of cpu info : [[user, kernel], [0.9, 1.3]]
572
+ *
573
+ * @privateRemarks XXX: type the result
574
+ */
575
+ getPerformanceData(packageName: string, dataType: types.PerformanceDataType, retries?: number): Promise<any[][]>;
576
+ /**
577
+ * Retrieves performance data about the given Android subsystem.
578
+ * The data is parsed from the output of the dumpsys utility.
579
+ *
580
+ * @returns The output depends on the selected subsystem.
581
+ * It is orginized into a table, where the first row represent column names
582
+ * and the following rows represent the sampled data for each column.
583
+ * Example output for different data types:
584
+ * - batteryinfo: [[power], [23]]
585
+ * - memory info: [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, totalPss,
586
+ * nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]]
587
+ * - networkinfo: [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,],
588
+ * [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]]
589
+ *
590
+ * [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600],
591
+ * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600],
592
+ * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]]
593
+ * - cpuinfo: [[user, kernel], [0.9, 1.3]]
594
+ */
595
+ mobileGetPerformanceData(opts: types.PerformanceDataOpts): Promise<any[][]>;
596
+ }
597
+ export interface PermissionsMixin {
598
+ /**
599
+ * Changes package permissions in runtime.
600
+ *
601
+ * @param opts - Available options mapping.
602
+ * @throws {Error} if there was a failure while changing permissions
603
+ */
604
+ mobileChangePermissions(opts: types.ChangePermissionsOpts): Promise<void>;
605
+ /**
606
+ * Gets runtime permissions list for the given application package.
607
+ *
608
+ * opts - Available options mapping.
609
+ * @returns The list of retrieved permissions for the given type
610
+ * (can also be empty).
611
+ * @throws {Error} if there was an error while getting permissions.
612
+ */
613
+ mobileGetPermissions(opts: types.GetPermissionsOpts): Promise<string[]>;
614
+ }
615
+ export interface RecordScreenMixin {
616
+ /**
617
+ * @privateRemarks FIXME: type this properly
618
+ */
619
+ _screenRecordingProperties?: StringRecord;
620
+ /**
621
+ * Record the display of a real devices running Android 4.4 (API level 19) and
622
+ * higher.
623
+ *
624
+ * Emulators are supported since API level 27 (Android P). It records screen
625
+ * activity to an MPEG-4 file. Audio is not recorded with the video file. If
626
+ * screen recording has been already started then the command will stop it
627
+ * forcefully and start a new one. The previously recorded video file will be
628
+ * deleted.
629
+ *
630
+ * @param opts - The available options.
631
+ * @returns Base64-encoded content of the recorded media file if any screen
632
+ * recording is currently running or an empty string.
633
+ * @throws {Error} If screen recording has failed to start or is not supported
634
+ * on the device under test.
635
+ */
636
+ startRecordingScreen(opts?: types.StartScreenRecordingOpts): Promise<string>;
637
+ /**
638
+ * Stop recording the screen.
639
+ *
640
+ * If no screen recording has been started before then the method returns an
641
+ * empty string.
642
+ *
643
+ * @param opts - The available options.
644
+ * @returns Base64-encoded content of the recorded media file if `remotePath`
645
+ * option is falsy or an empty string.
646
+ * @throws {Error} If there was an error while getting the name of a media
647
+ * file or the file content cannot be uploaded to the remote location or
648
+ * screen recording is not supported on the device under test.
649
+ */
650
+ stopRecordingScreen(opts?: types.StopScreenRecordingOpts): Promise<string>;
651
+ }
652
+ export interface ShellMixin {
653
+ mobileShell(opts?: types.ShellOpts): Promise<string | {
654
+ stderr: string;
655
+ stdout: string;
656
+ }>;
657
+ }
658
+ export interface StreamScreenMixin {
659
+ _screenStreamingProps?: StringRecord;
660
+ /**
661
+ * Starts device screen broadcast by creating MJPEG server. Multiple calls to
662
+ * this method have no effect unless the previous streaming session is stopped.
663
+ * This method only works if the `adb_screen_streaming` feature is enabled on
664
+ * the server side.
665
+ *
666
+ * @param opts - The available options.
667
+ * @throws {Error} If screen streaming has failed to start or is not
668
+ * supported on the host system or the corresponding server feature is not
669
+ * enabled.
670
+ */
671
+ mobileStartScreenStreaming(opts?: types.StartScreenStreamingOpts): Promise<void>;
672
+ /**
673
+ * Stop screen streaming.
674
+ *
675
+ * If no screen streaming server has been started then nothing is done.
676
+ */
677
+ mobileStopScreenStreaming(): Promise<void>;
678
+ }
679
+ export interface SystemBarsMixin {
680
+ getSystemBars(): Promise<StringRecord>;
681
+ /**
682
+ * Performs commands on the system status bar.
683
+ *
684
+ * A thin wrapper over `adb shell cmd statusbar` CLI. Works on Android Oreo and newer.
685
+ *
686
+ * @returns The actual output of the downstream console command.
687
+ */
688
+ mobilePerformStatusBarCommand(opts?: types.StatusBarCommandOpts): Promise<string>;
689
+ }
690
+ export interface TouchMixin {
691
+ /**
692
+ * @privateRemarks the shape of opts is dependent on the value of action, and
693
+ * this can be further narrowed to avoid all of the type assertions below.
694
+ */
695
+ doTouchAction(action: types.TouchActionKind, opts?: types.TouchActionOpts): Promise<void>;
696
+ /**
697
+ * @privateRemarks drag is *not* press-move-release, so we need to translate.
698
+ * drag works fine for scroll, as well
699
+ */
700
+ doTouchDrag(gestures: types.TouchDragAction): Promise<void>;
701
+ /**
702
+ * @privateRemarks Release gesture needs element or co-ordinates to release it
703
+ * from that position or else release gesture is performed from center of the
704
+ * screen, so to fix it This method sets co-ordinates/element to release
705
+ * gesture if it has no options set already.
706
+ */
707
+ fixRelease(gestures: types.TouchAction[]): Promise<types.TouchAction | undefined>;
708
+ /**
709
+ * Performs a single gesture
710
+ */
711
+ performGesture(gesture: types.TouchAction): Promise<void>;
712
+ getSwipeOptions(gestures: types.SwipeAction, touchCount?: number): Promise<types.TouchSwipeOpts>;
713
+ performTouch(gestures: types.TouchAction[]): Promise<void>;
714
+ parseTouch(gestures: types.TouchAction[], mult?: boolean): Promise<types.TouchState[]>;
715
+ performMultiAction(actions: types.TouchAction[], elementId: string): Promise<void>;
716
+ /**
717
+ * @privateRemarks Reason for isolating `doPerformMultiAction` from
718
+ * {@link performMultiAction} is for reusing `performMultiAction` across android-drivers
719
+ * (like `appium-uiautomator2-driver`) and to avoid code duplication. Other
720
+ * android-drivers (like `appium-uiautomator2-driver`) need to override
721
+ * `doPerformMultiAction` to facilitate `performMultiAction`.
722
+ */
723
+ doPerformMultiAction(elementId: string, states: types.TouchState[]): Promise<void>;
724
+ }
725
+ declare module '../driver' {
726
+ interface AndroidDriver extends ActionsMixin, AlertMixin, AppManagementMixin, ContextMixin, ElementMixin, EmulatorConsoleMixin, ExecuteMixin, FileActionsMixin, FindMixin, GeneralMixin, IMEMixin, ActivityMixin, KeyboardMixin, LogMixin, MediaProjectionMixin, NetworkMixin, PerformanceMixin, PermissionsMixin, RecordScreenMixin, ShellMixin, StreamScreenMixin, SystemBarsMixin, TouchMixin {
727
+ }
728
+ }
729
+ /**
730
+ * This function assigns a mixin `T` to the `AndroidDriver` class' prototype.
731
+ *
732
+ * While each mixin has its own interface which is (in isolation) unrelated to
733
+ * `AndroidDriver`, the constraint on this generic type `T` is that it must be a
734
+ * partial of `AndroidDriver`'s interface. This enforces that it does not
735
+ * conflict with the existing interface of `AndroidDriver`. In that way, you
736
+ * can think of it as a type guard.
737
+ * @param mixin Mixin implementation
738
+ */
739
+ export declare function mixin<T extends Partial<AndroidDriver>>(mixin: T): void;
740
+ //# sourceMappingURL=mixins.d.ts.map