appium-xcuitest-driver 4.3.0 → 4.3.3
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/README.md +7 -4
- package/build/lib/commands/appearance.js +14 -4
- package/lib/commands/appearance.js +11 -5
- package/npm-shrinkwrap.json +2531 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://npmjs.org/package/appium-xcuitest-driver)
|
|
4
4
|
[](https://npmjs.org/package/appium-xcuitest-driver)
|
|
5
|
-
[](https://david-dm.org/appium/appium-xcuitest-driver)
|
|
6
|
-
[](https://david-dm.org/appium/appium-xcuitest-driver#info=devDependencies)
|
|
7
5
|
|
|
8
|
-
[](https://github.com/appium/appium-xcuitest-driver/actions/workflows/publish.js.yml)
|
|
9
7
|
|
|
10
8
|
Appium XCUITest Driver is a combined solution, which allows to perform automated black-box testing of iOS and tvOS native applications and WebKit web views.
|
|
11
9
|
The native testing is based on Apple's [XCTest](https://developer.apple.com/documentation/xctest) framework and the fork of Facebook's [WebDriverAgent](https://github.com/appium/WebDriverAgent) server (the [original](https://github.com/facebookarchive/WebDriverAgent) project is not supported anymore).
|
|
@@ -55,6 +53,9 @@ See [real device configuration documentation](docs/real-device-config.md).
|
|
|
55
53
|
- After many failures on real devices it could transition to a state where connections are no longer being accepted. To possibly remedy this issue reboot the device. Read https://github.com/facebook/WebDriverAgent/issues/507 for more details.
|
|
56
54
|
- iPhone/iPad real devices show overlay, which has `Automation Running Hold both volume buttons to stop` text, since iOS/iPadOS 15. This is a known limitation of XCTest framework. This limitation does not affect screenshooting APIs though (e.g. the overlay is not visible on taken screenshots).
|
|
57
55
|
- iPhone/iPad real devices [require passcode or touch id](https://github.com/appium/appium/issues/15898#issuecomment-927340411) when they start a XCTest session since iOS/iPadOS 15. Disabling passcode/touch id in the device preference allows to workaround the behaviour above.
|
|
56
|
+
- OpenSSL v3 breaks secured communication with real devices. It can cause a [Failed to receive any data within the timeout](https://github.com/appium/appium/issues/16399) error in [appium-ios-device](https://github.com/appium/appium-ios-device). Please read [this issue](https://github.com/appium/appium-ios-device/pull/88#discussion_r825315862) for more details.
|
|
57
|
+
- Please make sure your environment has Open SSL v1 for NodeJS environment, or prepare an OpenSSL v3 build by patching `OPENSSL_TLS_SECURITY_LEVEL=1`. (e.g. [an article](https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html))
|
|
58
|
+
- This configuration is only necessary for XCUITest driver v4.3.0 or lower.
|
|
58
59
|
|
|
59
60
|
#### Weird state
|
|
60
61
|
|
|
@@ -507,7 +508,7 @@ Either `true` if the app was successfully terminated, otherwise `false`
|
|
|
507
508
|
|
|
508
509
|
### mobile: killApp
|
|
509
510
|
|
|
510
|
-
Kill the given app on the real device under test by instruments service via [py-ios-device](https://github.com/YueChen-C/py-ios-device) if it is installed on the server machine.
|
|
511
|
+
Kill the given app on the real device under test by instruments service via [py-ios-device](https://github.com/YueChen-C/py-ios-device) if it is installed on the server machine since XCUITest driver 4.3.0.
|
|
511
512
|
If the app is not running or failed to kill, then nothing is done.
|
|
512
513
|
Note that this method takes a few more time than `mobile:terminateApp` for now since it calls the instruments service via external command, `py-ios-device`.
|
|
513
514
|
|
|
@@ -1355,3 +1356,5 @@ the tests locally. These include:
|
|
|
1355
1356
|
the root directory of the repo with the extension "xcconfig")
|
|
1356
1357
|
* `UICATALOG_REAL_DEVICE` - path to the real device build of UICatalog, in case
|
|
1357
1358
|
the npm installed one is not built for real device
|
|
1359
|
+
|
|
1360
|
+
|
|
@@ -21,8 +21,8 @@ commands.mobileSetAppearance = async function mobileSetAppearance(opts = {}) {
|
|
|
21
21
|
style
|
|
22
22
|
} = opts;
|
|
23
23
|
|
|
24
|
-
if (!style) {
|
|
25
|
-
throw new Error(`The 'style'
|
|
24
|
+
if (!['light', 'dark'].includes(_lodash.default.toLower(style))) {
|
|
25
|
+
throw new Error(`The 'style' value is expected to equal either 'light' or 'dark'`);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (_support.util.compareVersions(this.opts.platformVersion, '<', '12.0')) {
|
|
@@ -32,7 +32,17 @@ commands.mobileSetAppearance = async function mobileSetAppearance(opts = {}) {
|
|
|
32
32
|
if (this.isSimulator()) {
|
|
33
33
|
try {
|
|
34
34
|
return void (await this.opts.device.setAppearance(style));
|
|
35
|
-
} catch (
|
|
35
|
+
} catch (e) {
|
|
36
|
+
this.log.debug(e.stack);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
return void (await this.proxyCommand('/wda/device/appearance', 'POST', {
|
|
42
|
+
name: style
|
|
43
|
+
}));
|
|
44
|
+
} catch (e) {
|
|
45
|
+
this.log.debug(e.stack);
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
await this.mobileSiriCommand({
|
|
@@ -66,4 +76,4 @@ var _default = commands;
|
|
|
66
76
|
exports.default = _default;require('source-map-support').install();
|
|
67
77
|
|
|
68
78
|
|
|
69
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,
|
|
79
|
+
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9jb21tYW5kcy9hcHBlYXJhbmNlLmpzIl0sIm5hbWVzIjpbImNvbW1hbmRzIiwibW9iaWxlU2V0QXBwZWFyYW5jZSIsIm9wdHMiLCJzdHlsZSIsImluY2x1ZGVzIiwiXyIsInRvTG93ZXIiLCJFcnJvciIsInV0aWwiLCJjb21wYXJlVmVyc2lvbnMiLCJwbGF0Zm9ybVZlcnNpb24iLCJpc1NpbXVsYXRvciIsImRldmljZSIsInNldEFwcGVhcmFuY2UiLCJlIiwibG9nIiwiZGVidWciLCJzdGFjayIsInByb3h5Q29tbWFuZCIsIm5hbWUiLCJtb2JpbGVTaXJpQ29tbWFuZCIsInRleHQiLCJtb2JpbGVHZXRBcHBlYXJhbmNlIiwiZ2V0QXBwZWFyY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V0IHRoZSBkZXZpY2UncyBVSSBhcHBlYXJhbmNlIHN0eWxlLlxuICpcbiAqIEBzaW5jZSBYY29kZSBTREsgMTFcbiAqIEByZXR1cm5zIHtBcHBlYXJhbmNlfVxuICovXG5jb21tYW5kcy5tb2JpbGVHZXRBcHBlYXJhbmNlID0gYXN5bmMgZnVuY3Rpb24gbW9iaWxlR2V0QXBwZWFyYW5jZSAoKSB7XG4gIGlmICh1dGlsLmNvbXBhcmVWZXJzaW9ucyh0aGlzLm9wdHMucGxhdGZvcm1WZXJzaW9uLCAnPCcsICcxMi4wJykpIHtcbiAgICByZXR1cm4gJ3Vuc3VwcG9ydGVkJztcbiAgfVxuXG4gIGxldCBzdHlsZTtcbiAgaWYgKHRoaXMuaXNTaW11bGF0b3IoKSkge1xuICAgIHRyeSB7XG4gICAgICBzdHlsZSA9IGF3YWl0IHRoaXMub3B0cy5kZXZpY2UuZ2V0QXBwZWFyYW5jZSgpO1xuICAgIH0gY2F0Y2ggKGlnbikge31cbiAgfVxuICBpZiAoIXN0eWxlKSB7XG4gICAgc3R5bGUgPSAoYXdhaXQgdGhpcy5wcm94eUNvbW1hbmQoJy93ZGEvZGV2aWNlL2luZm8nLCAnR0VUJykpLnVzZXJJbnRlcmZhY2VTdHlsZSB8fCAndW5rbm93bic7XG4gIH1cbiAgcmV0dXJuIHtcbiAgICBzdHlsZSxcbiAgfTtcbn07XG5cblxuZXhwb3J0IHsgY29tbWFuZHMgfTtcbmV4cG9ydCBkZWZhdWx0IGNvbW1hbmRzO1xuIl0sImZpbGUiOiJsaWIvY29tbWFuZHMvYXBwZWFyYW5jZS5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLi8uLiJ9
|
|
@@ -24,8 +24,8 @@ commands.mobileSetAppearance = async function mobileSetAppearance (opts = {}) {
|
|
|
24
24
|
const {
|
|
25
25
|
style,
|
|
26
26
|
} = opts;
|
|
27
|
-
if (!style) {
|
|
28
|
-
throw new Error(`The 'style'
|
|
27
|
+
if (!['light', 'dark'].includes(_.toLower(style))) {
|
|
28
|
+
throw new Error(`The 'style' value is expected to equal either 'light' or 'dark'`);
|
|
29
29
|
}
|
|
30
30
|
if (util.compareVersions(this.opts.platformVersion, '<', '12.0')) {
|
|
31
31
|
throw new Error('Changing appearance is only supported since iOS 12');
|
|
@@ -34,10 +34,16 @@ commands.mobileSetAppearance = async function mobileSetAppearance (opts = {}) {
|
|
|
34
34
|
if (this.isSimulator()) {
|
|
35
35
|
try {
|
|
36
36
|
return void (await this.opts.device.setAppearance(style));
|
|
37
|
-
} catch (
|
|
37
|
+
} catch (e) {
|
|
38
|
+
this.log.debug(e.stack);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
return void (await this.proxyCommand('/wda/device/appearance', 'POST', {name: style}));
|
|
43
|
+
} catch (e) {
|
|
44
|
+
this.log.debug(e.stack);
|
|
38
45
|
}
|
|
39
|
-
// Fall back to the ugly Siri workaround if the
|
|
40
|
-
// or this is a real device
|
|
46
|
+
// Fall back to the ugly Siri workaround if the current SDK is too old
|
|
41
47
|
await this.mobileSiriCommand({
|
|
42
48
|
text: `Turn ${_.toLower(style) === 'dark' ? 'on' : 'off'} dark mode`,
|
|
43
49
|
});
|