appium-xcuitest-driver 10.14.2 → 10.14.4

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/alert.d.ts +26 -31
  3. package/build/lib/commands/alert.d.ts.map +1 -1
  4. package/build/lib/commands/alert.js +20 -29
  5. package/build/lib/commands/alert.js.map +1 -1
  6. package/build/lib/commands/appearance.d.ts +7 -9
  7. package/build/lib/commands/appearance.d.ts.map +1 -1
  8. package/build/lib/commands/appearance.js +13 -19
  9. package/build/lib/commands/appearance.js.map +1 -1
  10. package/build/lib/commands/biometric.d.ts +12 -14
  11. package/build/lib/commands/biometric.d.ts.map +1 -1
  12. package/build/lib/commands/biometric.js +10 -19
  13. package/build/lib/commands/biometric.js.map +1 -1
  14. package/build/lib/commands/content-size.d.ts +16 -19
  15. package/build/lib/commands/content-size.d.ts.map +1 -1
  16. package/build/lib/commands/content-size.js +14 -22
  17. package/build/lib/commands/content-size.js.map +1 -1
  18. package/build/lib/commands/geolocation.d.ts +16 -36
  19. package/build/lib/commands/geolocation.d.ts.map +1 -1
  20. package/build/lib/commands/geolocation.js +8 -25
  21. package/build/lib/commands/geolocation.js.map +1 -1
  22. package/build/lib/commands/iohid.d.ts +6 -1359
  23. package/build/lib/commands/iohid.d.ts.map +1 -1
  24. package/build/lib/commands/iohid.js +5 -10
  25. package/build/lib/commands/iohid.js.map +1 -1
  26. package/build/lib/commands/keyboard.d.ts +16 -13
  27. package/build/lib/commands/keyboard.d.ts.map +1 -1
  28. package/build/lib/commands/keyboard.js +14 -18
  29. package/build/lib/commands/keyboard.js.map +1 -1
  30. package/build/lib/commands/notifications.d.ts +10 -10
  31. package/build/lib/commands/notifications.d.ts.map +1 -1
  32. package/build/lib/commands/notifications.js +8 -12
  33. package/build/lib/commands/notifications.js.map +1 -1
  34. package/build/lib/commands/permissions.d.ts +15 -17
  35. package/build/lib/commands/permissions.d.ts.map +1 -1
  36. package/build/lib/commands/permissions.js +12 -18
  37. package/build/lib/commands/permissions.js.map +1 -1
  38. package/build/lib/commands/proxy-helper.d.ts +11 -11
  39. package/build/lib/commands/proxy-helper.d.ts.map +1 -1
  40. package/build/lib/commands/proxy-helper.js +15 -24
  41. package/build/lib/commands/proxy-helper.js.map +1 -1
  42. package/build/lib/commands/simctl.d.ts +16 -22
  43. package/build/lib/commands/simctl.d.ts.map +1 -1
  44. package/build/lib/commands/simctl.js +8 -17
  45. package/build/lib/commands/simctl.js.map +1 -1
  46. package/build/lib/commands/timeouts.d.ts +25 -32
  47. package/build/lib/commands/timeouts.d.ts.map +1 -1
  48. package/build/lib/commands/timeouts.js +18 -14
  49. package/build/lib/commands/timeouts.js.map +1 -1
  50. package/lib/commands/alert.ts +98 -0
  51. package/lib/commands/appearance.ts +70 -0
  52. package/lib/commands/biometric.ts +52 -0
  53. package/lib/commands/content-size.ts +67 -0
  54. package/lib/commands/geolocation.ts +55 -0
  55. package/lib/commands/{iohid.js → iohid.ts} +15 -13
  56. package/lib/commands/keyboard.ts +70 -0
  57. package/lib/commands/{notifications.js → notifications.ts} +22 -14
  58. package/lib/commands/permissions.ts +90 -0
  59. package/lib/commands/{proxy-helper.js → proxy-helper.ts} +26 -26
  60. package/lib/commands/{simctl.js → simctl.ts} +27 -21
  61. package/lib/commands/timeouts.ts +95 -0
  62. package/npm-shrinkwrap.json +5 -5
  63. package/package.json +1 -1
  64. package/lib/commands/alert.js +0 -88
  65. package/lib/commands/appearance.js +0 -71
  66. package/lib/commands/biometric.js +0 -52
  67. package/lib/commands/content-size.js +0 -68
  68. package/lib/commands/geolocation.js +0 -56
  69. package/lib/commands/keyboard.js +0 -62
  70. package/lib/commands/permissions.js +0 -85
  71. package/lib/commands/timeouts.js +0 -68
