appium-xcuitest-driver 10.14.3 → 10.14.5

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/battery.d.ts +4 -4
  3. package/build/lib/commands/battery.d.ts.map +1 -1
  4. package/build/lib/commands/battery.js +3 -7
  5. package/build/lib/commands/battery.js.map +1 -1
  6. package/build/lib/commands/biometric.d.ts +12 -14
  7. package/build/lib/commands/biometric.d.ts.map +1 -1
  8. package/build/lib/commands/biometric.js +10 -19
  9. package/build/lib/commands/biometric.js.map +1 -1
  10. package/build/lib/commands/clipboard.d.ts +9 -11
  11. package/build/lib/commands/clipboard.d.ts.map +1 -1
  12. package/build/lib/commands/clipboard.js +8 -13
  13. package/build/lib/commands/clipboard.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/increase-contrast.d.ts +10 -13
  23. package/build/lib/commands/increase-contrast.d.ts.map +1 -1
  24. package/build/lib/commands/increase-contrast.js +8 -16
  25. package/build/lib/commands/increase-contrast.js.map +1 -1
  26. package/build/lib/commands/iohid.d.ts +6 -1359
  27. package/build/lib/commands/iohid.d.ts.map +1 -1
  28. package/build/lib/commands/iohid.js +5 -10
  29. package/build/lib/commands/iohid.js.map +1 -1
  30. package/build/lib/commands/keyboard.d.ts +16 -13
  31. package/build/lib/commands/keyboard.d.ts.map +1 -1
  32. package/build/lib/commands/keyboard.js +14 -18
  33. package/build/lib/commands/keyboard.js.map +1 -1
  34. package/build/lib/commands/lock.d.ts +6 -10
  35. package/build/lib/commands/lock.d.ts.map +1 -1
  36. package/build/lib/commands/lock.js +3 -10
  37. package/build/lib/commands/lock.js.map +1 -1
  38. package/build/lib/commands/memory.d.ts +4 -5
  39. package/build/lib/commands/memory.d.ts.map +1 -1
  40. package/build/lib/commands/memory.js +3 -8
  41. package/build/lib/commands/memory.js.map +1 -1
  42. package/build/lib/commands/notifications.d.ts +10 -10
  43. package/build/lib/commands/notifications.d.ts.map +1 -1
  44. package/build/lib/commands/notifications.js +8 -12
  45. package/build/lib/commands/notifications.js.map +1 -1
  46. package/build/lib/commands/pasteboard.d.ts +9 -10
  47. package/build/lib/commands/pasteboard.d.ts.map +1 -1
  48. package/build/lib/commands/pasteboard.js +8 -13
  49. package/build/lib/commands/pasteboard.js.map +1 -1
  50. package/lib/commands/{battery.js → battery.ts} +10 -12
  51. package/lib/commands/biometric.ts +52 -0
  52. package/lib/commands/clipboard.ts +37 -0
  53. package/lib/commands/content-size.ts +67 -0
  54. package/lib/commands/geolocation.ts +55 -0
  55. package/lib/commands/increase-contrast.ts +49 -0
  56. package/lib/commands/{iohid.js → iohid.ts} +15 -13
  57. package/lib/commands/keyboard.ts +70 -0
  58. package/lib/commands/lock.ts +43 -0
  59. package/lib/commands/{memory.js → memory.ts} +9 -9
  60. package/lib/commands/{notifications.js → notifications.ts} +22 -14
  61. package/lib/commands/pasteboard.ts +44 -0
  62. package/npm-shrinkwrap.json +29 -8
  63. package/package.json +1 -1
  64. package/lib/commands/biometric.js +0 -52
  65. package/lib/commands/clipboard.js +0 -35
  66. package/lib/commands/content-size.js +0 -68
  67. package/lib/commands/geolocation.js +0 -56
  68. package/lib/commands/increase-contrast.js +0 -50
  69. package/lib/commands/keyboard.js +0 -62
  70. package/lib/commands/lock.js +0 -46
  71. package/lib/commands/pasteboard.js +0 -43
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [10.14.5](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.4...v10.14.5) (2026-01-06)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * Migrate various commands to typescript (part 9) ([#2695](https://github.com/appium/appium-xcuitest-driver/issues/2695)) ([615b21f](https://github.com/appium/appium-xcuitest-driver/commit/615b21f166ad967e9cb6b3962c9dfed1c7b267e3))
6
+
7
+ ## [10.14.4](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.3...v10.14.4) (2026-01-05)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Migrate various commands to typescript (part 8) ([#2694](https://github.com/appium/appium-xcuitest-driver/issues/2694)) ([a8438e3](https://github.com/appium/appium-xcuitest-driver/commit/a8438e3d3bd497ba5c3c8b11c03927463a364213))
12
+
1
13
  ## [10.14.3](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.2...v10.14.3) (2026-01-04)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -1,13 +1,13 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { BatteryInfo } from './types';
1
3
  /**
2
4
  * Reads the battery information from the device under test.
3
5
  *
4
6
  * This endpoint only returns reliable result on real devices.
5
7
  *
6
- * @returns {Promise<import('./types').BatteryInfo & {advanced: Record<string, any>}>}
7
- * @this {import('../driver').XCUITestDriver}
8
+ * @returns Battery information with advanced details
8
9
  */
9
- export function mobileGetBatteryInfo(this: import("../driver").XCUITestDriver): Promise<import("./types").BatteryInfo & {
10
+ export declare function mobileGetBatteryInfo(this: XCUITestDriver): Promise<BatteryInfo & {
10
11
  advanced: Record<string, any>;
11
12
  }>;
12
- export type BatteryInfo = import("./types").BatteryInfo;
13
13
  //# sourceMappingURL=battery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,gFAHa,OAAO,CAAC,OAAO,SAAS,EAAE,WAAW,GAAG;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAC,CAAC,CAgCpF;0BAGY,OAAO,SAAS,EAAE,WAAW"}
1
+ {"version":3,"file":"battery.d.ts","sourceRoot":"","sources":["../../../lib/commands/battery.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,WAAW,GAAG;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAC,CAAC,CA2BxD"}
@@ -7,8 +7,7 @@ const utils_1 = require("../utils");
7
7
  *
8
8
  * This endpoint only returns reliable result on real devices.
9
9
  *
10
- * @returns {Promise<import('./types').BatteryInfo & {advanced: Record<string, any>}>}
11
- * @this {import('../driver').XCUITestDriver}
10
+ * @returns Battery information with advanced details
12
11
  */
13
12
  async function mobileGetBatteryInfo() {
14
13
  let batteryInfoFromShimService;
@@ -16,7 +15,7 @@ async function mobileGetBatteryInfo() {
16
15
  let remoteXPCConnection;
17
16
  try {
18
17
  const { Services } = await import('appium-ios-remotexpc');
19
- let { diagnosticsService, remoteXPC } = await Services.startDiagnosticsService(this.device.udid);
18
+ const { diagnosticsService, remoteXPC } = await Services.startDiagnosticsService(this.device.udid);
20
19
  remoteXPCConnection = remoteXPC;
21
20
  batteryInfoFromShimService = await diagnosticsService.ioregistry({
22
21
  ioClass: 'IOPMPowerSource',
@@ -33,13 +32,10 @@ async function mobileGetBatteryInfo() {
33
32
  }
34
33
  }
35
34
  }
36
- const batteryInfoFromWda = /** @type {import('./types').BatteryInfo}} */ (await this.proxyCommand('/wda/batteryInfo', 'GET'));
35
+ const batteryInfoFromWda = await this.proxyCommand('/wda/batteryInfo', 'GET');
37
36
  return {
38
37
  ...batteryInfoFromWda,
39
38
  advanced: batteryInfoFromShimService || {},
40
39
  };
41
40
  }
42
- /**
43
- * @typedef {import('./types').BatteryInfo} BatteryInfo
44
- */
45
41
  //# sourceMappingURL=battery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.js"],"names":[],"mappings":";;AAUA,oDA6BC;AAvCD,oCAA0C;AAE1C;;;;;;;GAOG;AACI,KAAK,UAAU,oBAAoB;IACxC,IAAI,0BAA0B,CAAC;IAC/B,IAAI,IAAA,sBAAc,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACrD,IAAI,mBAAmB,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,EAAC,QAAQ,EAAC,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACxD,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjG,mBAAmB,GAAG,SAAS,CAAC;YAChC,0BAA0B,GAAG,MAAM,kBAAkB,CAAC,UAAU,CAAC;gBAC/D,OAAO,EAAE,iBAAiB;gBAC1B,aAAa,EAAE,IAAI;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uDAAuD,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACvF,CAAC;gBAAS,CAAC;YACT,IAAI,mBAAmB,EAAE,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2CAA2C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7E,MAAM,mBAAmB,CAAC,KAAK,EAAE,CAAC;YACpC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,6CAA6C,CAAC,CACvE,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CACnD,CAAC;IACF,OAAO;QACL,GAAG,kBAAkB;QACrB,QAAQ,EAAE,0BAA0B,IAAI,EAAE;KAC3C,CAAC;AACJ,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"battery.js","sourceRoot":"","sources":["../../../lib/commands/battery.ts"],"names":[],"mappings":";;AAWA,oDA6BC;AAxCD,oCAA0C;AAI1C;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB;IAGxC,IAAI,0BAA2D,CAAC;IAChE,IAAI,IAAA,sBAAc,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACrD,IAAI,mBAAmB,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,EAAC,QAAQ,EAAC,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;YACxD,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnG,mBAAmB,GAAG,SAAS,CAAC;YAChC,0BAA0B,GAAG,MAAM,kBAAkB,CAAC,UAAU,CAAC;gBAC/D,OAAO,EAAE,iBAAiB;gBAC1B,aAAa,EAAE,IAAI;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uDAAuD,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACvF,CAAC;gBAAS,CAAC;YACT,IAAI,mBAAmB,EAAE,CAAC;gBACxB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2CAA2C,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7E,MAAM,mBAAmB,CAAC,KAAK,EAAE,CAAC;YACpC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAmB,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO;QACL,GAAG,kBAAkB;QACrB,QAAQ,EAAE,0BAA0B,IAAI,EAAE;KAC3C,CAAC;AACJ,CAAC"}
@@ -1,32 +1,30 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { BiometricFeature } from './types';
1
3
  /**
2
4
  * Enrolls biometric authentication on a simulated device.
3
5
  *
4
- * @param {boolean} isEnabled - Whether to enable/disable biometric enrollment.
5
- * @throws {Error} If enrollment fails or the device is not a Simulator.
6
+ * @param isEnabled - Whether to enable/disable biometric enrollment.
7
+ * @throws If enrollment fails or the device is not a Simulator.
6
8
  * @group Simulator Only
7
- * @this {XCUITestDriver}
8
9
  */
9
- export function mobileEnrollBiometric(this: import("../driver").XCUITestDriver, isEnabled?: boolean): Promise<void>;
10
+ export declare function mobileEnrollBiometric(this: XCUITestDriver, isEnabled?: boolean): Promise<void>;
10
11
  /**
11
12
  * Emulates biometric match or non-match event on a simulated device.
12
13
  *
13
14
  * The biometric feature is expected to be already enrolled via {@linkcode mobileEnrollBiometric|mobile: enrollBiometric} before executing this.
14
15
  *
15
- * @param {import('./types').BiometricFeature} type - The biometric feature name.
16
- * @param {boolean} match - If `true`, simulate biometic match. If `false`, simulate biometric non-match.
17
- * @throws {Error} If matching fails or the device is not a Simulator.
16
+ * @param type - The biometric feature name.
17
+ * @param match - If `true`, simulate biometric match. If `false`, simulate biometric non-match.
18
+ * @throws If matching fails or the device is not a Simulator.
18
19
  * @group Simulator Only
19
- * @this {XCUITestDriver}
20
20
  */
21
- export function mobileSendBiometricMatch(this: import("../driver").XCUITestDriver, type?: import("./types").BiometricFeature, match?: boolean): Promise<void>;
21
+ export declare function mobileSendBiometricMatch(this: XCUITestDriver, type?: BiometricFeature, match?: boolean): Promise<void>;
22
22
  /**
23
23
  * Checks whether the biometric feature is currently enrolled on a simulated device.
24
24
  *
25
- * @returns {Promise<boolean>} `true` if biometric is enrolled.
26
- * @throws {Error} If the detection fails or the device is not a Simulator.
25
+ * @returns `true` if biometric is enrolled.
26
+ * @throws If the detection fails or the device is not a Simulator.
27
27
  * @group Simulator Only
28
- * @this {XCUITestDriver}
29
28
  */
30
- export function mobileIsBiometricEnrolled(this: import("../driver").XCUITestDriver): Promise<boolean>;
31
- export type XCUITestDriver = import("../driver").XCUITestDriver;
29
+ export declare function mobileIsBiometricEnrolled(this: XCUITestDriver): Promise<boolean>;
32
30
  //# sourceMappingURL=biometric.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"biometric.d.ts","sourceRoot":"","sources":["../../../lib/commands/biometric.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,4FALW,OAAO,iBASjB;AAED;;;;;;;;;;GAUG;AACH,0FANW,OAAO,SAAS,EAAE,gBAAgB,UAClC,OAAO,iBASjB;AAED;;;;;;;GAOG;AACH,qFALa,OAAO,CAAC,OAAO,CAAC,CAS5B;6BAGY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"biometric.d.ts","sourceRoot":"","sources":["../../../lib/commands/biometric.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAK9C;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,cAAc,EACpB,SAAS,GAAE,OAAc,GACxB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,cAAc,EACpB,IAAI,GAAE,gBAA4B,EAClC,KAAK,GAAE,OAAc,GACpB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,OAAO,CAAC,CAElB"}
@@ -8,43 +8,34 @@ const assertSimulator = (driver) => utils_1.assertSimulator.call(driver, 'Biomet
8
8
  /**
9
9
  * Enrolls biometric authentication on a simulated device.
10
10
  *
11
- * @param {boolean} isEnabled - Whether to enable/disable biometric enrollment.
12
- * @throws {Error} If enrollment fails or the device is not a Simulator.
11
+ * @param isEnabled - Whether to enable/disable biometric enrollment.
12
+ * @throws If enrollment fails or the device is not a Simulator.
13
13
  * @group Simulator Only
14
- * @this {XCUITestDriver}
15
14
  */
16
15
  async function mobileEnrollBiometric(isEnabled = true) {
17
- assertSimulator(this);
18
- await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).enrollBiometric(isEnabled);
16
+ await assertSimulator(this).enrollBiometric(isEnabled);
19
17
  }
20
18
  /**
21
19
  * Emulates biometric match or non-match event on a simulated device.
22
20
  *
23
21
  * The biometric feature is expected to be already enrolled via {@linkcode mobileEnrollBiometric|mobile: enrollBiometric} before executing this.
24
22
  *
25
- * @param {import('./types').BiometricFeature} type - The biometric feature name.
26
- * @param {boolean} match - If `true`, simulate biometic match. If `false`, simulate biometric non-match.
27
- * @throws {Error} If matching fails or the device is not a Simulator.
23
+ * @param type - The biometric feature name.
24
+ * @param match - If `true`, simulate biometric match. If `false`, simulate biometric non-match.
25
+ * @throws If matching fails or the device is not a Simulator.
28
26
  * @group Simulator Only
29
- * @this {XCUITestDriver}
30
27
  */
31
28
  async function mobileSendBiometricMatch(type = 'touchId', match = true) {
32
- assertSimulator(this);
33
- await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).sendBiometricMatch(match, type);
29
+ await assertSimulator(this).sendBiometricMatch(match, type);
34
30
  }
35
31
  /**
36
32
  * Checks whether the biometric feature is currently enrolled on a simulated device.
37
33
  *
38
- * @returns {Promise<boolean>} `true` if biometric is enrolled.
39
- * @throws {Error} If the detection fails or the device is not a Simulator.
34
+ * @returns `true` if biometric is enrolled.
35
+ * @throws If the detection fails or the device is not a Simulator.
40
36
  * @group Simulator Only
41
- * @this {XCUITestDriver}
42
37
  */
43
38
  async function mobileIsBiometricEnrolled() {
44
- assertSimulator(this);
45
- return await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).isBiometricEnrolled();
39
+ return await assertSimulator(this).isBiometricEnrolled();
46
40
  }
47
- /**
48
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
49
- */
50
41
  //# sourceMappingURL=biometric.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"biometric.js","sourceRoot":"","sources":["../../../lib/commands/biometric.js"],"names":[],"mappings":";;AAYA,sDAIC;AAaD,4DAIC;AAUD,8DAIC;AA/CD,oCAA6D;AAE7D,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAE1F;;;;;;;GAOG;AACI,KAAK,UAAU,qBAAqB,CAAC,SAAS,GAAG,IAAI;IAC1D,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACzG,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,wBAAwB,CAAC,IAAI,GAAG,SAAS,EAAE,KAAK,GAAG,IAAI;IAC3E,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC9G,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,yBAAyB;IAC7C,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,OAAO,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC3G,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"biometric.js","sourceRoot":"","sources":["../../../lib/commands/biometric.ts"],"names":[],"mappings":";;AAcA,sDAKC;AAYD,4DAMC;AASD,8DAIC;AAlDD,oCAA6D;AAK7D,MAAM,eAAe,GAAG,CAAC,MAAsB,EAAa,EAAE,CAAC,uBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAErH;;;;;;GAMG;AACI,KAAK,UAAU,qBAAqB,CAEzC,YAAqB,IAAI;IAEzB,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;GASG;AACI,KAAK,UAAU,wBAAwB,CAE5C,OAAyB,SAAS,EAClC,QAAiB,IAAI;IAErB,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,yBAAyB;IAG7C,OAAO,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC3D,CAAC"}
@@ -1,21 +1,19 @@
1
+ import type { XCUITestDriver } from '../driver';
1
2
  /**
2
3
  * Sets the primary clipboard's content on the device under test.
3
4
  *
4
- * @param {string} content - The content to be set as base64 encoded string.
5
- * @param {string} [contentType=plaintext] - The type of the content to set.
6
- * Only `plaintext`, 'image and 'url' are supported.
7
- * @this {XCUITestDriver}
5
+ * @param content - The content to be set as base64 encoded string.
6
+ * @param contentType - The type of the content to set.
7
+ * Only `plaintext`, 'image' and 'url' are supported.
8
8
  */
9
- export function setClipboard(this: import("../driver").XCUITestDriver, content: string, contentType?: string): Promise<void>;
9
+ export declare function setClipboard(this: XCUITestDriver, content: string, contentType?: string): Promise<void>;
10
10
  /**
11
11
  * Gets the content of the primary clipboard on the device under test.
12
12
  *
13
- * @param {string} [contentType=plaintext] - The type of the content to get.
14
- * Only `plaintext`, 'image and 'url' are supported.
15
- * @returns {Promise<string>} The actual clipboard content encoded into base64 string.
13
+ * @param contentType - The type of the content to get.
14
+ * Only `plaintext`, 'image' and 'url' are supported.
15
+ * @returns The actual clipboard content encoded into base64 string.
16
16
  * An empty string is returned if the clipboard contains no data.
17
- * @this {XCUITestDriver}
18
17
  */
19
- export function getClipboard(this: import("../driver").XCUITestDriver, contentType?: string): Promise<string>;
20
- export type XCUITestDriver = import("../driver").XCUITestDriver;
18
+ export declare function getClipboard(this: XCUITestDriver, contentType?: string): Promise<string>;
21
19
  //# sourceMappingURL=clipboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,gFALW,MAAM,gBACN,MAAM,iBAShB;AAED;;;;;;;;GAQG;AACH,qFANW,MAAM,GAEJ,OAAO,CAAC,MAAM,CAAC,CAU3B;6BAGY,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,cAAc,EACpB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAIjB"}
@@ -5,10 +5,9 @@ exports.getClipboard = getClipboard;
5
5
  /**
6
6
  * Sets the primary clipboard's content on the device under test.
7
7
  *
8
- * @param {string} content - The content to be set as base64 encoded string.
9
- * @param {string} [contentType=plaintext] - The type of the content to set.
10
- * Only `plaintext`, 'image and 'url' are supported.
11
- * @this {XCUITestDriver}
8
+ * @param content - The content to be set as base64 encoded string.
9
+ * @param contentType - The type of the content to set.
10
+ * Only `plaintext`, 'image' and 'url' are supported.
12
11
  */
13
12
  async function setClipboard(content, contentType) {
14
13
  await this.proxyCommand('/wda/setPasteboard', 'POST', {
@@ -19,18 +18,14 @@ async function setClipboard(content, contentType) {
19
18
  /**
20
19
  * Gets the content of the primary clipboard on the device under test.
21
20
  *
22
- * @param {string} [contentType=plaintext] - The type of the content to get.
23
- * Only `plaintext`, 'image and 'url' are supported.
24
- * @returns {Promise<string>} The actual clipboard content encoded into base64 string.
21
+ * @param contentType - The type of the content to get.
22
+ * Only `plaintext`, 'image' and 'url' are supported.
23
+ * @returns The actual clipboard content encoded into base64 string.
25
24
  * An empty string is returned if the clipboard contains no data.
26
- * @this {XCUITestDriver}
27
25
  */
28
26
  async function getClipboard(contentType) {
29
- return /** @type {string} */ (await this.proxyCommand('/wda/getPasteboard', 'POST', {
27
+ return await this.proxyCommand('/wda/getPasteboard', 'POST', {
30
28
  contentType,
31
- }));
29
+ });
32
30
  }
33
- /**
34
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
35
- */
36
31
  //# sourceMappingURL=clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAQA,oCAKC;AAWD,oCAMC;AA9BD;;;;;;;GAOG;AACI,KAAK,UAAU,YAAY,CAAC,OAAO,EAAE,WAAW;IACrD,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,MAAM,EAAE;QACpD,OAAO;QACP,WAAW;KACZ,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,YAAY,CAAC,WAAW;IAC5C,OAAO,qBAAqB,CAAC,CAC3B,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,MAAM,EAAE;QACpD,WAAW;KACZ,CAAC,CACH,CAAC;AACJ,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.ts"],"names":[],"mappings":";;AASA,oCASC;AAUD,oCAOC;AAjCD;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAEhC,OAAe,EACf,WAAoB;IAEpB,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,MAAM,EAAE;QACpD,OAAO;QACP,WAAW;KACZ,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,YAAY,CAEhC,WAAoB;IAEpB,OAAO,MAAM,IAAI,CAAC,YAAY,CAAc,oBAAoB,EAAE,MAAM,EAAE;QACxE,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
@@ -1,30 +1,27 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { ContentSizeAction, ContentSizeResult } from './types';
1
3
  /**
2
4
  * Sets content size for the given simulator.
3
5
  *
4
6
  * @since Xcode 15 (but lower xcode could have this command)
5
- * @param {ContentSizeAction} size - The content size action to set. Acceptable value is
6
- * extra-small, small, medium, large, extra-large, extra-extra-large,
7
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
8
- * accessibility-extra-large, accessibility-extra-extra-large,
9
- * accessibility-extra-extra-extra-large with Xcode 16.2.
10
- * @throws {Error} if the current platform does not support content size appearance changes
11
- * @this {XCUITestDriver}
7
+ * @param size - The content size action to set. Acceptable value is
8
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
9
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
10
+ * accessibility-extra-large, accessibility-extra-extra-large,
11
+ * accessibility-extra-extra-extra-large with Xcode 16.2.
12
+ * @throws If the current platform does not support content size appearance changes
12
13
  */
13
- export function mobileSetContentSize(this: import("../driver").XCUITestDriver, size: ContentSizeAction): Promise<void>;
14
+ export declare function mobileSetContentSize(this: XCUITestDriver, size: ContentSizeAction): Promise<void>;
14
15
  /**
15
16
  * Retrieves the current content size value from the given simulator.
16
17
  *
17
18
  * @since Xcode 15 (but lower xcode could have this command)
18
- * @returns {Promise<ContentSizeResult>} the content size value. Possible return value is
19
- * extra-small, small, medium, large, extra-large, extra-extra-large,
20
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
21
- * accessibility-extra-large, accessibility-extra-extra-large,
22
- * accessibility-extra-extra-extra-large,
23
- * unknown or unsupported with Xcode 16.2.
24
- * @this {XCUITestDriver}
19
+ * @returns The content size value. Possible return value is
20
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
21
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
22
+ * accessibility-extra-large, accessibility-extra-extra-large,
23
+ * accessibility-extra-extra-extra-large,
24
+ * unknown or unsupported with Xcode 16.2.
25
25
  */
26
- export function mobileGetContentSize(this: import("../driver").XCUITestDriver): Promise<ContentSizeResult>;
27
- export type XCUITestDriver = import("../driver").XCUITestDriver;
28
- export type ContentSizeAction = import("./types").ContentSizeAction;
29
- export type ContentSizeResult = import("./types").ContentSizeResult;
26
+ export declare function mobileGetContentSize(this: XCUITestDriver): Promise<ContentSizeResult>;
30
27
  //# sourceMappingURL=content-size.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-size.d.ts","sourceRoot":"","sources":["../../../lib/commands/content-size.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AACH,qFARW,iBAAiB,iBAkB3B;AAED;;;;;;;;;;;GAWG;AACH,gFARa,OAAO,CAAC,iBAAiB,CAAC,CAUtC;6BAGY,OAAO,WAAW,EAAE,cAAc;gCAClC,OAAO,SAAS,EAAE,iBAAiB;gCACnC,OAAO,SAAS,EAAE,iBAAiB"}
1
+ {"version":3,"file":"content-size.d.ts","sourceRoot":"","sources":["../../../lib/commands/content-size.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAsBlE;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAE5B"}
@@ -29,39 +29,31 @@ const CONTENT_SIZE = [
29
29
  * Sets content size for the given simulator.
30
30
  *
31
31
  * @since Xcode 15 (but lower xcode could have this command)
32
- * @param {ContentSizeAction} size - The content size action to set. Acceptable value is
33
- * extra-small, small, medium, large, extra-large, extra-extra-large,
34
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
35
- * accessibility-extra-large, accessibility-extra-extra-large,
36
- * accessibility-extra-extra-extra-large with Xcode 16.2.
37
- * @throws {Error} if the current platform does not support content size appearance changes
38
- * @this {XCUITestDriver}
32
+ * @param size - The content size action to set. Acceptable value is
33
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
34
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
35
+ * accessibility-extra-large, accessibility-extra-extra-large,
36
+ * accessibility-extra-extra-extra-large with Xcode 16.2.
37
+ * @throws If the current platform does not support content size appearance changes
39
38
  */
40
39
  async function mobileSetContentSize(size) {
41
- const simulator = assertSimulator(this);
42
40
  if (!CONTENT_SIZE.includes(lodash_1.default.lowerCase(size))) {
43
41
  throw new driver_1.errors.InvalidArgumentError(`The 'size' value is expected to be one of ${CONTENT_SIZE.join(',')}`);
44
42
  }
45
- await simulator.setContentSize(size);
43
+ await assertSimulator(this).setContentSize(size);
46
44
  }
47
45
  /**
48
46
  * Retrieves the current content size value from the given simulator.
49
47
  *
50
48
  * @since Xcode 15 (but lower xcode could have this command)
51
- * @returns {Promise<ContentSizeResult>} the content size value. Possible return value is
52
- * extra-small, small, medium, large, extra-large, extra-extra-large,
53
- * extra-extra-extra-large, accessibility-medium, accessibility-large,
54
- * accessibility-extra-large, accessibility-extra-extra-large,
55
- * accessibility-extra-extra-extra-large,
56
- * unknown or unsupported with Xcode 16.2.
57
- * @this {XCUITestDriver}
49
+ * @returns The content size value. Possible return value is
50
+ * extra-small, small, medium, large, extra-large, extra-extra-large,
51
+ * extra-extra-extra-large, accessibility-medium, accessibility-large,
52
+ * accessibility-extra-large, accessibility-extra-extra-large,
53
+ * accessibility-extra-extra-extra-large,
54
+ * unknown or unsupported with Xcode 16.2.
58
55
  */
59
56
  async function mobileGetContentSize() {
60
- return /** @type {ContentSizeResult} */ (await assertSimulator(this).getContentSize());
57
+ return await assertSimulator(this).getContentSize();
61
58
  }
62
- /**
63
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
64
- * @typedef {import('./types').ContentSizeAction} ContentSizeAction
65
- * @typedef {import('./types').ContentSizeResult} ContentSizeResult
66
- */
67
59
  //# sourceMappingURL=content-size.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-size.js","sourceRoot":"","sources":["../../../lib/commands/content-size.js"],"names":[],"mappings":";;;;;AAmCA,oDAUC;AAcD,oDAEC;AA7DD,oDAAuB;AACvB,oCAA6D;AAC7D,0CAAuC;AAEvC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAE7F,MAAM,YAAY,GAAG;IACjB,aAAa;IACb,OAAO;IACP,QAAQ;IACR,OAAO;IACP,aAAa;IACb,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,qBAAqB;IACrB,2BAA2B;IAC3B,iCAAiC;IACjC,uCAAuC;IACvC,WAAW;IACX,WAAW;CACd,CAAC;AAEF;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,oBAAoB,CAAC,IAAI;IAC7C,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,6CAA6C,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACtE,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,oBAAoB;IACxC,OAAO,gCAAgC,CAAC,CAAC,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;AACzF,CAAC;AAED;;;;GAIG"}
1
+ {"version":3,"file":"content-size.js","sourceRoot":"","sources":["../../../lib/commands/content-size.ts"],"names":[],"mappings":";;;;;AAqCA,oDAWC;AAaD,oDAIC;AAjED,oDAAuB;AACvB,oCAA6D;AAC7D,0CAAuC;AAKvC,MAAM,eAAe,GAAG,CAAC,MAAsB,EAAa,EAAE,CAAC,uBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AAExH,MAAM,YAAY,GAAG;IACjB,aAAa;IACb,OAAO;IACP,QAAQ;IACR,OAAO;IACP,aAAa;IACb,mBAAmB;IACnB,yBAAyB;IACzB,sBAAsB;IACtB,qBAAqB;IACrB,2BAA2B;IAC3B,iCAAiC;IACjC,uCAAuC;IACvC,WAAW;IACX,WAAW;CACL,CAAC;AAEX;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB,CAExC,IAAuB;IAEvB,IAAI,CAAE,YAAkC,CAAC,QAAQ,CAAC,gBAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,6CAA6C,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACtE,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB;IAGxC,OAAO,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,EAAuB,CAAC;AAC3E,CAAC"}
@@ -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"}
@@ -1,24 +1,21 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { IncreaseContrastAction, IncreaseContrastResult } from './types';
1
3
  /**
2
4
  * Sets the increase contrast configuration for the given simulator.
3
5
  *
4
6
  * @since Xcode 15 (but lower xcode could have this command)
5
- * @param {IncreaseContrastAction} increaseContrast valid increase contrast configuration value.
6
- * Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
7
- * @throws {Error} if the current platform does not support content size appearance changes
8
- * @this {XCUITestDriver}
7
+ * @param increaseContrast - Valid increase contrast configuration value.
8
+ * Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
9
+ * @throws If the current platform does not support content size appearance changes
9
10
  */
10
- export function mobileSetIncreaseContrast(this: import("../driver").XCUITestDriver, increaseContrast: IncreaseContrastAction): Promise<void>;
11
+ export declare function mobileSetIncreaseContrast(this: XCUITestDriver, increaseContrast: IncreaseContrastAction): Promise<void>;
11
12
  /**
12
13
  * Retrieves the current increase contrast configuration value from the given simulator.
13
14
  *
14
15
  * @since Xcode 15 (but lower xcode could have this command)
15
- * @returns {Promise<IncreaseContrastResult>} the contrast configuration value.
16
- * Possible return value is 'enabled', 'disabled',
17
- * 'unsupported' or 'unknown' with Xcode 16.2.
18
- * @this {XCUITestDriver}
16
+ * @returns The contrast configuration value.
17
+ * Possible return value is 'enabled', 'disabled',
18
+ * 'unsupported' or 'unknown' with Xcode 16.2.
19
19
  */
20
- export function mobileGetIncreaseContrast(this: import("../driver").XCUITestDriver): Promise<IncreaseContrastResult>;
21
- export type XCUITestDriver = import("../driver").XCUITestDriver;
22
- export type IncreaseContrastAction = import("./types").IncreaseContrastAction;
23
- export type IncreaseContrastResult = import("./types").IncreaseContrastResult;
20
+ export declare function mobileGetIncreaseContrast(this: XCUITestDriver): Promise<IncreaseContrastResult>;
24
21
  //# sourceMappingURL=increase-contrast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"increase-contrast.d.ts","sourceRoot":"","sources":["../../../lib/commands/increase-contrast.js"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,sGALW,sBAAsB,iBAehC;AAED;;;;;;;;GAQG;AACH,qFALa,OAAO,CAAC,sBAAsB,CAAC,CAO3C;6BAGY,OAAO,WAAW,EAAE,cAAc;qCAClC,OAAO,SAAS,EAAE,sBAAsB;qCACxC,OAAO,SAAS,EAAE,sBAAsB"}
1
+ {"version":3,"file":"increase-contrast.d.ts","sourceRoot":"","sources":["../../../lib/commands/increase-contrast.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,sBAAsB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAU5E;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,cAAc,EACpB,gBAAgB,EAAE,sBAAsB,GACvC,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}