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