appium-xcuitest-driver 5.14.2 → 5.15.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 +21 -0
- package/build/lib/commands/index.d.ts +2 -0
- package/build/lib/commands/index.d.ts.map +1 -1
- package/build/lib/commands/index.js +2 -0
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/memory.d.ts +14 -0
- package/build/lib/commands/memory.d.ts.map +1 -0
- package/build/lib/commands/memory.js +52 -0
- package/build/lib/commands/memory.js.map +1 -0
- package/build/lib/devicectl.d.ts +103 -0
- package/build/lib/devicectl.d.ts.map +1 -0
- package/build/lib/devicectl.js +162 -0
- package/build/lib/devicectl.js.map +1 -0
- package/build/lib/driver.d.ts +14 -11
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +4 -0
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +6 -0
- package/build/lib/execute-method-map.d.ts.map +1 -1
- package/build/lib/execute-method-map.js +6 -0
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/ios-deploy.d.ts.map +1 -1
- package/build/lib/ios-deploy.js +7 -31
- package/build/lib/ios-deploy.js.map +1 -1
- package/lib/commands/index.js +2 -0
- package/lib/commands/memory.js +54 -0
- package/lib/devicectl.js +174 -0
- package/lib/driver.js +6 -0
- package/lib/execute-method-map.ts +6 -0
- package/lib/ios-deploy.js +7 -32
- package/npm-shrinkwrap.json +9 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [5.15.1](https://github.com/appium/appium-xcuitest-driver/compare/v5.15.0...v5.15.1) (2024-01-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* revert active application detection fix added in 5.14.1 ([#2314](https://github.com/appium/appium-xcuitest-driver/issues/2314)) ([b46243e](https://github.com/appium/appium-xcuitest-driver/commit/b46243e6276ce65bb25f6bd7650a25b935df955f))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* Unify devicectl usage ([#2310](https://github.com/appium/appium-xcuitest-driver/issues/2310)) ([b788c76](https://github.com/appium/appium-xcuitest-driver/commit/b788c76ef0f020adf5012d729013e7ed69508307))
|
|
12
|
+
|
|
13
|
+
## [5.15.0](https://github.com/appium/appium-xcuitest-driver/compare/v5.14.2...v5.15.0) (2024-01-29)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Add 'mobile: sendMemoryWarning' extension ([#2308](https://github.com/appium/appium-xcuitest-driver/issues/2308)) ([014952b](https://github.com/appium/appium-xcuitest-driver/commit/014952b6f98a35518d30d2e25f4809d85609b055))
|
|
19
|
+
|
|
1
20
|
## [5.14.2](https://github.com/appium/appium-xcuitest-driver/compare/v5.14.1...v5.14.2) (2024-01-27)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -7,6 +26,8 @@
|
|
|
7
26
|
|
|
8
27
|
## [5.14.1](https://github.com/appium/appium-xcuitest-driver/compare/v5.14.0...v5.14.1) (2024-01-24)
|
|
9
28
|
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
* Fixed current active application detection in WebDriverAgent [WebDriverAgent#834](https://github.com/appium/WebDriverAgent/pull/834). It might require switching the active application to `com.apple.springboard` in order to interact with system dialogs, such as permission dialogs, while the current active application is not the springboard. Using `mobile:alert` or `acceptAlertButtonSelector`/`dismissAlertButtonSelector` also should help. See also [appium#19716](https://github.com/appium/appium/issues/19716).
|
|
10
31
|
|
|
11
32
|
### Miscellaneous Chores
|
|
12
33
|
|
|
@@ -26,6 +26,7 @@ declare namespace _default {
|
|
|
26
26
|
export { locationExtensions };
|
|
27
27
|
export { lockExtensions };
|
|
28
28
|
export { logExtensions };
|
|
29
|
+
export { memoryExtensions };
|
|
29
30
|
export { navigationExtensions };
|
|
30
31
|
export { notificationsExtensions };
|
|
31
32
|
export { pasteboardExtensions };
|
|
@@ -69,6 +70,7 @@ import localizationExtensions from './localization';
|
|
|
69
70
|
import locationExtensions from './location';
|
|
70
71
|
import lockExtensions from './lock';
|
|
71
72
|
import logExtensions from './log';
|
|
73
|
+
import memoryExtensions from './memory';
|
|
72
74
|
import navigationExtensions from './navigation';
|
|
73
75
|
import notificationsExtensions from './notifications';
|
|
74
76
|
import pasteboardExtensions from './pasteboard';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAoC,iBAAiB;4BACzB,SAAS;iCAEJ,cAAc;oCADX,kBAAkB;iCAErB,eAAe;4BACpB,SAAS;8BACP,WAAW;gCACT,aAAa;kCACX,eAAe;gCACjB,aAAa;gCACb,aAAa;8BACf,WAAW;iCACR,cAAc;8BACjB,WAAW;8BACX,WAAW;mCACN,iBAAiB;2BACzB,QAAQ;8BACL,WAAW;kCACP,eAAe;8BACnB,WAAW;4BACb,SAAS;gCACL,aAAa;+BACd,YAAY;mCACR,gBAAgB;+BACpB,YAAY;2BAChB,QAAQ;0BACT,OAAO;6BACJ,UAAU;iCACN,cAAc;oCACX,iBAAiB;iCACpB,cAAc;2BACpB,QAAQ;kCACD,eAAe;kCACf,eAAe;kCACf,gBAAgB;kCAChB,gBAAgB;mCACf,gBAAgB;iCAClB,eAAe;6BACnB,UAAU;8BACT,YAAY;0BAChB,OAAO;6BACJ,UAAU"}
|
|
@@ -30,6 +30,7 @@ const localization_1 = __importDefault(require("./localization"));
|
|
|
30
30
|
const location_1 = __importDefault(require("./location"));
|
|
31
31
|
const lock_1 = __importDefault(require("./lock"));
|
|
32
32
|
const log_1 = __importDefault(require("./log"));
|
|
33
|
+
const memory_1 = __importDefault(require("./memory"));
|
|
33
34
|
const navigation_1 = __importDefault(require("./navigation"));
|
|
34
35
|
const notifications_1 = __importDefault(require("./notifications"));
|
|
35
36
|
const pasteboard_1 = __importDefault(require("./pasteboard"));
|
|
@@ -72,6 +73,7 @@ exports.default = {
|
|
|
72
73
|
locationExtensions: location_1.default,
|
|
73
74
|
lockExtensions: lock_1.default,
|
|
74
75
|
logExtensions: log_1.default,
|
|
76
|
+
memoryExtensions: memory_1.default,
|
|
75
77
|
navigationExtensions: navigation_1.default,
|
|
76
78
|
notificationsExtensions: notifications_1.default,
|
|
77
79
|
pasteboardExtensions: pasteboard_1.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;;;;AAAA,oEAAsD;AACtD,oDAAsC;AACtC,sEAAuD;AACvD,8DAAgD;AAChD,gEAAiD;AACjD,oDAAsC;AACtC,wDAA0C;AAC1C,4DAA8C;AAC9C,gEAAkD;AAClD,4DAA8C;AAC9C,4DAA8C;AAC9C,wDAA0C;AAC1C,8DAAgD;AAChD,wDAA0C;AAC1C,wDAA0C;AAC1C,oEAAqD;AACrD,kDAAoC;AACpC,wDAA0C;AAC1C,gEAAkD;AAClD,wDAA0C;AAC1C,oDAAsC;AACtC,4DAA8C;AAC9C,0DAA4C;AAC5C,kEAAoD;AACpD,0DAA4C;AAC5C,kDAAoC;AACpC,gDAAkC;AAClC,8DAAgD;AAChD,oEAAsD;AACtD,8DAAgD;AAChD,kDAAoC;AACpC,gEAAkD;AAClD,gEAAkD;AAClD,kEAAmD;AACnD,kEAAmD;AACnD,kEAAoD;AACpD,gEAAiD;AACjD,sDAAwC;AACxC,0DAA2C;AAC3C,gDAAkC;AAClC,sDAAwC;AAExC,kBAAe;IACb,uBAAuB,EAAvB,uBAAuB;IACvB,eAAe,EAAf,eAAe;IACf,oBAAoB,EAApB,oBAAoB;IACpB,uBAAuB,EAAvB,wBAAuB;IACvB,oBAAoB,EAApB,qBAAoB;IACpB,eAAe,EAAf,eAAe;IACf,iBAAiB,EAAjB,iBAAiB;IACjB,mBAAmB,EAAnB,mBAAmB;IACnB,qBAAqB,EAArB,qBAAqB;IACrB,mBAAmB,EAAnB,mBAAmB;IACnB,mBAAmB,EAAnB,mBAAmB;IACnB,iBAAiB,EAAjB,iBAAiB;IACjB,oBAAoB,EAApB,oBAAoB;IACpB,iBAAiB,EAAjB,iBAAiB;IACjB,iBAAiB,EAAjB,iBAAiB;IACjB,sBAAsB,EAAtB,uBAAsB;IACtB,cAAc,EAAd,cAAc;IACd,iBAAiB,EAAjB,iBAAiB;IACjB,qBAAqB,EAArB,qBAAqB;IACrB,iBAAiB,EAAjB,iBAAiB;IACjB,eAAe,EAAf,eAAe;IACf,mBAAmB,EAAnB,mBAAmB;IACnB,kBAAkB,EAAlB,kBAAkB;IAClB,sBAAsB,EAAtB,sBAAsB;IACtB,kBAAkB,EAAlB,kBAAkB;IAClB,cAAc,EAAd,cAAc;IACd,aAAa,EAAb,aAAa;IACb,oBAAoB,EAApB,oBAAoB;IACpB,uBAAuB,EAAvB,uBAAuB;IACvB,oBAAoB,EAApB,oBAAoB;IACpB,cAAc,EAAd,cAAc;IACd,qBAAqB,EAArB,qBAAqB;IACrB,qBAAqB,EAArB,qBAAqB;IACrB,qBAAqB,EAArB,sBAAqB;IACrB,qBAAqB,EAArB,sBAAqB;IACrB,sBAAsB,EAAtB,sBAAsB;IACtB,oBAAoB,EAApB,qBAAoB;IACpB,gBAAgB,EAAhB,gBAAgB;IAChB,iBAAiB,EAAjB,kBAAiB;IACjB,aAAa,EAAb,aAAa;IACb,gBAAgB,EAAhB,gBAAgB;CACjB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;;;;AAAA,oEAAsD;AACtD,oDAAsC;AACtC,sEAAuD;AACvD,8DAAgD;AAChD,gE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BAAsB,EAAtB,sBAAsB;IACtB,kBAAkB,EAAlB,kBAAkB;IAClB,cAAc,EAAd,cAAc;IACd,aAAa,EAAb,aAAa;IACb,gBAAgB,EAAhB,gBAAgB;IAChB,oBAAoB,EAApB,oBAAoB;IACpB,uBAAuB,EAAvB,uBAAuB;IACvB,oBAAoB,EAApB,oBAAoB;IACpB,cAAc,EAAd,cAAc;IACd,qBAAqB,EAArB,qBAAqB;IACrB,qBAAqB,EAArB,qBAAqB;IACrB,qBAAqB,EAArB,sBAAqB;IACrB,qBAAqB,EAArB,sBAAqB;IACrB,sBAAsB,EAAtB,sBAAsB;IACtB,oBAAoB,EAApB,qBAAoB;IACpB,gBAAgB,EAAhB,gBAAgB;IAChB,iBAAiB,EAAjB,kBAAiB;IACjB,aAAa,EAAb,aAAa;IACb,gBAAgB,EAAhB,gBAAgB;CACjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
/**
|
|
3
|
+
* Simulates Low Memory warning on the given application
|
|
4
|
+
*
|
|
5
|
+
* @since Xcode 15
|
|
6
|
+
* @param {string} bundleId - The bundle identifier of the target app. The app must be running
|
|
7
|
+
* @this {XCUITestDriver}
|
|
8
|
+
* @throws {Error} if the app is not running or is not installed
|
|
9
|
+
*/
|
|
10
|
+
function mobileSendMemoryWarning(this: import("../driver").default, bundleId: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export default _default;
|
|
13
|
+
export type XCUITestDriver = import('../driver').XCUITestDriver;
|
|
14
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../lib/commands/memory.js"],"names":[],"mappings":";IAKE;;;;;;;OAOG;IACH,qGAmCC;;;6BAIU,OAAO,WAAW,EAAE,cAAc"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
+
const devicectl_1 = require("../devicectl");
|
|
8
|
+
const driver_1 = require("appium/driver");
|
|
9
|
+
exports.default = {
|
|
10
|
+
/**
|
|
11
|
+
* Simulates Low Memory warning on the given application
|
|
12
|
+
*
|
|
13
|
+
* @since Xcode 15
|
|
14
|
+
* @param {string} bundleId - The bundle identifier of the target app. The app must be running
|
|
15
|
+
* @this {XCUITestDriver}
|
|
16
|
+
* @throws {Error} if the app is not running or is not installed
|
|
17
|
+
*/
|
|
18
|
+
async mobileSendMemoryWarning(bundleId) {
|
|
19
|
+
if (!this.isRealDevice()) {
|
|
20
|
+
throw new Error('Memory warning simulation is only supported on real devices');
|
|
21
|
+
}
|
|
22
|
+
const devicectl = new devicectl_1.Devicectl(this.opts.udid, this.log);
|
|
23
|
+
/** @type {import('../devicectl').AppInfo[]} */
|
|
24
|
+
const appInfos = await devicectl.listApps(bundleId);
|
|
25
|
+
if (lodash_1.default.isEmpty(appInfos)) {
|
|
26
|
+
throw new driver_1.errors.InvalidArgumentError(`The application identified by ${bundleId} cannot be found on the device. Is it installed?`);
|
|
27
|
+
}
|
|
28
|
+
// This regexp tries to match the process name of the main bundle executable.
|
|
29
|
+
// For example, if 'url' contains something like
|
|
30
|
+
// `file:///private/var/containers/Bundle/Application/093ACA6D-8F0B-4601-87B9-4099E43A1A20/Target.app/`
|
|
31
|
+
// and the following processes might be running:
|
|
32
|
+
// `file:///private/var/containers/Bundle/Application/093ACA6D-8F0B-4601-87B9-4099E43A1A20/Target.app/Target`
|
|
33
|
+
// `file:///private/var/containers/Bundle/Application/093ACA6D-8F0B-4601-87B9-4099E43A1A20/Target.app/PlugIns/WidgetExtension.appex/WidgetExtension`
|
|
34
|
+
// then we only want to match the first one.
|
|
35
|
+
// Unfortunately devicectl does not provide more info which would
|
|
36
|
+
// allow to connect a bundle id to a process id.
|
|
37
|
+
const pattern = new RegExp(`^${lodash_1.default.escapeRegExp(appInfos[0].url)}[^/]+$`);
|
|
38
|
+
/** @type {number[]} */
|
|
39
|
+
const pids = (await devicectl.listProcesses())
|
|
40
|
+
.filter(({ executable }) => pattern.test(executable))
|
|
41
|
+
.map(({ processIdentifier }) => processIdentifier);
|
|
42
|
+
if (lodash_1.default.isEmpty(pids)) {
|
|
43
|
+
throw new driver_1.errors.InvalidArgumentError(`The application identified by ${bundleId} must be running in order to simulate the Low Memory warning`);
|
|
44
|
+
}
|
|
45
|
+
this.log.info(`Emulating Low Memory warning for the process id ${pids[0]}, bundle id ${bundleId}`);
|
|
46
|
+
await devicectl.sendMemoryWarning(pids[0]);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
51
|
+
*/
|
|
52
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../lib/commands/memory.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,4CAAyC;AACzC,0CAAuC;AAEvC,kBAAe;IACb;;;;;;;OAOG;IACH,KAAK,CAAC,uBAAuB,CAAC,QAAQ;QACpC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;SAChF;QAED,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1D,+CAA+C;QAC/C,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,gBAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACvB,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,iCAAiC,QAAQ,kDAAkD,CAC5F,CAAC;SACH;QAED,6EAA6E;QAC7E,gDAAgD;QAChD,uGAAuG;QACvG,gDAAgD;QAChD,6GAA6G;QAC7G,oJAAoJ;QACpJ,4CAA4C;QAC5C,iEAAiE;QACjE,gDAAgD;QAChD,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,IAAI,gBAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACxE,uBAAuB;QACvB,MAAM,IAAI,GAAG,CAAC,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;aAC3C,MAAM,CAAC,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAClD,GAAG,CAAC,CAAC,EAAC,iBAAiB,EAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC;QACnD,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,iCAAiC,QAAQ,8DAA8D,CACxG,CAAC;SACH;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,mDAAmD,IAAI,CAAC,CAAC,CAAC,eAAe,QAAQ,EAAE,CAAC,CAAC;QACnG,MAAM,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC;AAEF;;GAEG"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} ProcessInfo
|
|
3
|
+
* @property {number} processIdentifier
|
|
4
|
+
* @property {string} executable
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {Object} AppInfo
|
|
8
|
+
* @property {boolean} appClip
|
|
9
|
+
* @property {boolean} builtByDeveloper
|
|
10
|
+
* @property {string} bundleIdentifier
|
|
11
|
+
* @property {string} bundleVersion
|
|
12
|
+
* @property {boolean} defaultApp
|
|
13
|
+
* @property {boolean} hidden
|
|
14
|
+
* @property {boolean} internalApp
|
|
15
|
+
* @property {string} name
|
|
16
|
+
* @property {boolean} removable
|
|
17
|
+
* @property {string} url
|
|
18
|
+
* @property {string} version
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} ExecuteOptions
|
|
22
|
+
* @property {boolean} [logStdout=false]
|
|
23
|
+
* @property {boolean} [asJson=true]
|
|
24
|
+
* @property {boolean} [asynchronous=false]
|
|
25
|
+
* @property {string[]|string} [subcommandOptions]
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {{asynchronous: true}} TAsyncOpts
|
|
29
|
+
*/
|
|
30
|
+
export class Devicectl {
|
|
31
|
+
/**
|
|
32
|
+
* @since Xcode 15, iOS 17
|
|
33
|
+
* @param {string} udid
|
|
34
|
+
* @param {import('@appium/types').AppiumLogger} log
|
|
35
|
+
*/
|
|
36
|
+
constructor(udid: string, log: import('@appium/types').AppiumLogger);
|
|
37
|
+
udid: string;
|
|
38
|
+
log: import("@appium/types").AppiumLogger;
|
|
39
|
+
/**
|
|
40
|
+
* @template {ExecuteOptions} TExecOpts
|
|
41
|
+
* @param {string[]} subcommand
|
|
42
|
+
* @param {TExecOpts} [opts]
|
|
43
|
+
* @return {Promise<TExecOpts extends TAsyncOpts ? import('teen_process').SubProcess : import('teen_process').TeenProcessExecResult>}
|
|
44
|
+
*/
|
|
45
|
+
execute<TExecOpts extends ExecuteOptions>(subcommand: string[], opts?: TExecOpts | undefined): Promise<TExecOpts extends TAsyncOpts ? SubProcess : import("teen_process").TeenProcessExecResult<any>>;
|
|
46
|
+
/**
|
|
47
|
+
* Simulates memory warning for the process with the given PID
|
|
48
|
+
*
|
|
49
|
+
* @param {number|string} pid The process identifier to simulate the Low Memory warning for
|
|
50
|
+
* @return {Promise<void>}
|
|
51
|
+
*/
|
|
52
|
+
sendMemoryWarning(pid: number | string): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Lists running processes on the device
|
|
55
|
+
*
|
|
56
|
+
* @returns {Promise<ProcessInfo[]>}
|
|
57
|
+
*/
|
|
58
|
+
listProcesses(): Promise<ProcessInfo[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Send POSIX signal to the running process
|
|
61
|
+
*
|
|
62
|
+
* @param {number|string} pid The process identifier to send a signal to
|
|
63
|
+
* @param {number|string} signal The signal to send to a process. See 'man signal' for a list of signals
|
|
64
|
+
* @returns {Promise<void>}
|
|
65
|
+
*/
|
|
66
|
+
sendSignalToProcess(pid: number | string, signal: number | string): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieves the list of installed apps from the device
|
|
69
|
+
*
|
|
70
|
+
* @param {string?} [bundleId=null] Provide the target bundle identifier
|
|
71
|
+
* to speed up the lookup.
|
|
72
|
+
* @returns {Promise<AppInfo[]>} Empty array is returned if no matching apps are found
|
|
73
|
+
*/
|
|
74
|
+
listApps(bundleId?: string | null | undefined): Promise<AppInfo[]>;
|
|
75
|
+
}
|
|
76
|
+
export type ProcessInfo = {
|
|
77
|
+
processIdentifier: number;
|
|
78
|
+
executable: string;
|
|
79
|
+
};
|
|
80
|
+
export type AppInfo = {
|
|
81
|
+
appClip: boolean;
|
|
82
|
+
builtByDeveloper: boolean;
|
|
83
|
+
bundleIdentifier: string;
|
|
84
|
+
bundleVersion: string;
|
|
85
|
+
defaultApp: boolean;
|
|
86
|
+
hidden: boolean;
|
|
87
|
+
internalApp: boolean;
|
|
88
|
+
name: string;
|
|
89
|
+
removable: boolean;
|
|
90
|
+
url: string;
|
|
91
|
+
version: string;
|
|
92
|
+
};
|
|
93
|
+
export type ExecuteOptions = {
|
|
94
|
+
logStdout?: boolean | undefined;
|
|
95
|
+
asJson?: boolean | undefined;
|
|
96
|
+
asynchronous?: boolean | undefined;
|
|
97
|
+
subcommandOptions?: string | string[] | undefined;
|
|
98
|
+
};
|
|
99
|
+
export type TAsyncOpts = {
|
|
100
|
+
asynchronous: true;
|
|
101
|
+
};
|
|
102
|
+
import { SubProcess } from 'teen_process';
|
|
103
|
+
//# sourceMappingURL=devicectl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devicectl.d.ts","sourceRoot":"","sources":["../../lib/devicectl.js"],"names":[],"mappings":"AAMA;;;;GAIG;AAUH;;;;;;;;;;;;;GAaG;AAmBH;;;;;;GAMG;AAEH;;GAEG;AAEH;IACE;;;;OAIG;IACH,kBAHW,MAAM,OACN,OAAO,eAAe,EAAE,YAAY,EAK9C;IAFC,aAAgB;IAChB,0CAAc;IAGhB;;;;;OAKG;IACH,sDAJW,MAAM,EAAE,wIA0ClB;IAED;;;;;OAKG;IACH,uBAHW,MAAM,GAAC,MAAM,GACZ,QAAQ,IAAI,CAAC,CAMxB;IAED;;;;OAIG;IACH,iBAFa,QAAQ,WAAW,EAAE,CAAC,CAKlC;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,GAAC,MAAM,UACb,MAAM,GAAC,MAAM,GACX,QAAQ,IAAI,CAAC,CAMzB;IAED;;;;;;OAMG;IACH,gDAFa,QAAQ,OAAO,EAAE,CAAC,CAW9B;CACF;;uBArKa,MAAM;gBACN,MAAM;;;aAaN,OAAO;sBACP,OAAO;sBACP,MAAM;mBACN,MAAM;gBACN,OAAO;YACP,OAAO;iBACP,OAAO;UACP,MAAM;eACN,OAAO;SACP,MAAM;aACN,MAAM;;;;;;;;yBA6BP;IAAC,YAAY,EAAE,IAAI,CAAA;CAAC;2BA7DF,cAAc"}
|
|
@@ -0,0 +1,162 @@
|
|
|
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.Devicectl = void 0;
|
|
7
|
+
const teen_process_1 = require("teen_process");
|
|
8
|
+
const support_1 = require("appium/support");
|
|
9
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
10
|
+
const XCRUN = 'xcrun';
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {Object} ProcessInfo
|
|
13
|
+
* @property {number} processIdentifier
|
|
14
|
+
* @property {string} executable
|
|
15
|
+
*/
|
|
16
|
+
/*
|
|
17
|
+
Example:
|
|
18
|
+
{
|
|
19
|
+
"executable" : "file:///sbin/launchd",
|
|
20
|
+
"processIdentifier" : 1
|
|
21
|
+
},
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* @typedef {Object} AppInfo
|
|
25
|
+
* @property {boolean} appClip
|
|
26
|
+
* @property {boolean} builtByDeveloper
|
|
27
|
+
* @property {string} bundleIdentifier
|
|
28
|
+
* @property {string} bundleVersion
|
|
29
|
+
* @property {boolean} defaultApp
|
|
30
|
+
* @property {boolean} hidden
|
|
31
|
+
* @property {boolean} internalApp
|
|
32
|
+
* @property {string} name
|
|
33
|
+
* @property {boolean} removable
|
|
34
|
+
* @property {string} url
|
|
35
|
+
* @property {string} version
|
|
36
|
+
*/
|
|
37
|
+
/*
|
|
38
|
+
Example:
|
|
39
|
+
{
|
|
40
|
+
"appClip" : false,
|
|
41
|
+
"builtByDeveloper" : false,
|
|
42
|
+
"bundleIdentifier" : "com.apple.mobilesafari",
|
|
43
|
+
"bundleVersion" : "8617.1.17.10.9",
|
|
44
|
+
"defaultApp" : true,
|
|
45
|
+
"hidden" : false,
|
|
46
|
+
"internalApp" : false,
|
|
47
|
+
"name" : "Safari",
|
|
48
|
+
"removable" : false,
|
|
49
|
+
"url" : "file:///Applications/MobileSafari.app/",
|
|
50
|
+
"version" : "17.2"
|
|
51
|
+
}
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* @typedef {Object} ExecuteOptions
|
|
55
|
+
* @property {boolean} [logStdout=false]
|
|
56
|
+
* @property {boolean} [asJson=true]
|
|
57
|
+
* @property {boolean} [asynchronous=false]
|
|
58
|
+
* @property {string[]|string} [subcommandOptions]
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {{asynchronous: true}} TAsyncOpts
|
|
62
|
+
*/
|
|
63
|
+
class Devicectl {
|
|
64
|
+
/**
|
|
65
|
+
* @since Xcode 15, iOS 17
|
|
66
|
+
* @param {string} udid
|
|
67
|
+
* @param {import('@appium/types').AppiumLogger} log
|
|
68
|
+
*/
|
|
69
|
+
constructor(udid, log) {
|
|
70
|
+
this.udid = udid;
|
|
71
|
+
this.log = log;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @template {ExecuteOptions} TExecOpts
|
|
75
|
+
* @param {string[]} subcommand
|
|
76
|
+
* @param {TExecOpts} [opts]
|
|
77
|
+
* @return {Promise<TExecOpts extends TAsyncOpts ? import('teen_process').SubProcess : import('teen_process').TeenProcessExecResult>}
|
|
78
|
+
*/
|
|
79
|
+
async execute(subcommand, opts) {
|
|
80
|
+
const { logStdout = false, asynchronous = false, asJson = true, subcommandOptions, } = opts ?? {};
|
|
81
|
+
const finalArgs = [
|
|
82
|
+
'devicectl', ...subcommand,
|
|
83
|
+
'--device', this.udid,
|
|
84
|
+
];
|
|
85
|
+
if (subcommandOptions && !lodash_1.default.isEmpty(subcommandOptions)) {
|
|
86
|
+
finalArgs.push(...(Array.isArray(subcommandOptions) ? subcommandOptions : [subcommandOptions]));
|
|
87
|
+
}
|
|
88
|
+
if (asJson) {
|
|
89
|
+
finalArgs.push('--quiet', '--json-output', '-');
|
|
90
|
+
}
|
|
91
|
+
const cmdStr = support_1.util.quote([XCRUN, ...finalArgs]);
|
|
92
|
+
this.log.debug(`Executing ${cmdStr}`);
|
|
93
|
+
try {
|
|
94
|
+
if (asynchronous) {
|
|
95
|
+
const result = new teen_process_1.SubProcess(XCRUN, finalArgs);
|
|
96
|
+
await result.start(0);
|
|
97
|
+
// @ts-ignore TS does not understand it
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
const result = await (0, teen_process_1.exec)(XCRUN, finalArgs);
|
|
101
|
+
if (logStdout) {
|
|
102
|
+
this.log.debug(`Command output: ${result.stdout}`);
|
|
103
|
+
}
|
|
104
|
+
// @ts-ignore TS does not understand it
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
throw new Error(`'${cmdStr}' failed. Original error: ${e.stderr || e.stdout || e.message}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Simulates memory warning for the process with the given PID
|
|
113
|
+
*
|
|
114
|
+
* @param {number|string} pid The process identifier to simulate the Low Memory warning for
|
|
115
|
+
* @return {Promise<void>}
|
|
116
|
+
*/
|
|
117
|
+
async sendMemoryWarning(pid) {
|
|
118
|
+
await this.execute(['device', 'process', 'sendMemoryWarning'], {
|
|
119
|
+
subcommandOptions: ['--pid', `${pid}`]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Lists running processes on the device
|
|
124
|
+
*
|
|
125
|
+
* @returns {Promise<ProcessInfo[]>}
|
|
126
|
+
*/
|
|
127
|
+
async listProcesses() {
|
|
128
|
+
const { stdout } = await this.execute(['device', 'info', 'processes']);
|
|
129
|
+
return JSON.parse(stdout).result.runningProcesses;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Send POSIX signal to the running process
|
|
133
|
+
*
|
|
134
|
+
* @param {number|string} pid The process identifier to send a signal to
|
|
135
|
+
* @param {number|string} signal The signal to send to a process. See 'man signal' for a list of signals
|
|
136
|
+
* @returns {Promise<void>}
|
|
137
|
+
*/
|
|
138
|
+
async sendSignalToProcess(pid, signal) {
|
|
139
|
+
await this.execute(['device', 'process', 'signal'], {
|
|
140
|
+
subcommandOptions: ['--signal', `${signal}`, '--pid', `${pid}`]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Retrieves the list of installed apps from the device
|
|
145
|
+
*
|
|
146
|
+
* @param {string?} [bundleId=null] Provide the target bundle identifier
|
|
147
|
+
* to speed up the lookup.
|
|
148
|
+
* @returns {Promise<AppInfo[]>} Empty array is returned if no matching apps are found
|
|
149
|
+
*/
|
|
150
|
+
async listApps(bundleId = null) {
|
|
151
|
+
const subcommandOptions = ['--include-all-apps'];
|
|
152
|
+
if (bundleId) {
|
|
153
|
+
subcommandOptions.push('--bundle-id', bundleId);
|
|
154
|
+
}
|
|
155
|
+
const { stdout } = await this.execute(['device', 'info', 'apps'], {
|
|
156
|
+
subcommandOptions,
|
|
157
|
+
});
|
|
158
|
+
return JSON.parse(stdout).result.apps;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.Devicectl = Devicectl;
|
|
162
|
+
//# sourceMappingURL=devicectl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devicectl.js","sourceRoot":"","sources":["../../lib/devicectl.js"],"names":[],"mappings":";;;;;;AAAA,+CAA8C;AAC9C,4CAAoC;AACpC,oDAAuB;AAEvB,MAAM,KAAK,GAAG,OAAO,CAAC;AAEtB;;;;GAIG;AAEH;;;;;;EAME;AAEF;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;EAeE;AAEF;;;;;;GAMG;AAEH;;GAEG;AAEH,MAAa,SAAS;IACpB;;;;OAIG;IACH,YAAY,IAAI,EAAE,GAAG;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI;QAC5B,MAAM,EACJ,SAAS,GAAG,KAAK,EACjB,YAAY,GAAG,KAAK,EACpB,MAAM,GAAG,IAAI,EACb,iBAAiB,GAClB,GAAG,IAAI,IAAI,EAAE,CAAC;QAEf,MAAM,SAAS,GAAG;YAChB,WAAW,EAAE,GAAG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@@ -927,6 +927,12 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
927
927
|
readonly optional: readonly ["offset"];
|
|
928
928
|
};
|
|
929
929
|
};
|
|
930
|
+
readonly 'mobile: sendMemoryWarning': {
|
|
931
|
+
readonly command: "mobileSendMemoryWarning";
|
|
932
|
+
readonly params: {
|
|
933
|
+
readonly required: readonly ["bundleId"];
|
|
934
|
+
};
|
|
935
|
+
};
|
|
930
936
|
readonly 'mobile: swipe': {
|
|
931
937
|
readonly command: "mobileSwipe";
|
|
932
938
|
readonly params: {
|
|
@@ -1103,7 +1109,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1103
1109
|
};
|
|
1104
1110
|
readonly 'mobile: viewportRect': {
|
|
1105
1111
|
readonly command: "getViewportRect";
|
|
1106
|
-
};
|
|
1112
|
+
}; /** @type {string|null|undefined} */
|
|
1107
1113
|
readonly 'mobile: startPerfRecord': {
|
|
1108
1114
|
readonly command: "mobileStartPerfRecord";
|
|
1109
1115
|
readonly params: {
|
|
@@ -1117,20 +1123,17 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1117
1123
|
};
|
|
1118
1124
|
};
|
|
1119
1125
|
readonly 'mobile: installCertificate': {
|
|
1120
|
-
/**
|
|
1121
|
-
* @type {import('./types').Page[]|undefined}
|
|
1122
|
-
*/
|
|
1123
1126
|
readonly command: "mobileInstallCertificate";
|
|
1124
1127
|
readonly params: {
|
|
1125
|
-
readonly required: readonly ["content"];
|
|
1128
|
+
readonly required: readonly ["content"];
|
|
1126
1129
|
readonly optional: readonly ["commonName", "isRoot"];
|
|
1127
1130
|
};
|
|
1128
1131
|
};
|
|
1129
1132
|
readonly 'mobile: removeCertificate': {
|
|
1130
|
-
readonly command: "mobileRemoveCertificate";
|
|
1133
|
+
readonly command: "mobileRemoveCertificate";
|
|
1131
1134
|
readonly params: {
|
|
1132
1135
|
readonly required: readonly ["name"];
|
|
1133
|
-
};
|
|
1136
|
+
}; /** @type {LRUCache} */
|
|
1134
1137
|
};
|
|
1135
1138
|
readonly 'mobile: listCertificates': {
|
|
1136
1139
|
readonly command: "mobileListCertificates";
|
|
@@ -1139,24 +1142,23 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
1139
1142
|
readonly command: "mobileStartLogsBroadcast";
|
|
1140
1143
|
};
|
|
1141
1144
|
readonly 'mobile: stopLogsBroadcast': {
|
|
1145
|
+
/** @type {boolean|undefined} */
|
|
1142
1146
|
readonly command: "mobileStopLogsBroadcast";
|
|
1143
1147
|
};
|
|
1144
1148
|
readonly 'mobile: batteryInfo': {
|
|
1145
1149
|
readonly command: "mobileGetBatteryInfo";
|
|
1146
1150
|
};
|
|
1147
1151
|
readonly 'mobile: performAccessibilityAudit': {
|
|
1148
|
-
readonly command: "mobilePerformAccessibilityAudit";
|
|
1152
|
+
readonly command: "mobilePerformAccessibilityAudit"; /** @type {XCUITestDriverOpts} */
|
|
1149
1153
|
readonly params: {
|
|
1150
1154
|
readonly optional: readonly ["auditTypes"];
|
|
1151
1155
|
};
|
|
1152
1156
|
};
|
|
1153
|
-
/** @type {import('./types').LifecycleData} */
|
|
1154
1157
|
readonly 'mobile: deviceInfo': {
|
|
1155
1158
|
readonly command: "mobileGetDeviceInfo";
|
|
1156
1159
|
};
|
|
1157
|
-
/** @type {XCUITestDriverOpts} */
|
|
1158
1160
|
readonly 'mobile: getDeviceTime': {
|
|
1159
|
-
readonly command: "mobileGetDeviceTime";
|
|
1161
|
+
readonly command: "mobileGetDeviceTime"; /** @type {import('./commands/pcap').TrafficCapture|null} */
|
|
1160
1162
|
readonly params: {
|
|
1161
1163
|
readonly optional: readonly ["format"];
|
|
1162
1164
|
};
|
|
@@ -2009,6 +2011,7 @@ export class XCUITestDriver extends BaseDriver<{
|
|
|
2009
2011
|
mobileDeleteFile: (this: XCUITestDriver, remotePath: string) => Promise<void>;
|
|
2010
2012
|
pullFolder: (this: XCUITestDriver, remotePath: string) => Promise<string>;
|
|
2011
2013
|
mobilePullFolder: (this: XCUITestDriver, remotePath: string) => Promise<string>;
|
|
2014
|
+
mobileSendMemoryWarning: (this: XCUITestDriver, bundleId: string) => Promise<void>;
|
|
2012
2015
|
findElOrEls: (this: XCUITestDriver, strategy: any, selector: any, mult: any, context: any) => Promise<any>;
|
|
2013
2016
|
findNativeElementOrElements: (this: XCUITestDriver, strategy: any, selector: any, mult: any, context: any) => Promise<any>;
|
|
2014
2017
|
doNativeFind: (this: XCUITestDriver, strategy: any, selector: any, mult: any, context: any) => Promise<import("@appium/types").Element<string>[] | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../lib/driver.js"],"names":[],"mappings":";0FAyqEa,OAAO,eAAe,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC;wCAI9C,4BAA4B;iCAC5B,OAAO,eAAe,EAAE,UAAU,CAAC,yBAAyB,CAAC;0BAC7D,OAAO,kBAAkB,EAAE,WAAW;8BACtC,OAAO,SAAS,EAAE,eAAe;2BACjC,OAAO,cAAc,EAAE,YAAY;AAlgEhD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgBE,0BAA0B;;;;;;;OAS1B;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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3D,iHAAiD;IACjD,iGAA2D;IAC3D,wJAAyD;IACzD,0FAAyE;IACzE,oCAAmD;IACnD,mFAAmD;IACnD,oHAA2E;IAC3E,8EAAuD;IACvD,8DAA6D;IAC7D,qFAAiE;IACjE,+DAA+D;IAC/D,qGAA2F;IAC3F,mHAA+E;IAC/E,+DAAmD;IACnD,8GAA+D;IAC/D,0DAAqD;IACrD,2EAAiD;IACjD,uEAAmD;IACnD,sDAAiE;IACjE,qHAAuH;IACvH,+HAAqF;IAKrF,oTAA4D;IAC5D,sFAAgF;IAChF,qEAA4E;IAC5E,2FAAwF;CACzF;sCAvoEmC,gBAAgB;2BAvBX,eAAe;yBAMjC,WAAW;+BANO,eAAe;sBAC1B,gBAAgB"}
|
package/build/lib/driver.js
CHANGED
|
@@ -279,6 +279,10 @@ class XCUITestDriver extends driver_1.BaseDriver {
|
|
|
279
279
|
this.mobileDeleteFile = commands_1.default.fileMovementExtensions.mobileDeleteFile;
|
|
280
280
|
this.pullFolder = commands_1.default.fileMovementExtensions.pullFolder;
|
|
281
281
|
this.mobilePullFolder = commands_1.default.fileMovementExtensions.mobilePullFolder;
|
|
282
|
+
/*--------+
|
|
283
|
+
| MEMORY |
|
|
284
|
+
+--------+*/
|
|
285
|
+
this.mobileSendMemoryWarning = commands_1.default.memoryExtensions.mobileSendMemoryWarning;
|
|
282
286
|
/*------+
|
|
283
287
|
| FIND |
|
|
284
288
|
+------+*/
|