appium-android-driver 7.8.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/build/lib/commands/app-management.d.ts +129 -5
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +433 -128
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +17 -4
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +32 -33
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/context/cache.d.ts +19 -0
- package/build/lib/commands/context/cache.d.ts.map +1 -0
- package/build/lib/commands/context/cache.js +32 -0
- package/build/lib/commands/context/cache.js.map +1 -0
- package/build/lib/commands/context/exports.d.ts +141 -0
- package/build/lib/commands/context/exports.d.ts.map +1 -0
- package/build/lib/commands/context/exports.js +351 -0
- package/build/lib/commands/context/exports.js.map +1 -0
- package/build/lib/commands/context/helpers.d.ts +98 -0
- package/build/lib/commands/context/helpers.d.ts.map +1 -0
- package/build/lib/commands/context/helpers.js +715 -0
- package/build/lib/commands/context/helpers.js.map +1 -0
- package/build/lib/commands/device/common.d.ts +23 -0
- package/build/lib/commands/device/common.d.ts.map +1 -0
- package/build/lib/commands/device/common.js +230 -0
- package/build/lib/commands/device/common.js.map +1 -0
- package/build/lib/commands/device/emulator-actions.d.ts +114 -0
- package/build/lib/commands/device/emulator-actions.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-actions.js +197 -0
- package/build/lib/commands/device/emulator-actions.js.map +1 -0
- package/build/lib/commands/device/emulator-console.d.ts +7 -0
- package/build/lib/commands/device/emulator-console.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-console.js +24 -0
- package/build/lib/commands/device/emulator-console.js.map +1 -0
- package/build/lib/commands/device/utils.d.ts +50 -0
- package/build/lib/commands/device/utils.d.ts.map +1 -0
- package/build/lib/commands/device/utils.js +238 -0
- package/build/lib/commands/device/utils.js.map +1 -0
- package/build/lib/commands/deviceidle.d.ts +8 -5
- package/build/lib/commands/deviceidle.d.ts.map +1 -1
- package/build/lib/commands/deviceidle.js +31 -37
- package/build/lib/commands/deviceidle.js.map +1 -1
- package/build/lib/commands/element.d.ts +99 -5
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +152 -116
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +12 -4
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +83 -78
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +42 -5
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +230 -194
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +5 -4
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +7 -10
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +45 -0
- package/build/lib/commands/geolocation.d.ts.map +1 -0
- package/build/lib/commands/geolocation.js +182 -0
- package/build/lib/commands/geolocation.js.map +1 -0
- package/build/lib/commands/ime.d.ts +25 -5
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +59 -42
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/intent.d.ts +56 -5
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +135 -83
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +58 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +119 -17
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/lock/exports.d.ts +301 -0
- package/build/lib/commands/lock/exports.d.ts.map +1 -0
- package/build/lib/commands/lock/exports.js +121 -0
- package/build/lib/commands/lock/exports.js.map +1 -0
- package/build/lib/commands/lock/helpers.d.ts +349 -0
- package/build/lib/commands/lock/helpers.d.ts.map +1 -0
- package/build/lib/commands/lock/helpers.js +375 -0
- package/build/lib/commands/lock/helpers.js.map +1 -0
- package/build/lib/commands/log.d.ts +59 -5
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +150 -140
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +16 -5
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +69 -58
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/memory.d.ts +9 -5
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +19 -24
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/misc.d.ts +42 -0
- package/build/lib/commands/misc.d.ts.map +1 -0
- package/build/lib/commands/misc.js +100 -0
- package/build/lib/commands/misc.js.map +1 -0
- package/build/lib/commands/network.d.ts +61 -5
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +196 -189
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +67 -27
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +105 -80
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +12 -6
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +65 -62
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +44 -5
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +131 -126
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/resources.d.ts +16 -0
- package/build/lib/commands/resources.d.ts.map +1 -0
- package/build/lib/commands/resources.js +91 -0
- package/build/lib/commands/resources.js.map +1 -0
- package/build/lib/commands/shell.d.ts +8 -5
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +29 -33
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +34 -6
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +166 -162
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +18 -13
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +68 -64
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/time.d.ts +14 -0
- package/build/lib/commands/time.d.ts.map +1 -0
- package/build/lib/commands/time.js +39 -0
- package/build/lib/commands/time.js.map +1 -0
- package/build/lib/commands/touch.d.ts +99 -6
- package/build/lib/commands/touch.d.ts.map +1 -1
- package/build/lib/commands/touch.js +399 -280
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/types.d.ts +115 -3
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/doctor/checks.d.ts.map +1 -1
- package/build/lib/doctor/checks.js +4 -4
- package/build/lib/doctor/checks.js.map +1 -1
- package/build/lib/driver.d.ts +224 -27
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +232 -7
- package/build/lib/driver.js.map +1 -1
- package/build/lib/index.d.ts +1 -4
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +1 -13
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +0 -23
- package/build/lib/method-map.d.ts.map +1 -1
- package/build/lib/method-map.js +0 -11
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/utils.d.ts +12 -0
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +38 -2
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/app-management.js +470 -145
- package/lib/commands/appearance.js +29 -36
- package/lib/commands/context/cache.js +29 -0
- package/lib/commands/context/exports.js +379 -0
- package/lib/commands/context/helpers.js +802 -0
- package/lib/commands/device/common.js +264 -0
- package/lib/commands/device/emulator-actions.js +194 -0
- package/lib/commands/device/emulator-console.js +24 -0
- package/lib/commands/device/utils.js +285 -0
- package/lib/commands/deviceidle.js +31 -44
- package/lib/commands/element.js +149 -142
- package/lib/commands/execute.js +86 -87
- package/lib/commands/file-actions.js +249 -222
- package/lib/commands/find.ts +13 -19
- package/lib/commands/geolocation.js +179 -0
- package/lib/commands/ime.js +53 -45
- package/lib/commands/intent.js +149 -91
- package/lib/commands/keyboard.js +114 -17
- package/lib/commands/lock/exports.js +139 -0
- package/lib/commands/lock/helpers.js +379 -0
- package/lib/commands/log.js +170 -166
- package/lib/commands/media-projection.js +75 -70
- package/lib/commands/memory.js +17 -29
- package/lib/commands/misc.js +94 -0
- package/lib/commands/network.js +209 -223
- package/lib/commands/performance.js +88 -73
- package/lib/commands/permissions.js +83 -84
- package/lib/commands/recordscreen.js +171 -170
- package/lib/commands/resources.js +96 -0
- package/lib/commands/shell.js +28 -42
- package/lib/commands/streamscreen.js +207 -206
- package/lib/commands/system-bars.js +76 -77
- package/lib/commands/time.js +36 -0
- package/lib/commands/touch.js +442 -346
- package/lib/commands/types.ts +142 -10
- package/lib/doctor/checks.js +24 -16
- package/lib/driver.ts +454 -12
- package/lib/index.ts +1 -13
- package/lib/logger.js +1 -1
- package/lib/method-map.js +0 -11
- package/lib/utils.js +40 -3
- package/package.json +1 -1
- package/build/lib/commands/actions.d.ts +0 -8
- package/build/lib/commands/actions.d.ts.map +0 -1
- package/build/lib/commands/actions.js +0 -207
- package/build/lib/commands/actions.js.map +0 -1
- package/build/lib/commands/alert.d.ts +0 -8
- package/build/lib/commands/alert.d.ts.map +0 -1
- package/build/lib/commands/alert.js +0 -29
- package/build/lib/commands/alert.js.map +0 -1
- package/build/lib/commands/context.d.ts +0 -10
- package/build/lib/commands/context.d.ts.map +0 -1
- package/build/lib/commands/context.js +0 -431
- package/build/lib/commands/context.js.map +0 -1
- package/build/lib/commands/emu-console.d.ts +0 -7
- package/build/lib/commands/emu-console.d.ts.map +0 -1
- package/build/lib/commands/emu-console.js +0 -27
- package/build/lib/commands/emu-console.js.map +0 -1
- package/build/lib/commands/general.d.ts +0 -9
- package/build/lib/commands/general.d.ts.map +0 -1
- package/build/lib/commands/general.js +0 -293
- package/build/lib/commands/general.js.map +0 -1
- package/build/lib/commands/index.d.ts +0 -28
- package/build/lib/commands/index.d.ts.map +0 -1
- package/build/lib/commands/index.js +0 -57
- package/build/lib/commands/index.js.map +0 -1
- package/build/lib/commands/mixins.d.ts +0 -747
- package/build/lib/commands/mixins.d.ts.map +0 -1
- package/build/lib/commands/mixins.js +0 -19
- package/build/lib/commands/mixins.js.map +0 -1
- package/build/lib/helpers/android.d.ts +0 -163
- package/build/lib/helpers/android.d.ts.map +0 -1
- package/build/lib/helpers/android.js +0 -818
- package/build/lib/helpers/android.js.map +0 -1
- package/build/lib/helpers/index.d.ts +0 -7
- package/build/lib/helpers/index.d.ts.map +0 -1
- package/build/lib/helpers/index.js +0 -29
- package/build/lib/helpers/index.js.map +0 -1
- package/build/lib/helpers/types.d.ts +0 -122
- package/build/lib/helpers/types.d.ts.map +0 -1
- package/build/lib/helpers/types.js +0 -3
- package/build/lib/helpers/types.js.map +0 -1
- package/build/lib/helpers/unlock.d.ts +0 -32
- package/build/lib/helpers/unlock.d.ts.map +0 -1
- package/build/lib/helpers/unlock.js +0 -273
- package/build/lib/helpers/unlock.js.map +0 -1
- package/build/lib/helpers/webview.d.ts +0 -74
- package/build/lib/helpers/webview.d.ts.map +0 -1
- package/build/lib/helpers/webview.js +0 -442
- package/build/lib/helpers/webview.js.map +0 -1
- package/lib/commands/actions.js +0 -244
- package/lib/commands/alert.js +0 -34
- package/lib/commands/context.js +0 -507
- package/lib/commands/emu-console.js +0 -31
- package/lib/commands/general.js +0 -343
- package/lib/commands/index.ts +0 -54
- package/lib/commands/mixins.ts +0 -976
- package/lib/helpers/android.ts +0 -1153
- package/lib/helpers/index.ts +0 -6
- package/lib/helpers/types.ts +0 -136
- package/lib/helpers/unlock.ts +0 -329
- package/lib/helpers/webview.ts +0 -604
|
@@ -4,11 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.parseWindows = exports.parseWindowProperties = void 0;
|
|
7
|
+
exports.parseWindows = exports.parseWindowProperties = exports.mobilePerformStatusBarCommand = exports.getSystemBars = void 0;
|
|
8
8
|
const driver_1 = require("appium/driver");
|
|
9
9
|
const lodash_1 = __importDefault(require("lodash"));
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
|
-
const mixins_1 = require("./mixins");
|
|
12
11
|
const WINDOW_TITLE_PATTERN = /^\s+Window\s#\d+\sWindow\{[0-9a-f]+\s\w+\s([\w-]+)\}:$/;
|
|
13
12
|
const FRAME_PATTERN = /\bm?[Ff]rame=\[([0-9.-]+),([0-9.-]+)\]\[([0-9.-]+),([0-9.-]+)\]/;
|
|
14
13
|
const VIEW_VISIBILITY_PATTERN = /\bmViewVisibility=(0x[0-9a-fA-F]+)/;
|
|
@@ -23,22 +22,78 @@ const DEFAULT_WINDOW_PROPERTIES = {
|
|
|
23
22
|
width: 0,
|
|
24
23
|
height: 0,
|
|
25
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* @this {import('../driver').AndroidDriver}
|
|
27
|
+
* @returns {Promise<StringRecord>}
|
|
28
|
+
*/
|
|
29
|
+
async function getSystemBars() {
|
|
30
|
+
/** @type {string} */
|
|
31
|
+
let stdout;
|
|
32
|
+
try {
|
|
33
|
+
stdout = await this.adb.shell(['dumpsys', 'window', 'windows']);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
throw new Error(`Cannot retrieve system bars details. Original error: ${ /** @type {Error} */(e).message}`);
|
|
37
|
+
}
|
|
38
|
+
return parseWindows.bind(this)(stdout);
|
|
39
|
+
}
|
|
40
|
+
exports.getSystemBars = getSystemBars;
|
|
41
|
+
/**
|
|
42
|
+
* @this {import('../driver').AndroidDriver}
|
|
43
|
+
* @param {import('./types').StatusBarCommandOpts} opts
|
|
44
|
+
* @returns {Promise<string>}
|
|
45
|
+
*/
|
|
46
|
+
async function mobilePerformStatusBarCommand(opts) {
|
|
47
|
+
const { command } = (0, utils_1.requireArgs)('command', opts);
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @param {string} cmd
|
|
51
|
+
* @param {(() => string[]|string)} [argsCallable]
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
const toStatusBarCommandCallable = (cmd, argsCallable) => async () => await this.adb.shell([
|
|
55
|
+
'cmd',
|
|
56
|
+
'statusbar',
|
|
57
|
+
cmd,
|
|
58
|
+
...(argsCallable ? lodash_1.default.castArray(argsCallable()) : []),
|
|
59
|
+
]);
|
|
60
|
+
const tileCommandArgsCallable = () =>
|
|
61
|
+
/** @type {string} */ ((0, utils_1.requireArgs)('component', opts).component);
|
|
62
|
+
const statusBarCommands = lodash_1.default.fromPairs(
|
|
63
|
+
/** @type {const} */ ([
|
|
64
|
+
['expandNotifications', ['expand-notifications']],
|
|
65
|
+
['expandSettings', ['expand-settings']],
|
|
66
|
+
['collapse', ['collapse']],
|
|
67
|
+
['addTile', ['add-tile', tileCommandArgsCallable]],
|
|
68
|
+
['removeTile', ['remove-tile', tileCommandArgsCallable]],
|
|
69
|
+
['clickTile', ['click-tile', tileCommandArgsCallable]],
|
|
70
|
+
['getStatusIcons', ['get-status-icons']],
|
|
71
|
+
]).map(([name, args]) => [name, toStatusBarCommandCallable(args[0], args[1])]));
|
|
72
|
+
const action = statusBarCommands[command];
|
|
73
|
+
if (!action) {
|
|
74
|
+
throw new driver_1.errors.InvalidArgumentError(`The '${command}' status bar command is unknown. Only the following commands ` +
|
|
75
|
+
`are supported: ${lodash_1.default.keys(statusBarCommands)}`);
|
|
76
|
+
}
|
|
77
|
+
return await action();
|
|
78
|
+
}
|
|
79
|
+
exports.mobilePerformStatusBarCommand = mobilePerformStatusBarCommand;
|
|
80
|
+
// #region Internal helpers
|
|
26
81
|
/**
|
|
27
82
|
* Parses window properties from adb dumpsys output
|
|
28
83
|
*
|
|
84
|
+
* @this {import('../driver').AndroidDriver}
|
|
29
85
|
* @param {string} name The name of the window whose properties are being parsed
|
|
30
86
|
* @param {Array<string>} props The list of particular window property lines.
|
|
31
87
|
* Check the corresponding unit tests for more details on the input format.
|
|
32
|
-
* @param {import('@appium/types').AppiumLogger} [log] Logger instance
|
|
33
88
|
* @returns {WindowProperties} Parsed properties object
|
|
34
89
|
* @throws {Error} If there was an issue while parsing the properties string
|
|
35
90
|
*/
|
|
36
|
-
function parseWindowProperties(name, props
|
|
91
|
+
function parseWindowProperties(name, props) {
|
|
37
92
|
const result = lodash_1.default.cloneDeep(DEFAULT_WINDOW_PROPERTIES);
|
|
38
93
|
const propLines = props.join('\n');
|
|
39
94
|
const frameMatch = FRAME_PATTERN.exec(propLines);
|
|
40
95
|
if (!frameMatch) {
|
|
41
|
-
log
|
|
96
|
+
this.log.debug(propLines);
|
|
42
97
|
throw new Error(`Cannot parse the frame size from '${name}' window properties`);
|
|
43
98
|
}
|
|
44
99
|
result.x = parseFloat(frameMatch[1]);
|
|
@@ -47,7 +102,7 @@ function parseWindowProperties(name, props, log) {
|
|
|
47
102
|
result.height = parseFloat(frameMatch[4]) - result.y;
|
|
48
103
|
const visibilityMatch = VIEW_VISIBILITY_PATTERN.exec(propLines);
|
|
49
104
|
if (!visibilityMatch) {
|
|
50
|
-
log
|
|
105
|
+
this.log.debug(propLines);
|
|
51
106
|
throw new Error(`Cannot parse the visibility value from '${name}' window properties`);
|
|
52
107
|
}
|
|
53
108
|
result.visible = parseInt(visibilityMatch[1], 16) === VIEW_VISIBLE;
|
|
@@ -57,14 +112,14 @@ exports.parseWindowProperties = parseWindowProperties;
|
|
|
57
112
|
/**
|
|
58
113
|
* Extracts status and navigation bar information from the window manager output.
|
|
59
114
|
*
|
|
115
|
+
* @this {import('../driver').AndroidDriver}
|
|
60
116
|
* @param {string} lines Output from dumpsys command.
|
|
61
117
|
* Check the corresponding unit tests for more details on the input format.
|
|
62
|
-
* @param {import('@appium/types').AppiumLogger} [log] Logger instance
|
|
63
118
|
* @return {StringRecord} An object containing two items where keys are statusBar and navigationBar,
|
|
64
119
|
* and values are corresponding WindowProperties objects
|
|
65
120
|
* @throws {Error} If no window properties could be parsed
|
|
66
121
|
*/
|
|
67
|
-
function parseWindows(lines
|
|
122
|
+
function parseWindows(lines) {
|
|
68
123
|
/**
|
|
69
124
|
* @type {StringRecord}
|
|
70
125
|
*/
|
|
@@ -86,17 +141,17 @@ function parseWindows(lines, log) {
|
|
|
86
141
|
}
|
|
87
142
|
}
|
|
88
143
|
if (lodash_1.default.isEmpty(windows)) {
|
|
89
|
-
log
|
|
144
|
+
this.log.debug(lines);
|
|
90
145
|
throw new Error('Cannot parse any window information from the dumpsys output');
|
|
91
146
|
}
|
|
92
147
|
/** @type {{statusBar?: WindowProperties, navigationBar?: WindowProperties}} */
|
|
93
148
|
const result = {};
|
|
94
149
|
for (const [name, props] of lodash_1.default.toPairs(windows)) {
|
|
95
150
|
if (name.startsWith(STATUS_BAR_WINDOW_NAME_PREFIX)) {
|
|
96
|
-
result.statusBar = parseWindowProperties(name, props
|
|
151
|
+
result.statusBar = parseWindowProperties.bind(this)(name, props);
|
|
97
152
|
}
|
|
98
153
|
else if (name.startsWith(NAVIGATION_BAR_WINDOW_NAME_PREFIX)) {
|
|
99
|
-
result.navigationBar = parseWindowProperties(name, props
|
|
154
|
+
result.navigationBar = parseWindowProperties.bind(this)(name, props);
|
|
100
155
|
}
|
|
101
156
|
}
|
|
102
157
|
const unmatchedWindows = /** @type {const} */ ([
|
|
@@ -104,7 +159,7 @@ function parseWindows(lines, log) {
|
|
|
104
159
|
['navigationBar', NAVIGATION_BAR_WINDOW_NAME_PREFIX],
|
|
105
160
|
]).filter(([name]) => lodash_1.default.isNil(result[name]));
|
|
106
161
|
for (const [window, namePrefix] of unmatchedWindows) {
|
|
107
|
-
log
|
|
162
|
+
this.log.info(`No windows have been found whose title matches to ` +
|
|
108
163
|
`'${namePrefix}'. Assuming it is invisible. ` +
|
|
109
164
|
`Only the following windows are available: ${lodash_1.default.keys(windows)}`);
|
|
110
165
|
result[window] = lodash_1.default.cloneDeep(DEFAULT_WINDOW_PROPERTIES);
|
|
@@ -112,58 +167,7 @@ function parseWindows(lines, log) {
|
|
|
112
167
|
return result;
|
|
113
168
|
}
|
|
114
169
|
exports.parseWindows = parseWindows;
|
|
115
|
-
|
|
116
|
-
* @type {import('./mixins').SystemBarsMixin & ThisType<import('../driver').AndroidDriver>}
|
|
117
|
-
* @satisfies {import('@appium/types').ExternalDriver}
|
|
118
|
-
*/
|
|
119
|
-
const SystemBarsMixin = {
|
|
120
|
-
async getSystemBars() {
|
|
121
|
-
/** @type {string} */
|
|
122
|
-
let stdout;
|
|
123
|
-
try {
|
|
124
|
-
stdout = await this.adb.shell(['dumpsys', 'window', 'windows']);
|
|
125
|
-
}
|
|
126
|
-
catch (e) {
|
|
127
|
-
throw new Error(`Cannot retrieve system bars details. Original error: ${ /** @type {Error} */(e).message}`);
|
|
128
|
-
}
|
|
129
|
-
return parseWindows(stdout, this.log);
|
|
130
|
-
},
|
|
131
|
-
async mobilePerformStatusBarCommand(opts) {
|
|
132
|
-
const { command } = (0, utils_1.requireArgs)('command', opts);
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @param {string} cmd
|
|
136
|
-
* @param {(() => string[]|string)} [argsCallable]
|
|
137
|
-
* @returns
|
|
138
|
-
*/
|
|
139
|
-
const toStatusBarCommandCallable = (cmd, argsCallable) => async () => await this.adb.shell([
|
|
140
|
-
'cmd',
|
|
141
|
-
'statusbar',
|
|
142
|
-
cmd,
|
|
143
|
-
...(argsCallable ? lodash_1.default.castArray(argsCallable()) : []),
|
|
144
|
-
]);
|
|
145
|
-
const tileCommandArgsCallable = () =>
|
|
146
|
-
/** @type {string} */ ((0, utils_1.requireArgs)('component', opts).component);
|
|
147
|
-
const statusBarCommands = lodash_1.default.fromPairs(
|
|
148
|
-
/** @type {const} */ ([
|
|
149
|
-
['expandNotifications', ['expand-notifications']],
|
|
150
|
-
['expandSettings', ['expand-settings']],
|
|
151
|
-
['collapse', ['collapse']],
|
|
152
|
-
['addTile', ['add-tile', tileCommandArgsCallable]],
|
|
153
|
-
['removeTile', ['remove-tile', tileCommandArgsCallable]],
|
|
154
|
-
['clickTile', ['click-tile', tileCommandArgsCallable]],
|
|
155
|
-
['getStatusIcons', ['get-status-icons']],
|
|
156
|
-
]).map(([name, args]) => [name, toStatusBarCommandCallable(args[0], args[1])]));
|
|
157
|
-
const action = statusBarCommands[command];
|
|
158
|
-
if (!action) {
|
|
159
|
-
throw new driver_1.errors.InvalidArgumentError(`The '${command}' status bar command is unknown. Only the following commands ` +
|
|
160
|
-
`are supported: ${lodash_1.default.keys(statusBarCommands)}`);
|
|
161
|
-
}
|
|
162
|
-
return await action();
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
(0, mixins_1.mixin)(SystemBarsMixin);
|
|
166
|
-
exports.default = SystemBarsMixin;
|
|
170
|
+
// #endregion
|
|
167
171
|
/**
|
|
168
172
|
* @typedef {import('appium-adb').ADB} ADB
|
|
169
173
|
* @typedef {import('@appium/types').StringRecord} StringRecord
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-bars.js","sourceRoot":"","sources":["../../../lib/commands/system-bars.js"],"names":[],"mappings":";AAAA,YAAY;;;;;;AAEZ,0CAAqC;AACrC,oDAAuB;AACvB,oCAAqC;
|
|
1
|
+
{"version":3,"file":"system-bars.js","sourceRoot":"","sources":["../../../lib/commands/system-bars.js"],"names":[],"mappings":";AAAA,YAAY;;;;;;AAEZ,0CAAqC;AACrC,oDAAuB;AACvB,oCAAqC;AAErC,MAAM,oBAAoB,GAAG,wDAAwD,CAAC;AACtF,MAAM,aAAa,GAAG,iEAAiE,CAAC;AACxF,MAAM,uBAA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BAAoB,CAAC,CAAC;QAC7C,CAAC,WAAW,EAAE,6BAA6B,CAAC;QAC5C,CAAC,eAAe,EAAE,iCAAiC,CAAC;KACrD,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,gBAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7C,KAAK,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,gBAAgB,EAAE;QACnD,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,oDAAoD;YAClD,IAAI,UAAU,+BAA+B;YAC7C,6CAA6C,gBAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CACjE,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,GAAG,gBAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;KACzD;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAjDD,oCAiDC;AAED,aAAa;AAEb;;;;GAIG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @this {import('../driver').AndroidDriver}
|
|
3
|
+
* @param {string} [format=MOMENT_FORMAT_ISO8601]
|
|
4
|
+
* @returns {Promise<string>}
|
|
5
|
+
*/
|
|
6
|
+
export function getDeviceTime(this: import("../driver").AndroidDriver, format?: string | undefined): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* @this {import('../driver').AndroidDriver}
|
|
9
|
+
* @param {import('./types').DeviceTimeOpts} [opts={}]
|
|
10
|
+
* @returns {Promise<string>}
|
|
11
|
+
*/
|
|
12
|
+
export function mobileGetDeviceTime(this: import("../driver").AndroidDriver, opts?: import("./types").DeviceTimeOpts | undefined): Promise<string>;
|
|
13
|
+
export type ADB = import('appium-adb').ADB;
|
|
14
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../lib/commands/time.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,qGAFa,QAAQ,MAAM,CAAC,CAe3B;AAED;;;;GAIG;AACH,mIAFa,QAAQ,MAAM,CAAC,CAI3B;kBAGY,OAAO,YAAY,EAAE,GAAG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mobileGetDeviceTime = exports.getDeviceTime = void 0;
|
|
7
|
+
const moment_1 = __importDefault(require("moment"));
|
|
8
|
+
const MOMENT_FORMAT_ISO8601 = 'YYYY-MM-DDTHH:mm:ssZ';
|
|
9
|
+
/**
|
|
10
|
+
* @this {import('../driver').AndroidDriver}
|
|
11
|
+
* @param {string} [format=MOMENT_FORMAT_ISO8601]
|
|
12
|
+
* @returns {Promise<string>}
|
|
13
|
+
*/
|
|
14
|
+
async function getDeviceTime(format = MOMENT_FORMAT_ISO8601) {
|
|
15
|
+
this.log.debug('Attempting to capture android device date and time. ' + `The format specifier is '${format}'`);
|
|
16
|
+
const deviceTimestamp = (await this.adb.shell(['date', '+%Y-%m-%dT%T%z'])).trim();
|
|
17
|
+
this.log.debug(`Got device timestamp: ${deviceTimestamp}`);
|
|
18
|
+
const parsedTimestamp = moment_1.default.utc(deviceTimestamp, 'YYYY-MM-DDTHH:mm:ssZZ');
|
|
19
|
+
if (!parsedTimestamp.isValid()) {
|
|
20
|
+
this.log.warn('Cannot parse the returned timestamp. Returning as is');
|
|
21
|
+
return deviceTimestamp;
|
|
22
|
+
}
|
|
23
|
+
// @ts-expect-error private API
|
|
24
|
+
return parsedTimestamp.utcOffset(parsedTimestamp._tzm || 0).format(format);
|
|
25
|
+
}
|
|
26
|
+
exports.getDeviceTime = getDeviceTime;
|
|
27
|
+
/**
|
|
28
|
+
* @this {import('../driver').AndroidDriver}
|
|
29
|
+
* @param {import('./types').DeviceTimeOpts} [opts={}]
|
|
30
|
+
* @returns {Promise<string>}
|
|
31
|
+
*/
|
|
32
|
+
async function mobileGetDeviceTime(opts = {}) {
|
|
33
|
+
return await this.getDeviceTime(opts.format);
|
|
34
|
+
}
|
|
35
|
+
exports.mobileGetDeviceTime = mobileGetDeviceTime;
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {import('appium-adb').ADB} ADB
|
|
38
|
+
*/
|
|
39
|
+
//# sourceMappingURL=time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../../lib/commands/time.js"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAErD;;;;GAIG;AACI,KAAK,UAAU,aAAa,CAAC,MAAM,GAAG,qBAAqB;IAChE,IAAI,CAAC,GAAG,CAAC,KAAK,CACZ,sDAAsD,GAAG,4BAA4B,MAAM,GAAG,CAC/F,CAAC;IACF,MAAM,eAAe,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAClF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,eAAe,EAAE,CAAC,CAAC;IAC3D,MAAM,eAAe,GAAG,gBAAM,CAAC,GAAG,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC;IAC7E,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;QACtE,OAAO,eAAe,CAAC;KACxB;IACD,+BAA+B;IAC/B,OAAO,eAAe,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AAbD,sCAaC;AAED;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,IAAI,GAAG,EAAE;IACjD,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC;AAFD,kDAEC;AAED;;GAEG"}
|
|
@@ -1,10 +1,103 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated
|
|
3
|
+
* @this {import('../driver').AndroidDriver}
|
|
4
|
+
* @param {string?} [elementId=null]
|
|
5
|
+
* @param {number?} [x=null]
|
|
6
|
+
* @param {number?} [y=null]
|
|
7
|
+
* @param {number} [count=1]
|
|
8
|
+
* @returns {Promise<void>}
|
|
9
|
+
*/
|
|
10
|
+
export function tap(this: import("../driver").AndroidDriver, elementId?: string | null | undefined, x?: number | null | undefined, y?: number | null | undefined, count?: number | undefined): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* @this {import('../driver').AndroidDriver}
|
|
14
|
+
* @param {string} elementId
|
|
15
|
+
* @param {number} x
|
|
16
|
+
* @param {number} y
|
|
17
|
+
* @param {number} duration
|
|
18
|
+
* @returns {Promise<void>}
|
|
19
|
+
*/
|
|
20
|
+
export function touchLongClick(this: import("../driver").AndroidDriver, elementId: string, x: number, y: number, duration: number): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
* @this {import('../driver').AndroidDriver}
|
|
24
|
+
* @param {string} elementId
|
|
25
|
+
* @param {number} x
|
|
26
|
+
* @param {number} y
|
|
27
|
+
* @returns {Promise<void>}
|
|
28
|
+
*/
|
|
29
|
+
export function touchDown(this: import("../driver").AndroidDriver, elementId: string, x: number, y: number): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
* @this {import('../driver').AndroidDriver}
|
|
33
|
+
* @param {string} elementId
|
|
34
|
+
* @param {number} x
|
|
35
|
+
* @param {number} y
|
|
36
|
+
* @returns {Promise<void>}
|
|
37
|
+
*/
|
|
38
|
+
export function touchUp(this: import("../driver").AndroidDriver, elementId: string, x: number, y: number): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
* @this {import('../driver').AndroidDriver}
|
|
42
|
+
* @param {string} elementId
|
|
43
|
+
* @param {number} x
|
|
44
|
+
* @param {number} y
|
|
45
|
+
* @returns {Promise<void>}
|
|
46
|
+
*/
|
|
47
|
+
export function touchMove(this: import("../driver").AndroidDriver, elementId: string, x: number, y: number): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated
|
|
50
|
+
* @this {import('../driver').AndroidDriver}
|
|
51
|
+
* @param {import('./types').SwipeOpts} opts
|
|
52
|
+
* @returns {Promise<void>}
|
|
53
|
+
*/
|
|
54
|
+
export function doSwipe(this: import("../driver").AndroidDriver, opts: import('./types').SwipeOpts): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated
|
|
57
|
+
* @this {import('../driver').AndroidDriver}
|
|
58
|
+
* @param {import('./types').TouchDragAction} opts
|
|
59
|
+
* @returns {Promise<void>}
|
|
60
|
+
*/
|
|
61
|
+
export function doTouchDrag(this: import("../driver").AndroidDriver, opts: import('./types').TouchDragAction): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
64
|
+
* @this {import('../driver').AndroidDriver}
|
|
65
|
+
* @param {import('./types').TouchActionKind} action
|
|
66
|
+
* @param {import('./types').TouchActionOpts} [opts={}]
|
|
67
|
+
* @returns {Promise<void>}
|
|
68
|
+
*/
|
|
69
|
+
export function doTouchAction(this: import("../driver").AndroidDriver, action: import('./types').TouchActionKind, opts?: import("./types").TouchActionOpts | undefined): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated
|
|
72
|
+
* @this {import('../driver').AndroidDriver}
|
|
73
|
+
* @param {import('./types').TouchAction[]} gestures
|
|
74
|
+
* @returns {Promise<void>}
|
|
75
|
+
*/
|
|
76
|
+
export function performTouch(this: import("../driver").AndroidDriver, gestures: import('./types').TouchAction[]): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated
|
|
79
|
+
* @this {import('../driver').AndroidDriver}
|
|
80
|
+
* @param {import('./types').TouchAction[]} actions
|
|
81
|
+
* @param {string} elementId
|
|
82
|
+
* @returns {Promise<void>}
|
|
83
|
+
*/
|
|
84
|
+
export function performMultiAction(this: import("../driver").AndroidDriver, actions: import('./types').TouchAction[], elementId: string): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated
|
|
87
|
+
* @this {import('../driver').AndroidDriver}
|
|
88
|
+
* @param {string} elementId
|
|
89
|
+
* @param {import('./types').TouchState[]} states
|
|
90
|
+
* @returns {Promise<void>}
|
|
91
|
+
*/
|
|
92
|
+
export function doPerformMultiAction(this: import("../driver").AndroidDriver, elementId: string, states: import('./types').TouchState[]): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated
|
|
95
|
+
* @param {number} number
|
|
96
|
+
* @param {number} digits
|
|
97
|
+
* @returns {number}
|
|
98
|
+
*/
|
|
99
|
+
export function truncateDecimals(number: number, digits: number): number;
|
|
2
100
|
export type ADB = import('appium-adb').ADB;
|
|
3
101
|
export type TouchAction = import('./types').TouchAction;
|
|
4
102
|
export type NonReleaseTouchAction = import('./types').NonReleaseTouchAction;
|
|
5
|
-
/**
|
|
6
|
-
* @type {import('./mixins').TouchMixin & ThisType<import('../driver').AndroidDriver>}
|
|
7
|
-
* @satisfies {import('@appium/types').ExternalDriver}
|
|
8
|
-
*/
|
|
9
|
-
declare const TouchMixin: import('./mixins').TouchMixin & ThisType<import('../driver').AndroidDriver>;
|
|
10
103
|
//# sourceMappingURL=touch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../lib/commands/touch.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../l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