appium-xcuitest-driver 9.8.1 → 9.9.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 +12 -0
- package/npm-shrinkwrap.json +12 -11
- package/package.json +4 -2
- package/scripts/build-wda.js +1 -11
- package/scripts/download-wda-sim.mjs +70 -0
- package/scripts/tunnel-creation.mjs +3 -0
- package/scripts/utils.js +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [9.9.1](https://github.com/appium/appium-xcuitest-driver/compare/v9.9.0...v9.9.1) (2025-06-28)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* add @ temporary fix ([#2588](https://github.com/appium/appium-xcuitest-driver/issues/2588)) ([f0ffbf6](https://github.com/appium/appium-xcuitest-driver/commit/f0ffbf6133458c3c3bcf69a1dbefc992c1ad599e))
|
|
6
|
+
|
|
7
|
+
## [9.9.0](https://github.com/appium/appium-xcuitest-driver/compare/v9.8.1...v9.9.0) (2025-06-26)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add download-wda-sim to download prebuilt WDA for Sim ([#2587](https://github.com/appium/appium-xcuitest-driver/issues/2587)) ([c1fb5a4](https://github.com/appium/appium-xcuitest-driver/commit/c1fb5a4df52cc8d8816c0a362916570d8236275d))
|
|
12
|
+
|
|
1
13
|
## [9.8.1](https://github.com/appium/appium-xcuitest-driver/compare/v9.8.0...v9.8.1) (2025-06-25)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-xcuitest-driver",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.9.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-xcuitest-driver",
|
|
9
|
-
"version": "9.
|
|
9
|
+
"version": "9.9.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@appium/strongbox": "^0.x",
|
|
13
|
+
"@appium/support": "^6.1.1",
|
|
13
14
|
"@colors/colors": "^1.6.0",
|
|
14
15
|
"appium-idb": "^1.6.13",
|
|
15
16
|
"appium-ios-device": "^2.8.0",
|
|
@@ -480,15 +481,15 @@
|
|
|
480
481
|
"license": "MIT"
|
|
481
482
|
},
|
|
482
483
|
"node_modules/@types/lodash": {
|
|
483
|
-
"version": "4.17.
|
|
484
|
-
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.
|
|
485
|
-
"integrity": "sha512-
|
|
484
|
+
"version": "4.17.19",
|
|
485
|
+
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.19.tgz",
|
|
486
|
+
"integrity": "sha512-NYqRyg/hIQrYPT9lbOeYc3kIRabJDn/k4qQHIXUpx88CBDww2fD15Sg5kbXlW86zm2XEW4g0QxkTI3/Kfkc7xQ==",
|
|
486
487
|
"license": "MIT"
|
|
487
488
|
},
|
|
488
489
|
"node_modules/@types/node": {
|
|
489
|
-
"version": "24.0.
|
|
490
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.
|
|
491
|
-
"integrity": "sha512-
|
|
490
|
+
"version": "24.0.7",
|
|
491
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.7.tgz",
|
|
492
|
+
"integrity": "sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw==",
|
|
492
493
|
"license": "MIT",
|
|
493
494
|
"dependencies": {
|
|
494
495
|
"undici-types": "~7.8.0"
|
|
@@ -4372,9 +4373,9 @@
|
|
|
4372
4373
|
"license": "ISC"
|
|
4373
4374
|
},
|
|
4374
4375
|
"node_modules/ws": {
|
|
4375
|
-
"version": "8.18.
|
|
4376
|
-
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.
|
|
4377
|
-
"integrity": "sha512-
|
|
4376
|
+
"version": "8.18.3",
|
|
4377
|
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
|
4378
|
+
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
|
4378
4379
|
"license": "MIT",
|
|
4379
4380
|
"engines": {
|
|
4380
4381
|
"node": ">=10.0.0"
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"xcuitest",
|
|
9
9
|
"xctest"
|
|
10
10
|
],
|
|
11
|
-
"version": "9.
|
|
11
|
+
"version": "9.9.1",
|
|
12
12
|
"author": "Appium Contributors",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"repository": {
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build-wda": "./scripts/build-wda.js",
|
|
35
35
|
"open-wda": "./scripts/open-wda.js",
|
|
36
|
-
"tunnel-creation": "./scripts/tunnel-creation.mjs"
|
|
36
|
+
"tunnel-creation": "./scripts/tunnel-creation.mjs",
|
|
37
|
+
"download-wda-sim": "./scripts/download-wda-sim.mjs"
|
|
37
38
|
},
|
|
38
39
|
"schema": {
|
|
39
40
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
"types": "./build/index.d.ts",
|
|
79
80
|
"dependencies": {
|
|
80
81
|
"@appium/strongbox": "^0.x",
|
|
82
|
+
"@appium/support": "^6.1.1",
|
|
81
83
|
"@colors/colors": "^1.6.0",
|
|
82
84
|
"appium-idb": "^1.6.13",
|
|
83
85
|
"appium-ios-device": "^2.8.0",
|
package/scripts/build-wda.js
CHANGED
|
@@ -3,20 +3,10 @@ const xcode = require('appium-xcode');
|
|
|
3
3
|
const {Simctl} = require('node-simctl');
|
|
4
4
|
const {getSimulator} = require('appium-ios-simulator');
|
|
5
5
|
const {logger} = require('appium/support');
|
|
6
|
+
const {parseArgValue} = require('./utils');
|
|
6
7
|
|
|
7
8
|
const log = logger.getLogger('WDA');
|
|
8
9
|
|
|
9
|
-
function parseArgValue(argName) {
|
|
10
|
-
const argNamePattern = new RegExp(`^--${argName}\\b`);
|
|
11
|
-
for (let i = 1; i < process.argv.length; ++i) {
|
|
12
|
-
const arg = process.argv[i];
|
|
13
|
-
if (argNamePattern.test(arg)) {
|
|
14
|
-
return arg.includes('=') ? arg.split('=')[1] : process.argv[i + 1];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
10
|
async function build() {
|
|
21
11
|
const customDevice = parseArgValue('name');
|
|
22
12
|
const xcodeVersion = await xcode.getVersion(true);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// TODO: Please revert '@appium/support' to 'appium/support.js' and "@appium/support" dependency
|
|
2
|
+
// in Appium 3 based version
|
|
3
|
+
import {fs, logger, zip, net, node} from '@appium/support';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
import os from 'os';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import {parseArgValue} from './utils.js';
|
|
8
|
+
|
|
9
|
+
const log = logger.getLogger('download-wda-sim');
|
|
10
|
+
const wdaUrl = (version, zipFileName) =>
|
|
11
|
+
`https://github.com/appium/WebDriverAgent/releases/download/v${version}/${zipFileName}`;
|
|
12
|
+
const destZip = (platform) => {
|
|
13
|
+
const scheme = `WebDriverAgentRunner${_.toLower(platform) === 'tvos' ? '_tvOS' : ''}`;
|
|
14
|
+
return `${scheme}-Build-Sim-${os.arch() === 'arm64' ? 'arm64' : 'x86_64'}.zip`;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Return installed appium-webdriveragent package version
|
|
19
|
+
* @returns {number}
|
|
20
|
+
*/
|
|
21
|
+
async function webdriveragentPkgVersion() {
|
|
22
|
+
const pkgPath = path.join(
|
|
23
|
+
node.getModuleRootSync('appium-xcuitest-driver', import.meta.url),
|
|
24
|
+
'node_modules',
|
|
25
|
+
'appium-webdriveragent',
|
|
26
|
+
'package.json'
|
|
27
|
+
);
|
|
28
|
+
return JSON.parse(await fs.readFile(pkgPath, 'utf8')).version;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Prepare the working root directory.
|
|
33
|
+
* @returns {string} Root directory to download and unzip.
|
|
34
|
+
*/
|
|
35
|
+
async function prepareRootDir() {
|
|
36
|
+
const destDirRoot = parseArgValue('outdir');
|
|
37
|
+
if (!destDirRoot) {
|
|
38
|
+
throw new Error(`--outdir is required`);
|
|
39
|
+
}
|
|
40
|
+
const destDir = path.resolve(process.cwd(), destDirRoot);
|
|
41
|
+
if (await fs.exists(destDir)) {
|
|
42
|
+
throw new Error(`${destDir} already exists`);
|
|
43
|
+
}
|
|
44
|
+
await fs.mkdir(destDir, {recursive: true});
|
|
45
|
+
return destDir;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function getWDAPrebuiltPackage() {
|
|
49
|
+
const destDir = await prepareRootDir();
|
|
50
|
+
const platform = parseArgValue('platform');
|
|
51
|
+
const zipFileName = destZip(platform);
|
|
52
|
+
const wdaVersion = await webdriveragentPkgVersion();
|
|
53
|
+
const urlToDownload = wdaUrl(wdaVersion, zipFileName);
|
|
54
|
+
const downloadedZipFile = path.join(destDir, zipFileName);
|
|
55
|
+
try {
|
|
56
|
+
log.info(`Downloading ${urlToDownload}`);
|
|
57
|
+
await net.downloadFile(urlToDownload, downloadedZipFile);
|
|
58
|
+
|
|
59
|
+
log.info(`Unpacking ${downloadedZipFile} into ${destDir}`);
|
|
60
|
+
await zip.extractAllTo(downloadedZipFile, destDir);
|
|
61
|
+
|
|
62
|
+
log.info(`Deleting ${downloadedZipFile}`);
|
|
63
|
+
} finally {
|
|
64
|
+
if (await fs.exists(downloadedZipFile)) {
|
|
65
|
+
await fs.unlink(downloadedZipFile);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
(async () => await getWDAPrebuiltPackage())();
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Test script for creating lockdown service, starting CoreDeviceProxy, and creating tunnel
|
|
4
4
|
* This script demonstrates the tunnel creation workflow for all connected devices
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
// TODO: Please revert '@appium/support' to 'appium/support.js' and "@appium/support" dependency
|
|
8
|
+
// in Appium 3 based version
|
|
6
9
|
import {logger, node} from '@appium/support';
|
|
7
10
|
import _ from 'lodash';
|
|
8
11
|
/* eslint-disable import/no-unresolved */
|
package/scripts/utils.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the value of the given argument name.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} argName
|
|
5
|
+
* @returns {string?} The value of the given 'argName'.
|
|
6
|
+
*/
|
|
7
|
+
export function parseArgValue(argName) {
|
|
8
|
+
const argNamePattern = new RegExp(`^--${argName}\\b`);
|
|
9
|
+
for (let i = 1; i < process.argv.length; ++i) {
|
|
10
|
+
const arg = process.argv[i];
|
|
11
|
+
if (argNamePattern.test(arg)) {
|
|
12
|
+
return arg.includes('=') ? arg.split('=')[1] : process.argv[i + 1];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|