appium-android-driver 5.14.6 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/index.d.ts +282 -0
  3. package/build/index.d.ts.map +1 -0
  4. package/build/index.js.map +1 -0
  5. package/build/lib/commands/actions.d.ts +6 -224
  6. package/build/lib/commands/actions.d.ts.map +1 -1
  7. package/build/lib/commands/actions.js +306 -405
  8. package/build/lib/commands/actions.js.map +1 -1
  9. package/build/lib/commands/alert.d.ts +7 -9
  10. package/build/lib/commands/alert.d.ts.map +1 -1
  11. package/build/lib/commands/alert.js +24 -18
  12. package/build/lib/commands/alert.js.map +1 -1
  13. package/build/lib/commands/app-management.d.ts +7 -313
  14. package/build/lib/commands/app-management.d.ts.map +1 -1
  15. package/build/lib/commands/app-management.js +135 -293
  16. package/build/lib/commands/app-management.js.map +1 -1
  17. package/build/lib/commands/context.d.ts +8 -92
  18. package/build/lib/commands/context.d.ts.map +1 -1
  19. package/build/lib/commands/context.js +381 -439
  20. package/build/lib/commands/context.js.map +1 -1
  21. package/build/lib/commands/element.d.ts +8 -35
  22. package/build/lib/commands/element.d.ts.map +1 -1
  23. package/build/lib/commands/element.js +153 -136
  24. package/build/lib/commands/element.js.map +1 -1
  25. package/build/lib/commands/emu-console.d.ts +6 -48
  26. package/build/lib/commands/emu-console.d.ts.map +1 -1
  27. package/build/lib/commands/emu-console.js +19 -34
  28. package/build/lib/commands/emu-console.js.map +1 -1
  29. package/build/lib/commands/execute.d.ts +6 -5
  30. package/build/lib/commands/execute.d.ts.map +1 -1
  31. package/build/lib/commands/execute.js +77 -66
  32. package/build/lib/commands/execute.js.map +1 -1
  33. package/build/lib/commands/file-actions.d.ts +7 -128
  34. package/build/lib/commands/file-actions.d.ts.map +1 -1
  35. package/build/lib/commands/file-actions.js +183 -219
  36. package/build/lib/commands/file-actions.js.map +1 -1
  37. package/build/lib/commands/find.d.ts +8 -12
  38. package/build/lib/commands/find.d.ts.map +1 -1
  39. package/build/lib/commands/find.js +19 -23
  40. package/build/lib/commands/find.js.map +1 -1
  41. package/build/lib/commands/general.d.ts +9 -132
  42. package/build/lib/commands/general.d.ts.map +1 -1
  43. package/build/lib/commands/general.js +281 -312
  44. package/build/lib/commands/general.js.map +1 -1
  45. package/build/lib/commands/ime.d.ts +7 -10
  46. package/build/lib/commands/ime.d.ts.map +1 -1
  47. package/build/lib/commands/ime.js +47 -35
  48. package/build/lib/commands/ime.js.map +1 -1
  49. package/build/lib/commands/index.d.ts +27 -2
  50. package/build/lib/commands/index.d.ts.map +1 -1
  51. package/build/lib/commands/index.js +41 -19
  52. package/build/lib/commands/index.js.map +1 -1
  53. package/build/lib/commands/intent.d.ts +7 -417
  54. package/build/lib/commands/intent.d.ts.map +1 -1
  55. package/build/lib/commands/intent.js +104 -216
  56. package/build/lib/commands/intent.js.map +1 -1
  57. package/build/lib/commands/keyboard.d.ts +6 -5
  58. package/build/lib/commands/keyboard.d.ts.map +1 -1
  59. package/build/lib/commands/keyboard.js +16 -8
  60. package/build/lib/commands/keyboard.js.map +1 -1
  61. package/build/lib/commands/log.d.ts +7 -44
  62. package/build/lib/commands/log.d.ts.map +1 -1
  63. package/build/lib/commands/log.js +146 -108
  64. package/build/lib/commands/log.js.map +1 -1
  65. package/build/lib/commands/media-projection.d.ts +7 -143
  66. package/build/lib/commands/media-projection.d.ts.map +1 -1
  67. package/build/lib/commands/media-projection.js +113 -140
  68. package/build/lib/commands/media-projection.js.map +1 -1
  69. package/build/lib/commands/mixins.d.ts +740 -0
  70. package/build/lib/commands/mixins.d.ts.map +1 -0
  71. package/build/lib/commands/mixins.js +19 -0
  72. package/build/lib/commands/mixins.js.map +1 -0
  73. package/build/lib/commands/network.d.ts +7 -138
  74. package/build/lib/commands/network.d.ts.map +1 -1
  75. package/build/lib/commands/network.js +212 -254
  76. package/build/lib/commands/network.js.map +1 -1
  77. package/build/lib/commands/performance.d.ts +24 -70
  78. package/build/lib/commands/performance.d.ts.map +1 -1
  79. package/build/lib/commands/performance.js +144 -100
  80. package/build/lib/commands/performance.js.map +1 -1
  81. package/build/lib/commands/permissions.d.ts +8 -92
  82. package/build/lib/commands/permissions.d.ts.map +1 -1
  83. package/build/lib/commands/permissions.js +75 -87
  84. package/build/lib/commands/permissions.js.map +1 -1
  85. package/build/lib/commands/recordscreen.d.ts +7 -193
  86. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  87. package/build/lib/commands/recordscreen.js +151 -182
  88. package/build/lib/commands/recordscreen.js.map +1 -1
  89. package/build/lib/commands/shell.d.ts +7 -7
  90. package/build/lib/commands/shell.d.ts.map +1 -1
  91. package/build/lib/commands/shell.js +40 -33
  92. package/build/lib/commands/shell.js.map +1 -1
  93. package/build/lib/commands/streamscreen.d.ts +9 -103
  94. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  95. package/build/lib/commands/streamscreen.js +261 -218
  96. package/build/lib/commands/streamscreen.js.map +1 -1
  97. package/build/lib/commands/system-bars.d.ts +22 -90
  98. package/build/lib/commands/system-bars.d.ts.map +1 -1
  99. package/build/lib/commands/system-bars.js +76 -74
  100. package/build/lib/commands/system-bars.js.map +1 -1
  101. package/build/lib/commands/touch.d.ts +10 -29
  102. package/build/lib/commands/touch.d.ts.map +1 -1
  103. package/build/lib/commands/touch.js +301 -285
  104. package/build/lib/commands/touch.js.map +1 -1
  105. package/build/lib/commands/types.d.ts +978 -0
  106. package/build/lib/commands/types.d.ts.map +1 -0
  107. package/build/lib/commands/types.js +3 -0
  108. package/build/lib/commands/types.js.map +1 -0
  109. package/build/lib/constraints.d.ts +291 -0
  110. package/build/lib/constraints.d.ts.map +1 -0
  111. package/build/lib/constraints.js +300 -0
  112. package/build/lib/constraints.js.map +1 -0
  113. package/build/lib/driver.d.ts +68 -37
  114. package/build/lib/driver.d.ts.map +1 -1
  115. package/build/lib/driver.js +123 -80
  116. package/build/lib/driver.js.map +1 -1
  117. package/build/lib/helpers/android.d.ts +164 -0
  118. package/build/lib/helpers/android.d.ts.map +1 -0
  119. package/build/lib/helpers/android.js +819 -0
  120. package/build/lib/helpers/android.js.map +1 -0
  121. package/build/lib/helpers/index.d.ts +7 -0
  122. package/build/lib/helpers/index.d.ts.map +1 -0
  123. package/build/lib/helpers/index.js +29 -0
  124. package/build/lib/helpers/index.js.map +1 -0
  125. package/build/lib/helpers/types.d.ts +121 -0
  126. package/build/lib/helpers/types.d.ts.map +1 -0
  127. package/build/lib/helpers/types.js +3 -0
  128. package/build/lib/helpers/types.js.map +1 -0
  129. package/build/lib/helpers/unlock.d.ts +32 -0
  130. package/build/lib/helpers/unlock.d.ts.map +1 -0
  131. package/build/lib/helpers/unlock.js +273 -0
  132. package/build/lib/helpers/unlock.js.map +1 -0
  133. package/build/lib/helpers/webview.d.ts +74 -0
  134. package/build/lib/helpers/webview.d.ts.map +1 -0
  135. package/build/lib/helpers/webview.js +421 -0
  136. package/build/lib/helpers/webview.js.map +1 -0
  137. package/build/lib/index.d.ts +9 -0
  138. package/build/lib/index.d.ts.map +1 -0
  139. package/build/lib/index.js +37 -0
  140. package/build/lib/index.js.map +1 -0
  141. package/build/lib/method-map.d.ts +0 -8
  142. package/build/lib/method-map.d.ts.map +1 -1
  143. package/build/lib/method-map.js +63 -74
  144. package/build/lib/method-map.js.map +1 -1
  145. package/build/lib/stubs.d.ts +0 -1
  146. package/build/lib/stubs.d.ts.map +1 -1
  147. package/build/lib/stubs.js +1 -0
  148. package/build/lib/stubs.js.map +1 -1
  149. package/build/lib/utils.d.ts +1 -1
  150. package/build/lib/utils.d.ts.map +1 -1
  151. package/lib/commands/actions.js +351 -464
  152. package/lib/commands/alert.js +27 -17
  153. package/lib/commands/app-management.js +156 -314
  154. package/lib/commands/context.js +457 -441
  155. package/lib/commands/element.js +201 -157
  156. package/lib/commands/emu-console.js +25 -45
  157. package/lib/commands/execute.js +106 -90
  158. package/lib/commands/file-actions.js +222 -240
  159. package/lib/commands/find.ts +103 -0
  160. package/lib/commands/general.js +327 -339
  161. package/lib/commands/ime.js +50 -34
  162. package/lib/commands/{index.js → index.ts} +20 -24
  163. package/lib/commands/intent.js +108 -249
  164. package/lib/commands/keyboard.js +20 -8
  165. package/lib/commands/log.js +172 -116
  166. package/lib/commands/media-projection.js +134 -161
  167. package/lib/commands/mixins.ts +966 -0
  168. package/lib/commands/network.js +252 -281
  169. package/lib/commands/performance.js +203 -132
  170. package/lib/commands/permissions.js +108 -109
  171. package/lib/commands/recordscreen.js +212 -209
  172. package/lib/commands/shell.js +51 -40
  173. package/lib/commands/streamscreen.js +355 -289
  174. package/lib/commands/system-bars.js +92 -83
  175. package/lib/commands/touch.js +357 -294
  176. package/lib/commands/types.ts +1097 -0
  177. package/lib/{desired-caps.js → constraints.ts} +106 -103
  178. package/lib/{driver.js → driver.ts} +278 -132
  179. package/lib/helpers/android.ts +1143 -0
  180. package/lib/helpers/index.ts +6 -0
  181. package/lib/helpers/types.ts +134 -0
  182. package/lib/helpers/unlock.ts +329 -0
  183. package/lib/helpers/webview.ts +582 -0
  184. package/lib/index.ts +18 -0
  185. package/lib/method-map.js +87 -98
  186. package/lib/stubs.ts +0 -1
  187. package/package.json +26 -19
  188. package/index.js +0 -24
  189. package/lib/android-helpers.js +0 -983
  190. package/lib/commands/coverage.js +0 -18
  191. package/lib/commands/find.js +0 -82
  192. package/lib/unlock-helpers.js +0 -278
  193. package/lib/webview-helpers.js +0 -602
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.14.7](https://github.com/appium/appium-android-driver/compare/v5.14.6...v5.14.7) (2023-08-28)
2
+
3
+
4
+ ### Miscellaneous Chores
5
+
6
+ * **deps-dev:** bump conventional-changelog-conventionalcommits ([#843](https://github.com/appium/appium-android-driver/issues/843)) ([d1b5079](https://github.com/appium/appium-android-driver/commit/d1b50798fb6fc3f7f28c38ea5ce112d20d8a1b7a))
7
+
1
8
  ## [5.14.6](https://github.com/appium/appium-android-driver/compare/v5.14.5...v5.14.6) (2023-08-25)
2
9
 
3
10
 
@@ -0,0 +1,282 @@
1
+ #!/usr/bin/env node
2
+ export default AndroidDriver;
3
+ export const AndroidDriver: typeof driver.AndroidDriver;
4
+ export const androidHelpers: typeof androidHelperIndex.helpers;
5
+ export const androidCommands: {};
6
+ export const commonCapConstraints: {
7
+ platformName: {
8
+ isString: boolean;
9
+ inclusionCaseInsensitive: string[];
10
+ presence: boolean;
11
+ };
12
+ app: {
13
+ isString: boolean;
14
+ };
15
+ appActivity: {
16
+ isString: boolean;
17
+ };
18
+ appPackage: {
19
+ isString: boolean;
20
+ };
21
+ appWaitActivity: {
22
+ isString: boolean;
23
+ };
24
+ appWaitPackage: {
25
+ isString: boolean;
26
+ };
27
+ appWaitDuration: {
28
+ isNumber: boolean;
29
+ };
30
+ deviceReadyTimeout: {
31
+ isNumber: boolean;
32
+ };
33
+ androidCoverage: {
34
+ isString: boolean;
35
+ };
36
+ androidDeviceReadyTimeout: {
37
+ isNumber: boolean;
38
+ };
39
+ androidDeviceSocket: {
40
+ isString: boolean;
41
+ };
42
+ androidInstallTimeout: {
43
+ isNumber: boolean;
44
+ };
45
+ adbPort: {
46
+ isNumber: boolean;
47
+ };
48
+ remoteAdbHost: {
49
+ isString: boolean;
50
+ };
51
+ adbExecTimeout: {
52
+ isNumber: boolean;
53
+ };
54
+ avd: {
55
+ isString: boolean;
56
+ };
57
+ avdLaunchTimeout: {
58
+ isNumber: boolean;
59
+ };
60
+ avdReadyTimeout: {
61
+ isNumber: boolean;
62
+ };
63
+ avdArgs: {};
64
+ avdEnv: {
65
+ isObject: boolean;
66
+ };
67
+ useKeystore: {
68
+ isBoolean: boolean;
69
+ };
70
+ keystorePath: {
71
+ isString: boolean;
72
+ };
73
+ keystorePassword: {
74
+ isString: boolean;
75
+ };
76
+ keyAlias: {
77
+ isString: boolean;
78
+ };
79
+ keyPassword: {
80
+ isString: boolean;
81
+ };
82
+ webviewDevtoolsPort: {
83
+ isNumber: boolean;
84
+ };
85
+ ensureWebviewsHavePages: {
86
+ isBoolean: boolean;
87
+ };
88
+ enableWebviewDetailsCollection: {
89
+ isBoolean: boolean;
90
+ };
91
+ chromeDriverPort: {
92
+ isNumber: boolean;
93
+ };
94
+ chromedriverPort: {
95
+ isNumber: boolean;
96
+ };
97
+ chromedriverPorts: {
98
+ isArray: boolean;
99
+ };
100
+ chromedriverArgs: {
101
+ isObject: boolean;
102
+ };
103
+ chromedriverExecutable: {
104
+ isString: boolean;
105
+ };
106
+ chromedriverExecutableDir: {
107
+ isString: boolean;
108
+ };
109
+ chromedriverChromeMappingFile: {
110
+ isString: boolean;
111
+ };
112
+ chromedriverUseSystemExecutable: {
113
+ isBoolean: boolean;
114
+ };
115
+ chromedriverDisableBuildCheck: {
116
+ isBoolean: boolean;
117
+ };
118
+ chromeLoggingPrefs: {
119
+ isObject: boolean;
120
+ };
121
+ autoWebviewTimeout: {
122
+ isNumber: boolean;
123
+ };
124
+ autoWebviewName: {
125
+ isString: boolean;
126
+ };
127
+ intentAction: {
128
+ isString: boolean;
129
+ };
130
+ intentCategory: {
131
+ isString: boolean;
132
+ };
133
+ intentFlags: {
134
+ isString: boolean;
135
+ };
136
+ optionalIntentArguments: {
137
+ isString: boolean;
138
+ };
139
+ dontStopAppOnReset: {
140
+ isBoolean: boolean;
141
+ };
142
+ unicodeKeyboard: {
143
+ isBoolean: boolean;
144
+ };
145
+ resetKeyboard: {
146
+ isBoolean: boolean;
147
+ };
148
+ noSign: {
149
+ isBoolean: boolean;
150
+ };
151
+ recreateChromeDriverSessions: {
152
+ isBoolean: boolean;
153
+ };
154
+ autoLaunch: {
155
+ isBoolean: boolean;
156
+ };
157
+ nativeWebScreenshot: {
158
+ isBoolean: boolean;
159
+ };
160
+ androidScreenshotPath: {
161
+ isString: boolean;
162
+ };
163
+ androidInstallPath: {
164
+ isString: boolean;
165
+ };
166
+ clearSystemFiles: {
167
+ isBoolean: boolean;
168
+ };
169
+ extractChromeAndroidPackageFromContextName: {
170
+ isBoolean: boolean;
171
+ };
172
+ autoGrantPermissions: {
173
+ isBoolean: boolean;
174
+ };
175
+ sharedPreferences: {
176
+ isObject: boolean;
177
+ };
178
+ networkSpeed: {
179
+ isString: boolean;
180
+ };
181
+ gpsEnabled: {
182
+ isBoolean: boolean;
183
+ };
184
+ isHeadless: {
185
+ isBoolean: boolean;
186
+ };
187
+ showChromedriverLog: {
188
+ isBoolean: boolean;
189
+ };
190
+ skipUnlock: {
191
+ isBoolean: boolean;
192
+ };
193
+ clearDeviceLogsOnStart: {
194
+ isBoolean: boolean;
195
+ };
196
+ unlockType: {
197
+ isString: boolean;
198
+ };
199
+ unlockKey: {
200
+ isString: boolean;
201
+ };
202
+ unlockStrategy: {
203
+ isString: boolean;
204
+ inclusionCaseInsensitive: string[];
205
+ };
206
+ otherApps: {
207
+ isString: boolean;
208
+ };
209
+ uninstallOtherPackages: {
210
+ isString: boolean;
211
+ };
212
+ allowTestPackages: {
213
+ isBoolean: boolean;
214
+ };
215
+ pageLoadStrategy: {
216
+ isString: boolean;
217
+ };
218
+ localeScript: {
219
+ isString: boolean;
220
+ };
221
+ skipDeviceInitialization: {
222
+ isBoolean: boolean;
223
+ };
224
+ remoteAppsCacheLimit: {
225
+ isNumber: boolean;
226
+ };
227
+ buildToolsVersion: {
228
+ isString: boolean;
229
+ };
230
+ skipLogcatCapture: {
231
+ isBoolean: boolean;
232
+ };
233
+ chromeOptions: {
234
+ isObject: boolean;
235
+ };
236
+ enablePerformanceLogging: {
237
+ isBoolean: boolean;
238
+ };
239
+ userProfile: {
240
+ isNumber: boolean;
241
+ };
242
+ browserName: {
243
+ isString: boolean;
244
+ };
245
+ enforceAppInstall: {
246
+ isBoolean: boolean;
247
+ };
248
+ suppressKillServer: {
249
+ isBoolean: boolean;
250
+ };
251
+ allowOfflineDevices: {
252
+ isBoolean: boolean;
253
+ };
254
+ ignoreHiddenApiPolicyError: {
255
+ isBoolean: boolean;
256
+ };
257
+ unlockSuccessTimeout: {
258
+ isNumber: boolean;
259
+ };
260
+ mockLocationApp: {
261
+ isString: boolean;
262
+ };
263
+ logcatFormat: {
264
+ isString: boolean;
265
+ };
266
+ logcatFilterSpecs: {
267
+ isArray: boolean;
268
+ };
269
+ allowDelayAdb: {
270
+ isBoolean: boolean;
271
+ };
272
+ };
273
+ export const webviewHelpers: typeof webview.helpers;
274
+ export const NATIVE_WIN: "NATIVE_APP";
275
+ export const WEBVIEW_WIN: "WEBVIEW";
276
+ export const WEBVIEW_BASE: "WEBVIEW_";
277
+ export const CHROMIUM_WIN: "CHROMIUM";
278
+ export const SETTINGS_HELPER_PKG_ID: "io.appium.settings";
279
+ import * as driver from './lib/driver';
280
+ import * as androidHelperIndex from './lib/android-helpers';
281
+ import * as webview from './lib/webview-helpers';
282
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAIwB,cAAc;oCACF,uBAAuB;yBAElC,uBAAuB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAA2C;AAC3C,IAAA,4BAAO,GAAE,CAAC;AAEV,qDAAuC;AACvC,0EAA4D;AAC5D,mEAAqD;AACrD,+DAAiD;AACjD,yDAA2C;AAE3C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;AAUE,sCAAa;AAThD,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAC9D,YAAY,EAAE,GAAG,OAAO,CAAC;AAST,wCAAc;AAAE,gCAAU;AAAE,kCAAW;AAC7D,oCAAY;AAAE,oCAAY;AAT5B,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;AAQpC,oDAAoB;AAPtB,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;AAMjC,0CAAe;AALjC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAAC;AAK7E,wCAAc;AAEc,wDAAsB;AAJpD,kBAAe,aAAa,CAAC"}
@@ -1,227 +1,9 @@
1
- export default extensions;
2
- export type LockOptions = {
3
- /**
4
- * The number to keep the locked.
5
- * 0 or empty value will keep the device locked.
6
- */
7
- seconds: number | null;
8
- };
9
- export type FingerprintOpts = any;
10
- export type SendSmsOptions = {
11
- /**
12
- * The phone number to send SMS to
13
- */
14
- phoneNumber: string;
15
- /**
16
- * The message payload
17
- */
18
- message: string;
19
- };
20
- export type GsmCallOptions = {
21
- /**
22
- * The phone number to call to
23
- */
24
- phoneNumber: string;
25
- /**
26
- * One of possible actions to take
27
- */
28
- action: call | accept | cancel | hold;
29
- };
30
- export type GsmSignalOptions = {
31
- /**
32
- * One of possible signal strength values, where 4 is the best signal.
33
- */
34
- strength: 0 | 1 | 2 | 3 | 4;
35
- };
36
- export type GsmVoiceOptions = {
37
- state: on | off;
38
- };
39
- export type PowerAcOptions = {
40
- state: on | off;
41
- };
42
- export type PowerCapacityOptions = {
43
- /**
44
- * - Percentage value in range [0, 100]
45
- */
46
- percent: number;
47
- };
48
- export type NetworkSpeedOptions = {
49
- speed: gsm | scsd | gprs | edge | umts | hsdpa | lte | evdo | full;
50
- };
1
+ export default ActionsMixin;
2
+ export type AndroidBootstrap = import('../bootstrap').AndroidBootstrap;
3
+ export type ADB = import('appium-adb').ADB;
51
4
  /**
52
- * Emulate sensors values on the connected emulator.
5
+ * @type {import('./mixins').ActionsMixin & ThisType<import('../driver').AndroidDriver>}
6
+ * @satisfies {import('@appium/types').ExternalDriver}
53
7
  */
54
- export type Sensor = {
55
- /**
56
- * - sensor type declared in adb.SENSORS
57
- */
58
- sensorType: string;
59
- /**
60
- * - value to set to the sensor
61
- */
62
- value: string;
63
- };
64
- export namespace commands {
65
- function keyevent(keycode: any, metastate?: null): Promise<any>;
66
- function pressKeyCode(keycode: any, metastate?: null): Promise<any>;
67
- function longPressKeyCode(keycode: any, metastate?: null): Promise<any>;
68
- function getOrientation(): Promise<any>;
69
- function setOrientation(orientation: any): Promise<any>;
70
- function fakeFlick(xSpeed: any, ySpeed: any): Promise<any>;
71
- function fakeFlickElement(elementId: any, xoffset: any, yoffset: any, speed: any): Promise<any>;
72
- function swipe(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elId: any): Promise<any>;
73
- function doSwipe(swipeOpts: any): Promise<any>;
74
- function pinchClose(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
75
- function pinchOpen(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
76
- function flick(element: any, xSpeed: any, ySpeed: any, xOffset: any, yOffset: any, speed: any): Promise<void>;
77
- function drag(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elementId: any, destElId: any): Promise<any>;
78
- function doDrag(dragOpts: any): Promise<any>;
79
- /**
80
- * @typedef {Object} LockOptions
81
- * @property {number?} seconds The number to keep the locked.
82
- * 0 or empty value will keep the device locked.
83
- */
84
- /**
85
- * Lock the device (and optionally unlock it after a certain amount of time).
86
-
87
- * @param {LockOptions} opts
88
- * @throws {Error} if lock or unlock operation fails
89
- */
90
- function mobileLock(opts?: LockOptions): Promise<void>;
91
- function lock(seconds: any): Promise<void>;
92
- function isLocked(): Promise<any>;
93
- function unlock(): Promise<void>;
94
- function openNotifications(): Promise<any>;
95
- function setLocation(latitude: any, longitude: any): Promise<any>;
96
- function fingerprint(fingerprintId: any): Promise<void>;
97
- /**
98
- * @typedef {Object} FingerprintOpts
99
- * @param {string|number} fingerprintId The value is the finger_id for the finger that
100
- * was "scanned". It is a unique integer that you assign for each virtual fingerprint.
101
- * When the app is running you can run this same command each time the
102
- * emulator prompts you for a fingerprint, you can run the adb command and pass it
103
- * the finger_id to simulate the fingerprint scan.
104
- */
105
- /**
106
- * Emulate fingerprint on Android Emulator.
107
- * Only works on API 23+
108
- *
109
- * @param {FingerprintOpts} opts
110
- */
111
- function mobileFingerprint(opts?: any): Promise<void>;
112
- function sendSMS(phoneNumber: any, message: any): Promise<void>;
113
- /**
114
- * @typedef {Object} SendSmsOptions
115
- * @property {string} phoneNumber The phone number to send SMS to
116
- * @property {string} message The message payload
117
- */
118
- /**
119
- * Emulate sending an SMS to the given phone number.
120
- * Only works on emulators.
121
- *
122
- * @param {SendSmsOptions} opts
123
- */
124
- function mobileSendSms(opts?: SendSmsOptions): Promise<void>;
125
- function gsmCall(phoneNumber: any, action: any): Promise<void>;
126
- /**
127
- * @typedef {Object} GsmCallOptions
128
- * @property {string} phoneNumber The phone number to call to
129
- * @property {call|accept|cancel|hold} action One of possible actions to take
130
- */
131
- /**
132
- * Emulate a GSM call to the given phone number.
133
- * Only works on emulators.
134
- *
135
- * @param {GsmCallOptions} opts
136
- */
137
- function mobileGsmCall(opts?: GsmCallOptions): Promise<void>;
138
- function gsmSignal(signalStrengh: any): Promise<void>;
139
- /**
140
- * @typedef {Object} GsmSignalOptions
141
- * @property {0|1|2|3|4} strength One of possible signal strength values, where 4 is the best signal.
142
- */
143
- /**
144
- * Emulate GSM signal strength change event.
145
- * Only works on emulators.
146
- *
147
- * @param {GsmSignalOptions} opts
148
- */
149
- function mobileGsmSignal(opts?: GsmSignalOptions): Promise<void>;
150
- function gsmVoice(state: any): Promise<void>;
151
- /**
152
- * @typedef {Object} GsmVoiceOptions
153
- * @property {on|off} state
154
- */
155
- /**
156
- * Emulate GSM voice state change event.
157
- * Only works on emulators.
158
- *
159
- * @param {GsmVoiceOptions} opts
160
- */
161
- function mobileGsmVoice(opts?: GsmVoiceOptions): Promise<void>;
162
- function powerAC(state: any): Promise<void>;
163
- /**
164
- * @typedef {Object} PowerAcOptions
165
- * @property {on|off} state
166
- */
167
- /**
168
- * Emulate AC power state change.
169
- * Only works on emulators.
170
- *
171
- * @param {GsmVoiceOptions} opts
172
- */
173
- function mobilePowerAc(opts?: GsmVoiceOptions): Promise<void>;
174
- function powerCapacity(batteryPercent: any): Promise<void>;
175
- /**
176
- * @typedef {Object} PowerCapacityOptions
177
- * @property {number} percent - Percentage value in range [0, 100]
178
- */
179
- /**
180
- * Emulate power capacity change.
181
- * Only works on emulators.
182
- *
183
- * @param {PowerCapacityOptions} opts
184
- */
185
- function mobilePowerCapacity(opts?: PowerCapacityOptions): Promise<void>;
186
- function networkSpeed(networkSpeed: any): Promise<void>;
187
- /**
188
- * @typedef {Object} NetworkSpeedOptions
189
- * @property {gsm|scsd|gprs|edge|umts|hsdpa|lte|evdo|full} speed
190
- */
191
- /**
192
- * Emulate different network connection speed modes.
193
- * Only works on emulators.
194
- *
195
- * @param {NetworkSpeedOptions} opts
196
- */
197
- function mobileNetworkSpeed(opts?: NetworkSpeedOptions): Promise<void>;
198
- /**
199
- * Emulate sensors values on the connected emulator.
200
- *
201
- * @typedef {Object} Sensor
202
- * @property {string} sensorType - sensor type declared in adb.SENSORS
203
- * @property {string} value - value to set to the sensor
204
- *
205
- * @param {Object} Sensor
206
- * @throws {Error} - If sensorType is not defined
207
- * @throws {Error} - If value for the se sor is not defined
208
- * @throws {Error} - If deviceType is not an emulator
209
- */
210
- function sensorSet(sensor?: {}): Promise<void>;
211
- function getScreenshot(): Promise<any>;
212
- }
213
- export namespace helpers {
214
- /**
215
- * @param {ADB} adb
216
- * @param {Object} opts
217
- * @returns {Promise<Buffer>}
218
- */
219
- function getScreenshotDataWithAdbShell(adb: ADB, opts: any): Promise<Buffer>;
220
- /**
221
- * @param {ADB} adb
222
- * @returns {Promise<Buffer>}
223
- */
224
- function getScreenshotDataWithAdbExecOut(adb: ADB): Promise<Buffer>;
225
- }
226
- declare const extensions: {};
8
+ declare const ActionsMixin: import('./mixins').ActionsMixin & ThisType<import('../driver').AndroidDriver>;
227
9
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;;;;;aAuJc,MAAM;;;;;;;iBAkFN,MAAM;;;;aACN,MAAM;;;;;;iBAuBN,MAAM;;;;YACN,6BAAuB;;;;;;cAuBvB,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC;;;WAuBT,QAAM;;;WAuBN,QAAM;;;;;;aAuBN,MAAM;;;WAuBN,2DAA2C;;;;;;;;;gBAkB3C,MAAM;;;;WACN,MAAM;;;IA1XpB,gEAIC;IAED,oEAEC;IAED,wEAEC;IAED,wCAMC;IAED,wDAOC;IAED,2DAEC;IAED,gGAGC;IAED,wHAcC;IAED,+CAMC;IAED,sIAiBC;IAED,qIAYC;IAED,8GAMC;IAED,2IAoBC;IAED,6CAMC;IAED;;;;OAIG;IAEH;;;;;OAKG;IAEH,uDAGC;IAED,2CAYC;IAED,kCAEC;IAED,iCAEC;IAED,2CAEC;IAED,kEAEC;IAED,wDAKC;IAED;;;;;;;OAOG;IAEH;;;;;OAKG;IACH,sDAGC;IAED,gEAKC;IAED;;;;OAIG;IAEH;;;;;OAKG;IACH,6DAGC;IAED,+DAKC;IAED;;;;OAIG;IAEH;;;;;OAKG;IACH,6DAGC;IAED,sDAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,iEAGC;IAED,6CAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,+DAGC;IAED,4CAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,8DAGC;IAED,2DAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,yEAGC;IAED,wDAKC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,uEAGC;IAED;;;;;;;;;;;OAWG;IACH,+CAYC;IAkDD,uCAuCC;;;IAvFD;;;;OAIG;IACH,6EAmBC;IAED;;;OAGG;IACH,oEAgBC;;AA/bD,6BAAsB"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";+BAqYa,OAAO,cAAc,EAAE,gBAAgB;kBACvC,OAAO,YAAY,EAAE,GAAG;AAzXrC;;;GAGG;AACH,4BAHU,OAAO,UAAU,EAAE,YAAY,GAAG,SAAS,OAAO,WAAW,EAAE,aAAa,CAAC,CAgXrF"}