appium-android-driver 13.4.0 → 14.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 +10 -0
- package/build/lib/commands/app-management.d.ts +2 -2
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +41 -67
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +1 -1
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +2 -6
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/bidi/constants.js +4 -8
- package/build/lib/commands/bidi/constants.js.map +1 -1
- package/build/lib/commands/bidi/models.d.ts +1 -1
- package/build/lib/commands/bidi/models.d.ts.map +1 -1
- package/build/lib/commands/bidi/models.js +7 -13
- package/build/lib/commands/bidi/models.js.map +1 -1
- package/build/lib/commands/bidi/types.js +1 -2
- package/build/lib/commands/bluetooth.d.ts +1 -1
- package/build/lib/commands/bluetooth.d.ts.map +1 -1
- package/build/lib/commands/bluetooth.js +3 -6
- package/build/lib/commands/bluetooth.js.map +1 -1
- package/build/lib/commands/context/cache.d.ts +1 -1
- package/build/lib/commands/context/cache.d.ts.map +1 -1
- package/build/lib/commands/context/cache.js +5 -10
- package/build/lib/commands/context/cache.js.map +1 -1
- package/build/lib/commands/context/exports.d.ts +2 -2
- package/build/lib/commands/context/exports.d.ts.map +1 -1
- package/build/lib/commands/context/exports.js +64 -86
- package/build/lib/commands/context/exports.js.map +1 -1
- package/build/lib/commands/context/helpers.d.ts +2 -2
- package/build/lib/commands/context/helpers.d.ts.map +1 -1
- package/build/lib/commands/context/helpers.js +69 -82
- package/build/lib/commands/context/helpers.js.map +1 -1
- package/build/lib/commands/device/common.d.ts +2 -2
- package/build/lib/commands/device/common.d.ts.map +1 -1
- package/build/lib/commands/device/common.js +28 -71
- package/build/lib/commands/device/common.js.map +1 -1
- package/build/lib/commands/device/emulator-actions.d.ts +2 -2
- package/build/lib/commands/device/emulator-actions.d.ts.map +1 -1
- package/build/lib/commands/device/emulator-actions.js +33 -52
- package/build/lib/commands/device/emulator-actions.js.map +1 -1
- package/build/lib/commands/device/emulator-console.d.ts +1 -1
- package/build/lib/commands/device/emulator-console.d.ts.map +1 -1
- package/build/lib/commands/device/emulator-console.js +3 -6
- package/build/lib/commands/device/emulator-console.js.map +1 -1
- package/build/lib/commands/device/utils.d.ts +1 -1
- package/build/lib/commands/device/utils.d.ts.map +1 -1
- package/build/lib/commands/device/utils.js +27 -37
- package/build/lib/commands/device/utils.js.map +1 -1
- package/build/lib/commands/deviceidle.d.ts +1 -1
- package/build/lib/commands/deviceidle.d.ts.map +1 -1
- package/build/lib/commands/deviceidle.js +4 -7
- package/build/lib/commands/deviceidle.js.map +1 -1
- package/build/lib/commands/element.d.ts +2 -2
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +22 -39
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +1 -1
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +6 -9
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +1 -1
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +25 -34
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +2 -2
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +10 -14
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +1 -1
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/geolocation.js +21 -35
- package/build/lib/commands/geolocation.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +1 -1
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +4 -7
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/image-injection.d.ts +1 -1
- package/build/lib/commands/image-injection.d.ts.map +1 -1
- package/build/lib/commands/image-injection.js +16 -23
- package/build/lib/commands/image-injection.js.map +1 -1
- package/build/lib/commands/ime.d.ts +1 -1
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +10 -18
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/intent.d.ts +1 -1
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +22 -29
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +2 -2
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +21 -33
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/legacy.d.ts +1 -1
- package/build/lib/commands/legacy.d.ts.map +1 -1
- package/build/lib/commands/legacy.js +7 -12
- package/build/lib/commands/legacy.js.map +1 -1
- package/build/lib/commands/lock/exports.d.ts +2 -2
- package/build/lib/commands/lock/exports.d.ts.map +1 -1
- package/build/lib/commands/lock/exports.js +18 -25
- package/build/lib/commands/lock/exports.js.map +1 -1
- package/build/lib/commands/lock/helpers.d.ts +2 -2
- package/build/lib/commands/lock/helpers.d.ts.map +1 -1
- package/build/lib/commands/lock/helpers.js +48 -64
- package/build/lib/commands/lock/helpers.js.map +1 -1
- package/build/lib/commands/log.d.ts +2 -2
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +38 -42
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +2 -2
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +14 -22
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/memory.d.ts +2 -2
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +4 -7
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/misc.d.ts +2 -2
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +10 -19
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/network.d.ts +2 -2
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +14 -26
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/nfc.d.ts +2 -2
- package/build/lib/commands/nfc.d.ts.map +1 -1
- package/build/lib/commands/nfc.js +3 -6
- package/build/lib/commands/nfc.js.map +1 -1
- package/build/lib/commands/performance.d.ts +2 -2
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +48 -58
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +1 -1
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +16 -20
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +2 -2
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +32 -39
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/resources.d.ts +1 -1
- package/build/lib/commands/resources.d.ts.map +1 -1
- package/build/lib/commands/resources.js +7 -11
- package/build/lib/commands/resources.js.map +1 -1
- package/build/lib/commands/shell.d.ts +1 -1
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +9 -12
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +1 -1
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +32 -37
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +2 -2
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +10 -16
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/time.d.ts +1 -1
- package/build/lib/commands/time.d.ts.map +1 -1
- package/build/lib/commands/time.js +9 -17
- package/build/lib/commands/time.js.map +1 -1
- package/build/lib/commands/types.d.ts +15 -1
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/commands/types.js +1 -2
- package/build/lib/constraints.js +2 -5
- package/build/lib/constraints.js.map +1 -1
- package/build/lib/doctor/checks.js +54 -65
- package/build/lib/doctor/checks.js.map +1 -1
- package/build/lib/doctor/utils.js +4 -7
- package/build/lib/doctor/utils.js.map +1 -1
- package/build/lib/driver.d.ts +39 -39
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +220 -223
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.js +1 -4
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/index.d.ts +7 -7
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +11 -51
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js +2 -5
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.js +1 -4
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/utils.d.ts +9 -7
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +22 -28
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/app-management.ts +5 -11
- package/lib/commands/appearance.ts +1 -1
- package/lib/commands/bidi/models.ts +3 -3
- package/lib/commands/bluetooth.ts +2 -2
- package/lib/commands/context/cache.ts +1 -1
- package/lib/commands/context/exports.ts +7 -7
- package/lib/commands/context/helpers.ts +4 -4
- package/lib/commands/device/common.ts +9 -10
- package/lib/commands/device/emulator-actions.ts +4 -4
- package/lib/commands/device/emulator-console.ts +2 -2
- package/lib/commands/device/utils.ts +3 -3
- package/lib/commands/deviceidle.ts +2 -2
- package/lib/commands/element.ts +3 -3
- package/lib/commands/execute.ts +2 -2
- package/lib/commands/file-actions.ts +2 -2
- package/lib/commands/find.ts +4 -4
- package/lib/commands/geolocation.ts +2 -2
- package/lib/commands/gestures.ts +3 -3
- package/lib/commands/image-injection.ts +2 -2
- package/lib/commands/ime.ts +3 -3
- package/lib/commands/intent.ts +3 -3
- package/lib/commands/keyboard.ts +3 -3
- package/lib/commands/legacy.ts +2 -2
- package/lib/commands/lock/exports.ts +3 -3
- package/lib/commands/lock/helpers.ts +2 -2
- package/lib/commands/log.ts +18 -11
- package/lib/commands/media-projection.ts +2 -2
- package/lib/commands/memory.ts +3 -3
- package/lib/commands/misc.ts +3 -3
- package/lib/commands/network.ts +3 -3
- package/lib/commands/nfc.ts +3 -3
- package/lib/commands/performance.ts +4 -4
- package/lib/commands/permissions.ts +3 -3
- package/lib/commands/recordscreen.ts +5 -5
- package/lib/commands/resources.ts +2 -2
- package/lib/commands/shell.ts +3 -3
- package/lib/commands/streamscreen.ts +6 -4
- package/lib/commands/system-bars.ts +6 -6
- package/lib/commands/time.ts +3 -3
- package/lib/commands/types.ts +15 -1
- package/lib/doctor/checks.ts +1 -1
- package/lib/driver.ts +44 -44
- package/lib/index.ts +7 -7
- package/lib/method-map.ts +1 -1
- package/lib/utils.ts +10 -8
- package/package.json +12 -3
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AACnD,eAAO,MAAM,KAAK;;;;CAIR,CAAC;AACX,mBAAmB,qBAAqB,CAAC;AACzC,OAAO,EAAC,0BAA0B,IAAI,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AACpF,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,eAAe,aAAa,CAAC"}
|
package/build/lib/index.js
CHANGED
|
@@ -1,53 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
1
|
+
import { AndroidDriver } from './driver.js';
|
|
2
|
+
import { getChromePkg } from './commands/context/helpers.js';
|
|
3
|
+
import { parseArray, requireArgs } from './utils.js';
|
|
4
|
+
export const utils = {
|
|
5
|
+
getChromePkg,
|
|
6
|
+
parseArray,
|
|
7
|
+
requireArgs,
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.doctor = exports.commonCapConstraints = exports.utils = void 0;
|
|
40
|
-
const driver_1 = require("./driver");
|
|
41
|
-
const helpers_1 = require("./commands/context/helpers");
|
|
42
|
-
const utils_1 = require("./utils");
|
|
43
|
-
exports.utils = {
|
|
44
|
-
getChromePkg: helpers_1.getChromePkg,
|
|
45
|
-
parseArray: utils_1.parseArray,
|
|
46
|
-
requireArgs: utils_1.requireArgs,
|
|
47
|
-
};
|
|
48
|
-
var constraints_1 = require("./constraints");
|
|
49
|
-
Object.defineProperty(exports, "commonCapConstraints", { enumerable: true, get: function () { return constraints_1.ANDROID_DRIVER_CONSTRAINTS; } });
|
|
50
|
-
__exportStar(require("./driver"), exports);
|
|
51
|
-
exports.doctor = __importStar(require("./doctor/checks"));
|
|
52
|
-
exports.default = driver_1.AndroidDriver;
|
|
9
|
+
export { ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints } from './constraints.js';
|
|
10
|
+
export * from './driver.js';
|
|
11
|
+
export * as doctor from './doctor/checks.js';
|
|
12
|
+
export default AndroidDriver;
|
|
53
13
|
//# sourceMappingURL=index.js.map
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAC,UAAU,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,YAAY;IACZ,UAAU;IACV,WAAW;CACH,CAAC;AAEX,OAAO,EAAC,0BAA0B,IAAI,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AACpF,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,eAAe,aAAa,CAAC"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.log = void 0;
|
|
4
|
-
const support_1 = require("@appium/support");
|
|
5
|
-
exports.log = support_1.logger.getLogger('AndroidDriver');
|
|
1
|
+
import { logger } from '@appium/support';
|
|
2
|
+
export const log = logger.getLogger('AndroidDriver');
|
|
6
3
|
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAGvC,MAAM,CAAC,MAAM,GAAG,GAAiB,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC"}
|
package/build/lib/method-map.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.js","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method-map.js","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,4CAA4C,EAAE;QAC5C,IAAI,EAAE;YACJ,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAC;YACjC,UAAU,EAAE,IAAI;SACjB;KACF;IACD,2CAA2C,EAAE,EAAC,GAAG,EAAE,EAAC,OAAO,EAAE,qBAAqB,EAAC,EAAC;IACpF,uCAAuC,EAAE,EAAC,GAAG,EAAE,EAAC,OAAO,EAAE,oBAAoB,EAAC,EAAC;IAC/E,mCAAmC,EAAE,EAAC,GAAG,EAAE,EAAC,OAAO,EAAE,gBAA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"}
|
package/build/lib/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogEntry } from 'appium-adb';
|
|
2
|
-
import type { AndroidDriver } from './driver';
|
|
2
|
+
import type { AndroidDriver } from './driver.js';
|
|
3
3
|
export type { LogEntry };
|
|
4
4
|
export declare const ADB_SHELL_FEATURE = "adb_shell";
|
|
5
5
|
export declare const ADB_LISTEN_ALL_NETWORK_FEATURE = "adb_listen_all_network";
|
|
@@ -20,23 +20,25 @@ interface LogEntryWithPrefix {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function requireArgs(argNames: string | string[], opts: Record<string, any>): Record<string, any>;
|
|
22
22
|
/**
|
|
23
|
+
* Parses a capability into an array
|
|
23
24
|
*
|
|
24
|
-
* @param cap
|
|
25
|
-
* @returns
|
|
25
|
+
* @param cap - The capability to parse
|
|
26
|
+
* @returns The parsed capability
|
|
26
27
|
*/
|
|
27
28
|
export declare function parseArray(cap: string | string[]): string[];
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @returns
|
|
30
|
+
* Removes all session web socket handlers
|
|
31
31
|
*/
|
|
32
32
|
export declare function removeAllSessionWebSocketHandlers(this: AndroidDriver): Promise<void>;
|
|
33
33
|
/**
|
|
34
|
+
* Converts a native log entry to a Selenium log entry
|
|
34
35
|
*
|
|
35
|
-
* @param x
|
|
36
|
-
* @returns
|
|
36
|
+
* @param x - The native log entry
|
|
37
|
+
* @returns The Selenium log entry
|
|
37
38
|
*/
|
|
38
39
|
export declare function nativeLogEntryToSeleniumEntry(x: LogEntryWithPrefix): LogEntry;
|
|
39
40
|
/**
|
|
41
|
+
* Converts a timestamp and message to a Selenium log entry
|
|
40
42
|
*
|
|
41
43
|
* @see {@link https://github.com/SeleniumHQ/selenium/blob/0d425676b3c9df261dd641917f867d4d5ce7774d/java/client/src/org/openqa/selenium/logging/LogEntry.java}
|
|
42
44
|
* @param timestamp
|
package/build/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAG/C,YAAY,EAAC,QAAQ,EAAC,CAAC;AAEvB,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AACvE,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AAGvE,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACxB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAOrB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAa3D;AAED;;GAEG;AACH,wBAAsB,iCAAiC,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAS1F;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,kBAAkB,GAAG,QAAQ,CAG7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAc,GAAG,QAAQ,CAM/F"}
|
package/build/lib/utils.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.nativeLogEntryToSeleniumEntry = nativeLogEntryToSeleniumEntry;
|
|
8
|
-
exports.toLogRecord = toLogRecord;
|
|
9
|
-
const driver_1 = require("appium/driver");
|
|
10
|
-
const support_1 = require("@appium/support");
|
|
11
|
-
exports.ADB_SHELL_FEATURE = 'adb_shell';
|
|
12
|
-
exports.ADB_LISTEN_ALL_NETWORK_FEATURE = 'adb_listen_all_network';
|
|
13
|
-
exports.GET_SERVER_LOGS_FEATURE = 'get_server_logs';
|
|
14
|
-
exports.SET_STYLUS_HANDWRITING_FEATURE = 'set_stylus_handwriting';
|
|
1
|
+
import { errors } from 'appium/driver.js';
|
|
2
|
+
import { util } from '@appium/support';
|
|
3
|
+
export const ADB_SHELL_FEATURE = 'adb_shell';
|
|
4
|
+
export const ADB_LISTEN_ALL_NETWORK_FEATURE = 'adb_listen_all_network';
|
|
5
|
+
export const GET_SERVER_LOGS_FEATURE = 'get_server_logs';
|
|
6
|
+
export const SET_STYLUS_HANDWRITING_FEATURE = 'set_stylus_handwriting';
|
|
15
7
|
const COLOR_CODE_PATTERN = /\u001b\[(\d+(;\d+)*)?m/g; // eslint-disable-line no-control-regex
|
|
16
8
|
/**
|
|
17
9
|
* Assert the presence of particular keys in the given object
|
|
@@ -20,20 +12,21 @@ const COLOR_CODE_PATTERN = /\u001b\[(\d+(;\d+)*)?m/g; // eslint-disable-line no-
|
|
|
20
12
|
* @param opts the object to check
|
|
21
13
|
* @returns the same given object
|
|
22
14
|
*/
|
|
23
|
-
function requireArgs(argNames, opts) {
|
|
15
|
+
export function requireArgs(argNames, opts) {
|
|
24
16
|
for (const argName of Array.isArray(argNames) ? argNames : [argNames]) {
|
|
25
|
-
if (
|
|
26
|
-
throw new
|
|
17
|
+
if (util.isPlainObject(opts) && !Object.hasOwn(opts, argName)) {
|
|
18
|
+
throw new errors.InvalidArgumentError(`'${argName}' argument must be provided`);
|
|
27
19
|
}
|
|
28
20
|
}
|
|
29
21
|
return opts;
|
|
30
22
|
}
|
|
31
23
|
/**
|
|
24
|
+
* Parses a capability into an array
|
|
32
25
|
*
|
|
33
|
-
* @param cap
|
|
34
|
-
* @returns
|
|
26
|
+
* @param cap - The capability to parse
|
|
27
|
+
* @returns The parsed capability
|
|
35
28
|
*/
|
|
36
|
-
function parseArray(cap) {
|
|
29
|
+
export function parseArray(cap) {
|
|
37
30
|
let parsedCaps;
|
|
38
31
|
try {
|
|
39
32
|
parsedCaps = JSON.parse(cap);
|
|
@@ -48,10 +41,9 @@ function parseArray(cap) {
|
|
|
48
41
|
throw new Error(`must provide a string or JSON Array; received ${cap}`);
|
|
49
42
|
}
|
|
50
43
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @returns
|
|
44
|
+
* Removes all session web socket handlers
|
|
53
45
|
*/
|
|
54
|
-
async function removeAllSessionWebSocketHandlers() {
|
|
46
|
+
export async function removeAllSessionWebSocketHandlers() {
|
|
55
47
|
if (!this.sessionId || typeof this.server?.getWebSocketHandlers !== 'function') {
|
|
56
48
|
return;
|
|
57
49
|
}
|
|
@@ -61,15 +53,17 @@ async function removeAllSessionWebSocketHandlers() {
|
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
55
|
/**
|
|
56
|
+
* Converts a native log entry to a Selenium log entry
|
|
64
57
|
*
|
|
65
|
-
* @param x
|
|
66
|
-
* @returns
|
|
58
|
+
* @param x - The native log entry
|
|
59
|
+
* @returns The Selenium log entry
|
|
67
60
|
*/
|
|
68
|
-
function nativeLogEntryToSeleniumEntry(x) {
|
|
69
|
-
const msg =
|
|
61
|
+
export function nativeLogEntryToSeleniumEntry(x) {
|
|
62
|
+
const msg = util.isEmpty(x.prefix) ? x.message : `[${x.prefix}] ${x.message}`;
|
|
70
63
|
return toLogRecord(x.timestamp ?? Date.now(), msg.replace(COLOR_CODE_PATTERN, ''));
|
|
71
64
|
}
|
|
72
65
|
/**
|
|
66
|
+
* Converts a timestamp and message to a Selenium log entry
|
|
73
67
|
*
|
|
74
68
|
* @see {@link https://github.com/SeleniumHQ/selenium/blob/0d425676b3c9df261dd641917f867d4d5ce7774d/java/client/src/org/openqa/selenium/logging/LogEntry.java}
|
|
75
69
|
* @param timestamp
|
|
@@ -77,7 +71,7 @@ function nativeLogEntryToSeleniumEntry(x) {
|
|
|
77
71
|
* @param level
|
|
78
72
|
* @returns
|
|
79
73
|
*/
|
|
80
|
-
function toLogRecord(timestamp, message, level = 'ALL') {
|
|
74
|
+
export function toLogRecord(timestamp, message, level = 'ALL') {
|
|
81
75
|
return {
|
|
82
76
|
timestamp,
|
|
83
77
|
level: level,
|
package/build/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC,OAAO,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAC7C,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AACvE,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,CAAC,uCAAuC;AAS7F;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,QAA2B,EAC3B,IAAyB;IAEzB,KAAK,MAAM,OAAO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AAsB,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,CAAqB;IACjE,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IAC9E,OAAO,WAAW,CAAC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC,CAAC;AACrF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAe,EAAE,QAAgB,KAAK;IACnF,OAAO;QACL,SAAS;QACT,KAAK,EAAE,KAAY;QACnB,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {util} from '@appium/support';
|
|
2
2
|
import {waitForCondition, longSleep} from 'asyncbox';
|
|
3
3
|
import {EOL} from 'node:os';
|
|
4
|
-
import type {AndroidDriver, AndroidDriverOpts} from '../driver';
|
|
5
|
-
import type {AppInfoMap, AppState, IsAppInstalledOptions, TerminateAppOpts} from './types';
|
|
4
|
+
import type {AndroidDriver, AndroidDriverOpts} from '../driver.js';
|
|
5
|
+
import type {AppInfoMap, AppState, IsAppInstalledOptions, TerminateAppOpts} from './types.js';
|
|
6
6
|
import type {
|
|
7
7
|
UninstallOptions,
|
|
8
8
|
InstallOptions,
|
|
@@ -210,10 +210,7 @@ export async function terminateApp(
|
|
|
210
210
|
}
|
|
211
211
|
currentPids = await this.adb.listAppProcessIds(appId);
|
|
212
212
|
const currentPidsSet = new Set(currentPids);
|
|
213
|
-
if (
|
|
214
|
-
util.isEmpty(currentPids) ||
|
|
215
|
-
util.isEmpty(pids.filter((pid) => currentPidsSet.has(pid)))
|
|
216
|
-
) {
|
|
213
|
+
if (util.isEmpty(currentPids) || !pids.some((pid) => currentPidsSet.has(pid))) {
|
|
217
214
|
this.log.info(
|
|
218
215
|
`The application '${appId}' was reported running, ` +
|
|
219
216
|
`although all process ids belonging to it have been changed: ` +
|
|
@@ -231,12 +228,9 @@ export async function terminateApp(
|
|
|
231
228
|
);
|
|
232
229
|
} catch {
|
|
233
230
|
const currentPidsSet = new Set(currentPids);
|
|
234
|
-
if (
|
|
235
|
-
!util.isEmpty(currentPids) &&
|
|
236
|
-
!util.isEmpty(pids.filter((pid) => !currentPidsSet.has(pid)))
|
|
237
|
-
) {
|
|
231
|
+
if (!util.isEmpty(currentPids) && pids.some((pid) => !currentPidsSet.has(pid))) {
|
|
238
232
|
this.log.warn(
|
|
239
|
-
`Some of processes belonging to the '${appId}'
|
|
233
|
+
`Some of processes belonging to the '${appId}' application are still running ` +
|
|
240
234
|
`after ${timeout}ms (${JSON.stringify(pids)} -> ${JSON.stringify(currentPids)})`,
|
|
241
235
|
);
|
|
242
236
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {BiDiLogLevel, LogEntryAddedEvent, ContextUpdatedEvent} from './types';
|
|
2
|
-
import {NATIVE_WIN} from '../context/helpers';
|
|
1
|
+
import type {BiDiLogLevel, LogEntryAddedEvent, ContextUpdatedEvent} from './types.js';
|
|
2
|
+
import {NATIVE_WIN} from '../context/helpers.js';
|
|
3
3
|
import {
|
|
4
4
|
CONTEXT_UPDATED_EVENT,
|
|
5
5
|
LOG_ENTRY_ADDED_EVENT,
|
|
6
6
|
CONTEXT_UPDATED_EVENT_OBSOLETE,
|
|
7
|
-
} from './constants';
|
|
7
|
+
} from './constants.js';
|
|
8
8
|
import type {LogEntry} from 'appium-adb';
|
|
9
9
|
|
|
10
10
|
function toContextUpdatedEvent(method: string, contextName: string): ContextUpdatedEvent {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {util} from '@appium/support';
|
|
2
2
|
import {Chromedriver} from 'appium-chromedriver';
|
|
3
|
-
import {errors, PROTOCOLS} from 'appium/driver';
|
|
3
|
+
import {errors, PROTOCOLS} from 'appium/driver.js';
|
|
4
4
|
import type {StringRecord} from '@appium/types';
|
|
5
5
|
import {
|
|
6
6
|
CHROMIUM_WIN,
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
setupExistingChromedriver,
|
|
15
15
|
setupNewChromedriver,
|
|
16
16
|
shouldDismissChromeWelcome,
|
|
17
|
-
} from './helpers';
|
|
18
|
-
import {APP_STATE} from '../app-management';
|
|
19
|
-
import {BIDI_EVENT_NAME} from '../bidi/constants';
|
|
20
|
-
import {makeContextUpdatedEvent, makeObsoleteContextUpdatedEvent} from '../bidi/models';
|
|
21
|
-
import type {AndroidDriver} from '../../driver';
|
|
22
|
-
import type {WebviewsMapping} from '../types';
|
|
17
|
+
} from './helpers.js';
|
|
18
|
+
import {APP_STATE} from '../app-management.js';
|
|
19
|
+
import {BIDI_EVENT_NAME} from '../bidi/constants.js';
|
|
20
|
+
import {makeContextUpdatedEvent, makeObsoleteContextUpdatedEvent} from '../bidi/models.js';
|
|
21
|
+
import type {AndroidDriver} from '../../driver.js';
|
|
22
|
+
import type {WebviewsMapping} from '../types.js';
|
|
23
23
|
|
|
24
24
|
// https://github.com/appium/appium/issues/20710
|
|
25
25
|
const DEFAULT_NATIVE_WINDOW_HANDLE = '1';
|
|
@@ -8,9 +8,9 @@ import path from 'node:path';
|
|
|
8
8
|
import http from 'node:http';
|
|
9
9
|
import {Chromedriver} from 'appium-chromedriver';
|
|
10
10
|
import type {ChromedriverOpts} from 'appium-chromedriver';
|
|
11
|
-
import {toDetailsCacheKey, getWebviewDetails, WEBVIEWS_DETAILS_CACHE} from './cache';
|
|
11
|
+
import {toDetailsCacheKey, getWebviewDetails, WEBVIEWS_DETAILS_CACHE} from './cache.js';
|
|
12
12
|
import dns from 'node:dns/promises';
|
|
13
|
-
import type {AndroidDriver, AndroidDriverOpts} from '../../driver';
|
|
13
|
+
import type {AndroidDriver, AndroidDriverOpts} from '../../driver.js';
|
|
14
14
|
import type {
|
|
15
15
|
GetWebviewsOpts,
|
|
16
16
|
WebviewsMapping,
|
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
PortSpec,
|
|
20
20
|
WebviewProc,
|
|
21
21
|
DetailCollectionOptions,
|
|
22
|
-
} from '../types';
|
|
22
|
+
} from '../types.js';
|
|
23
23
|
import type {StringRecord} from '@appium/types';
|
|
24
24
|
|
|
25
25
|
// https://cs.chromium.org/chromium/src/chrome/browser/devtools/device/android_device_info_query.cc
|
|
@@ -180,7 +180,7 @@ export async function getWebViewsMapping(
|
|
|
180
180
|
|
|
181
181
|
this.log.debug(`No webviews found in ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);
|
|
182
182
|
await sleep(WEBVIEW_WAIT_INTERVAL_MS);
|
|
183
|
-
} while (timer.getDuration().asMilliSeconds < waitMs);
|
|
183
|
+
} while (timer.getDuration().asMilliSeconds < Number(waitMs));
|
|
184
184
|
|
|
185
185
|
await collectWebviewsDetails.bind(this)(webviewsMapping, {
|
|
186
186
|
ensureWebviewsHavePages,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as semver from 'semver';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {setMockLocationApp} from '../geolocation';
|
|
3
|
+
import {setMockLocationApp} from '../geolocation.js';
|
|
4
4
|
import {SETTINGS_HELPER_ID} from 'io.appium.settings';
|
|
5
|
-
import {hideKeyboardCompletely, initUnicodeKeyboard} from '../keyboard';
|
|
6
|
-
import {createBaseADB, prepareEmulator, pushSettingsApp} from './utils';
|
|
7
|
-
import {adjustTimeZone} from '../time';
|
|
5
|
+
import {hideKeyboardCompletely, initUnicodeKeyboard} from '../keyboard.js';
|
|
6
|
+
import {createBaseADB, prepareEmulator, pushSettingsApp} from './utils.js';
|
|
7
|
+
import {adjustTimeZone} from '../time.js';
|
|
8
8
|
import {retryInterval} from 'asyncbox';
|
|
9
|
-
import {GET_SERVER_LOGS_FEATURE, nativeLogEntryToSeleniumEntry} from '../../utils';
|
|
10
|
-
import type {AndroidDriver} from '../../driver';
|
|
11
|
-
import type {ADBDeviceInfo, ADBLaunchInfo} from '../types';
|
|
9
|
+
import {GET_SERVER_LOGS_FEATURE, nativeLogEntryToSeleniumEntry} from '../../utils.js';
|
|
10
|
+
import type {AndroidDriver} from '../../driver.js';
|
|
11
|
+
import type {ADBDeviceInfo, ADBLaunchInfo} from '../types.js';
|
|
12
12
|
import type {ADB} from 'appium-adb';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -76,8 +76,7 @@ export async function getDeviceInfoFromCaps(this: AndroidDriver): Promise<ADBDev
|
|
|
76
76
|
if (
|
|
77
77
|
(bothVersionsCanBeCoerced &&
|
|
78
78
|
(semverDO as semver.SemVer).version === (semverPV as semver.SemVer).version) ||
|
|
79
|
-
(bothVersionsAreStrings &&
|
|
80
|
-
String(deviceOS)?.toLowerCase() === String(platformVersion)?.toLowerCase())
|
|
79
|
+
(bothVersionsAreStrings && deviceOS.toLowerCase() === platformVersion.toLowerCase())
|
|
81
80
|
) {
|
|
82
81
|
// Got an exact match - proceed immediately
|
|
83
82
|
udid = device.udid;
|
|
@@ -92,7 +91,7 @@ export async function getDeviceInfoFromCaps(this: AndroidDriver): Promise<ADBDev
|
|
|
92
91
|
const dvMajor = (semverDO as semver.SemVer).major;
|
|
93
92
|
const dvMinor = (semverDO as semver.SemVer).minor;
|
|
94
93
|
if (
|
|
95
|
-
((!String(this.opts.platformVersion)
|
|
94
|
+
((!String(this.opts.platformVersion).includes('.') && pvMajor === dvMajor) ||
|
|
96
95
|
(pvMajor === dvMajor && pvMinor === dvMinor)) &&
|
|
97
96
|
// Got a partial match - make sure we consider the most recent
|
|
98
97
|
// device version available on the host system
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {util} from '@appium/support';
|
|
2
|
-
import {requireEmulator} from './utils';
|
|
3
|
-
import {errors} from 'appium/driver';
|
|
4
|
-
import type {AndroidDriver} from '../../driver';
|
|
2
|
+
import {requireEmulator} from './utils.js';
|
|
3
|
+
import {errors} from 'appium/driver.js';
|
|
4
|
+
import type {AndroidDriver} from '../../driver.js';
|
|
5
5
|
import type {
|
|
6
6
|
GsmAction,
|
|
7
7
|
GsmSignalStrength,
|
|
8
8
|
GsmVoiceState,
|
|
9
9
|
PowerACState,
|
|
10
10
|
NetworkSpeed,
|
|
11
|
-
} from '../types';
|
|
11
|
+
} from '../types.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use mobile: extension
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
UNICODE_IME,
|
|
8
8
|
EMPTY_IME,
|
|
9
9
|
} from 'io.appium.settings';
|
|
10
|
-
import {prepareEmulatorForImageInjection} from '../image-injection';
|
|
11
|
-
import {ADB_LISTEN_ALL_NETWORK_FEATURE} from '../../utils';
|
|
12
|
-
import type {AndroidDriver} from '../../driver';
|
|
10
|
+
import {prepareEmulatorForImageInjection} from '../image-injection.js';
|
|
11
|
+
import {ADB_LISTEN_ALL_NETWORK_FEATURE} from '../../utils.js';
|
|
12
|
+
import type {AndroidDriver} from '../../driver.js';
|
|
13
13
|
|
|
14
14
|
const HELPER_APP_INSTALL_RETRIES = 3;
|
|
15
15
|
const HELPER_APP_INSTALL_RETRY_DELAY_MS = 5000;
|
package/lib/commands/element.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
|
|
3
|
-
import {errors} from 'appium/driver';
|
|
3
|
+
import {errors} from 'appium/driver.js';
|
|
4
4
|
import type {Position, Size} from '@appium/types';
|
|
5
|
-
import type {AndroidDriver} from '../driver';
|
|
6
|
-
import type {DoSetElementValueOpts} from './types';
|
|
5
|
+
import type {AndroidDriver} from '../driver.js';
|
|
6
|
+
import type {DoSetElementValueOpts} from './types.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Gets an attribute value from an element.
|
package/lib/commands/execute.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {errors, PROTOCOLS} from 'appium/driver';
|
|
1
|
+
import {errors, PROTOCOLS} from 'appium/driver.js';
|
|
2
2
|
import {util} from '@appium/support';
|
|
3
3
|
import type {StringRecord, Element} from '@appium/types';
|
|
4
|
-
import type {AndroidDriver} from '../driver';
|
|
4
|
+
import type {AndroidDriver} from '../driver.js';
|
|
5
5
|
import type {Chromedriver} from 'appium-chromedriver';
|
|
6
6
|
|
|
7
7
|
const EXECUTE_SCRIPT_PREFIX = 'mobile:';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {fs, util, zip, tempDir} from '@appium/support';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {errors} from 'appium/driver';
|
|
4
|
-
import type {AndroidDriver} from '../driver';
|
|
3
|
+
import {errors} from 'appium/driver.js';
|
|
4
|
+
import type {AndroidDriver} from '../driver.js';
|
|
5
5
|
import type {ADB} from 'appium-adb';
|
|
6
6
|
|
|
7
7
|
const CONTAINER_PATH_MARKER = '@';
|
package/lib/commands/find.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {errors, isErrorType} from 'appium/driver';
|
|
2
|
-
import type {AndroidDriver} from '../driver';
|
|
3
|
-
import type {Element} from '@appium/types';
|
|
4
|
-
import type {FindElementOpts} from './types';
|
|
1
|
+
import {errors, isErrorType} from 'appium/driver.js';
|
|
5
2
|
import {util} from '@appium/support';
|
|
3
|
+
import type {AndroidDriver} from '../driver.js';
|
|
4
|
+
import type {Element} from '@appium/types';
|
|
5
|
+
import type {FindElementOpts} from './types.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @param strategy The element location strategy to use (e.g., 'id', 'xpath', 'class name').
|
|
@@ -2,9 +2,9 @@ import {asyncmap} from 'asyncbox';
|
|
|
2
2
|
import {fs, tempDir} from '@appium/support';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import type {Location} from '@appium/types';
|
|
5
|
+
import {getThirdPartyPackages} from './app-management.js';
|
|
6
|
+
import type {AndroidDriver} from '../driver.js';
|
|
5
7
|
import {SETTINGS_HELPER_ID} from 'io.appium.settings';
|
|
6
|
-
import {getThirdPartyPackages} from './app-management';
|
|
7
|
-
import type {AndroidDriver} from '../driver';
|
|
8
8
|
|
|
9
9
|
// The value close to zero, but not zero, is needed
|
|
10
10
|
// to trick JSON generation and send a float value instead of an integer,
|
package/lib/commands/gestures.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {errors} from 'appium/driver';
|
|
1
|
+
import {errors} from 'appium/driver.js';
|
|
3
2
|
import type {StringRecord} from '@appium/types';
|
|
4
|
-
import type {AndroidDriver} from '../driver';
|
|
3
|
+
import type {AndroidDriver} from '../driver.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Performs a series of actions (gestures) on the device.
|
|
@@ -11,5 +10,6 @@ import type {AndroidDriver} from '../driver';
|
|
|
11
10
|
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
12
11
|
*/
|
|
13
12
|
export async function performActions(this: AndroidDriver, actions: StringRecord[]): Promise<void> {
|
|
13
|
+
void actions;
|
|
14
14
|
throw new errors.NotImplementedError('Not implemented');
|
|
15
15
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {errors} from 'appium/driver';
|
|
1
|
+
import {errors} from 'appium/driver.js';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import {fs, tempDir} from '@appium/support';
|
|
4
4
|
import crypto from 'node:crypto';
|
|
5
|
-
import type {AndroidDriver} from '../driver';
|
|
5
|
+
import type {AndroidDriver} from '../driver.js';
|
|
6
6
|
|
|
7
7
|
const EMULATOR_RESOURCES_ROOT = ['emulator', 'resources'];
|
|
8
8
|
const CONFIG_NAME = 'Toren1BD.posters';
|
package/lib/commands/ime.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {errors} from 'appium/driver';
|
|
2
|
-
import type {AndroidDriver} from '../driver';
|
|
3
|
-
import {SET_STYLUS_HANDWRITING_FEATURE} from '../utils';
|
|
1
|
+
import {errors} from 'appium/driver.js';
|
|
2
|
+
import type {AndroidDriver} from '../driver.js';
|
|
3
|
+
import {SET_STYLUS_HANDWRITING_FEATURE} from '../utils.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Checks if an IME (Input Method Editor) is activated.
|