appium-android-driver 5.13.4 → 5.14.0-alpha.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 (210) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bootstrap/README.md +19 -0
  3. package/build/index.js +20 -34
  4. package/build/lib/bootstrap.d.ts +5 -5
  5. package/build/lib/bootstrap.d.ts.map +1 -1
  6. package/build/lib/commands/actions.d.ts +6 -206
  7. package/build/lib/commands/actions.d.ts.map +1 -1
  8. package/build/lib/commands/actions.js +302 -384
  9. package/build/lib/commands/actions.js.map +1 -1
  10. package/build/lib/commands/alert.d.ts +7 -9
  11. package/build/lib/commands/alert.d.ts.map +1 -1
  12. package/build/lib/commands/alert.js +24 -18
  13. package/build/lib/commands/alert.js.map +1 -1
  14. package/build/lib/commands/app-management.d.ts +7 -313
  15. package/build/lib/commands/app-management.d.ts.map +1 -1
  16. package/build/lib/commands/app-management.js +135 -293
  17. package/build/lib/commands/app-management.js.map +1 -1
  18. package/build/lib/commands/context.d.ts +9 -93
  19. package/build/lib/commands/context.d.ts.map +1 -1
  20. package/build/lib/commands/context.js +381 -439
  21. package/build/lib/commands/context.js.map +1 -1
  22. package/build/lib/commands/element.d.ts +8 -35
  23. package/build/lib/commands/element.d.ts.map +1 -1
  24. package/build/lib/commands/element.js +153 -136
  25. package/build/lib/commands/element.js.map +1 -1
  26. package/build/lib/commands/emu-console.d.ts +6 -48
  27. package/build/lib/commands/emu-console.d.ts.map +1 -1
  28. package/build/lib/commands/emu-console.js +19 -34
  29. package/build/lib/commands/emu-console.js.map +1 -1
  30. package/build/lib/commands/execute.d.ts +6 -5
  31. package/build/lib/commands/execute.d.ts.map +1 -1
  32. package/build/lib/commands/execute.js +76 -65
  33. package/build/lib/commands/execute.js.map +1 -1
  34. package/build/lib/commands/file-actions.d.ts +7 -128
  35. package/build/lib/commands/file-actions.d.ts.map +1 -1
  36. package/build/lib/commands/file-actions.js +183 -219
  37. package/build/lib/commands/file-actions.js.map +1 -1
  38. package/build/lib/commands/find.d.ts +5 -12
  39. package/build/lib/commands/find.d.ts.map +1 -1
  40. package/build/lib/commands/find.js +18 -23
  41. package/build/lib/commands/find.js.map +1 -1
  42. package/build/lib/commands/general.d.ts +9 -132
  43. package/build/lib/commands/general.d.ts.map +1 -1
  44. package/build/lib/commands/general.js +281 -312
  45. package/build/lib/commands/general.js.map +1 -1
  46. package/build/lib/commands/ime.d.ts +7 -10
  47. package/build/lib/commands/ime.d.ts.map +1 -1
  48. package/build/lib/commands/ime.js +47 -35
  49. package/build/lib/commands/ime.js.map +1 -1
  50. package/build/lib/commands/index.d.ts +47 -2
  51. package/build/lib/commands/index.d.ts.map +1 -1
  52. package/build/lib/commands/index.js +41 -19
  53. package/build/lib/commands/index.js.map +1 -1
  54. package/build/lib/commands/intent.d.ts +7 -417
  55. package/build/lib/commands/intent.d.ts.map +1 -1
  56. package/build/lib/commands/intent.js +104 -216
  57. package/build/lib/commands/intent.js.map +1 -1
  58. package/build/lib/commands/keyboard.d.ts +6 -5
  59. package/build/lib/commands/keyboard.d.ts.map +1 -1
  60. package/build/lib/commands/keyboard.js +16 -8
  61. package/build/lib/commands/keyboard.js.map +1 -1
  62. package/build/lib/commands/log.d.ts +7 -44
  63. package/build/lib/commands/log.d.ts.map +1 -1
  64. package/build/lib/commands/log.js +146 -108
  65. package/build/lib/commands/log.js.map +1 -1
  66. package/build/lib/commands/media-projection.d.ts +7 -143
  67. package/build/lib/commands/media-projection.d.ts.map +1 -1
  68. package/build/lib/commands/media-projection.js +113 -140
  69. package/build/lib/commands/media-projection.js.map +1 -1
  70. package/build/lib/commands/mixin.d.ts +3 -0
  71. package/build/lib/commands/mixin.d.ts.map +1 -0
  72. package/build/lib/commands/mixin.js +6 -0
  73. package/build/lib/commands/mixin.js.map +1 -0
  74. package/build/lib/commands/mixins.d.ts +735 -0
  75. package/build/lib/commands/mixins.d.ts.map +1 -0
  76. package/build/lib/commands/mixins.js +19 -0
  77. package/build/lib/commands/mixins.js.map +1 -0
  78. package/build/lib/commands/network.d.ts +7 -138
  79. package/build/lib/commands/network.d.ts.map +1 -1
  80. package/build/lib/commands/network.js +212 -254
  81. package/build/lib/commands/network.js.map +1 -1
  82. package/build/lib/commands/performance.d.ts +24 -70
  83. package/build/lib/commands/performance.d.ts.map +1 -1
  84. package/build/lib/commands/performance.js +144 -100
  85. package/build/lib/commands/performance.js.map +1 -1
  86. package/build/lib/commands/permissions.d.ts +8 -92
  87. package/build/lib/commands/permissions.d.ts.map +1 -1
  88. package/build/lib/commands/permissions.js +75 -87
  89. package/build/lib/commands/permissions.js.map +1 -1
  90. package/build/lib/commands/recordscreen.d.ts +7 -193
  91. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  92. package/build/lib/commands/recordscreen.js +151 -182
  93. package/build/lib/commands/recordscreen.js.map +1 -1
  94. package/build/lib/commands/shell.d.ts +7 -7
  95. package/build/lib/commands/shell.d.ts.map +1 -1
  96. package/build/lib/commands/shell.js +40 -33
  97. package/build/lib/commands/shell.js.map +1 -1
  98. package/build/lib/commands/streamscreen.d.ts +9 -103
  99. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  100. package/build/lib/commands/streamscreen.js +261 -218
  101. package/build/lib/commands/streamscreen.js.map +1 -1
  102. package/build/lib/commands/system-bars.d.ts +22 -90
  103. package/build/lib/commands/system-bars.d.ts.map +1 -1
  104. package/build/lib/commands/system-bars.js +76 -74
  105. package/build/lib/commands/system-bars.js.map +1 -1
  106. package/build/lib/commands/touch.d.ts +10 -29
  107. package/build/lib/commands/touch.d.ts.map +1 -1
  108. package/build/lib/commands/touch.js +301 -285
  109. package/build/lib/commands/touch.js.map +1 -1
  110. package/build/lib/commands/types.d.ts +971 -0
  111. package/build/lib/commands/types.d.ts.map +1 -0
  112. package/build/lib/commands/types.js +3 -0
  113. package/build/lib/commands/types.js.map +1 -0
  114. package/build/lib/{desired-caps.d.ts → constraints.d.ts} +163 -130
  115. package/build/lib/constraints.d.ts.map +1 -0
  116. package/build/lib/{desired-caps.js → constraints.js} +110 -102
  117. package/build/lib/constraints.js.map +1 -0
  118. package/build/lib/driver.d.ts +418 -26
  119. package/build/lib/driver.d.ts.map +1 -1
  120. package/build/lib/driver.js +169 -66
  121. package/build/lib/driver.js.map +1 -1
  122. package/build/lib/helpers/android.d.ts +164 -0
  123. package/build/lib/helpers/android.d.ts.map +1 -0
  124. package/build/lib/helpers/android.js +819 -0
  125. package/build/lib/helpers/android.js.map +1 -0
  126. package/build/lib/helpers/index.d.ts +7 -0
  127. package/build/lib/helpers/index.d.ts.map +1 -0
  128. package/build/lib/helpers/index.js +29 -0
  129. package/build/lib/helpers/index.js.map +1 -0
  130. package/build/lib/helpers/types.d.ts +121 -0
  131. package/build/lib/helpers/types.d.ts.map +1 -0
  132. package/build/lib/helpers/types.js +3 -0
  133. package/build/lib/helpers/types.js.map +1 -0
  134. package/build/lib/helpers/unlock.d.ts +31 -0
  135. package/build/lib/helpers/unlock.d.ts.map +1 -0
  136. package/build/lib/helpers/unlock.js +273 -0
  137. package/build/lib/helpers/unlock.js.map +1 -0
  138. package/build/lib/helpers/webview.d.ts +73 -0
  139. package/build/lib/helpers/webview.d.ts.map +1 -0
  140. package/build/lib/helpers/webview.js +420 -0
  141. package/build/lib/helpers/webview.js.map +1 -0
  142. package/build/lib/logger.d.ts +1 -1
  143. package/build/lib/logger.d.ts.map +1 -1
  144. package/build/lib/stubs.d.ts +0 -1
  145. package/build/lib/stubs.d.ts.map +1 -1
  146. package/build/lib/stubs.js +1 -0
  147. package/build/lib/stubs.js.map +1 -1
  148. package/build/lib/uiautomator.d.ts +7 -7
  149. package/build/lib/uiautomator.d.ts.map +1 -1
  150. package/build/lib/utils.d.ts +1 -1
  151. package/build/lib/utils.d.ts.map +1 -1
  152. package/lib/commands/actions.js +349 -414
  153. package/lib/commands/alert.js +27 -17
  154. package/lib/commands/app-management.js +156 -314
  155. package/lib/commands/context.js +457 -441
  156. package/lib/commands/element.js +201 -157
  157. package/lib/commands/emu-console.js +25 -45
  158. package/lib/commands/execute.js +103 -87
  159. package/lib/commands/file-actions.js +222 -240
  160. package/lib/commands/find.ts +101 -0
  161. package/lib/commands/general.js +327 -339
  162. package/lib/commands/ime.js +50 -34
  163. package/lib/commands/index.js +18 -24
  164. package/lib/commands/intent.js +108 -249
  165. package/lib/commands/keyboard.js +20 -8
  166. package/lib/commands/log.js +170 -116
  167. package/lib/commands/media-projection.js +134 -161
  168. package/lib/commands/mixins.ts +962 -0
  169. package/lib/commands/network.js +252 -281
  170. package/lib/commands/performance.js +203 -132
  171. package/lib/commands/permissions.js +108 -109
  172. package/lib/commands/recordscreen.js +212 -209
  173. package/lib/commands/shell.js +51 -40
  174. package/lib/commands/streamscreen.js +355 -289
  175. package/lib/commands/system-bars.js +92 -83
  176. package/lib/commands/touch.js +357 -294
  177. package/lib/commands/types.ts +1089 -0
  178. package/lib/{desired-caps.js → constraints.js} +109 -103
  179. package/lib/driver.js +287 -101
  180. package/lib/helpers/android.ts +1126 -0
  181. package/lib/helpers/index.ts +6 -0
  182. package/lib/helpers/types.ts +134 -0
  183. package/lib/helpers/unlock.ts +328 -0
  184. package/lib/helpers/webview.ts +581 -0
  185. package/lib/stubs.ts +0 -1
  186. package/package.json +21 -15
  187. package/build/lib/android-helpers.d.ts +0 -136
  188. package/build/lib/android-helpers.d.ts.map +0 -1
  189. package/build/lib/android-helpers.js +0 -855
  190. package/build/lib/android-helpers.js.map +0 -1
  191. package/build/lib/commands/coverage.d.ts +0 -5
  192. package/build/lib/commands/coverage.d.ts.map +0 -1
  193. package/build/lib/commands/coverage.js +0 -19
  194. package/build/lib/commands/coverage.js.map +0 -1
  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 -223
  202. package/build/lib/webview-helpers.d.ts.map +0 -1
  203. package/build/lib/webview-helpers.js +0 -530
  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 -565
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.13.5](https://github.com/appium/appium-android-driver/compare/v5.13.4...v5.13.5) (2023-06-16)
2
+
3
+
4
+ ### Miscellaneous Chores
5
+
6
+ * Make sharp to an optional dependency ([#824](https://github.com/appium/appium-android-driver/issues/824)) ([598388b](https://github.com/appium/appium-android-driver/commit/598388be58ab4e5ece4f3606ce78cabddc1574bb))
7
+
1
8
  ## [5.13.4](https://github.com/appium/appium-android-driver/compare/v5.13.3...v5.13.4) (2023-06-15)
2
9
 
3
10
 
@@ -0,0 +1,19 @@
1
+ Bootstrap Android
2
+ ===
3
+
4
+ To install the Android Maven dependencies in your local environment, run the following:
5
+
6
+ * Clone https://github.com/mosabua/maven-android-sdk-deployer into your workstation
7
+ * Set the ANDROID_HOME environment to the location of the Android SDK, eg. `export ANDROID_HOME=/Developer/adt-bundle-mac-x86_64-20130219/sdk/`
8
+ * Run `mvn install -P 4.4` from the `maven-android-sdk-deployer` directory. The build will fail if API 19 and some extra packages are not installed.
9
+ * Please install all sdk and api versions of android for building `maven-android-sdk-deployer`.
10
+
11
+ You can then compile the bootstrap project by running
12
+
13
+ mvn package -P 4.4
14
+
15
+ If mvn package fails, try deleting your ANDROID_HOME folder and downloading everything again. If it still doesn't work try:
16
+
17
+ android-sdk/tools/android update sdk --no-ui --obsolete --force
18
+
19
+ and then run `mvn clean ; mvn install`
package/build/index.js CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
3
  if (k2 === undefined) k2 = k;
@@ -11,41 +10,28 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
11
10
  if (k2 === undefined) k2 = k;
12
11
  o[k2] = m[k];
13
12
  }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
25
18
  };
26
19
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.SETTINGS_HELPER_PKG_ID = exports.CHROMIUM_WIN = exports.WEBVIEW_BASE = exports.WEBVIEW_WIN = exports.NATIVE_WIN = exports.webviewHelpers = exports.commonCapConstraints = exports.AndroidDriver = exports.androidCommands = exports.androidHelpers = void 0;
20
+ exports.webviewHelpers = exports.WEBVIEW_WIN = exports.WEBVIEW_BASE = exports.NATIVE_WIN = exports.CHROMIUM_WIN = exports.androidHelpers = exports.SETTINGS_HELPER_PKG_ID = exports.commonCapConstraints = void 0;
28
21
  const source_map_support_1 = require("source-map-support");
29
22
  (0, source_map_support_1.install)();
30
- const driver = __importStar(require("./lib/driver"));
31
- const androidHelperIndex = __importStar(require("./lib/android-helpers"));
32
- const commandIndex = __importStar(require("./lib/commands/index"));
33
- const webview = __importStar(require("./lib/webview-helpers"));
34
- const caps = __importStar(require("./lib/desired-caps"));
35
- const { AndroidDriver } = driver;
36
- exports.AndroidDriver = AndroidDriver;
37
- const { helpers: webviewHelpers, NATIVE_WIN, WEBVIEW_WIN, WEBVIEW_BASE, CHROMIUM_WIN } = webview;
38
- exports.webviewHelpers = webviewHelpers;
39
- exports.NATIVE_WIN = NATIVE_WIN;
40
- exports.WEBVIEW_WIN = WEBVIEW_WIN;
41
- exports.WEBVIEW_BASE = WEBVIEW_BASE;
42
- exports.CHROMIUM_WIN = CHROMIUM_WIN;
43
- const { commonCapConstraints } = caps;
44
- exports.commonCapConstraints = commonCapConstraints;
45
- const { commands: androidCommands } = commandIndex;
46
- exports.androidCommands = androidCommands;
47
- const { helpers: androidHelpers, SETTINGS_HELPER_PKG_ID } = androidHelperIndex;
48
- exports.androidHelpers = androidHelpers;
49
- exports.SETTINGS_HELPER_PKG_ID = SETTINGS_HELPER_PKG_ID;
50
- exports.default = AndroidDriver;
23
+ const driver_1 = require("./lib/driver");
24
+ var constraints_1 = require("./lib/constraints");
25
+ Object.defineProperty(exports, "commonCapConstraints", { enumerable: true, get: function () { return constraints_1.ANDROID_DRIVER_CONSTRAINTS; } });
26
+ __exportStar(require("./lib/driver"), exports);
27
+ var android_1 = require("./lib/helpers/android");
28
+ Object.defineProperty(exports, "SETTINGS_HELPER_PKG_ID", { enumerable: true, get: function () { return android_1.SETTINGS_HELPER_PKG_ID; } });
29
+ Object.defineProperty(exports, "androidHelpers", { enumerable: true, get: function () { return __importDefault(android_1).default; } });
30
+ var webview_1 = require("./lib/helpers/webview");
31
+ Object.defineProperty(exports, "CHROMIUM_WIN", { enumerable: true, get: function () { return webview_1.CHROMIUM_WIN; } });
32
+ Object.defineProperty(exports, "NATIVE_WIN", { enumerable: true, get: function () { return webview_1.NATIVE_WIN; } });
33
+ Object.defineProperty(exports, "WEBVIEW_BASE", { enumerable: true, get: function () { return webview_1.WEBVIEW_BASE; } });
34
+ Object.defineProperty(exports, "WEBVIEW_WIN", { enumerable: true, get: function () { return webview_1.WEBVIEW_WIN; } });
35
+ Object.defineProperty(exports, "webviewHelpers", { enumerable: true, get: function () { return __importDefault(webview_1).default; } });
36
+ exports.default = driver_1.AndroidDriver;
51
37
  //# sourceMappingURL=index.js.map
@@ -20,10 +20,10 @@ export class AndroidBootstrap {
20
20
  _ignoreUnexpectedShutdown: any;
21
21
  }
22
22
  export namespace COMMAND_TYPES {
23
- const ACTION: string;
24
- const SHUTDOWN: string;
23
+ let ACTION: string;
24
+ let SHUTDOWN: string;
25
25
  }
26
- import B from "bluebird";
27
- import net from "net";
28
- import UiAutomator from "./uiautomator";
26
+ import B from 'bluebird';
27
+ import net from 'net';
28
+ import UiAutomator from './uiautomator';
29
29
  //# sourceMappingURL=bootstrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../lib/bootstrap.js"],"names":[],"mappings":";;AAuCA;IACE,kEAKC;IAJC,SAAc;IACd,mBAA4B;IAC5B,eAA0B;IA4K5B,uCAGC;IAED,oCAEC;IA/KD,mCASC;IANG,iDAEE;IAMN,iGA4EC;IArEG,aAMC;IA6CG,qCAA6D;IAoBrE,iDA4CC;IAED,mDAGC;IAED,0BAaC;IADC,4CAAuB;IAIzB,sBAUC;IAIC,+BAAuC;CAM1C"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../lib/bootstrap.js"],"names":[],"mappings":";;AAuCA;IACE,kEAKC;IAJC,SAAc;IACd,mBAA4B;IAC5B,eAA0B;IA4K5B,uCAGC;IAED,oCAEC;IA/KD,mCASC;IANG,iDAEE;IAMN,iGA4EC;IArEG,aAMC;IA6CG,qCAA6D;IAoBrE,iDA4CC;IAED,mDAGC;IAED,0BAaC;IADC,4CAAuB;IAIzB,sBAUC;IAIC,+BAAuC;CAM1C;;;;;cA1Na,UAAU;gBAJR,KAAK;wBADG,eAAe"}
@@ -1,209 +1,9 @@
1
- export default extensions;
2
- export type FingerprintOpts = any;
3
- export type SendSmsOptions = {
4
- /**
5
- * The phone number to send SMS to
6
- */
7
- phoneNumber: string;
8
- /**
9
- * The message payload
10
- */
11
- message: string;
12
- };
13
- export type GsmCallOptions = {
14
- /**
15
- * The phone number to call to
16
- */
17
- phoneNumber: string;
18
- /**
19
- * One of possible actions to take
20
- */
21
- action: call | accept | cancel | hold;
22
- };
23
- export type GsmSignalOptions = {
24
- /**
25
- * One of possible signal strength values, where 4 is the best signal.
26
- */
27
- strength: 0 | 1 | 2 | 3 | 4;
28
- };
29
- export type GsmVoiceOptions = {
30
- state: on | off;
31
- };
32
- export type PowerAcOptions = {
33
- state: on | off;
34
- };
35
- export type PowerCapacityOptions = {
36
- /**
37
- * - Percentage value in range [0, 100]
38
- */
39
- percent: number;
40
- };
41
- export type NetworkSpeedOptions = {
42
- speed: gsm | scsd | gprs | edge | umts | hsdpa | lte | evdo | full;
43
- };
1
+ export default ActionsMixin;
2
+ export type AndroidBootstrap = import('../bootstrap').AndroidBootstrap;
3
+ export type ADB = import('appium-adb').ADB;
44
4
  /**
45
- * Emulate sensors values on the connected emulator.
5
+ * @type {import('./mixins').ActionsMixin & ThisType<import('../driver').AndroidDriver>}
6
+ * @satisfies {import('@appium/types').ExternalDriver}
46
7
  */
47
- export type Sensor = {
48
- /**
49
- * - sensor type declared in adb.SENSORS
50
- */
51
- sensorType: string;
52
- /**
53
- * - value to set to the sensor
54
- */
55
- value: string;
56
- };
57
- export namespace commands {
58
- function keyevent(keycode: any, metastate?: null): Promise<any>;
59
- function pressKeyCode(keycode: any, metastate?: null): Promise<any>;
60
- function longPressKeyCode(keycode: any, metastate?: null): Promise<any>;
61
- function getOrientation(): Promise<any>;
62
- function setOrientation(orientation: any): Promise<any>;
63
- function fakeFlick(xSpeed: any, ySpeed: any): Promise<any>;
64
- function fakeFlickElement(elementId: any, xoffset: any, yoffset: any, speed: any): Promise<any>;
65
- function swipe(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elId: any): Promise<any>;
66
- function doSwipe(swipeOpts: any): Promise<any>;
67
- function pinchClose(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
68
- function pinchOpen(startX: any, startY: any, endX: any, endY: any, duration: any, percent: any, steps: any, elId: any): Promise<any>;
69
- function flick(element: any, xSpeed: any, ySpeed: any, xOffset: any, yOffset: any, speed: any): Promise<void>;
70
- function drag(startX: any, startY: any, endX: any, endY: any, duration: any, touchCount: any, elementId: any, destElId: any): Promise<any>;
71
- function doDrag(dragOpts: any): Promise<any>;
72
- function lock(seconds: any): Promise<void>;
73
- function isLocked(): Promise<any>;
74
- function unlock(): Promise<void>;
75
- function openNotifications(): Promise<any>;
76
- function setLocation(latitude: any, longitude: any): Promise<any>;
77
- function fingerprint(fingerprintId: any): Promise<void>;
78
- /**
79
- * @typedef {Object} FingerprintOpts
80
- * @param {string|number} fingerprintId The value is the finger_id for the finger that
81
- * was "scanned". It is a unique integer that you assign for each virtual fingerprint.
82
- * When the app is running you can run this same command each time the
83
- * emulator prompts you for a fingerprint, you can run the adb command and pass it
84
- * the finger_id to simulate the fingerprint scan.
85
- */
86
- /**
87
- * Emulate fingerprint on Android Emulator.
88
- * Only works on API 23+
89
- *
90
- * @param {FingerprintOpts} opts
91
- */
92
- function mobileFingerprint(opts?: any): Promise<void>;
93
- function sendSMS(phoneNumber: any, message: any): Promise<void>;
94
- /**
95
- * @typedef {Object} SendSmsOptions
96
- * @property {string} phoneNumber The phone number to send SMS to
97
- * @property {string} message The message payload
98
- */
99
- /**
100
- * Emulate sending an SMS to the given phone number.
101
- * Only works on emulators.
102
- *
103
- * @param {SendSmsOptions} opts
104
- */
105
- function mobileSendSms(opts?: SendSmsOptions): Promise<void>;
106
- function gsmCall(phoneNumber: any, action: any): Promise<void>;
107
- /**
108
- * @typedef {Object} GsmCallOptions
109
- * @property {string} phoneNumber The phone number to call to
110
- * @property {call|accept|cancel|hold} action One of possible actions to take
111
- */
112
- /**
113
- * Emulate a GSM call to the given phone number.
114
- * Only works on emulators.
115
- *
116
- * @param {GsmCallOptions} opts
117
- */
118
- function mobileGsmCall(opts?: GsmCallOptions): Promise<void>;
119
- function gsmSignal(signalStrengh: any): Promise<void>;
120
- /**
121
- * @typedef {Object} GsmSignalOptions
122
- * @property {0|1|2|3|4} strength One of possible signal strength values, where 4 is the best signal.
123
- */
124
- /**
125
- * Emulate GSM signal strength change event.
126
- * Only works on emulators.
127
- *
128
- * @param {GsmSignalOptions} opts
129
- */
130
- function mobileGsmSignal(opts?: GsmSignalOptions): Promise<void>;
131
- function gsmVoice(state: any): Promise<void>;
132
- /**
133
- * @typedef {Object} GsmVoiceOptions
134
- * @property {on|off} state
135
- */
136
- /**
137
- * Emulate GSM voice state change event.
138
- * Only works on emulators.
139
- *
140
- * @param {GsmVoiceOptions} opts
141
- */
142
- function mobileGsmVoice(opts?: GsmVoiceOptions): Promise<void>;
143
- function powerAC(state: any): Promise<void>;
144
- /**
145
- * @typedef {Object} PowerAcOptions
146
- * @property {on|off} state
147
- */
148
- /**
149
- * Emulate AC power state change.
150
- * Only works on emulators.
151
- *
152
- * @param {GsmVoiceOptions} opts
153
- */
154
- function mobilePowerAc(opts?: GsmVoiceOptions): Promise<void>;
155
- function powerCapacity(batteryPercent: any): Promise<void>;
156
- /**
157
- * @typedef {Object} PowerCapacityOptions
158
- * @property {number} percent - Percentage value in range [0, 100]
159
- */
160
- /**
161
- * Emulate power capacity change.
162
- * Only works on emulators.
163
- *
164
- * @param {PowerCapacityOptions} opts
165
- */
166
- function mobilePowerCapacity(opts?: PowerCapacityOptions): Promise<void>;
167
- function networkSpeed(networkSpeed: any): Promise<void>;
168
- /**
169
- * @typedef {Object} NetworkSpeedOptions
170
- * @property {gsm|scsd|gprs|edge|umts|hsdpa|lte|evdo|full} speed
171
- */
172
- /**
173
- * Emulate different network connection speed modes.
174
- * Only works on emulators.
175
- *
176
- * @param {NetworkSpeedOptions} opts
177
- */
178
- function mobileNetworkSpeed(opts?: NetworkSpeedOptions): Promise<void>;
179
- /**
180
- * Emulate sensors values on the connected emulator.
181
- *
182
- * @typedef {Object} Sensor
183
- * @property {string} sensorType - sensor type declared in adb.SENSORS
184
- * @property {string} value - value to set to the sensor
185
- *
186
- * @param {Object} Sensor
187
- * @throws {Error} - If sensorType is not defined
188
- * @throws {Error} - If value for the se sor is not defined
189
- * @throws {Error} - If deviceType is not an emulator
190
- */
191
- function sensorSet(sensor?: {}): Promise<void>;
192
- function getScreenshot(): Promise<any>;
193
- }
194
- export namespace helpers {
195
- /**
196
- * @param {ADB} adb
197
- * @param {Object} opts
198
- * @returns {Promise<sharp>}
199
- */
200
- function getScreenshotDataWithAdbShell(adb: ADB, opts: any): Promise<typeof sharp>;
201
- /**
202
- * @param {ADB} adb
203
- * @returns {Promise<sharp>}
204
- */
205
- function getScreenshotDataWithAdbExecOut(adb: ADB): Promise<typeof sharp>;
206
- }
207
- declare const extensions: {};
208
- import sharp from "sharp";
8
+ declare const ActionsMixin: import('./mixins').ActionsMixin & ThisType<import('../driver').AndroidDriver>;
209
9
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;;;;;iBA0Lc,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;;;IA1UpB,gEAIC;IAED,oEAEC;IAED,wEAEC;IAED,wCAMC;IAED,wDAOC;IAED,2DAEC;IAED,gGAGC;IAED,wHAeC;IAED,+CAMC;IAED,sIAQC;IAED,qIAGC;IAED,8GAMC;IAED,2IAOC;IAED,6CAMC;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,uCAiCC;;;IAjFD;;;;OAIG;IACH,mFAmBC;IAED;;;OAGG;IACH,0EAgBC;;AA/YD,6BAAsB"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";+BAgYa,OAAO,cAAc,EAAE,gBAAgB;kBACvC,OAAO,YAAY,EAAE,GAAG;AApXrC;;;GAGG;AACH,4BAHU,OAAO,UAAU,EAAE,YAAY,GAAG,SAAS,OAAO,WAAW,EAAE,aAAa,CAAC,CA2WrF"}