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
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [10.14.4](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.3...v10.14.4) (2026-01-05)
2
+
3
+ ### Miscellaneous Chores
4
+
5
+ * 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))
6
+
7
+ ## [10.14.3](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.2...v10.14.3) (2026-01-04)
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * Migrate various command modules to typescript (part 7) ([#2693](https://github.com/appium/appium-xcuitest-driver/issues/2693)) ([1286364](https://github.com/appium/appium-xcuitest-driver/commit/128636475c1eac6ea5c73da3dcebb2eb9d539c4d))
12
+
1
13
  ## [10.14.2](https://github.com/appium/appium-xcuitest-driver/compare/v10.14.1...v10.14.2) (2026-01-01)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -1,45 +1,40 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ export type AlertAction = 'accept' | 'dismiss' | 'getButtons';
1
3
  /**
2
- * @this {XCUITestDriver}
3
- */
4
- export function getAlertText(this: import("../driver").XCUITestDriver): Promise<string | null>;
5
- /**
6
- * @param {string} value
7
- * @this {XCUITestDriver}
8
- * @returns {Promise<void>}
4
+ * Gets the text of the currently displayed alert.
5
+ *
6
+ * @returns The alert text, or null if no alert is displayed
9
7
  */
10
- export function setAlertText(this: import("../driver").XCUITestDriver, value: string): Promise<void>;
8
+ export declare function getAlertText(this: XCUITestDriver): Promise<string | null>;
11
9
  /**
12
- * @param { {buttonLabel?: string} } opts
13
- * @returns {Promise<void>}
14
- * @this {XCUITestDriver}
10
+ * Sets the text in an alert input field.
11
+ *
12
+ * @param value - The text to set
15
13
  */
16
- export function postAcceptAlert(this: import("../driver").XCUITestDriver, opts?: {
17
- buttonLabel?: string;
18
- }): Promise<void>;
14
+ export declare function setAlertText(this: XCUITestDriver, value: string): Promise<void>;
19
15
  /**
20
- * @param { {buttonLabel?: string} } opts
21
- * @returns {Promise<void>}
22
- * @this {XCUITestDriver}
16
+ * Accepts the currently displayed alert.
17
+ *
18
+ * @param opts - Options including optional button label
23
19
  */
24
- export function postDismissAlert(this: import("../driver").XCUITestDriver, opts?: {
25
- buttonLabel?: string;
26
- }): Promise<void>;
20
+ export declare function postAcceptAlert(this: XCUITestDriver, opts?: AlertOptions): Promise<void>;
27
21
  /**
28
- * @internal
29
- * @this {XCUITestDriver}
30
- * @returns {Promise<string[]>} The list of button labels
22
+ * Dismisses the currently displayed alert.
23
+ *
24
+ * @param opts - Options including optional button label
31
25
  */
32
- export function getAlertButtons(this: import("../driver").XCUITestDriver): Promise<string[]>;
26
+ export declare function postDismissAlert(this: XCUITestDriver, opts?: AlertOptions): Promise<void>;
33
27
  /**
34
28
  * Tries to apply the given action to the currently visible alert.
35
29
  *
36
- * @param {AlertAction} action - The actual action to apply.
37
- * @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
38
- * @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
30
+ * @param action - The actual action to apply
31
+ * @param buttonLabel - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`
32
+ * @returns If `action` is `getButtons`, a list of alert button labels; otherwise nothing
39
33
  * @remarks This should really be separate commands.
40
- * @this {XCUITestDriver}
41
34
  */
42
- export function mobileHandleAlert(this: import("../driver").XCUITestDriver, action: AlertAction, buttonLabel?: string): Promise<string[] | void>;
43
- export type AlertAction = "accept" | "dismiss" | "getButtons";
44
- export type XCUITestDriver = import("../driver").XCUITestDriver;
35
+ export declare function mobileHandleAlert(this: XCUITestDriver, action: AlertAction, buttonLabel?: string): Promise<string[] | void>;
36
+ interface AlertOptions {
37
+ buttonLabel?: string;
38
+ }
39
+ export {};
45
40
  //# sourceMappingURL=alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,+FAEC;AA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rC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,WAAW,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAc1B;AAUD,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -7,51 +7,53 @@ exports.postDismissAlert = postDismissAlert;
7
7
  exports.getAlertButtons = getAlertButtons;
8
8
  exports.mobileHandleAlert = mobileHandleAlert;
9
9
  /**
10
- * @this {XCUITestDriver}
10
+ * Gets the text of the currently displayed alert.
11
+ *
12
+ * @returns The alert text, or null if no alert is displayed
11
13
  */
12
14
  async function getAlertText() {
13
- return /** @type {string|null} */ (await this.proxyCommand('/alert/text', 'GET'));
15
+ return await this.proxyCommand('/alert/text', 'GET');
14
16
  }
15
17
  /**
16
- * @param {string} value
17
- * @this {XCUITestDriver}
18
- * @returns {Promise<void>}
18
+ * Sets the text in an alert input field.
19
+ *
20
+ * @param value - The text to set
19
21
  */
20
22
  async function setAlertText(value) {
21
23
  await this.proxyCommand('/alert/text', 'POST', { value });
22
24
  }
23
25
  /**
24
- * @param { {buttonLabel?: string} } opts
25
- * @returns {Promise<void>}
26
- * @this {XCUITestDriver}
26
+ * Accepts the currently displayed alert.
27
+ *
28
+ * @param opts - Options including optional button label
27
29
  */
28
30
  async function postAcceptAlert(opts = {}) {
29
31
  await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
30
32
  }
31
33
  /**
32
- * @param { {buttonLabel?: string} } opts
33
- * @returns {Promise<void>}
34
- * @this {XCUITestDriver}
34
+ * Dismisses the currently displayed alert.
35
+ *
36
+ * @param opts - Options including optional button label
35
37
  */
36
38
  async function postDismissAlert(opts = {}) {
37
39
  await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
38
40
  }
39
41
  /**
42
+ * Gets the list of button labels from the currently displayed alert.
43
+ *
44
+ * @returns The list of button labels
40
45
  * @internal
41
- * @this {XCUITestDriver}
42
- * @returns {Promise<string[]>} The list of button labels
43
46
  */
44
47
  async function getAlertButtons() {
45
- return /** @type {string[]} */ (await this.proxyCommand('/wda/alert/buttons', 'GET'));
48
+ return await this.proxyCommand('/wda/alert/buttons', 'GET');
46
49
  }
47
50
  /**
48
51
  * Tries to apply the given action to the currently visible alert.
49
52
  *
50
- * @param {AlertAction} action - The actual action to apply.
51
- * @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
52
- * @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
53
+ * @param action - The actual action to apply
54
+ * @param buttonLabel - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`
55
+ * @returns If `action` is `getButtons`, a list of alert button labels; otherwise nothing
53
56
  * @remarks This should really be separate commands.
54
- * @this {XCUITestDriver}
55
57
  */
56
58
  async function mobileHandleAlert(action, buttonLabel) {
57
59
  switch (action) {
@@ -66,11 +68,6 @@ async function mobileHandleAlert(action, buttonLabel) {
66
68
  `'${action}' is provided instead.`);
67
69
  }
68
70
  }
69
- /**
70
- *
71
- * @param { {buttonLabel?: string} } opts
72
- * @returns { {name?: string} }
73
- */
74
71
  function toAlertParams(opts = {}) {
75
72
  const params = {};
76
73
  if (opts.buttonLabel) {
@@ -78,10 +75,4 @@ function toAlertParams(opts = {}) {
78
75
  }
79
76
  return params;
80
77
  }
81
- /**
82
- * @typedef {'accept'|'dismiss'|'getButtons'} AlertAction
83
- */
84
- /**
85
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
86
- */
87
78
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAGA,oCAEC;AAOD,oCAEC;AAOD,0CAEC;AAOD,4CAEC;AAOD,0CAEC;AAWD,8CAcC;AAlED;;GAEG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,0BAA0B,CAAC,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;YACX,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;QACnD,KAAK,SAAS;YACZ,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;QACpD,KAAK,YAAY;YACf,OAAO,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QACtC;YACE,MAAM,IAAI,KAAK,CACb,2EAA2E;gBACzE,IAAI,MAAM,wBAAwB,CACrC,CAAC;IACN,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,OAAqB,EAAE;IAC5C,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,22 +1,20 @@
1
+ import type { XCUITestDriver } from '../driver';
2
+ import type { Style } from './types';
1
3
  /**
2
4
  * Set the device's UI appearance style
3
5
  *
4
6
  * @since iOS 12.0
5
- * @param {'dark'|'light'} style - The appearance style to set
6
- * @throws {Error} if the current platform does not support UI appearance changes
7
- * @this {XCUITestDriver}
7
+ * @param style - The appearance style to set
8
+ * @throws If the current platform does not support UI appearance changes
8
9
  */
9
- export function mobileSetAppearance(this: import("../driver").XCUITestDriver, style: "dark" | "light"): Promise<undefined>;
10
+ export declare function mobileSetAppearance(this: XCUITestDriver, style: 'dark' | 'light'): Promise<void>;
10
11
  /**
11
12
  * Get the device's UI appearance style.
12
13
  *
13
14
  * @since Xcode SDK 11
14
- * @returns {Promise<{style: Style}>}
15
- * @this {XCUITestDriver}
15
+ * @returns The current appearance style
16
16
  */
17
- export function mobileGetAppearance(this: import("../driver").XCUITestDriver): Promise<{
17
+ export declare function mobileGetAppearance(this: XCUITestDriver): Promise<{
18
18
  style: Style;
19
19
  }>;
20
- export type XCUITestDriver = import("../driver").XCUITestDriver;
21
- export type Style = import("./types").Style;
22
20
  //# sourceMappingURL=appearance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../../lib/commands/appearance.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,qFAJW,MAAM,GAAC,OAAO,sBA0BxB;AAED;;;;;;GAMG;AACH,+EAHa,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,CAAC,CA0BnC;6BAGY,OAAO,WAAW,EAAE,cAAc;oBAClC,OAAO,SAAS,EAAE,KAAK"}
1
+ {"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../../lib/commands/appearance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAGnC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,GAAG,OAAO,GACtB,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAC,CAAC,CAkBzB"}
@@ -11,27 +11,28 @@ const support_1 = require("appium/support");
11
11
  * Set the device's UI appearance style
12
12
  *
13
13
  * @since iOS 12.0
14
- * @param {'dark'|'light'} style - The appearance style to set
15
- * @throws {Error} if the current platform does not support UI appearance changes
16
- * @this {XCUITestDriver}
14
+ * @param style - The appearance style to set
15
+ * @throws If the current platform does not support UI appearance changes
17
16
  */
18
17
  async function mobileSetAppearance(style) {
19
18
  if (!['light', 'dark'].includes(lodash_1.default.toLower(style))) {
20
19
  throw new Error(`The 'style' value is expected to equal either 'light' or 'dark'`);
21
20
  }
22
- if (support_1.util.compareVersions(/** @type {string} */ (this.opts.platformVersion), '<', '12.0')) {
21
+ if (support_1.util.compareVersions(this.opts.platformVersion, '<', '12.0')) {
23
22
  throw new Error('Changing appearance is only supported since iOS 12');
24
23
  }
25
24
  if (this.isSimulator()) {
26
25
  try {
27
- return void (await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).setAppearance(style));
26
+ await this.device.setAppearance(style);
27
+ return;
28
28
  }
29
29
  catch (e) {
30
30
  this.log.debug(e.stack);
31
31
  }
32
32
  }
33
33
  try {
34
- return void (await this.proxyCommand('/wda/device/appearance', 'POST', { name: style }, false));
34
+ await this.proxyCommand('/wda/device/appearance', 'POST', { name: style }, false);
35
+ return;
35
36
  }
36
37
  catch (e) {
37
38
  this.log.debug(e.stack);
@@ -43,32 +44,25 @@ async function mobileSetAppearance(style) {
43
44
  * Get the device's UI appearance style.
44
45
  *
45
46
  * @since Xcode SDK 11
46
- * @returns {Promise<{style: Style}>}
47
- * @this {XCUITestDriver}
47
+ * @returns The current appearance style
48
48
  */
49
49
  async function mobileGetAppearance() {
50
- if (support_1.util.compareVersions(/** @type {string} */ (this.opts.platformVersion), '<', '12.0')) {
50
+ if (support_1.util.compareVersions(this.opts.platformVersion, '<', '12.0')) {
51
51
  return { style: 'unsupported' };
52
52
  }
53
- /** @type {Style|undefined} */
54
53
  let style;
55
54
  if (this.isSimulator()) {
56
55
  try {
57
- style = /** @type {Style} */ (await /** @type {import('appium-ios-simulator').Simulator} */ (this.device).getAppearance());
56
+ style = await this.device.getAppearance();
58
57
  }
59
58
  catch { }
60
59
  }
61
60
  if (!style) {
62
- style = /** @type {Style} */ (
63
- /** @type {any} */ (await this.proxyCommand('/wda/device/info', 'GET'))
64
- ?.userInterfaceStyle ?? 'unknown');
61
+ const deviceInfo = await this.proxyCommand('/wda/device/info', 'GET');
62
+ style = (deviceInfo?.userInterfaceStyle ?? 'unknown');
65
63
  }
66
64
  return {
67
- style,
65
+ style: style,
68
66
  };
69
67
  }
70
- /**
71
- * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
72
- * @typedef {import('./types').Style} Style
73
- */
74
68
  //# sourceMappingURL=appearance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.js","sourceRoot":"","sources":["../../../lib/commands/appearance.js"],"names":[],"mappings":";;;;;AAWA,kDAsBC;AASD,kDAuBC;AAjED,oDAAuB;AACvB,4CAAoC;AAEpC;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB,CAAC,KAAK;IAC7C,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,gBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,IAAI,cAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACvB,IAAI,CAAC;YACH,OAAO,KAAK,CAAC,MAAM,uDAAuD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,IAAI,CAAC;QACH,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChG,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,sEAA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CAAC;IAED,IAAI,KAAwB,CAAC;IAC7B,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACvB,IAAI,CAAC;YACH,KAAK,GAAG,MAAO,IAAI,CAAC,MAAoB,CAAC,aAAa,EAAW,CAAC;QACpE,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAqC,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAC1G,KAAK,GAAG,CAAC,UAAU,EAAE,kBAAkB,IAAI,SAAS,CAAU,CAAC;IACjE,CAAC;IACD,OAAO;QACL,KAAK,EAAE,KAAc;KACtB,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,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"}