@@ -1,57 +1,37 @@
1
- /**
2
- * @typedef {Object} GeolocationInfo
3
- * @property {number|null} latitude Measurement of distance north or south of the Equator, or
4
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
5
- * resetSimulatedLocation} has been called.
6
- * @property {number|null} longitude Measurement of distance east or west of the prime meridian, or
7
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
8
- * resetSimulatedLocation} has been called.
9
- */
1
+ import type { XCUITestDriver } from '../driver';
2
+ export interface GeolocationInfo {
3
+ /** Measurement of distance north or south of the Equator, or `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode mobileResetSimulatedLocation} has been called. */
4
+ latitude: number | null;
5
+ /** Measurement of distance east or west of the prime meridian, or `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode mobileResetSimulatedLocation} has been called. */
6
+ longitude: number | null;
7
+ }
10
8
  /**
11
9
  * Retrieves the simulated geolocation value.
12
10
  * Only works since Xcode 14.3/iOS 16.4
13
11
  *
14
- * @returns {Promise<GeolocationInfo>}
15
- * @throws {Error} If the device under test does not support gelolocation simulation.
12
+ * @returns The current simulated geolocation
13
+ * @throws If the device under test does not support geolocation simulation.
16
14
  * @since 4.18
17
- * @this {XCUITestDriver}
18
15
  */
19
- export function mobileGetSimulatedLocation(this: import("../driver").XCUITestDriver): Promise<GeolocationInfo>;
16
+ export declare function mobileGetSimulatedLocation(this: XCUITestDriver): Promise<GeolocationInfo>;
20
17
  /**
21
18
  * Sets simulated geolocation value.
22
19
  * Only works since Xcode 14.3/iOS 16.4
23
20
  *
24
- * @param {number} latitude
25
- * @param {number} longitude
26
- * @returns {Promise<void>}
27
- * @throws {Error} If the device under test does not support gelolocation simulation.
21
+ * @param latitude - Latitude value
22
+ * @param longitude - Longitude value
23
+ * @throws If the device under test does not support geolocation simulation.
28
24
  * @since 4.18
29
- * @this {XCUITestDriver}
30
25
  */
31
- export function mobileSetSimulatedLocation(this: import("../driver").XCUITestDriver, latitude: number, longitude: number): Promise<void>;
26
+ export declare function mobileSetSimulatedLocation(this: XCUITestDriver, latitude: number, longitude: number): Promise<void>;
32
27
  /**
33
28
  * Resets simulated geolocation value.
34
29
  * Only works since Xcode 14.3/iOS 16.4.
35
30
  * ! Do not forget to reset the simulated geolocation value after your automated test is finished.
36
31
  * ! If the value is not reset explicitly then the simulated one will remain until the next device restart.
37
32
  *
38
- * @returns {Promise<void>}
39
- * @throws {Error} If the device under test does not support gelolocation simulation.
33
+ * @throws If the device under test does not support geolocation simulation.
40
34
  * @since 4.18
41
- * @this {XCUITestDriver}
42
35
  */
43
- export function mobileResetSimulatedLocation(this: import("../driver").XCUITestDriver): Promise<void>;
44
- export type GeolocationInfo = {
45
- /**
46
- * Measurement of distance north or south of the Equator, or
47
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode * resetSimulatedLocation} has been called.
48
- */
49
- latitude: number | null;
50
- /**
51
- * Measurement of distance east or west of the prime meridian, or
52
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode * resetSimulatedLocation} has been called.
53
- */
54
- longitude: number | null;
55
- };
56
- export type XCUITestDriver = import("../driver").XCUITestDriver;
36
+ export declare function mobileResetSimulatedLocation(this: XCUITestDriver): Promise<void>;
57
37
  //# sourceMappingURL=geolocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../lib/commands/geolocation.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AACH,sFALa,OAAO,CAAC,eAAe,CAAC,CAOpC;AAED;;;;;;;;;;GAUG;AACH,+FAPW,MAAM,aACN,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAOzB;AAED;;;;;;;;;;GAUG;AACH,wFALa,OAAO,CAAC,IAAI,CAAC,CAOzB;;;;;;cAjDa,MAAM,GAAC,IAAI;;;;;eAGX,MAAM,GAAC,IAAI;;6BAiDZ,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"geolocation.d.ts","sourceRoot":"","sources":["../../../lib/commands/geolocation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC9B,iNAAiN;IACjN,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sNAAsN;IACtN,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC,CAE1B;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * @typedef {Object} GeolocationInfo
