appium-android-driver 12.4.7 → 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.
- package/CHANGELOG.md +6 -0
- package/build/lib/commands/file-actions.d.ts +37 -19
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +44 -58
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/intent.d.ts +103 -107
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +103 -97
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +25 -40
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +46 -63
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/driver.d.ts +2 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js.map +1 -1
- package/lib/commands/{file-actions.js → file-actions.ts} +88 -74
- package/lib/commands/intent.ts +422 -0
- package/lib/commands/{recordscreen.js → recordscreen.ts} +77 -73
- package/lib/commands/types.ts +17 -0
- package/lib/driver.ts +2 -1
- package/package.json +1 -1
- package/lib/commands/intent.js +0 -409
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [12.4.8](https://github.com/appium/appium-android-driver/compare/v12.4.7...v12.4.8) (2025-12-19)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* Migrate command modules to typescript (part 2) ([#1039](https://github.com/appium/appium-android-driver/issues/1039)) ([163fdc6](https://github.com/appium/appium-android-driver/commit/163fdc6604a126e8a81a20f5ee54c98cfda9ecc1))
|
|
6
|
+
|
|
1
7
|
## [12.4.7](https://github.com/appium/appium-android-driver/compare/v12.4.6...v12.4.7) (2025-12-18)
|
|
2
8
|
|
|
3
9
|
### Miscellaneous Chores
|
|
@@ -1,34 +1,52 @@
|
|
|
1
|
+
import type { AndroidDriver } from '../driver';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* Pulls a file from the remote device.
|
|
4
|
+
*
|
|
5
|
+
* The full path to the remote file or a specially formatted path, which
|
|
4
6
|
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
5
7
|
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
6
8
|
* use the latter `remotePath` format.
|
|
7
|
-
*
|
|
9
|
+
*
|
|
10
|
+
* @param remotePath The full path to the remote file or a specially formatted path, which
|
|
11
|
+
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
12
|
+
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
13
|
+
* use the latter `remotePath` format.
|
|
14
|
+
* @returns Promise that resolves to the file content as a base64-encoded string.
|
|
15
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
8
16
|
*/
|
|
9
|
-
export function pullFile(this:
|
|
17
|
+
export declare function pullFile(this: AndroidDriver, remotePath: string): Promise<string>;
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
19
|
+
* Pushes a file to the remote device.
|
|
20
|
+
*
|
|
21
|
+
* The full path to the remote file or a specially formatted path, which
|
|
22
|
+
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
23
|
+
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
24
|
+
* use the latter `remotePath` format.
|
|
25
|
+
*
|
|
26
|
+
* @param remotePath The full path to the remote file or a specially formatted path, which
|
|
13
27
|
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
14
28
|
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
15
29
|
* use the latter `remotePath` format.
|
|
16
|
-
* @param
|
|
17
|
-
*
|
|
30
|
+
* @param base64Data Base64-encoded content of the file to be pushed.
|
|
31
|
+
* Can be a string or an array of numbers (for Java clients that send byte arrays).
|
|
32
|
+
* @returns Promise that resolves when the file is pushed.
|
|
33
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
18
34
|
*/
|
|
19
|
-
export function pushFile(this:
|
|
35
|
+
export declare function pushFile(this: AndroidDriver, remotePath: string, base64Data: string | number[]): Promise<void>;
|
|
20
36
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
37
|
+
* Pulls a folder from the remote device.
|
|
38
|
+
*
|
|
39
|
+
* @param remotePath The full path to the remote folder.
|
|
40
|
+
* @returns Promise that resolves to the folder content as a base64-encoded zip file string.
|
|
24
41
|
*/
|
|
25
|
-
export function pullFolder(this:
|
|
42
|
+
export declare function pullFolder(this: AndroidDriver, remotePath: string): Promise<string>;
|
|
26
43
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
44
|
+
* Deletes a file from the remote device.
|
|
45
|
+
*
|
|
46
|
+
* @param remotePath The full path to the remote file or a file inside an application bundle
|
|
47
|
+
* (for example `@my.app.id/path/in/bundle`).
|
|
48
|
+
* @returns Promise that resolves to `true` if the file was successfully deleted, `false` if it doesn't exist.
|
|
49
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
31
50
|
*/
|
|
32
|
-
export function mobileDeleteFile(this:
|
|
33
|
-
export type ADB = import("appium-adb").ADB;
|
|
51
|
+
export declare function mobileDeleteFile(this: AndroidDriver, remotePath: string): Promise<boolean>;
|
|
34
52
|
//# sourceMappingURL=file-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.
|
|
1
|
+
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAQ7C;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,GAC5B,OAAO,CAAC,IAAI,CAAC,CAgEf;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CAQlB"}
|
|
@@ -16,12 +16,19 @@ const CONTAINER_PATH_MARKER = '@';
|
|
|
16
16
|
const CONTAINER_PATH_PATTERN = new RegExp(`^${CONTAINER_PATH_MARKER}([^/]+)/(.+)`);
|
|
17
17
|
const ANDROID_MEDIA_RESCAN_INTENT = 'android.intent.action.MEDIA_SCANNER_SCAN_FILE';
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* Pulls a file from the remote device.
|
|
20
|
+
*
|
|
21
|
+
* The full path to the remote file or a specially formatted path, which
|
|
22
|
+
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
23
|
+
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
24
|
+
* use the latter `remotePath` format.
|
|
25
|
+
*
|
|
26
|
+
* @param remotePath The full path to the remote file or a specially formatted path, which
|
|
21
27
|
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
22
28
|
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
23
29
|
* use the latter `remotePath` format.
|
|
24
|
-
* @returns
|
|
30
|
+
* @returns Promise that resolves to the file content as a base64-encoded string.
|
|
31
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
25
32
|
*/
|
|
26
33
|
async function pullFile(remotePath) {
|
|
27
34
|
if (remotePath.endsWith('/')) {
|
|
@@ -44,7 +51,7 @@ async function pullFile(remotePath) {
|
|
|
44
51
|
catch (e) {
|
|
45
52
|
throw this.log.errorWithException(`Cannot access the container of '${packageId}' application. ` +
|
|
46
53
|
`Is the application installed and has 'debuggable' build option set to true? ` +
|
|
47
|
-
`Original error: ${
|
|
54
|
+
`Original error: ${e.message}`);
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
const localFile = await support_1.tempDir.path({ prefix: 'appium', suffix: '.tmp' });
|
|
@@ -62,13 +69,21 @@ async function pullFile(remotePath) {
|
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
72
|
+
* Pushes a file to the remote device.
|
|
73
|
+
*
|
|
74
|
+
* The full path to the remote file or a specially formatted path, which
|
|
75
|
+
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
76
|
+
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
77
|
+
* use the latter `remotePath` format.
|
|
78
|
+
*
|
|
79
|
+
* @param remotePath The full path to the remote file or a specially formatted path, which
|
|
67
80
|
* points to an item inside an app bundle, for example `@my.app.id/my/path`.
|
|
68
81
|
* It is mandatory for the app bundle to have debugging enabled in order to
|
|
69
82
|
* use the latter `remotePath` format.
|
|
70
|
-
* @param
|
|
71
|
-
*
|
|
83
|
+
* @param base64Data Base64-encoded content of the file to be pushed.
|
|
84
|
+
* Can be a string or an array of numbers (for Java clients that send byte arrays).
|
|
85
|
+
* @returns Promise that resolves when the file is pushed.
|
|
86
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
72
87
|
*/
|
|
73
88
|
async function pushFile(remotePath, base64Data) {
|
|
74
89
|
if (remotePath.endsWith('/')) {
|
|
@@ -76,12 +91,16 @@ async function pushFile(remotePath, base64Data) {
|
|
|
76
91
|
`'${remotePath}' is given instead`);
|
|
77
92
|
}
|
|
78
93
|
const localFile = await support_1.tempDir.path({ prefix: 'appium', suffix: '.tmp' });
|
|
94
|
+
let base64String;
|
|
79
95
|
if (lodash_1.default.isArray(base64Data)) {
|
|
80
96
|
// some clients (ahem) java, send a byte array encoding utf8 characters
|
|
81
97
|
// instead of a string, which would be infinitely better!
|
|
82
|
-
|
|
98
|
+
base64String = Buffer.from(base64Data).toString('utf8');
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
base64String = base64Data;
|
|
83
102
|
}
|
|
84
|
-
const content = Buffer.from(
|
|
103
|
+
const content = Buffer.from(base64String, 'base64');
|
|
85
104
|
let tmpDestination = null;
|
|
86
105
|
try {
|
|
87
106
|
await support_1.fs.writeFile(localFile, content.toString('binary'), 'binary');
|
|
@@ -108,7 +127,7 @@ async function pushFile(remotePath, base64Data) {
|
|
|
108
127
|
catch (e) {
|
|
109
128
|
throw this.log.errorWithException(`Cannot access the container of '${packageId}' application. ` +
|
|
110
129
|
`Is the application installed and has 'debuggable' build option set to true? ` +
|
|
111
|
-
`Original error: ${
|
|
130
|
+
`Original error: ${e.message}`);
|
|
112
131
|
}
|
|
113
132
|
}
|
|
114
133
|
else {
|
|
@@ -129,9 +148,10 @@ async function pushFile(remotePath, base64Data) {
|
|
|
129
148
|
}
|
|
130
149
|
}
|
|
131
150
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* @
|
|
151
|
+
* Pulls a folder from the remote device.
|
|
152
|
+
*
|
|
153
|
+
* @param remotePath The full path to the remote folder.
|
|
154
|
+
* @returns Promise that resolves to the folder content as a base64-encoded zip file string.
|
|
135
155
|
*/
|
|
136
156
|
async function pullFolder(remotePath) {
|
|
137
157
|
const tmpRoot = await support_1.tempDir.openDir();
|
|
@@ -146,10 +166,12 @@ async function pullFolder(remotePath) {
|
|
|
146
166
|
}
|
|
147
167
|
}
|
|
148
168
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
169
|
+
* Deletes a file from the remote device.
|
|
170
|
+
*
|
|
171
|
+
* @param remotePath The full path to the remote file or a file inside an application bundle
|
|
172
|
+
* (for example `@my.app.id/path/in/bundle`).
|
|
173
|
+
* @returns Promise that resolves to `true` if the file was successfully deleted, `false` if it doesn't exist.
|
|
174
|
+
* @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file.
|
|
153
175
|
*/
|
|
154
176
|
async function mobileDeleteFile(remotePath) {
|
|
155
177
|
if (remotePath.endsWith('/')) {
|
|
@@ -161,20 +183,15 @@ async function mobileDeleteFile(remotePath) {
|
|
|
161
183
|
/**
|
|
162
184
|
* Deletes the given folder or file from the remote device
|
|
163
185
|
*
|
|
164
|
-
* @param {ADB} adb
|
|
165
|
-
* @param {string} remotePath The full path to the remote folder
|
|
166
|
-
* or file (folder names must end with a single slash)
|
|
167
186
|
* @throws {Error} If the provided remote path is invalid or
|
|
168
187
|
* the package content cannot be accessed
|
|
169
|
-
* @returns
|
|
188
|
+
* @returns `true` if the remote item has been successfully deleted.
|
|
170
189
|
* If the remote path is valid, but the remote path does not exist
|
|
171
190
|
* this function return `false`.
|
|
172
|
-
* @this {import('../driver').AndroidDriver}
|
|
173
191
|
*/
|
|
174
192
|
async function deleteFileOrFolder(adb, remotePath) {
|
|
175
193
|
const { isDir, isPresent, isFile } = createFSTests(adb);
|
|
176
194
|
let dstPath = remotePath;
|
|
177
|
-
/** @type {string|undefined} */
|
|
178
195
|
let pkgId;
|
|
179
196
|
if (remotePath.startsWith(CONTAINER_PATH_MARKER)) {
|
|
180
197
|
const [packageId, pathInContainer] = parseContainerPath(remotePath);
|
|
@@ -189,7 +206,7 @@ async function deleteFileOrFolder(adb, remotePath) {
|
|
|
189
206
|
catch (e) {
|
|
190
207
|
throw this.log.errorWithException(`Cannot access the container of '${pkgId}' application. ` +
|
|
191
208
|
`Is the application installed and has 'debuggable' build option set to true? ` +
|
|
192
|
-
`Original error: ${
|
|
209
|
+
`Original error: ${e.message}`);
|
|
193
210
|
}
|
|
194
211
|
}
|
|
195
212
|
if (!(await isPresent(dstPath, pkgId))) {
|
|
@@ -218,9 +235,7 @@ async function deleteFileOrFolder(adb, remotePath) {
|
|
|
218
235
|
/**
|
|
219
236
|
* Parses the actual destination path from the given value
|
|
220
237
|
*
|
|
221
|
-
* @
|
|
222
|
-
* `@my.app.id/my/path`
|
|
223
|
-
* @returns {Array<string>} An array, where the first item is the parsed package
|
|
238
|
+
* @returns An array, where the first item is the parsed package
|
|
224
239
|
* identifier and the second one is the actual destination path inside the package.
|
|
225
240
|
* @throws {Error} If the given string cannot be parsed
|
|
226
241
|
*/
|
|
@@ -236,9 +251,6 @@ function parseContainerPath(remotePath) {
|
|
|
236
251
|
* Scans the given file/folder on the remote device
|
|
237
252
|
* and adds matching items to the device's media library.
|
|
238
253
|
* Exceptions are ignored and written into the log.
|
|
239
|
-
*
|
|
240
|
-
* @this {import('../driver').AndroidDriver}
|
|
241
|
-
* @param {string} remotePath The file/folder path on the remote device
|
|
242
254
|
*/
|
|
243
255
|
async function scanMedia(remotePath) {
|
|
244
256
|
this.log.debug(`Performing media scan of '${remotePath}'`);
|
|
@@ -259,7 +271,7 @@ async function scanMedia(remotePath) {
|
|
|
259
271
|
}
|
|
260
272
|
}
|
|
261
273
|
catch (e) {
|
|
262
|
-
const err =
|
|
274
|
+
const err = e;
|
|
263
275
|
// FIXME: what has a `stderr` prop?
|
|
264
276
|
this.log.warn(`Ignoring an unexpected error upon media scanning of '${remotePath}': ${err.stderr ?? err.message}`);
|
|
265
277
|
}
|
|
@@ -267,25 +279,14 @@ async function scanMedia(remotePath) {
|
|
|
267
279
|
/**
|
|
268
280
|
* A small helper, which escapes single quotes in paths,
|
|
269
281
|
* so they are safe to be passed as arguments of shell commands
|
|
270
|
-
*
|
|
271
|
-
* @param {string} p The initial remote path
|
|
272
|
-
* @returns {string} The escaped path value
|
|
273
282
|
*/
|
|
274
283
|
function escapePath(p) {
|
|
275
284
|
return p.replace(/'/g, `\\'`);
|
|
276
285
|
}
|
|
277
286
|
/**
|
|
278
287
|
* Factory providing filesystem test functions using ADB
|
|
279
|
-
* @param {ADB} adb
|
|
280
288
|
*/
|
|
281
289
|
function createFSTests(adb) {
|
|
282
|
-
/**
|
|
283
|
-
*
|
|
284
|
-
* @param {string} p
|
|
285
|
-
* @param {'d'|'f'|'e'} op
|
|
286
|
-
* @param {string} [runAs]
|
|
287
|
-
* @returns
|
|
288
|
-
*/
|
|
289
290
|
const performRemoteFsCheck = async (p, op, runAs) => {
|
|
290
291
|
const passFlag = '__PASS__';
|
|
291
292
|
const checkCmd = `[ -${op} '${escapePath(p)}' ] && echo ${passFlag}`;
|
|
@@ -297,25 +298,10 @@ function createFSTests(adb) {
|
|
|
297
298
|
return false;
|
|
298
299
|
}
|
|
299
300
|
};
|
|
300
|
-
/**
|
|
301
|
-
* @param {string} p
|
|
302
|
-
* @param {string} [runAs]
|
|
303
|
-
*/
|
|
304
301
|
const isFile = async (p, runAs) => await performRemoteFsCheck(p, 'f', runAs);
|
|
305
|
-
/**
|
|
306
|
-
* @param {string} p
|
|
307
|
-
* @param {string} [runAs]
|
|
308
|
-
*/
|
|
309
302
|
const isDir = async (p, runAs) => await performRemoteFsCheck(p, 'd', runAs);
|
|
310
|
-
/**
|
|
311
|
-
* @param {string} p
|
|
312
|
-
* @param {string} [runAs]
|
|
313
|
-
*/
|
|
314
303
|
const isPresent = async (p, runAs) => await performRemoteFsCheck(p, 'e', runAs);
|
|
315
304
|
return { isFile, isDir, isPresent };
|
|
316
305
|
}
|
|
317
306
|
// #endregion
|
|
318
|
-
/**
|
|
319
|
-
* @typedef {import('appium-adb').ADB} ADB
|
|
320
|
-
*/
|
|
321
307
|
//# sourceMappingURL=file-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-actions.js","sourceRoot":"","sources":["../../../lib/commands/file-actions.
|
|
1
|
+
{"version":3,"file":"file-actions.js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AE,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,KAAK,EAAE,CAAS,EAAE,KAAc,EAAoB,EAAE,CACtE,MAAM,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAE5C,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,CAAC;AACpC,CAAC;AAED,aAAa"}
|
|
@@ -1,121 +1,117 @@
|
|
|
1
|
+
import type { AndroidDriver } from '../driver';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
3
|
+
* Starts an Android activity.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated Use {@link mobileStartActivity} instead.
|
|
6
|
+
* @param appPackage The package name of the application to start.
|
|
7
|
+
* @param appActivity The activity name to start.
|
|
8
|
+
* @param appWaitPackage The package name to wait for. Defaults to `appPackage` if not provided.
|
|
9
|
+
* @param appWaitActivity The activity name to wait for. Defaults to `appActivity` if not provided.
|
|
10
|
+
* @param intentAction The intent action to use.
|
|
11
|
+
* @param intentCategory The intent category to use.
|
|
12
|
+
* @param intentFlags The intent flags to use.
|
|
13
|
+
* @param optionalIntentArguments Optional intent arguments.
|
|
14
|
+
* @param dontStopAppOnReset If `true`, does not stop the app on reset. If not provided, uses the capability value.
|
|
15
|
+
* @returns Promise that resolves when the activity is started.
|
|
14
16
|
*/
|
|
15
|
-
export function startActivity(this:
|
|
16
|
-
export class startActivity {
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated
|
|
19
|
-
* @this {import('../driver').AndroidDriver}
|
|
20
|
-
* @param {string} appPackage
|
|
21
|
-
* @param {string} appActivity
|
|
22
|
-
* @param {string} [appWaitPackage]
|
|
23
|
-
* @param {string} [appWaitActivity]
|
|
24
|
-
* @param {string} [intentAction]
|
|
25
|
-
* @param {string} [intentCategory]
|
|
26
|
-
* @param {string} [intentFlags]
|
|
27
|
-
* @param {string} [optionalIntentArguments]
|
|
28
|
-
* @param {boolean} [dontStopAppOnReset]
|
|
29
|
-
* @returns {Promise<void>}
|
|
30
|
-
*/
|
|
31
|
-
constructor(this: import("../driver").AndroidDriver, appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string, intentAction?: string, intentCategory?: string, intentFlags?: string, optionalIntentArguments?: string, dontStopAppOnReset?: boolean);
|
|
32
|
-
_cachedActivityArgs: import("@appium/types").StringRecord;
|
|
33
|
-
}
|
|
17
|
+
export declare function startActivity(this: AndroidDriver, appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string, intentAction?: string, intentCategory?: string, intentFlags?: string, optionalIntentArguments?: string, dontStopAppOnReset?: boolean): Promise<void>;
|
|
34
18
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
19
|
+
* Starts an Android activity using the activity manager.
|
|
20
|
+
*
|
|
21
|
+
* @param wait Set it to `true` if you want to block the method call
|
|
37
22
|
* until the activity manager's process returns the control to the system.
|
|
38
|
-
* false by default.
|
|
39
|
-
* @param
|
|
40
|
-
* app before starting the activity
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* for more details on possible windowing modes (constants starting with
|
|
46
|
-
* `WINDOWING_MODE_`).
|
|
47
|
-
* @param {string | number} [activityType] The activity type to launch the activity as.
|
|
23
|
+
* `false` by default.
|
|
24
|
+
* @param stop Set it to `true` to force stop the target
|
|
25
|
+
* app before starting the activity. `false` by default.
|
|
26
|
+
* @param windowingMode The windowing mode to launch the activity into.
|
|
27
|
+
* Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
|
|
28
|
+
* for more details on possible windowing modes (constants starting with `WINDOWING_MODE_`).
|
|
29
|
+
* @param activityType The activity type to launch the activity as.
|
|
48
30
|
* Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/WindowConfiguration.java
|
|
49
31
|
* for more details on possible activity types (constants starting with `ACTIVITY_TYPE_`).
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
53
|
-
*
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
61
|
-
* @param
|
|
62
|
-
*
|
|
32
|
+
* @param display The display identifier to launch the activity into.
|
|
33
|
+
* @param user The user ID for which the activity is started.
|
|
34
|
+
* @param intent The name of the activity intent to start, for example
|
|
35
|
+
* `com.some.package.name/.YourActivitySubClassName`.
|
|
36
|
+
* @param action Action name.
|
|
37
|
+
* @param pkg Package name.
|
|
38
|
+
* @param uri Unified resource identifier.
|
|
39
|
+
* @param mimeType Mime type.
|
|
40
|
+
* @param identifier Optional identifier.
|
|
41
|
+
* @param component Component name.
|
|
42
|
+
* @param categories One or more category names.
|
|
43
|
+
* @param extras Optional intent arguments. Must be represented as array of arrays,
|
|
44
|
+
* where each subarray item contains two or three string items: value type, key name and the value itself.
|
|
45
|
+
* See {@link IntentOpts} for supported value types.
|
|
46
|
+
* @param flags Intent startup-specific flags as a hexadecimal string.
|
|
47
|
+
* @returns Promise that resolves to the command output string.
|
|
63
48
|
*/
|
|
64
|
-
export function mobileStartActivity(this:
|
|
49
|
+
export declare function mobileStartActivity(this: AndroidDriver, wait?: boolean, stop?: boolean, windowingMode?: string | number, activityType?: string | number, display?: number | string, user?: string, intent?: string, action?: string, pkg?: string, uri?: string, mimeType?: string, identifier?: string, component?: string, categories?: string | string[], extras?: string[][], flags?: string): Promise<string>;
|
|
65
50
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* @param
|
|
71
|
-
*
|
|
72
|
-
* @param
|
|
73
|
-
*
|
|
74
|
-
* @param
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
81
|
-
* @param
|
|
82
|
-
*
|
|
51
|
+
* Sends a broadcast intent to the Android system.
|
|
52
|
+
*
|
|
53
|
+
* @param receiverPermission Require receiver to hold the given permission.
|
|
54
|
+
* @param allowBackgroundActivityStarts Whether the receiver may start activities even if in the background.
|
|
55
|
+
* @param user The user ID for which the broadcast is sent.
|
|
56
|
+
* The `current` alias assumes the current user ID. `all` by default.
|
|
57
|
+
* @param intent The name of the activity intent to broadcast, for example
|
|
58
|
+
* `com.some.package.name/.YourServiceSubClassName`.
|
|
59
|
+
* @param action Action name.
|
|
60
|
+
* @param pkg Package name.
|
|
61
|
+
* @param uri Unified resource identifier.
|
|
62
|
+
* @param mimeType Mime type.
|
|
63
|
+
* @param identifier Optional identifier.
|
|
64
|
+
* @param component Component name.
|
|
65
|
+
* @param categories One or more category names.
|
|
66
|
+
* @param extras Optional intent arguments. Must be represented as array of arrays,
|
|
67
|
+
* where each subarray item contains two or three string items: value type, key name and the value itself.
|
|
68
|
+
* See {@link IntentOpts} for supported value types.
|
|
69
|
+
* @param flags Intent startup-specific flags as a hexadecimal string.
|
|
70
|
+
* @returns Promise that resolves to the command output string.
|
|
83
71
|
*/
|
|
84
|
-
export function mobileBroadcast(this:
|
|
72
|
+
export declare function mobileBroadcast(this: AndroidDriver, receiverPermission?: string, allowBackgroundActivityStarts?: boolean, user?: string | number, intent?: string, action?: string, pkg?: string, uri?: string, mimeType?: string, identifier?: string, component?: string, categories?: string | string[], extras?: string[][], flags?: string): Promise<string>;
|
|
85
73
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* @param
|
|
91
|
-
*
|
|
92
|
-
* @param
|
|
93
|
-
*
|
|
94
|
-
* @param
|
|
95
|
-
* @param
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
98
|
-
* @param
|
|
99
|
-
* @param
|
|
100
|
-
* @param
|
|
101
|
-
* @
|
|
74
|
+
* Starts an Android service.
|
|
75
|
+
*
|
|
76
|
+
* @param foreground Set it to `true` if your service must be started as foreground service.
|
|
77
|
+
* This option is ignored if the API level of the device under test is below 26 (Android 8).
|
|
78
|
+
* @param user The user ID for which the service is started.
|
|
79
|
+
* The `current` user id is used by default.
|
|
80
|
+
* @param intent The name of the activity intent to start, for example
|
|
81
|
+
* `com.some.package.name/.YourServiceSubClassName`.
|
|
82
|
+
* @param action Action name.
|
|
83
|
+
* @param pkg Package name.
|
|
84
|
+
* @param uri Unified resource identifier.
|
|
85
|
+
* @param mimeType Mime type.
|
|
86
|
+
* @param identifier Optional identifier.
|
|
87
|
+
* @param component Component name.
|
|
88
|
+
* @param categories One or more category names.
|
|
89
|
+
* @param extras Optional intent arguments. Must be represented as array of arrays,
|
|
90
|
+
* where each subarray item contains two or three string items: value type, key name and the value itself.
|
|
91
|
+
* See {@link IntentOpts} for supported value types.
|
|
92
|
+
* @param flags Intent startup-specific flags as a hexadecimal string.
|
|
93
|
+
* @returns Promise that resolves to the command output string.
|
|
102
94
|
*/
|
|
103
|
-
export function mobileStartService(this:
|
|
95
|
+
export declare function mobileStartService(this: AndroidDriver, foreground?: boolean, user?: string, intent?: string, action?: string, pkg?: string, uri?: string, mimeType?: string, identifier?: string, component?: string, categories?: string | string[], extras?: string[][], flags?: string): Promise<string>;
|
|
104
96
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* @param
|
|
108
|
-
* @param
|
|
109
|
-
*
|
|
110
|
-
* @param
|
|
111
|
-
* @param
|
|
112
|
-
* @param
|
|
113
|
-
* @param
|
|
114
|
-
* @param
|
|
115
|
-
* @param
|
|
116
|
-
* @param
|
|
117
|
-
* @
|
|
97
|
+
* Stops an Android service.
|
|
98
|
+
*
|
|
99
|
+
* @param user The user ID for which the service is stopped.
|
|
100
|
+
* @param intent The name of the activity intent to stop, for example
|
|
101
|
+
* `com.some.package.name/.YourServiceSubClassName`.
|
|
102
|
+
* @param action Action name.
|
|
103
|
+
* @param pkg Package name.
|
|
104
|
+
* @param uri Unified resource identifier.
|
|
105
|
+
* @param mimeType Mime type.
|
|
106
|
+
* @param identifier Optional identifier.
|
|
107
|
+
* @param component Component name.
|
|
108
|
+
* @param categories One or more category names.
|
|
109
|
+
* @param extras Optional intent arguments. Must be represented as array of arrays,
|
|
110
|
+
* where each subarray item contains two or three string items: value type, key name and the value itself.
|
|
111
|
+
* See {@link IntentOpts} for supported value types.
|
|
112
|
+
* @param flags Intent startup-specific flags as a hexadecimal string.
|
|
113
|
+
* @returns Promise that resolves to the command output string.
|
|
114
|
+
* If the service was already stopped, returns the error message.
|
|
118
115
|
*/
|
|
119
|
-
export function mobileStopService(this:
|
|
120
|
-
export type ADB = import("appium-adb").ADB;
|
|
116
|
+
export declare function mobileStopService(this: AndroidDriver, user?: string, intent?: string, action?: string, pkg?: string, uri?: string, mimeType?: string, identifier?: string, component?: string, categories?: string | string[], extras?: string[][], flags?: string): Promise<string>;
|
|
121
117
|
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../lib/commands/intent.
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../lib/commands/intent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAuB7C;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,cAAc,CAAC,EAAE,MAAM,EACvB,eAAe,CAAC,EAAE,MAAM,EACxB,YAAY,CAAC,EAAE,MAAM,EACrB,cAAc,CAAC,EAAE,MAAM,EACvB,WAAW,CAAC,EAAE,MAAM,EACp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