appium-android-driver 12.4.6 → 12.4.8

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 (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/app-management.d.ts +167 -113
  3. package/build/lib/commands/app-management.d.ts.map +1 -1
  4. package/build/lib/commands/app-management.js +147 -103
  5. package/build/lib/commands/app-management.js.map +1 -1
  6. package/build/lib/commands/file-actions.d.ts +37 -19
  7. package/build/lib/commands/file-actions.d.ts.map +1 -1
  8. package/build/lib/commands/file-actions.js +44 -58
  9. package/build/lib/commands/file-actions.js.map +1 -1
  10. package/build/lib/commands/find.d.ts +20 -3
  11. package/build/lib/commands/find.d.ts.map +1 -1
  12. package/build/lib/commands/find.js +10 -3
  13. package/build/lib/commands/find.js.map +1 -1
  14. package/build/lib/commands/intent.d.ts +103 -107
  15. package/build/lib/commands/intent.d.ts.map +1 -1
  16. package/build/lib/commands/intent.js +103 -97
  17. package/build/lib/commands/intent.js.map +1 -1
  18. package/build/lib/commands/performance.d.ts +80 -51
  19. package/build/lib/commands/performance.d.ts.map +1 -1
  20. package/build/lib/commands/performance.js +113 -89
  21. package/build/lib/commands/performance.js.map +1 -1
  22. package/build/lib/commands/recordscreen.d.ts +25 -40
  23. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  24. package/build/lib/commands/recordscreen.js +46 -63
  25. package/build/lib/commands/recordscreen.js.map +1 -1
  26. package/build/lib/commands/shell.d.ts +21 -0
  27. package/build/lib/commands/shell.d.ts.map +1 -1
  28. package/build/lib/commands/shell.js +21 -0
  29. package/build/lib/commands/shell.js.map +1 -1
  30. package/build/lib/commands/streamscreen.d.ts +34 -64
  31. package/build/lib/commands/streamscreen.d.ts.map +1 -1
  32. package/build/lib/commands/streamscreen.js +41 -80
  33. package/build/lib/commands/streamscreen.js.map +1 -1
  34. package/build/lib/commands/types.d.ts.map +1 -1
  35. package/build/lib/driver.d.ts +2 -1
  36. package/build/lib/driver.d.ts.map +1 -1
  37. package/build/lib/driver.js.map +1 -1
  38. package/lib/commands/app-management.ts +639 -0
  39. package/lib/commands/{file-actions.js → file-actions.ts} +88 -74
  40. package/lib/commands/find.ts +20 -3
  41. package/lib/commands/intent.ts +422 -0
  42. package/lib/commands/{performance.js → performance.ts} +167 -108
  43. package/lib/commands/{recordscreen.js → recordscreen.ts} +77 -73
  44. package/lib/commands/shell.ts +21 -0
  45. package/lib/commands/{streamscreen.js → streamscreen.ts} +86 -109
  46. package/lib/commands/types.ts +17 -0
  47. package/lib/driver.ts +2 -1
  48. package/package.json +1 -1
  49. package/lib/commands/app-management.js +0 -533
  50. package/lib/commands/intent.js +0 -409
@@ -31,18 +31,19 @@ const SUPPORTED_EXTRA_TYPES = [
31
31
  'sal',
32
32
  ];
33
33
  /**
34
- * @deprecated
35
- * @this {import('../driver').AndroidDriver}
36
- * @param {string} appPackage
37
- * @param {string} appActivity
38
- * @param {string} [appWaitPackage]
39
- * @param {string} [appWaitActivity]
40
- * @param {string} [intentAction]
41
- * @param {string} [intentCategory]
42
- * @param {string} [intentFlags]
43
- * @param {string} [optionalIntentArguments]
44
- * @param {boolean} [dontStopAppOnReset]
45
- * @returns {Promise<void>}
34
+ * Starts an Android activity.
35
+ *
36
+ * @deprecated Use {@link mobileStartActivity} instead.
37
+ * @param appPackage The package name of the application to start.
38
+ * @param appActivity The activity name to start.
39
+ * @param appWaitPackage The package name to wait for. Defaults to `appPackage` if not provided.
40
+ * @param appWaitActivity The activity name to wait for. Defaults to `appActivity` if not provided.
41
+ * @param intentAction The intent action to use.
42
+ * @param intentCategory The intent category to use.
43
+ * @param intentFlags The intent flags to use.
44
+ * @param optionalIntentArguments Optional intent arguments.
45
+ * @param dontStopAppOnReset If `true`, does not stop the app on reset. If not provided, uses the capability value.
46
+ * @returns Promise that resolves when the activity is started.
46
47
  */
47
48
  async function startActivity(appPackage, appActivity, appWaitPackage, appWaitActivity, intentAction, intentCategory, intentFlags, optionalIntentArguments, dontStopAppOnReset) {
48
49
  this.log.debug(`Starting package '${appPackage}' and activity '${appActivity}'`);
@@ -51,8 +52,7 @@ async function startActivity(appPackage, appActivity, appWaitPackage, appWaitAct
51
52
  if (!support_1.util.hasValue(dontStopAppOnReset)) {
52
53
  dontStopAppOnReset = !!this.opts.dontStopAppOnReset;
53
54
  }
54
- /** @type {import('appium-adb').StartAppOptions} */
55
- let args = {
55
+ const args = {
56
56
  pkg: appPackage,
57
57
  activity: appActivity,
58
58
  waitPkg: appWaitPackage || appPackage,
@@ -68,34 +68,35 @@ async function startActivity(appPackage, appActivity, appWaitPackage, appWaitAct
68
68
  await this.adb.startApp(args);
69
69
  }
70
70
  /**
71
- * @this {import('../driver').AndroidDriver}
72
- * @param {boolean} [wait] Set it to `true` if you want to block the method call
71
+ * Starts an Android activity using the activity manager.
72
+ *
73
+ * @param wait Set it to `true` if you want to block the method call
73
74
  * until the activity manager's process returns the control to the system.
74
- * false by default.
75
- * @param {boolean} [stop] Set it to `true` to force stop the target
76
- * app before starting the activity
77
- * false by default.
78
- * @param {string | number} [windowingMode] The windowing mode to launch the activity into.
79
- * Check
80
- * https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
81
- * for more details on possible windowing modes (constants starting with
82
- * `WINDOWING_MODE_`).
83
- * @param {string | number} [activityType] The activity type to launch the activity as.
75
+ * `false` by default.
76
+ * @param stop Set it to `true` to force stop the target
77
+ * app before starting the activity. `false` by default.
78
+ * @param windowingMode The windowing mode to launch the activity into.
79
+ * Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
80
+ * for more details on possible windowing modes (constants starting with `WINDOWING_MODE_`).
81
+ * @param activityType The activity type to launch the activity as.
84
82
  * Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
85
83
  * for more details on possible activity types (constants starting with `ACTIVITY_TYPE_`).
86
- * @param {number | string} [display] The display identifier to launch the activity into.
87
- * @param {string} [user]
88
- * @param {string} [intent]
89
- * @param {string} [action]
90
- * @param {string} [pkg]
91
- * @param {string} [uri]
92
- * @param {string} [mimeType]
93
- * @param {string} [identifier]
94
- * @param {string} [component]
95
- * @param {string | string[]} [categories]
96
- * @param {string[][]} [extras]
97
- * @param {string} [flags]
98
- * @returns {Promise<string>}
84
+ * @param display The display identifier to launch the activity into.
85
+ * @param user The user ID for which the activity is started.
86
+ * @param intent The name of the activity intent to start, for example
87
+ * `com.some.package.name/.YourActivitySubClassName`.
88
+ * @param action Action name.
89
+ * @param pkg Package name.
90
+ * @param uri Unified resource identifier.
91
+ * @param mimeType Mime type.
92
+ * @param identifier Optional identifier.
93
+ * @param component Component name.
94
+ * @param categories One or more category names.
95
+ * @param extras Optional intent arguments. Must be represented as array of arrays,
96
+ * where each subarray item contains two or three string items: value type, key name and the value itself.
97
+ * See {@link IntentOpts} for supported value types.
98
+ * @param flags Intent startup-specific flags as a hexadecimal string.
99
+ * @returns Promise that resolves to the command output string.
99
100
  */
100
101
  async function mobileStartActivity(wait, stop, windowingMode, activityType, display, user, intent, action, pkg, uri, mimeType, identifier, component, categories, extras, flags) {
101
102
  const cmd = [
@@ -135,23 +136,26 @@ async function mobileStartActivity(wait, stop, windowingMode, activityType, disp
135
136
  return await this.adb.shell(cmd);
136
137
  }
137
138
  /**
138
- * @this {import('../driver').AndroidDriver}
139
- * @param {string | number} [user] The user ID for which the broadcast is sent.
140
- * The `current` alias assumes the current user ID.
141
- * `all` by default.
142
- * @param {string} [receiverPermission] Require receiver to hold the given permission.
143
- * @param {boolean} [allowBackgroundActivityStarts] Whether the receiver may start activities even if in the background.
144
- * @param {string} [intent]
145
- * @param {string} [action]
146
- * @param {string} [pkg]
147
- * @param {string} [uri]
148
- * @param {string} [mimeType]
149
- * @param {string} [identifier]
150
- * @param {string} [component]
151
- * @param {string | string[]} [categories]
152
- * @param {string[][]} [extras]
153
- * @param {string} [flags]
154
- * @returns {Promise<string>}
139
+ * Sends a broadcast intent to the Android system.
140
+ *
141
+ * @param receiverPermission Require receiver to hold the given permission.
142
+ * @param allowBackgroundActivityStarts Whether the receiver may start activities even if in the background.
143
+ * @param user The user ID for which the broadcast is sent.
144
+ * The `current` alias assumes the current user ID. `all` by default.
145
+ * @param intent The name of the activity intent to broadcast, for example
146
+ * `com.some.package.name/.YourServiceSubClassName`.
147
+ * @param action Action name.
148
+ * @param pkg Package name.
149
+ * @param uri Unified resource identifier.
150
+ * @param mimeType Mime type.
151
+ * @param identifier Optional identifier.
152
+ * @param component Component name.
153
+ * @param categories One or more category names.
154
+ * @param extras Optional intent arguments. Must be represented as array of arrays,
155
+ * where each subarray item contains two or three string items: value type, key name and the value itself.
156
+ * See {@link IntentOpts} for supported value types.
157
+ * @param flags Intent startup-specific flags as a hexadecimal string.
158
+ * @returns Promise that resolves to the command output string.
155
159
  */
156
160
  async function mobileBroadcast(receiverPermission, allowBackgroundActivityStarts, user, intent, action, pkg, uri, mimeType, identifier, component, categories, extras, flags) {
157
161
  const cmd = ['am', 'broadcast'];
@@ -179,22 +183,26 @@ async function mobileBroadcast(receiverPermission, allowBackgroundActivityStarts
179
183
  return await this.adb.shell(cmd);
180
184
  }
181
185
  /**
182
- * @this {import('../driver').AndroidDriver}
183
- * @param {boolean} [foreground] Set it to `true` if your service must be started as foreground service.
184
- * This option is ignored if the API level of the device under test is below
185
- * 26 (Android 8).
186
- * @param {string} [user]
187
- * @param {string} [intent]
188
- * @param {string} [action]
189
- * @param {string} [pkg]
190
- * @param {string} [uri]
191
- * @param {string} [mimeType]
192
- * @param {string} [identifier]
193
- * @param {string} [component]
194
- * @param {string | string[]} [categories]
195
- * @param {string[][]} [extras]
196
- * @param {string} [flags]
197
- * @returns {Promise<string>}
186
+ * Starts an Android service.
187
+ *
188
+ * @param foreground Set it to `true` if your service must be started as foreground service.
189
+ * This option is ignored if the API level of the device under test is below 26 (Android 8).
190
+ * @param user The user ID for which the service is started.
191
+ * The `current` user id is used by default.
192
+ * @param intent The name of the activity intent to start, for example
193
+ * `com.some.package.name/.YourServiceSubClassName`.
194
+ * @param action Action name.
195
+ * @param pkg Package name.
196
+ * @param uri Unified resource identifier.
197
+ * @param mimeType Mime type.
198
+ * @param identifier Optional identifier.
199
+ * @param component Component name.
200
+ * @param categories One or more category names.
201
+ * @param extras Optional intent arguments. Must be represented as array of arrays,
202
+ * where each subarray item contains two or three string items: value type, key name and the value itself.
203
+ * See {@link IntentOpts} for supported value types.
204
+ * @param flags Intent startup-specific flags as a hexadecimal string.
205
+ * @returns Promise that resolves to the command output string.
198
206
  */
199
207
  async function mobileStartService(foreground, user, intent, action, pkg, uri, mimeType, identifier, component, categories, extras, flags) {
200
208
  const cmd = ['am'];
@@ -217,19 +225,24 @@ async function mobileStartService(foreground, user, intent, action, pkg, uri, mi
217
225
  return await this.adb.shell(cmd);
218
226
  }
219
227
  /**
220
- * @this {import('../driver').AndroidDriver}
221
- * @param {string} [user]
222
- * @param {string} [intent]
223
- * @param {string} [action]
224
- * @param {string} [pkg]
225
- * @param {string} [uri]
226
- * @param {string} [mimeType]
227
- * @param {string} [identifier]
228
- * @param {string} [component]
229
- * @param {string | string[]} [categories]
230
- * @param {string[][]} [extras]
231
- * @param {string} [flags]
232
- * @returns {Promise<string>}
228
+ * Stops an Android service.
229
+ *
230
+ * @param user The user ID for which the service is stopped.
231
+ * @param intent The name of the activity intent to stop, for example
232
+ * `com.some.package.name/.YourServiceSubClassName`.
233
+ * @param action Action name.
234
+ * @param pkg Package name.
235
+ * @param uri Unified resource identifier.
236
+ * @param mimeType Mime type.
237
+ * @param identifier Optional identifier.
238
+ * @param component Component name.
239
+ * @param categories One or more category names.
240
+ * @param extras Optional intent arguments. Must be represented as array of arrays,
241
+ * where each subarray item contains two or three string items: value type, key name and the value itself.
242
+ * See {@link IntentOpts} for supported value types.
243
+ * @param flags Intent startup-specific flags as a hexadecimal string.
244
+ * @returns Promise that resolves to the command output string.
245
+ * If the service was already stopped, returns the error message.
233
246
  */
234
247
  async function mobileStopService(user, intent, action, pkg, uri, mimeType, identifier, component, categories, extras, flags) {
235
248
  const cmd = [
@@ -256,18 +269,14 @@ async function mobileStopService(user, intent, action, pkg, uri, mimeType, ident
256
269
  }
257
270
  catch (e) {
258
271
  // https://github.com/appium/appium-uiautomator2-driver/issues/792
259
- if (e.code === 255 && e.stderr?.includes('Service stopped')) {
260
- return e.stderr;
272
+ const err = e;
273
+ if (err.code === 255 && err.stderr?.includes('Service stopped')) {
274
+ return err.stderr;
261
275
  }
262
276
  throw e;
263
277
  }
264
278
  }
265
279
  // #region Internal helpers
266
- /**
267
- *
268
- * @param {import('./types').IntentOpts} opts
269
- * @returns {string[]}
270
- */
271
280
  function parseIntentSpec(opts = {}) {
272
281
  const { intent, action, uri, mimeType, identifier, categories, component, extras, flags } = opts;
273
282
  const resultArgs = [];
@@ -309,9 +318,9 @@ function parseIntentSpec(opts = {}) {
309
318
  throw new driver_1.errors.InvalidArgumentError(`Extra argument '${item}' must be an array`);
310
319
  }
311
320
  const [type, key, value] = item;
312
- if (!lodash_1.default.includes(SUPPORTED_EXTRA_TYPES, type)) {
321
+ if (!SUPPORTED_EXTRA_TYPES.includes(type)) {
313
322
  throw new driver_1.errors.InvalidArgumentError(`Extra argument type '${type}' is not known. ` +
314
- `Supported intent argument types are: ${SUPPORTED_EXTRA_TYPES}`);
323
+ `Supported intent argument types are: ${SUPPORTED_EXTRA_TYPES.join(', ')}`);
315
324
  }
316
325
  if (lodash_1.default.isEmpty(key) || (lodash_1.default.isString(key) && lodash_1.default.trim(key) === '')) {
317
326
  throw new driver_1.errors.InvalidArgumentError(`Extra argument's key in '${JSON.stringify(item)}' must be a valid string identifier`);
@@ -334,7 +343,4 @@ function parseIntentSpec(opts = {}) {
334
343
  return resultArgs;
335
344
  }
336
345
  // #endregion
337
- /**
338
- * @typedef {import('appium-adb').ADB} ADB
339
- */
340
346
  //# sourceMappingURL=intent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../lib/commands/intent.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AAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,gBAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;gBAC9D,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,4BAA4B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,qCAAqC,CACtF,CAAC;YACJ,CAAC;YACD,IAAI,IAAI,KAAK,iBAAiB,EAAE,CAAC;gBAC/B,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;YACrC,CAAC;iBAAM,IAAI,gBAAC,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,yBAAyB,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe;oBACvE,4BAA4B,CAC/B,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACV,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,aAAa"}
@@ -1,16 +1,44 @@
1
+ import type { AndroidDriver } from '../driver';
2
+ import type { PerformanceDataType } from './types';
3
+ export declare const NETWORK_KEYS: readonly [readonly ["bucketStart", "activeTime", "rxBytes", "rxPackets", "txBytes", "txPackets", "operations", "bucketDuration"], readonly ["st", "activeTime", "rb", "rp", "tb", "tp", "op", "bucketDuration"]];
4
+ export declare const CPU_KEYS: readonly ["user", "kernel"];
5
+ export declare const BATTERY_KEYS: readonly ["power"];
6
+ export declare const MEMORY_KEYS: readonly ["totalPrivateDirty", "nativePrivateDirty", "dalvikPrivateDirty", "eglPrivateDirty", "glPrivateDirty", "totalPss", "nativePss", "dalvikPss", "eglPss", "glPss", "nativeHeapAllocatedSize", "nativeHeapSize", "nativeRss", "dalvikRss", "totalRss"];
7
+ export declare const SUPPORTED_PERFORMANCE_DATA_TYPES: Readonly<{
8
+ readonly cpuinfo: "the amount of cpu by user and kernel process - cpu information for applications on real devices and simulators";
9
+ readonly memoryinfo: "the amount of memory used by the process - memory information for applications on real devices and simulators";
10
+ readonly batteryinfo: "the remaining battery power - battery power information for applications on real devices and simulators";
11
+ readonly networkinfo: "the network statistics - network rx/tx information for applications on real devices and simulators";
12
+ }>;
13
+ export declare const MEMINFO_TITLES: Readonly<{
14
+ readonly NATIVE: "Native";
15
+ readonly DALVIK: "Dalvik";
16
+ readonly EGL: "EGL";
17
+ readonly GL: "GL";
18
+ readonly MTRACK: "mtrack";
19
+ readonly TOTAL: "TOTAL";
20
+ readonly HEAP: "Heap";
21
+ }>;
1
22
  /**
2
- * @this {AndroidDriver}
3
- * @returns {Promise<import('./types').PerformanceDataType[]>}
23
+ * Retrieves the list of available performance data types.
24
+ *
25
+ * @returns An array of supported performance data type names.
26
+ * The possible values are: 'cpuinfo', 'memoryinfo', 'batteryinfo', 'networkinfo'.
4
27
  */
5
- export function getPerformanceDataTypes(this: import("../driver").AndroidDriver): Promise<import("./types").PerformanceDataType[]>;
28
+ export declare function getPerformanceDataTypes(this: AndroidDriver): Promise<PerformanceDataType[]>;
6
29
  /**
7
- * @this {AndroidDriver}
8
- * @param {string} packageName
9
- * @param {string} dataType
10
- * @param {number} [retries=2]
11
- * @returns {Promise<any[][]>}
30
+ * Retrieves performance data for the specified data type.
31
+ *
32
+ * @param packageName The package name of the application to get performance data for.
33
+ * Required for 'cpuinfo' and 'memoryinfo' data types.
34
+ * @param dataType The type of performance data to retrieve.
35
+ * Must be one of values returned by {@link getPerformanceDataTypes}.
36
+ * @param retries The number of retry attempts if data retrieval fails.
37
+ * @returns A two-dimensional array where the first row contains column names
38
+ * and subsequent rows contain the sampled data values.
39
+ * @throws {Error} If the data type is not supported or data retrieval fails.
12
40
  */
13
- export function getPerformanceData(this: import("../driver").AndroidDriver, packageName: string, dataType: string, retries?: number): Promise<any[][]>;
41
+ export declare function getPerformanceData(this: AndroidDriver, packageName: string, dataType: string, retries?: number): Promise<any[][]>;
14
42
  /**
15
43
  * Retrieves performance data about the given Android subsystem.
16
44
  * The data is parsed from the output of the dumpsys utility.
@@ -29,25 +57,42 @@ export function getPerformanceData(this: import("../driver").AndroidDriver, pack
29
57
  * [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600],
30
58
  * [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]]
31
59
  * - cpuinfo: [[user, kernel], [0.9, 1.3]]
32
- *
33
- * @this {AndroidDriver}
34
- * @param {string} packageName The name of the package identifier to fetch the data for
35
- * @param {import('./types').PerformanceDataType} dataType One of supported subsystem to fetch the data for.
36
- * @returns {Promise<any[][]>}
37
60
  */
38
- export function mobileGetPerformanceData(this: import("../driver").AndroidDriver, packageName: string, dataType: import("./types").PerformanceDataType): Promise<any[][]>;
61
+ export declare function mobileGetPerformanceData(this: AndroidDriver, packageName: string, dataType: PerformanceDataType): Promise<any[][]>;
39
62
  /**
63
+ * Retrieves memory information for the specified application package.
64
+ *
65
+ * The data is parsed from the output of `dumpsys meminfo` command.
66
+ * The output format varies depending on the Android API level:
67
+ * - API 18-29: Contains PSS, private dirty, and heap information
68
+ * - API 30+: Additionally includes RSS information
40
69
  *
41
- * @this {AndroidDriver}
42
- * @param {string} packageName
43
- * @param {number} retries
70
+ * @param packageName The package name of the application to get memory information for.
71
+ * @param retries The number of retry attempts if data retrieval fails.
72
+ * @returns A two-dimensional array where the first row contains memory metric names
73
+ * (totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty,
74
+ * glPrivateDirty, totalPss, nativePss, dalvikPss, eglPss, glPss,
75
+ * nativeHeapAllocatedSize, nativeHeapSize, nativeRss, dalvikRss, totalRss)
76
+ * and the second row contains the corresponding values.
77
+ * @throws {Error} If memory data cannot be retrieved or parsed.
44
78
  */
45
- export function getMemoryInfo(this: import("../driver").AndroidDriver, packageName: string, retries?: number): Promise<any[][] | null>;
79
+ export declare function getMemoryInfo(this: AndroidDriver, packageName: string, retries?: number): Promise<any[][]>;
46
80
  /**
47
- * @this {AndroidDriver}
48
- * @param {number} retries
81
+ * Retrieves network traffic statistics from the device.
82
+ *
83
+ * The data is parsed from the output of `dumpsys netstats` command.
84
+ * The output format differs between emulators and real devices:
85
+ * - Emulators: Uses full key names (bucketStart, activeTime, rxBytes, etc.)
86
+ * - Real devices (Android 7.1+): Uses abbreviated keys (st, rb, rp, tb, tp, op)
87
+ *
88
+ * @param retries The number of retry attempts if data retrieval fails.
89
+ * @returns A two-dimensional array where the first row contains network metric names
90
+ * (bucketStart/st, activeTime, rxBytes/rb, rxPackets/rp, txBytes/tb, txPackets/tp,
91
+ * operations/op, bucketDuration) and subsequent rows contain the sampled data
92
+ * for each time bucket.
93
+ * @throws {Error} If network traffic data cannot be retrieved or parsed.
49
94
  */
50
- export function getNetworkTrafficInfo(this: import("../driver").AndroidDriver, retries?: number): Promise<(string | undefined)[][] | null>;
95
+ export declare function getNetworkTrafficInfo(this: AndroidDriver, retries?: number): Promise<any[][]>;
51
96
  /**
52
97
  * Return the CPU information related to the given packageName.
53
98
  * It raises an exception if the dumped CPU information did not include the given packageName
@@ -58,39 +103,23 @@ export function getNetworkTrafficInfo(this: import("../driver").AndroidDriver, r
58
103
  * from 2023-02-07 12:04:40.556 to 2023-02-07 12:09:40.668. No process information
59
104
  * exists in the result if the process was not running during the period.
60
105
  *
61
- * @this {AndroidDriver}
62
- * @param {string} packageName The package name to get the CPU information.
63
- * @param {number} retries The number of retry count.
64
- * @returns {Promise<[typeof CPU_KEYS, [user: string, kernel: string]]>} The array of the parsed CPU upsage percentages.
106
+ * @param packageName The package name to get the CPU information.
107
+ * @param retries The number of retry count.
108
+ * @returns The array of the parsed CPU upsage percentages.
65
109
  * e.g. ['cpuinfo', ['14.3', '28.2']]
66
110
  * '14.3' is usage by the user (%), '28.2' is usage by the kernel (%)
67
111
  * @throws {Error} If it failed to parse the result of dumpsys, or no package name exists.
68
112
  */
69
- export function getCPUInfo(this: import("../driver").AndroidDriver, packageName: string, retries?: number): Promise<[typeof CPU_KEYS, [user: string, kernel: string]]>;
113
+ export declare function getCPUInfo(this: AndroidDriver, packageName: string, retries?: number): Promise<[typeof CPU_KEYS, [user: string, kernel: string]]>;
70
114
  /**
71
- * @this {AndroidDriver}
72
- * @param {number} retries
115
+ * Retrieves battery level information from the device.
116
+ *
117
+ * The data is parsed from the output of `dumpsys battery` command.
118
+ *
119
+ * @param retries The number of retry attempts if data retrieval fails.
120
+ * @returns A two-dimensional array where the first row contains the metric name ['power']
121
+ * and the second row contains the battery level as a string (0-100).
122
+ * @throws {Error} If battery data cannot be retrieved or parsed.
73
123
  */
74
- export function getBatteryInfo(this: import("../driver").AndroidDriver, retries?: number): Promise<string[][] | null>;
75
- export const NETWORK_KEYS: string[][];
76
- export const CPU_KEYS: readonly ["user", "kernel"];
77
- export const BATTERY_KEYS: string[];
78
- export const MEMORY_KEYS: string[];
79
- export const SUPPORTED_PERFORMANCE_DATA_TYPES: Readonly<{
80
- cpuinfo: "the amount of cpu by user and kernel process - cpu information for applications on real devices and simulators";
81
- memoryinfo: "the amount of memory used by the process - memory information for applications on real devices and simulators";
82
- batteryinfo: "the remaining battery power - battery power information for applications on real devices and simulators";
83
- networkinfo: "the network statistics - network rx/tx information for applications on real devices and simulators";
84
- }>;
85
- export const MEMINFO_TITLES: Readonly<{
86
- NATIVE: "Native";
87
- DALVIK: "Dalvik";
88
- EGL: "EGL";
89
- GL: "GL";
90
- MTRACK: "mtrack";
91
- TOTAL: "TOTAL";
92
- HEAP: "Heap";
93
- }>;
94
- export type AndroidDriver = import("../driver").AndroidDriver;
95
- export type ADB = import("appium-adb").ADB;
124
+ export declare function getBatteryInfo(this: AndroidDriver, retries?: number): Promise<any[][]>;
96
125
  //# sourceMappingURL=performance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../lib/commands/performance.js"],"names":[],"mappings":"AAyDA;;;GAGG;AACH,kFAFa,OAAO,CAAC,OAAO,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAM5D;AAED;;;;;;GAMG;AACH,yFALW,MAAM,YACN,MAAM,YACN,MAAM,GACJ,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CA4B5B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,+FAJW,MAAM,YACN,OAAO,SAAS,EAAE,mBAAmB,GACnC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAI5B;AAkED;;;;;GAKG;AACH,oFAHW,MAAM,YACN,MAAM,2BAoChB;AAED;;;GAGG;AACH,yFAFW,MAAM,4CAoKhB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,iFAPW,MAAM,YACN,MAAM,GACJ,OAAO,CAAC,CAAC,OAAO,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CA2CtE;AAED;;;GAGG;AACH,kFAFW,MAAM,8BAgBhB;AA5dD,sCAYE;AACF,mDAAkE;AAClE,oCAAsC;AACtC,mCAgBE;AACF;;;;;GASG;AACH;;;;;;;;GAQG;4BA+aU,OAAO,WAAW,EAAE,aAAa;kBACjC,OAAO,YAAY,EAAE,GAAG"}
1
+ {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../lib/commands/performance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,YAAY,kNAYf,CAAC;AAE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