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.
- package/CHANGELOG.md +7 -0
- package/build/lib/commands/actions.d.ts +6 -224
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +306 -405
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +7 -9
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +24 -18
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +7 -313
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +135 -293
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/context.d.ts +8 -92
- package/build/lib/commands/context.d.ts.map +1 -1
- package/build/lib/commands/context.js +381 -439
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/element.d.ts +8 -35
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +153 -136
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/emu-console.d.ts +6 -48
- package/build/lib/commands/emu-console.d.ts.map +1 -1
- package/build/lib/commands/emu-console.js +19 -34
- package/build/lib/commands/emu-console.js.map +1 -1
- package/build/lib/commands/execute.d.ts +6 -5
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +77 -66
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +7 -128
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +183 -219
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +8 -12
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +19 -23
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +9 -132
- package/build/lib/commands/general.d.ts.map +1 -1
- package/build/lib/commands/general.js +281 -312
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/ime.d.ts +7 -10
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +47 -35
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/index.d.ts +27 -2
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +41 -19
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/intent.d.ts +7 -417
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +104 -216
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +6 -5
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +16 -8
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/log.d.ts +7 -44
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +146 -108
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +7 -143
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +113 -140
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/mixins.d.ts +740 -0
- package/build/lib/commands/mixins.d.ts.map +1 -0
- package/build/lib/commands/mixins.js +19 -0
- package/build/lib/commands/mixins.js.map +1 -0
- package/build/lib/commands/network.d.ts +7 -138
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +212 -254
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +24 -70
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +144 -100
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +8 -92
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +75 -87
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +7 -193
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +151 -182
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/shell.d.ts +7 -7
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +40 -33
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +9 -103
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +261 -218
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +22 -90
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +76 -74
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/touch.d.ts +10 -29
- package/build/lib/commands/touch.d.ts.map +1 -1
- package/build/lib/commands/touch.js +301 -285
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/types.d.ts +978 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/build/lib/constraints.d.ts +291 -0
- package/build/lib/constraints.d.ts.map +1 -0
- package/build/lib/{desired-caps.js → constraints.js} +103 -102
- package/build/lib/constraints.js.map +1 -0
- package/build/lib/driver.d.ts +68 -37
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +123 -80
- package/build/lib/driver.js.map +1 -1
- package/build/lib/helpers/android.d.ts +164 -0
- package/build/lib/helpers/android.d.ts.map +1 -0
- package/build/lib/helpers/android.js +819 -0
- package/build/lib/helpers/android.js.map +1 -0
- package/build/lib/helpers/index.d.ts +7 -0
- package/build/lib/helpers/index.d.ts.map +1 -0
- package/build/lib/helpers/index.js +29 -0
- package/build/lib/helpers/index.js.map +1 -0
- package/build/lib/helpers/types.d.ts +121 -0
- package/build/lib/helpers/types.d.ts.map +1 -0
- package/build/lib/helpers/types.js +3 -0
- package/build/lib/helpers/types.js.map +1 -0
- package/build/lib/helpers/unlock.d.ts +32 -0
- package/build/lib/helpers/unlock.d.ts.map +1 -0
- package/build/lib/helpers/unlock.js +273 -0
- package/build/lib/helpers/unlock.js.map +1 -0
- package/build/lib/helpers/webview.d.ts +74 -0
- package/build/lib/helpers/webview.d.ts.map +1 -0
- package/build/lib/helpers/webview.js +421 -0
- package/build/lib/helpers/webview.js.map +1 -0
- package/build/lib/index.d.ts +9 -0
- package/build/lib/index.d.ts.map +1 -0
- package/build/lib/index.js +37 -0
- package/build/lib/index.js.map +1 -0
- package/build/lib/method-map.d.ts +0 -8
- package/build/lib/method-map.d.ts.map +1 -1
- package/build/lib/method-map.js +63 -74
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/stubs.d.ts +0 -1
- package/build/lib/stubs.d.ts.map +1 -1
- package/build/lib/stubs.js +1 -0
- package/build/lib/stubs.js.map +1 -1
- package/build/lib/utils.d.ts +1 -1
- package/build/lib/utils.d.ts.map +1 -1
- package/lib/commands/actions.js +351 -464
- package/lib/commands/alert.js +27 -17
- package/lib/commands/app-management.js +156 -314
- package/lib/commands/context.js +457 -441
- package/lib/commands/element.js +201 -157
- package/lib/commands/emu-console.js +25 -45
- package/lib/commands/execute.js +106 -90
- package/lib/commands/file-actions.js +222 -240
- package/lib/commands/find.ts +103 -0
- package/lib/commands/general.js +327 -339
- package/lib/commands/ime.js +50 -34
- package/lib/commands/{index.js → index.ts} +20 -24
- package/lib/commands/intent.js +108 -249
- package/lib/commands/keyboard.js +20 -8
- package/lib/commands/log.js +172 -116
- package/lib/commands/media-projection.js +134 -161
- package/lib/commands/mixins.ts +966 -0
- package/lib/commands/network.js +252 -281
- package/lib/commands/performance.js +203 -132
- package/lib/commands/permissions.js +108 -109
- package/lib/commands/recordscreen.js +212 -209
- package/lib/commands/shell.js +51 -40
- package/lib/commands/streamscreen.js +355 -289
- package/lib/commands/system-bars.js +92 -83
- package/lib/commands/touch.js +357 -294
- package/lib/commands/types.ts +1097 -0
- package/lib/{desired-caps.js → constraints.ts} +106 -103
- package/lib/{driver.js → driver.ts} +278 -132
- package/lib/helpers/android.ts +1143 -0
- package/lib/helpers/index.ts +6 -0
- package/lib/helpers/types.ts +134 -0
- package/lib/helpers/unlock.ts +329 -0
- package/lib/helpers/webview.ts +582 -0
- package/lib/index.ts +18 -0
- package/lib/method-map.js +87 -98
- package/lib/stubs.ts +0 -1
- package/package.json +26 -19
- package/build/index.js +0 -51
- package/build/lib/android-helpers.d.ts +0 -136
- package/build/lib/android-helpers.d.ts.map +0 -1
- package/build/lib/android-helpers.js +0 -855
- package/build/lib/android-helpers.js.map +0 -1
- package/build/lib/commands/coverage.d.ts +0 -5
- package/build/lib/commands/coverage.d.ts.map +0 -1
- package/build/lib/commands/coverage.js +0 -19
- package/build/lib/commands/coverage.js.map +0 -1
- package/build/lib/desired-caps.d.ts +0 -353
- package/build/lib/desired-caps.d.ts.map +0 -1
- package/build/lib/desired-caps.js.map +0 -1
- package/build/lib/unlock-helpers.d.ts +0 -38
- package/build/lib/unlock-helpers.d.ts.map +0 -1
- package/build/lib/unlock-helpers.js +0 -266
- package/build/lib/unlock-helpers.js.map +0 -1
- package/build/lib/webview-helpers.d.ts +0 -224
- package/build/lib/webview-helpers.d.ts.map +0 -1
- package/build/lib/webview-helpers.js +0 -528
- package/build/lib/webview-helpers.js.map +0 -1
- package/index.js +0 -24
- package/lib/android-helpers.js +0 -983
- package/lib/commands/coverage.js +0 -18
- package/lib/commands/find.js +0 -82
- package/lib/unlock-helpers.js +0 -278
- package/lib/webview-helpers.js +0 -602
|
@@ -1,75 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// @ts-check
|
|
2
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
5
|
};
|
|
5
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
8
|
const driver_1 = require("appium/driver");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
const mixins_1 = require("./mixins");
|
|
10
|
+
/**
|
|
11
|
+
* @type {import('./mixins').ExecuteMixin & ThisType<import('../driver').AndroidDriver>}
|
|
12
|
+
* @satisfies {import('@appium/types').ExternalDriver}
|
|
13
|
+
*/
|
|
14
|
+
const ExecuteMixin = {
|
|
15
|
+
async execute(script, args) {
|
|
16
|
+
if (script.match(/^mobile:/)) {
|
|
17
|
+
this.log.info(`Executing native command '${script}'`);
|
|
18
|
+
script = script.replace(/^mobile:/, '').trim();
|
|
19
|
+
return await this.executeMobile(script, lodash_1.default.isArray(args) ? /** @type {import('@appium/types').StringRecord} */ (args[0]) : args);
|
|
20
|
+
}
|
|
21
|
+
if (!this.isWebContext()) {
|
|
22
|
+
throw new driver_1.errors.NotImplementedError();
|
|
23
|
+
}
|
|
24
|
+
const endpoint =
|
|
25
|
+
/** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy
|
|
26
|
+
.downstreamProtocol === driver_1.PROTOCOLS.MJSONWP
|
|
27
|
+
? '/execute'
|
|
28
|
+
: '/execute/sync';
|
|
29
|
+
return await /** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy.command(endpoint, 'POST', {
|
|
30
|
+
script,
|
|
31
|
+
args,
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
async executeMobile(mobileCommand, opts = {}) {
|
|
35
|
+
const mobileCommandsMapping = {
|
|
36
|
+
shell: 'mobileShell',
|
|
37
|
+
execEmuConsoleCommand: 'mobileExecEmuConsoleCommand',
|
|
38
|
+
startLogsBroadcast: 'mobileStartLogsBroadcast',
|
|
39
|
+
stopLogsBroadcast: 'mobileStopLogsBroadcast',
|
|
40
|
+
changePermissions: 'mobileChangePermissions',
|
|
41
|
+
getPermissions: 'mobileGetPermissions',
|
|
42
|
+
performEditorAction: 'mobilePerformEditorAction',
|
|
43
|
+
sensorSet: 'sensorSet',
|
|
44
|
+
getDeviceTime: 'mobileGetDeviceTime',
|
|
45
|
+
startScreenStreaming: 'mobileStartScreenStreaming',
|
|
46
|
+
stopScreenStreaming: 'mobileStopScreenStreaming',
|
|
47
|
+
getNotifications: 'mobileGetNotifications',
|
|
48
|
+
listSms: 'mobileListSms',
|
|
49
|
+
pushFile: 'mobilePushFile',
|
|
50
|
+
pullFile: 'mobilePullFile',
|
|
51
|
+
pullFolder: 'mobilePullFolder',
|
|
52
|
+
deleteFile: 'mobileDeleteFile',
|
|
53
|
+
isAppInstalled: 'mobileIsAppInstalled',
|
|
54
|
+
queryAppState: 'mobileQueryAppState',
|
|
55
|
+
activateApp: 'mobileActivateApp',
|
|
56
|
+
removeApp: 'mobileRemoveApp',
|
|
57
|
+
terminateApp: 'mobileTerminateApp',
|
|
58
|
+
installApp: 'mobileInstallApp',
|
|
59
|
+
clearApp: 'mobileClearApp',
|
|
60
|
+
startService: 'mobileStartService',
|
|
61
|
+
stopService: 'mobileStopService',
|
|
62
|
+
startActivity: 'mobileStartActivity',
|
|
63
|
+
broadcast: 'mobileBroadcast',
|
|
64
|
+
getContexts: 'mobileGetContexts',
|
|
65
|
+
lock: 'mobileLock',
|
|
66
|
+
unlock: 'mobileUnlock',
|
|
67
|
+
refreshGpsCache: 'mobileRefreshGpsCache',
|
|
68
|
+
startMediaProjectionRecording: 'mobileStartMediaProjectionRecording',
|
|
69
|
+
isMediaProjectionRecordingRunning: 'mobileIsMediaProjectionRecordingRunning',
|
|
70
|
+
stopMediaProjectionRecording: 'mobileStopMediaProjectionRecording',
|
|
71
|
+
getConnectivity: 'mobileGetConnectivity',
|
|
72
|
+
setConnectivity: 'mobileSetConnectivity',
|
|
73
|
+
hideKeyboard: 'hideKeyboard',
|
|
74
|
+
isKeyboardShown: 'isKeyboardShown',
|
|
75
|
+
};
|
|
76
|
+
if (!lodash_1.default.has(mobileCommandsMapping, mobileCommand)) {
|
|
77
|
+
throw new driver_1.errors.UnknownCommandError(`Unknown mobile command "${mobileCommand}". ` +
|
|
78
|
+
`Only ${lodash_1.default.keys(mobileCommandsMapping)} commands are supported.`);
|
|
79
|
+
}
|
|
80
|
+
// @ts-expect-error fine for now until we replace with execute methods
|
|
81
|
+
return await this[mobileCommandsMapping[mobileCommand]](opts);
|
|
82
|
+
},
|
|
25
83
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
shell: 'mobileShell',
|
|
29
|
-
execEmuConsoleCommand: 'mobileExecEmuConsoleCommand',
|
|
30
|
-
startLogsBroadcast: 'mobileStartLogsBroadcast',
|
|
31
|
-
stopLogsBroadcast: 'mobileStopLogsBroadcast',
|
|
32
|
-
changePermissions: 'mobileChangePermissions',
|
|
33
|
-
getPermissions: 'mobileGetPermissions',
|
|
34
|
-
performEditorAction: 'mobilePerformEditorAction',
|
|
35
|
-
sensorSet: 'sensorSet',
|
|
36
|
-
getDeviceTime: 'mobileGetDeviceTime',
|
|
37
|
-
startScreenStreaming: 'mobileStartScreenStreaming',
|
|
38
|
-
stopScreenStreaming: 'mobileStopScreenStreaming',
|
|
39
|
-
getNotifications: 'mobileGetNotifications',
|
|
40
|
-
listSms: 'mobileListSms',
|
|
41
|
-
pushFile: 'mobilePushFile',
|
|
42
|
-
pullFile: 'mobilePullFile',
|
|
43
|
-
pullFolder: 'mobilePullFolder',
|
|
44
|
-
deleteFile: 'mobileDeleteFile',
|
|
45
|
-
isAppInstalled: 'mobileIsAppInstalled',
|
|
46
|
-
queryAppState: 'mobileQueryAppState',
|
|
47
|
-
activateApp: 'mobileActivateApp',
|
|
48
|
-
removeApp: 'mobileRemoveApp',
|
|
49
|
-
terminateApp: 'mobileTerminateApp',
|
|
50
|
-
installApp: 'mobileInstallApp',
|
|
51
|
-
clearApp: 'mobileClearApp',
|
|
52
|
-
startService: 'mobileStartService',
|
|
53
|
-
stopService: 'mobileStopService',
|
|
54
|
-
startActivity: 'mobileStartActivity',
|
|
55
|
-
broadcast: 'mobileBroadcast',
|
|
56
|
-
getContexts: 'mobileGetContexts',
|
|
57
|
-
lock: 'mobileLock',
|
|
58
|
-
unlock: 'mobileUnlock',
|
|
59
|
-
refreshGpsCache: 'mobileRefreshGpsCache',
|
|
60
|
-
startMediaProjectionRecording: 'mobileStartMediaProjectionRecording',
|
|
61
|
-
isMediaProjectionRecordingRunning: 'mobileIsMediaProjectionRecordingRunning',
|
|
62
|
-
stopMediaProjectionRecording: 'mobileStopMediaProjectionRecording',
|
|
63
|
-
getConnectivity: 'mobileGetConnectivity',
|
|
64
|
-
setConnectivity: 'mobileSetConnectivity',
|
|
65
|
-
hideKeyboard: 'hideKeyboard',
|
|
66
|
-
isKeyboardShown: 'isKeyboardShown',
|
|
67
|
-
};
|
|
68
|
-
if (!lodash_1.default.has(mobileCommandsMapping, mobileCommand)) {
|
|
69
|
-
throw new driver_1.errors.UnknownCommandError(`Unknown mobile command "${mobileCommand}". ` +
|
|
70
|
-
`Only ${lodash_1.default.keys(mobileCommandsMapping)} commands are supported.`);
|
|
71
|
-
}
|
|
72
|
-
return await this[mobileCommandsMapping[mobileCommand]](opts);
|
|
73
|
-
};
|
|
74
|
-
exports.default = extensions;
|
|
84
|
+
(0, mixins_1.mixin)(ExecuteMixin);
|
|
85
|
+
exports.default = ExecuteMixin;
|
|
75
86
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":";AAAA,YAAY;;;;;AAEZ,oDAAuB;AACvB,0CAAgD;AAChD,qCAA+B;AAE/B;;;GAGG;AACH,MAAM,YAAY,GAAG;IACnB,KAAK,C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;AAEpB,kBAAe,YAAY,CAAC"}
|
|
@@ -1,129 +1,8 @@
|
|
|
1
|
-
export default
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
remotePath: string;
|
|
10
|
-
};
|
|
11
|
-
export type PushFileOptions = {
|
|
12
|
-
/**
|
|
13
|
-
* The full path to the remote file
|
|
14
|
-
* or a specially formatted path, which points to an item inside an app bundle,
|
|
15
|
-
* for example `@my.app.id/my/path`. It is mandatory for the app bundle to have
|
|
16
|
-
* debugging enabled in order to use the latter remotePath format.
|
|
17
|
-
*/
|
|
18
|
-
remotePath: string;
|
|
19
|
-
/**
|
|
20
|
-
* Base64-encoded content of the file to be pushed.
|
|
21
|
-
*/
|
|
22
|
-
payload: string;
|
|
23
|
-
};
|
|
24
|
-
export type PullFolderOptions = {
|
|
25
|
-
/**
|
|
26
|
-
* The full path to the remote folder.
|
|
27
|
-
*/
|
|
28
|
-
remotePath: string;
|
|
29
|
-
};
|
|
30
|
-
export type DeleteFileOpts = {
|
|
31
|
-
/**
|
|
32
|
-
* The full path to the remote file
|
|
33
|
-
* or a file inside an application bundle (for example `@my.app.id/path/in/bundle`)
|
|
34
|
-
*/
|
|
35
|
-
remotePath: string;
|
|
36
|
-
};
|
|
37
|
-
export namespace commands {
|
|
38
|
-
/**
|
|
39
|
-
* Pulls a remote file from the device.
|
|
40
|
-
* It is required, that a package has debugging flag enabled
|
|
41
|
-
* in order to access its files.
|
|
42
|
-
*
|
|
43
|
-
* @param {string} remotePath The full path to the remote file
|
|
44
|
-
* or a specially formatted path, which points to an item inside app bundle
|
|
45
|
-
* @returns {string} Base64 encoded content of the pulled file
|
|
46
|
-
* @throws {Error} If the pull operation failed
|
|
47
|
-
*/
|
|
48
|
-
function pullFile(remotePath: string): string;
|
|
49
|
-
/**
|
|
50
|
-
* @typedef {Object} PullFileOptions
|
|
51
|
-
* @property {string} remotePath The full path to the remote file
|
|
52
|
-
* or a specially formatted path, which points to an item inside an app bundle,
|
|
53
|
-
* for example `@my.app.id/my/path`. It is mandatory for the app bundle to have
|
|
54
|
-
* debugging enabled in order to use the latter remotePath format.
|
|
55
|
-
*/
|
|
56
|
-
/**
|
|
57
|
-
* Pulls a remote file from the device.
|
|
58
|
-
*
|
|
59
|
-
* @param {PullFileOptions} opts
|
|
60
|
-
* @returns {string} The same as `pullFile`
|
|
61
|
-
*/
|
|
62
|
-
function mobilePullFile(opts?: PullFileOptions): string;
|
|
63
|
-
/**
|
|
64
|
-
* Pushes the given data to a file on the remote device
|
|
65
|
-
* It is required, that a package has debugging flag enabled
|
|
66
|
-
* in order to access its files.
|
|
67
|
-
* After a file is pushed it gets automatically scanned for possible
|
|
68
|
-
* media occurrences. If the scan succeeds then the file is added to the
|
|
69
|
-
* media library.
|
|
70
|
-
*
|
|
71
|
-
* @param {string} remotePath The full path to the remote file or
|
|
72
|
-
* a file inside a package bundle
|
|
73
|
-
* @param {string} base64Data Base64 encoded data to be written to the
|
|
74
|
-
* remote file. The remote file will be silently overridden if it already exists.
|
|
75
|
-
* @throws {Error} If there was an error while pushing the data
|
|
76
|
-
*/
|
|
77
|
-
function pushFile(remotePath: string, base64Data: string): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* @typedef {Object} PushFileOptions
|
|
80
|
-
* @property {string} remotePath The full path to the remote file
|
|
81
|
-
* or a specially formatted path, which points to an item inside an app bundle,
|
|
82
|
-
* for example `@my.app.id/my/path`. It is mandatory for the app bundle to have
|
|
83
|
-
* debugging enabled in order to use the latter remotePath format.
|
|
84
|
-
* @property {string} payload Base64-encoded content of the file to be pushed.
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* Pushes the given data to a file on the remote device.
|
|
88
|
-
*
|
|
89
|
-
* @param {PushFileOptions} opts
|
|
90
|
-
*/
|
|
91
|
-
function mobilePushFile(opts?: PushFileOptions): Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Pulls the whole folder from the remote device
|
|
94
|
-
*
|
|
95
|
-
* @param {string} remotePath The full path to a folder on the
|
|
96
|
-
* remote device or a folder inside an application bundle
|
|
97
|
-
* @returns {string} Base64-encoded and zipped content of the folder
|
|
98
|
-
* @throws {Error} If there was a failure while getting the folder content
|
|
99
|
-
*/
|
|
100
|
-
function pullFolder(remotePath: string): string;
|
|
101
|
-
/**
|
|
102
|
-
* @typedef {Object} PullFolderOptions
|
|
103
|
-
* @property {string} remotePath The full path to the remote folder.
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* Pulls the whole folder from the device under test.
|
|
107
|
-
*
|
|
108
|
-
* @param {PullFolderOptions} opts
|
|
109
|
-
* @returns {string} The same as `pullFolder`
|
|
110
|
-
*/
|
|
111
|
-
function mobilePullFolder(opts?: PullFolderOptions): string;
|
|
112
|
-
/**
|
|
113
|
-
* @typedef {Object} DeleteFileOpts
|
|
114
|
-
* @property {!string} remotePath The full path to the remote file
|
|
115
|
-
* or a file inside an application bundle (for example `@my.app.id/path/in/bundle`)
|
|
116
|
-
*/
|
|
117
|
-
/**
|
|
118
|
-
* Deletes a file on the remote device
|
|
119
|
-
*
|
|
120
|
-
* @param {DeleteFileOpts} opts
|
|
121
|
-
* @returns {boolean} `true` if the remote file has been successfully deleted.
|
|
122
|
-
* If the path to a remote file is valid, but the file itself does not exist
|
|
123
|
-
* then `false` is returned.
|
|
124
|
-
* @throws {Error} If the argument is invalid or there was an error while
|
|
125
|
-
* deleting the file
|
|
126
|
-
*/
|
|
127
|
-
function mobileDeleteFile(opts?: DeleteFileOpts): boolean;
|
|
128
|
-
}
|
|
1
|
+
export default FileActionsMixin;
|
|
2
|
+
export type ADB = import('appium-adb').ADB;
|
|
3
|
+
/**
|
|
4
|
+
* @type {import('./mixins').FileActionsMixin & ThisType<import('../driver').AndroidDriver>}
|
|
5
|
+
* @satisfies {import('@appium/types').ExternalDriver}
|
|
6
|
+
*/
|
|
7
|
+
declare const FileActionsMixin: import('./mixins').FileActionsMixin & ThisType<import('../driver').AndroidDriver>;
|
|
129
8
|
//# sourceMappingURL=file-actions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/file-actions.js"],"names":[],"mappings":";kBAsVa,OAAO,YAAY,EAAE,GAAG;AArQrC;;;GAGG;AACH,gCAHU,OAAO,UAAU,EAAE,gBAAgB,GAAG,SAAS,OAAO,WAAW,EAAE,aAAa,CAAC,CAuJzF"}
|