appium-android-driver 5.14.7 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/lib/commands/actions.d.ts +6 -224
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +306 -405
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +7 -9
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +24 -18
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +7 -313
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +135 -293
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/context.d.ts +8 -92
  15. package/build/lib/commands/context.d.ts.map +1 -1
  16. package/build/lib/commands/context.js +381 -439
  17. package/build/lib/commands/context.js.map +1 -1
  18. package/build/lib/commands/element.d.ts +8 -35
  19. package/build/lib/commands/element.d.ts.map +1 -1
  20. package/build/lib/commands/element.js +153 -136
  21. package/build/lib/commands/element.js.map +1 -1
  22. package/build/lib/commands/emu-console.d.ts +6 -48
  23. package/build/lib/commands/emu-console.d.ts.map +1 -1
  24. package/build/lib/commands/emu-console.js +19 -34
  25. package/build/lib/commands/emu-console.js.map +1 -1
  26. package/build/lib/commands/execute.d.ts +6 -5
  27. package/build/lib/commands/execute.d.ts.map +1 -1
  28. package/build/lib/commands/execute.js +77 -66
  29. package/build/lib/commands/execute.js.map +1 -1
  30. package/build/lib/commands/file-actions.d.ts +7 -128
  31. package/build/lib/commands/file-actions.d.ts.map +1 -1
  32. package/build/lib/commands/file-actions.js +183 -219
  33. package/build/lib/commands/file-actions.js.map +1 -1
  34. package/build/lib/commands/find.d.ts +8 -12
  35. package/build/lib/commands/find.d.ts.map +1 -1
  36. package/build/lib/commands/find.js +19 -23
  37. package/build/lib/commands/find.js.map +1 -1
  38. package/build/lib/commands/general.d.ts +9 -132
  39. package/build/lib/commands/general.d.ts.map +1 -1
  40. package/build/lib/commands/general.js +281 -312
  41. package/build/lib/commands/general.js.map +1 -1
  42. package/build/lib/commands/ime.d.ts +7 -10
  43. package/build/lib/commands/ime.d.ts.map +1 -1
  44. package/build/lib/commands/ime.js +47 -35
  45. package/build/lib/commands/ime.js.map +1 -1
  46. package/build/lib/commands/index.d.ts +27 -2
  47. package/build/lib/commands/index.d.ts.map +1 -1
  48. package/build/lib/commands/index.js +41 -19
  49. package/build/lib/commands/index.js.map +1 -1
  50. package/build/lib/commands/intent.d.ts +7 -417
  51. package/build/lib/commands/intent.d.ts.map +1 -1
  52. package/build/lib/commands/intent.js +104 -216
  53. package/build/lib/commands/intent.js.map +1 -1
  54. package/build/lib/commands/keyboard.d.ts +6 -5
  55. package/build/lib/commands/keyboard.d.ts.map +1 -1
  56. package/build/lib/commands/keyboard.js +16 -8
  57. package/build/lib/commands/keyboard.js.map +1 -1
  58. package/build/lib/commands/log.d.ts +7 -44
  59. package/build/lib/commands/log.d.ts.map +1 -1
  60. package/build/lib/commands/log.js +146 -108
  61. package/build/lib/commands/log.js.map +1 -1
  62. package/build/lib/commands/media-projection.d.ts +7 -143
  63. package/build/lib/commands/media-projection.d.ts.map +1 -1
  64. package/build/lib/commands/media-projection.js +113 -140
  65. package/build/lib/commands/media-projection.js.map +1 -1
  66. package/build/lib/commands/mixins.d.ts +740 -0
  67. package/build/lib/commands/mixins.d.ts.map +1 -0
  68. package/build/lib/commands/mixins.js +19 -0
  69. package/build/lib/commands/mixins.js.map +1 -0
  70. package/build/lib/commands/network.d.ts +7 -138
  71. package/build/lib/commands/network.d.ts.map +1 -1
  72. package/build/lib/commands/network.js +212 -254
  73. package/build/lib/commands/network.js.map +1 -1
  74. package/build/lib/commands/performance.d.ts +24 -70
  75. package/build/lib/commands/performance.d.ts.map +1 -1
  76. package/build/lib/commands/performance.js +144 -100
  77. package/build/lib/commands/performance.js.map +1 -1
  78. package/build/lib/commands/permissions.d.ts +8 -92
  79. package/build/lib/commands/permissions.d.ts.map +1 -1
  80. package/build/lib/commands/permissions.js +75 -87
  81. package/build/lib/commands/permissions.js.map +1 -1
  82. package/build/lib/commands/recordscreen.d.ts +7 -193
  83. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  84. package/build/lib/commands/recordscreen.js +151 -182
  85. package/build/lib/commands/recordscreen.js.map +1 -1
  86. package/build/lib/commands/shell.d.ts +7 -7
  87. package/build/lib/commands/shell.d.ts.map +1 -1
  88. package/build/lib/commands/shell.js +40 -33
  89. package/build/lib/commands/shell.js.map +1 -1
  90. package/build/lib/commands/streamscreen.d.ts +9 -103
  91. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  92. package/build/lib/commands/streamscreen.js +261 -218
  93. package/build/lib/commands/streamscreen.js.map +1 -1
  94. package/build/lib/commands/system-bars.d.ts +22 -90
  95. package/build/lib/commands/system-bars.d.ts.map +1 -1
  96. package/build/lib/commands/system-bars.js +76 -74
  97. package/build/lib/commands/system-bars.js.map +1 -1
  98. package/build/lib/commands/touch.d.ts +10 -29
  99. package/build/lib/commands/touch.d.ts.map +1 -1
  100. package/build/lib/commands/touch.js +301 -285
  101. package/build/lib/commands/touch.js.map +1 -1
  102. package/build/lib/commands/types.d.ts +978 -0
  103. package/build/lib/commands/types.d.ts.map +1 -0
  104. package/build/lib/commands/types.js +3 -0
  105. package/build/lib/commands/types.js.map +1 -0
  106. package/build/lib/constraints.d.ts +291 -0
  107. package/build/lib/constraints.d.ts.map +1 -0
  108. package/build/lib/{desired-caps.js → constraints.js} +103 -102
  109. package/build/lib/constraints.js.map +1 -0
  110. package/build/lib/driver.d.ts +68 -37
  111. package/build/lib/driver.d.ts.map +1 -1
  112. package/build/lib/driver.js +123 -80
  113. package/build/lib/driver.js.map +1 -1
  114. package/build/lib/helpers/android.d.ts +164 -0
  115. package/build/lib/helpers/android.d.ts.map +1 -0
  116. package/build/lib/helpers/android.js +819 -0
  117. package/build/lib/helpers/android.js.map +1 -0
  118. package/build/lib/helpers/index.d.ts +7 -0
  119. package/build/lib/helpers/index.d.ts.map +1 -0
  120. package/build/lib/helpers/index.js +29 -0
  121. package/build/lib/helpers/index.js.map +1 -0
  122. package/build/lib/helpers/types.d.ts +121 -0
  123. package/build/lib/helpers/types.d.ts.map +1 -0
  124. package/build/lib/helpers/types.js +3 -0
  125. package/build/lib/helpers/types.js.map +1 -0
  126. package/build/lib/helpers/unlock.d.ts +32 -0
  127. package/build/lib/helpers/unlock.d.ts.map +1 -0
  128. package/build/lib/helpers/unlock.js +273 -0
  129. package/build/lib/helpers/unlock.js.map +1 -0
  130. package/build/lib/helpers/webview.d.ts +74 -0
  131. package/build/lib/helpers/webview.d.ts.map +1 -0
  132. package/build/lib/helpers/webview.js +421 -0
  133. package/build/lib/helpers/webview.js.map +1 -0
  134. package/build/lib/index.d.ts +9 -0
  135. package/build/lib/index.d.ts.map +1 -0
  136. package/build/lib/index.js +37 -0
  137. package/build/lib/index.js.map +1 -0
  138. package/build/lib/method-map.d.ts +0 -8
  139. package/build/lib/method-map.d.ts.map +1 -1
  140. package/build/lib/method-map.js +63 -74
  141. package/build/lib/method-map.js.map +1 -1
  142. package/build/lib/stubs.d.ts +0 -1
  143. package/build/lib/stubs.d.ts.map +1 -1
  144. package/build/lib/stubs.js +1 -0
  145. package/build/lib/stubs.js.map +1 -1
  146. package/build/lib/utils.d.ts +1 -1
  147. package/build/lib/utils.d.ts.map +1 -1
  148. package/lib/commands/actions.js +351 -464
  149. package/lib/commands/alert.js +27 -17
  150. package/lib/commands/app-management.js +156 -314
  151. package/lib/commands/context.js +457 -441
  152. package/lib/commands/element.js +201 -157
  153. package/lib/commands/emu-console.js +25 -45
  154. package/lib/commands/execute.js +106 -90
  155. package/lib/commands/file-actions.js +222 -240
  156. package/lib/commands/find.ts +103 -0
  157. package/lib/commands/general.js +327 -339
  158. package/lib/commands/ime.js +50 -34
  159. package/lib/commands/{index.js → index.ts} +20 -24
  160. package/lib/commands/intent.js +108 -249
  161. package/lib/commands/keyboard.js +20 -8
  162. package/lib/commands/log.js +172 -116
  163. package/lib/commands/media-projection.js +134 -161
  164. package/lib/commands/mixins.ts +966 -0
  165. package/lib/commands/network.js +252 -281
  166. package/lib/commands/performance.js +203 -132
  167. package/lib/commands/permissions.js +108 -109
  168. package/lib/commands/recordscreen.js +212 -209
  169. package/lib/commands/shell.js +51 -40
  170. package/lib/commands/streamscreen.js +355 -289
  171. package/lib/commands/system-bars.js +92 -83
  172. package/lib/commands/touch.js +357 -294
  173. package/lib/commands/types.ts +1097 -0
  174. package/lib/{desired-caps.js → constraints.ts} +106 -103
  175. package/lib/{driver.js → driver.ts} +278 -132
  176. package/lib/helpers/android.ts +1143 -0
  177. package/lib/helpers/index.ts +6 -0
  178. package/lib/helpers/types.ts +134 -0
  179. package/lib/helpers/unlock.ts +329 -0
  180. package/lib/helpers/webview.ts +582 -0
  181. package/lib/index.ts +18 -0
  182. package/lib/method-map.js +87 -98
  183. package/lib/stubs.ts +0 -1
  184. package/package.json +26 -19
  185. package/build/index.js +0 -51
  186. package/build/lib/android-helpers.d.ts +0 -136
  187. package/build/lib/android-helpers.d.ts.map +0 -1
  188. package/build/lib/android-helpers.js +0 -855
  189. package/build/lib/android-helpers.js.map +0 -1
  190. package/build/lib/commands/coverage.d.ts +0 -5
  191. package/build/lib/commands/coverage.d.ts.map +0 -1
  192. package/build/lib/commands/coverage.js +0 -19
  193. package/build/lib/commands/coverage.js.map +0 -1
  194. package/build/lib/desired-caps.d.ts +0 -353
  195. package/build/lib/desired-caps.d.ts.map +0 -1
  196. package/build/lib/desired-caps.js.map +0 -1
  197. package/build/lib/unlock-helpers.d.ts +0 -38
  198. package/build/lib/unlock-helpers.d.ts.map +0 -1
  199. package/build/lib/unlock-helpers.js +0 -266
  200. package/build/lib/unlock-helpers.js.map +0 -1
  201. package/build/lib/webview-helpers.d.ts +0 -224
  202. package/build/lib/webview-helpers.d.ts.map +0 -1
  203. package/build/lib/webview-helpers.js +0 -528
  204. package/build/lib/webview-helpers.js.map +0 -1
  205. package/index.js +0 -24
  206. package/lib/android-helpers.js +0 -983
  207. package/lib/commands/coverage.js +0 -18
  208. package/lib/commands/find.js +0 -82
  209. package/lib/unlock-helpers.js +0 -278
  210. package/lib/webview-helpers.js +0 -602
