appium-xcuitest-driver 7.0.1 → 7.1.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 +14 -0
- package/build/lib/commands/location.d.ts +4 -0
- package/build/lib/commands/location.d.ts.map +1 -1
- package/build/lib/commands/location.js +16 -1
- package/build/lib/commands/location.js.map +1 -1
- package/lib/commands/location.js +18 -1
- package/npm-shrinkwrap.json +21 -21
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [7.1.1](https://github.com/appium/appium-xcuitest-driver/compare/v7.1.0...v7.1.1) (2024-02-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* Bump WDA ([3374b7b](https://github.com/appium/appium-xcuitest-driver/commit/3374b7b779ed956c86344b5ed9f8c92beb142de0))
|
|
7
|
+
|
|
8
|
+
## [7.1.0](https://github.com/appium/appium-xcuitest-driver/compare/v7.0.1...v7.1.0) (2024-02-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* return the result of getGeoLocation if available for ios 17+ ([#2329](https://github.com/appium/appium-xcuitest-driver/issues/2329)) ([fc0ba2c](https://github.com/appium/appium-xcuitest-driver/commit/fc0ba2c285cccef6f4f229dc5d27b5b2d0d78569))
|
|
14
|
+
|
|
1
15
|
## [7.0.1](https://github.com/appium/appium-xcuitest-driver/compare/v7.0.0...v7.0.1) (2024-02-14)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -8,6 +8,10 @@ declare namespace _default {
|
|
|
8
8
|
* if the Location Services are set to 'Always', because the device
|
|
9
9
|
* needs some time to update the location data.
|
|
10
10
|
*
|
|
11
|
+
* For iOS 17, the return value could be the result of
|
|
12
|
+
* "mobile:getSimulatedLocation" if the simulated location has been previously set
|
|
13
|
+
* "mobile:setSimulatedLocation" already.
|
|
14
|
+
*
|
|
11
15
|
* @returns {Promise<import('./types').LocationWithAltitude>}
|
|
12
16
|
* @throws {Error} If the device under test returns an error message.
|
|
13
17
|
* i.e.: tvOS returns unsupported error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":";IAME
|
|
1
|
+
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":";IAME;;;;;;;;;;;;;;;;;OAiBG;IACH;;;;OAoCC;IAED;;;;;;;;OAQG;IACH,2JA8BC;IAED;;;;;OAKG;IACH,sFAgBC;;;6BAIU,OAAO,WAAW,EAAE,cAAc;8BAClC,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,eAAe,EAAE,QAAQ"}
|
|
@@ -14,12 +14,27 @@ exports.default = {
|
|
|
14
14
|
* if the Location Services are set to 'Always', because the device
|
|
15
15
|
* needs some time to update the location data.
|
|
16
16
|
*
|
|
17
|
+
* For iOS 17, the return value could be the result of
|
|
18
|
+
* "mobile:getSimulatedLocation" if the simulated location has been previously set
|
|
19
|
+
* "mobile:setSimulatedLocation" already.
|
|
20
|
+
*
|
|
17
21
|
* @returns {Promise<import('./types').LocationWithAltitude>}
|
|
18
22
|
* @throws {Error} If the device under test returns an error message.
|
|
19
23
|
* i.e.: tvOS returns unsupported error
|
|
20
24
|
* @this {XCUITestDriver}
|
|
21
25
|
*/
|
|
22
26
|
async getGeoLocation() {
|
|
27
|
+
// Currently we proxy the setGeoLocation to mobile:setSimulatedLocation for iOS 17+.
|
|
28
|
+
// It would be helpful to address to use "mobile:getSimulatedLocation" for iOS 17+.
|
|
29
|
+
if (this.opts.platformVersion && support_1.util.compareVersions(this.opts.platformVersion, '>=', '17.0')) {
|
|
30
|
+
const { latitude, longitude } = await this.mobileGetSimulatedLocation();
|
|
31
|
+
if (latitude && longitude) {
|
|
32
|
+
this.log.debug('Returning the geolocation that has been previously set by mobile:setSimulatedLocation. ' +
|
|
33
|
+
'mobile:resetSimulatedLocation can reset the location configuration.');
|
|
34
|
+
return { latitude, longitude, altitude: 0 };
|
|
35
|
+
}
|
|
36
|
+
this.log.warn(`No location was set by mobile:setSimulatedLocation. Trying to return the location from the device.`);
|
|
37
|
+
}
|
|
23
38
|
// Please do not change the way to get the location here with '/wda/simulatedLocation'
|
|
24
39
|
// endpoint because they could return different value before setting the simulated location.
|
|
25
40
|
// '/wda/device/location' returns current device location information,
|
|
@@ -57,7 +72,7 @@ exports.default = {
|
|
|
57
72
|
return /** @type {Location} */ ({ latitude, longitude, altitude: 0 });
|
|
58
73
|
}
|
|
59
74
|
if (this.opts.platformVersion && support_1.util.compareVersions(this.opts.platformVersion, '>=', '17.0')) {
|
|
60
|
-
this.log.
|
|
75
|
+
this.log.info(`Proxying to mobile:setSimulatedLocation method for iOS 17+ platform version`);
|
|
61
76
|
await this.mobileSetSimulatedLocation(latitude, longitude);
|
|
62
77
|
}
|
|
63
78
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":";;AAAA,yDAA2C;AAC3C,0CAAqC;AACrC,4CAAoC;AACpC,iCAA2C;AAE3C,kBAAe;IACb
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":";;AAAA,yDAA2C;AAC3C,0CAAqC;AACrC,4CAAoC;AACpC,iCAA2C;AAE3C,kBAAe;IACb;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,cAAc;QAClB,oFAAoF;QACpF,mFAAmF;QACnF,IAAI,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,cAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;YAC9F,MAAM,EAAC,QAAQ,EAAE,SAAS,EAAC,GAAG,MAAM,IAAI,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YACF,OAAO,CAAC,aAAa,EAAE,CAAC;SACzB;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAC/B,yDAAyD,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK;gBAC1E,mBAAmB,GAAG,CAAC,OAAO,EAAE,CACnC,CAAC;SACH;gBAAS;YACR,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;IACH,CAAC;CACF,CAAC;AAEF;;;;GAIG"}
|
package/lib/commands/location.js
CHANGED
|
@@ -13,12 +13,29 @@ export default {
|
|
|
13
13
|
* if the Location Services are set to 'Always', because the device
|
|
14
14
|
* needs some time to update the location data.
|
|
15
15
|
*
|
|
16
|
+
* For iOS 17, the return value could be the result of
|
|
17
|
+
* "mobile:getSimulatedLocation" if the simulated location has been previously set
|
|
18
|
+
* "mobile:setSimulatedLocation" already.
|
|
19
|
+
*
|
|
16
20
|
* @returns {Promise<import('./types').LocationWithAltitude>}
|
|
17
21
|
* @throws {Error} If the device under test returns an error message.
|
|
18
22
|
* i.e.: tvOS returns unsupported error
|
|
19
23
|
* @this {XCUITestDriver}
|
|
20
24
|
*/
|
|
21
25
|
async getGeoLocation() {
|
|
26
|
+
// Currently we proxy the setGeoLocation to mobile:setSimulatedLocation for iOS 17+.
|
|
27
|
+
// It would be helpful to address to use "mobile:getSimulatedLocation" for iOS 17+.
|
|
28
|
+
if (this.opts.platformVersion && util.compareVersions(this.opts.platformVersion, '>=', '17.0')) {
|
|
29
|
+
const {latitude, longitude} = await this.mobileGetSimulatedLocation();
|
|
30
|
+
if (latitude && longitude) {
|
|
31
|
+
this.log.debug('Returning the geolocation that has been previously set by mobile:setSimulatedLocation. ' +
|
|
32
|
+
'mobile:resetSimulatedLocation can reset the location configuration.');
|
|
33
|
+
return {latitude, longitude, altitude: 0};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.log.warn(`No location was set by mobile:setSimulatedLocation. Trying to return the location from the device.`);
|
|
37
|
+
}
|
|
38
|
+
|
|
22
39
|
// Please do not change the way to get the location here with '/wda/simulatedLocation'
|
|
23
40
|
// endpoint because they could return different value before setting the simulated location.
|
|
24
41
|
// '/wda/device/location' returns current device location information,
|
|
@@ -66,7 +83,7 @@ export default {
|
|
|
66
83
|
}
|
|
67
84
|
|
|
68
85
|
if (this.opts.platformVersion && util.compareVersions(this.opts.platformVersion, '>=', '17.0')) {
|
|
69
|
-
this.log.
|
|
86
|
+
this.log.info(`Proxying to mobile:setSimulatedLocation method for iOS 17+ platform version`);
|
|
70
87
|
await this.mobileSetSimulatedLocation(latitude, longitude);
|
|
71
88
|
} else {
|
|
72
89
|
const service = await services.startSimulateLocationService(this.opts.udid);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-xcuitest-driver",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-xcuitest-driver",
|
|
9
|
-
"version": "7.
|
|
9
|
+
"version": "7.1.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@colors/colors": "^1.6.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"appium-ios-device": "^2.5.4",
|
|
15
15
|
"appium-ios-simulator": "^5.5.1",
|
|
16
16
|
"appium-remote-debugger": "^11.0.0",
|
|
17
|
-
"appium-webdriveragent": "^7.0.
|
|
17
|
+
"appium-webdriveragent": "^7.0.1",
|
|
18
18
|
"appium-xcode": "^5.1.4",
|
|
19
19
|
"async-lock": "^1.4.0",
|
|
20
20
|
"asyncbox": "^3.0.0",
|
|
@@ -669,9 +669,9 @@
|
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
671
|
"node_modules/@types/node": {
|
|
672
|
-
"version": "20.11.
|
|
673
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.
|
|
674
|
-
"integrity": "sha512-
|
|
672
|
+
"version": "20.11.20",
|
|
673
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz",
|
|
674
|
+
"integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==",
|
|
675
675
|
"dependencies": {
|
|
676
676
|
"undici-types": "~5.26.4"
|
|
677
677
|
}
|
|
@@ -882,9 +882,9 @@
|
|
|
882
882
|
}
|
|
883
883
|
},
|
|
884
884
|
"node_modules/appium-remote-debugger": {
|
|
885
|
-
"version": "11.0.
|
|
886
|
-
"resolved": "https://registry.npmjs.org/appium-remote-debugger/-/appium-remote-debugger-11.0.
|
|
887
|
-
"integrity": "sha512-
|
|
885
|
+
"version": "11.0.3",
|
|
886
|
+
"resolved": "https://registry.npmjs.org/appium-remote-debugger/-/appium-remote-debugger-11.0.3.tgz",
|
|
887
|
+
"integrity": "sha512-Mul8EBDHldRTgbB2QHuZBibWORmHyFGaLLqTExBMPUYuJ4Vd0MpmmUtyKaX7s8amEGJuzucTMssbszRVO5EYOg==",
|
|
888
888
|
"dependencies": {
|
|
889
889
|
"@appium/base-driver": "^9.0.0",
|
|
890
890
|
"@appium/support": "^4.0.0",
|
|
@@ -904,9 +904,9 @@
|
|
|
904
904
|
}
|
|
905
905
|
},
|
|
906
906
|
"node_modules/appium-webdriveragent": {
|
|
907
|
-
"version": "7.0.
|
|
908
|
-
"resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-7.0.
|
|
909
|
-
"integrity": "sha512-
|
|
907
|
+
"version": "7.0.1",
|
|
908
|
+
"resolved": "https://registry.npmjs.org/appium-webdriveragent/-/appium-webdriveragent-7.0.1.tgz",
|
|
909
|
+
"integrity": "sha512-WOKIPRsjsEUzbC1rQQBLY7PFQF6RVBk3bmfO930BFUSh75VgzPEgx4hQgIfFi816tvP7Y8d4iA8KWNe04Apy2A==",
|
|
910
910
|
"dependencies": {
|
|
911
911
|
"@appium/base-driver": "^9.0.0",
|
|
912
912
|
"@appium/strongbox": "^0.x",
|
|
@@ -2028,9 +2028,9 @@
|
|
|
2028
2028
|
}
|
|
2029
2029
|
},
|
|
2030
2030
|
"node_modules/has-proto": {
|
|
2031
|
-
"version": "1.0.
|
|
2032
|
-
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.
|
|
2033
|
-
"integrity": "sha512-
|
|
2031
|
+
"version": "1.0.3",
|
|
2032
|
+
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
|
2033
|
+
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
|
2034
2034
|
"engines": {
|
|
2035
2035
|
"node": ">= 0.4"
|
|
2036
2036
|
},
|
|
@@ -3405,9 +3405,9 @@
|
|
|
3405
3405
|
}
|
|
3406
3406
|
},
|
|
3407
3407
|
"node_modules/spdx-exceptions": {
|
|
3408
|
-
"version": "2.
|
|
3409
|
-
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.
|
|
3410
|
-
"integrity": "sha512-
|
|
3408
|
+
"version": "2.5.0",
|
|
3409
|
+
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
|
|
3410
|
+
"integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="
|
|
3411
3411
|
},
|
|
3412
3412
|
"node_modules/spdx-expression-parse": {
|
|
3413
3413
|
"version": "3.0.1",
|
|
@@ -3479,9 +3479,9 @@
|
|
|
3479
3479
|
}
|
|
3480
3480
|
},
|
|
3481
3481
|
"node_modules/streamx": {
|
|
3482
|
-
"version": "2.
|
|
3483
|
-
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.
|
|
3484
|
-
"integrity": "sha512-
|
|
3482
|
+
"version": "2.16.1",
|
|
3483
|
+
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",
|
|
3484
|
+
"integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==",
|
|
3485
3485
|
"dependencies": {
|
|
3486
3486
|
"fast-fifo": "^1.1.0",
|
|
3487
3487
|
"queue-tick": "^1.0.1"
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"xcuitest",
|
|
9
9
|
"xctest"
|
|
10
10
|
],
|
|
11
|
-
"version": "7.
|
|
11
|
+
"version": "7.1.1",
|
|
12
12
|
"author": "Appium Contributors",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"repository": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"appium-ios-device": "^2.5.4",
|
|
82
82
|
"appium-ios-simulator": "^5.5.1",
|
|
83
83
|
"appium-remote-debugger": "^11.0.0",
|
|
84
|
-
"appium-webdriveragent": "^7.0.
|
|
84
|
+
"appium-webdriveragent": "^7.0.1",
|
|
85
85
|
"appium-xcode": "^5.1.4",
|
|
86
86
|
"async-lock": "^1.4.0",
|
|
87
87
|
"asyncbox": "^3.0.0",
|