4
- * @property {number|null} latitude Measurement of distance north or south of the Equator, or
5
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
6
- * resetSimulatedLocation} has been called.
7
- * @property {number|null} longitude Measurement of distance east or west of the prime meridian, or
8
- * `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
9
- * resetSimulatedLocation} has been called.
10
- */
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.mobileGetSimulatedLocation = mobileGetSimulatedLocation;
13
4
  exports.mobileSetSimulatedLocation = mobileSetSimulatedLocation;
@@ -16,10 +7,9 @@ exports.mobileResetSimulatedLocation = mobileResetSimulatedLocation;
16
7
  * Retrieves the simulated geolocation value.
17
8
  * Only works since Xcode 14.3/iOS 16.4
18
9
  *
19
- * @returns {Promise<GeolocationInfo>}
20
- * @throws {Error} If the device under test does not support gelolocation simulation.
10
+ * @returns The current simulated geolocation
11
+ * @throws If the device under test does not support geolocation simulation.
21
12
  * @since 4.18
22
- * @this {XCUITestDriver}
23
13
  */
24
14
  async function mobileGetSimulatedLocation() {
25
15
  return await this.proxyCommand('/wda/simulatedLocation', 'GET');
@@ -28,15 +18,13 @@ async function mobileGetSimulatedLocation() {
28
18
  * Sets simulated geolocation value.
29
19
  * Only works since Xcode 14.3/iOS 16.4
30
20
  *
31
- * @param {number} latitude
32
- * @param {number} longitude
33
- * @returns {Promise<void>}
34
- * @throws {Error} If the device under test does not support gelolocation simulation.
21
+ * @param latitude - Latitude value
22
+ * @param longitude - Longitude value
23
+ * @throws If the device under test does not support geolocation simulation.
35
24
  * @since 4.18
36
- * @this {XCUITestDriver}
37
25
  */
38
26
  async function mobileSetSimulatedLocation(latitude, longitude) {
39
- return await this.proxyCommand('/wda/simulatedLocation', 'POST', { latitude, longitude });
27
+ await this.proxyCommand('/wda/simulatedLocation', 'POST', { latitude, longitude });
40
28
  }
41
29
  /**
42
30
  * Resets simulated geolocation value.
@@ -44,15 +32,10 @@ async function mobileSetSimulatedLocation(latitude, longitude) {
44
32
  * ! Do not forget to reset the simulated geolocation value after your automated test is finished.
45
33
  * ! If the value is not reset explicitly then the simulated one will remain until the next device restart.
46
34
  *
47
- * @returns {Promise<void>}
48
- * @throws {Error} If the device under test does not support gelolocation simulation.
35
+ * @throws If the device under test does not support geolocation simulation.
49
36
  * @since 4.18
50
- * @this {XCUITestDriver}
51
37
  */
52
38
  async function mobileResetSimulatedLocation() {
53
- return await this.proxyCommand('/wda/simulatedLocation', 'DELETE');
39
+ await this.proxyCommand('/wda/simulatedLocation', 'DELETE');
54
40
  }
55
- /**
56
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
57
- */
58
41
  //# sourceMappingURL=geolocation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation.js","sourceRoot":"","sources":["../../../lib/commands/geolocation.js"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAWH,gEAEC;AAaD,gEAEC;AAaD,oEAEC;AAzCD;;;;;;;;GAQG;AACI,KAAK,UAAU,0BAA0B;IAC9C,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,0BAA0B,CAAC,QAAQ,EAAE,SAAS;IAClE,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC,CAAC;AAC1F,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,4BAA4B;IAChD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AACrE,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"geolocation.js","sourceRoot":"","sources":["../../../lib/commands/geolocation.ts"],"names":[],"mappings":";;AAiBA,gEAIC;AAWD,gEAMC;AAWD,oEAIC;AA5CD;;;;;;;GAOG;AACI,KAAK,UAAU,0BAA0B;IAG9C,OAAO,MAAM,IAAI,CAAC,YAAY,CAAuB,wBAAwB,EAAE,KAAK,CAAC,CAAC;AACxF,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,0BAA0B,CAE9C,QAAgB,EAChB,SAAiB;IAEjB,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC,CAAC;AACnF,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,4BAA4B;IAGhD,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC"}