@@ -1,38 +1,27 @@
1
1
  "use strict";
2
+ /**
3
+ * @privateRemarks This file needed to be converted to TS because the overload of `findElOrEls` is seemingly impossible to express in JS since the value of `this` cannot be bound via a type assertion.
4
+ * @module
5
+ */
2
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
8
  };
5
9
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.helpers = void 0;
7
10
  const lodash_1 = __importDefault(require("lodash"));
11
+ const mixins_1 = require("./mixins");
8
12
  const driver_1 = require("appium/driver");
9
- let helpers = {}, extensions = {};
10
- exports.helpers = helpers;
11
- /**
12
- * Reason for isolating doFindElementOrEls from findElOrEls is for reusing findElOrEls
13
- * across android-drivers (like appium-uiautomator2-driver) to avoid code duplication.
14
- * Other android-drivers (like appium-uiautomator2-driver) need to override doFindElementOrEls
15
- * to facilitate findElOrEls.
16
- */
17
- helpers.doFindElementOrEls = async function doFindElementOrEls(params) {
18
- return await this.bootstrap.sendAction('find', params);
19
- };
20
- // stategy: locator strategy
21
- // selector: the actual selector for finding an element
22
- // mult: multiple elements or just one?
23
- // context: finding an element from the root context? or starting from another element
24
- helpers.findElOrEls = async function findElOrEls(strategy, selector, mult, context = '') {
13
+ async function findElOrEls(strategy, selector, mult, context = '') {
25
14
  if (!selector) {
26
15
  throw new Error('Must provide a selector when finding elements');
27
16
  }
28
- let params = {
17
+ const params = {
29
18
  strategy,
30
19
  selector,
31
20
  context,
32
- multiple: mult
21
+ multiple: mult,
33
22
  };
34
23
  let element;
35
- let doFind = async () => {
24
+ const doFind = async () => {
36
25
  try {
37
26
  element = await this.doFindElementOrEls(params);
38
27
  }
@@ -57,7 +46,8 @@ helpers.findElOrEls = async function findElOrEls(strategy, selector, mult, conte
57
46
  try {
58
47
  await this.implicitWaitForCondition(doFind);
59
48
  }
60
- catch (err) {
49
+ catch (e) {
50
+ const err = e;
61
51
  if (err.message && err.message.match(/Condition unmet/)) {
62
52
  // only get here if we are looking for multiple elements
63
53
  // condition was not met setting res to empty array
@@ -74,7 +64,13 @@ helpers.findElOrEls = async function findElOrEls(strategy, selector, mult, conte
74
64
  throw new driver_1.errors.NoSuchElementError();
75
65
  }
76
66
  return element;
67
+ }
68
+ const FindMixin = {
69
+ async doFindElementOrEls(params) {
70
+ return await this.bootstrap.sendAction('find', params);
71
+ },
72
+ findElOrEls,
77
73
  };
78
- Object.assign(extensions, helpers);
79
- exports.default = extensions;
74
+ (0, mixins_1.mixin)(FindMixin);
75
+ exports.default = FindMixin;
80
76
  //# sourceMappingURL=find.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"find.js","sourceRoot":"","sources":["../../../lib/commands/find.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,0CAAoD;AAGpD,IAAI,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,CAAC;AA4EzB,0BAAO;AA1EhB;;;;;GAKG;AACH,OAAO,CAAC,kBAAkB,GAAG,KAAK,UAAU,kBAAkB,CAAE,MAAM;IACpE,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,4BAA4B;AAC5B,uDAAuD;AACvD,uCAAuC;AACvC,sFAAsF;AACtF,OAAO,CAAC,WAAW,GAAG,KAAK,UAAU,WAAW,CAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE;IACtF,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IAED,IAAI,M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AAM,GAAG,GAAG,CAAU,CAAC;QACvB,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;YACvD,wDAAwD;YACxD,mDAAmD;YACnD,OAAO,GAAG,EAAE,CAAC;SACd;aAAM;YACL,MAAM,GAAG,CAAC;SACX;KACF;IAED,IAAI,IAAI,EAAE;QACR,OAAO,OAAoB,CAAC;KAC7B;IACD,IAAI,gBAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACtB,MAAM,IAAI,eAAM,CAAC,kBAAkB,EAAE,CAAC;KACvC;IACD,OAAO,OAAkB,CAAC;AAC5B,CAAC;AAED,MAAM,SAAS,GAAwC;IACrD,KAAK,CAAC,kBAAkB,CAAC,MAAM;QAC7B,OAAO,MAAO,IAAI,CAAC,SAA8B,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/E,CAAC;IAED,WAAW;CACZ,CAAC;AAEF,IAAA,cAAK,EAAC,SAAS,CAAC,CAAC;AAEjB,kBAAe,SAAS,CAAC"}
@@ -1,133 +1,10 @@
1
- export default extensions;
2
- export type DeviceTimeOptions = {
3
- /**
4
- * [YYYY-MM-DDTHH:mm:ssZ] - See getDeviceTime#format
5
- */
6
- format: string;
7
- };
8
- export type SmsListOptions = {
9
- /**
10
- * [100] - The maximum count of recent SMS messages
11
- * to retrieve
12
- */
13
- max: number;
14
- };
15
- export type UnlockOptions = {
16
- /**
17
- * The unlock key. The value of this key depends
18
- * on the actual unlock type and could be a pin/password/pattern value or
19
- * a biometric finger id.
20
- * If not provided then the corresponding value from session capabilities is used.
21
- */
22
- key: string | null;
23
- /**
24
- * The unlock type. The following unlock types
25
- * are supported: `pin`, `pinWithKeyEvent`, `password`, `pattern` and `fingerprint`.
26
- * If not provided then the corresponding value from session capabilities is used.
27
- */
28
- type: string | null;
29
- /**
30
- * Either 'locksettings' (default) or 'uiautomator'.
31
- * Setting it to 'uiautomator' will enforce the driver to avoid using special
32
- * ADB shortcuts in order to speed up the unlock procedure.
33
- */
34
- strategy: string | null;
35
- /**
36
- * [2000] The maximum time in milliseconds
37
- * to wait until the screen gets unlocked
38
- */
39
- timeoutMs: number | null;
40
- };
41
- export namespace commands {
42
- function keys(keys: any): Promise<void>;
43
- function doSendKeys(params: any): Promise<any>;
44
- /**
45
- * Retrieves the current device's timestamp.
46
- *
47
- * @param {string} format - The set of format specifiers. Read
48
- * https://momentjs.com/docs/ to get the full list of supported
49
- * datetime format specifiers. The default format is
50
- * `YYYY-MM-DDTHH:mm:ssZ`, which complies to ISO-8601
51
- * @return {string} Formatted datetime string or the raw command output if formatting fails
52
- */
53
- function getDeviceTime(format?: string): string;
54
- /**
55
- * @typedef {Object} DeviceTimeOptions
56
- * @property {string} format [YYYY-MM-DDTHH:mm:ssZ] - See getDeviceTime#format
57
- */
58
- /**
59
- * Retrieves the current device time
60
- *
61
- * @param {DeviceTimeOptions} opts
62
- * @return {string} Formatted datetime string or the raw command output if formatting fails
63
- */
64
- function mobileGetDeviceTime(opts?: DeviceTimeOptions): string;
65
- function getPageSource(): Promise<any>;
66
- function back(): Promise<any>;
67
- function openSettingsActivity(setting: any): Promise<void>;
68
- function getWindowSize(): Promise<any>;
69
- function getWindowRect(): Promise<{
70
- width: any;
71
- height: any;
72
- x: number;
73
- y: number;
74
- }>;
75
- function getCurrentActivity(): Promise<any>;
76
- function getCurrentPackage(): Promise<any>;
77
- function background(seconds: any): Promise<any>;
78
- function getStrings(language: any): Promise<{}>;
79
- function launchApp(): Promise<void>;
80
- function startActivity(appPackage: any, appActivity: any, appWaitPackage: any, appWaitActivity: any, intentAction: any, intentCategory: any, intentFlags: any, optionalIntentArguments: any, dontStopAppOnReset: any): Promise<void>;
81
- function reset(): Promise<any>;
82
- function startAUT(): Promise<void>;
83
- function setUrl(uri: any): Promise<void>;
84
- function closeApp(): Promise<void>;
85
- function getDisplayDensity(): Promise<number | undefined>;
86
- function mobilePerformEditorAction(opts?: {}): Promise<void>;
87
- /**
88
- * Retrieves the list of recent system notifications.
89
- *
90
- * @returns {Object} See the documentation on `adb.getNotifications` for
91
- * more details
92
- */
93
- function mobileGetNotifications(): any;
94
- /**
95
- * @typedef {Object} SmsListOptions
96
- * @property {number} max [100] - The maximum count of recent SMS messages
97
- * to retrieve
98
- */
99
- /**
100
- * Retrieves the list of recent SMS messages with their properties.
101
- *
102
- * @param {SmsListOptions} opts
103
- * @returns {Object} See the documentation on `adb.getSmsList` for
104
- * more details
105
- */
106
- function mobileListSms(opts?: SmsListOptions): any;
107
- /**
108
- * @typedef {Object} UnlockOptions
109
- * @property {string?} key The unlock key. The value of this key depends
110
- * on the actual unlock type and could be a pin/password/pattern value or
111
- * a biometric finger id.
112
- * If not provided then the corresponding value from session capabilities is used.
113
- * @property {string?} type The unlock type. The following unlock types
114
- * are supported: `pin`, `pinWithKeyEvent`, `password`, `pattern` and `fingerprint`.
115
- * If not provided then the corresponding value from session capabilities is used.
116
- * @property {string?} strategy Either 'locksettings' (default) or 'uiautomator'.
117
- * Setting it to 'uiautomator' will enforce the driver to avoid using special
118
- * ADB shortcuts in order to speed up the unlock procedure.
119
- * @property {number?} timeoutMs [2000] The maximum time in milliseconds
120
- * to wait until the screen gets unlocked
121
- */
122
- /**
123
- * Unlocks the device if it is locked. Noop if the device's screen is not locked.
124
- *
125
- * @param {UnlockOptions} opts
126
- * @throws {Error} if unlock operation fails or the provided
127
- * arguments are not valid
128
- */
129
- function mobileUnlock(opts?: UnlockOptions): Promise<void>;
130
- }
131
- export let helpers: {};
132
- declare let extensions: {};
1
+ export default GeneralMixin;
2
+ export type AndroidBootstrap = import('../bootstrap').AndroidBootstrap;
3
+ export type ADB = import('appium-adb').ADB;
4
+ export type StringRecord = import('@appium/types').StringRecord;
5
+ /**
6
+ * @type {import('./mixins').GeneralMixin & ThisType<import('../driver').AndroidDriver>}
7
+ * @satisfies {import('@appium/types').ExternalDriver}
8
+ */
9
+ declare const GeneralMixin: import('./mixins').GeneralMixin & ThisType<import('../driver').AndroidDriver>;
133
10
  //# sourceMappingURL=general.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../lib/commands/general.js"],"names":[],"mappings":";;;;;YAoDc,MAAM;;;;;;;SA8PN,MAAM;;;;;;;;;SAiBN,MAAM;;;;;;UAIN,MAAM;;;;;;cAGN,MAAM;;;;;eAGN,MAAM;;;IAlUpB,wCAWC;IAED,+CAEC;IAED;;;;;;;;OAQG;IACH,gDAWC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,+DAEC;IAED,uCAEC;IAED,8BAEC;IAED,2DAIC;IAED,uCAEC;IAGD;;;;;OAQC;IAED,4CAEC;IAED,2CAEC;IAED,gDA0DC;IAED,gDA4BC;IAED,oCAGC;IAED,qOAyBC;IAED,+BAKC;IAED,mCAeC;IAID,yCAEC;IAGD,mCAIC;IAED,0DAsBC;IAED,6DAOC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;OAIG;IAEH;;;;;;OAMG;IACH,mDAEC;IAED;;;;;;;;;;;;;;OAcG;IAEH;;;;;;OAMG;IACH,2DAYC;;AA3VkB,uBAAY;AAAE,2BAAe"}
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../lib/commands/general.js"],"names":[],"mappings":";+BAyVa,OAAO,cAAc,EAAE,gBAAgB;kBACvC,OAAO,YAAY,EAAE,GAAG;2BACxB,OAAO,eAAe,EAAE,YAAY;AAhVjD;;;GAGG;AACH,4BAHU,OAAO,UAAU,EAAE,YAAY,GAAG,SAAS,OAAO,WAAW,EAAE,aAAa,CAAC,CAsUrF"}