appium-xcuitest-driver 4.28.0 → 4.29.0

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 (217) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/lib/commands/activeAppInfo.d.ts +3 -3
  3. package/build/lib/commands/activeAppInfo.d.ts.map +1 -1
  4. package/build/lib/commands/activeAppInfo.js +3 -3
  5. package/build/lib/commands/activeAppInfo.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +17 -8
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +16 -7
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +68 -34
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +62 -28
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/app-strings.d.ts +4 -4
  15. package/build/lib/commands/app-strings.d.ts.map +1 -1
  16. package/build/lib/commands/app-strings.js +3 -3
  17. package/build/lib/commands/appearance.d.ts +4 -4
  18. package/build/lib/commands/appearance.d.ts.map +1 -1
  19. package/build/lib/commands/appearance.js +7 -4
  20. package/build/lib/commands/appearance.js.map +1 -1
  21. package/build/lib/commands/battery.d.ts +3 -1
  22. package/build/lib/commands/battery.d.ts.map +1 -1
  23. package/build/lib/commands/battery.js +6 -2
  24. package/build/lib/commands/battery.js.map +1 -1
  25. package/build/lib/commands/biometric.d.ts +9 -8
  26. package/build/lib/commands/biometric.d.ts.map +1 -1
  27. package/build/lib/commands/biometric.js +17 -15
  28. package/build/lib/commands/biometric.js.map +1 -1
  29. package/build/lib/commands/certificate.d.ts +23 -29
  30. package/build/lib/commands/certificate.d.ts.map +1 -1
  31. package/build/lib/commands/certificate.js +22 -28
  32. package/build/lib/commands/certificate.js.map +1 -1
  33. package/build/lib/commands/clipboard.d.ts.map +1 -1
  34. package/build/lib/commands/clipboard.js +2 -2
  35. package/build/lib/commands/clipboard.js.map +1 -1
  36. package/build/lib/commands/condition.d.ts +14 -28
  37. package/build/lib/commands/condition.d.ts.map +1 -1
  38. package/build/lib/commands/condition.js +36 -28
  39. package/build/lib/commands/condition.js.map +1 -1
  40. package/build/lib/commands/context.d.ts +12 -5
  41. package/build/lib/commands/context.d.ts.map +1 -1
  42. package/build/lib/commands/context.js +11 -4
  43. package/build/lib/commands/context.js.map +1 -1
  44. package/build/lib/commands/deviceInfo.d.ts +7 -4
  45. package/build/lib/commands/deviceInfo.d.ts.map +1 -1
  46. package/build/lib/commands/deviceInfo.js +9 -4
  47. package/build/lib/commands/deviceInfo.js.map +1 -1
  48. package/build/lib/commands/element.d.ts +2 -1
  49. package/build/lib/commands/element.d.ts.map +1 -1
  50. package/build/lib/commands/element.js +5 -4
  51. package/build/lib/commands/element.js.map +1 -1
  52. package/build/lib/commands/enum.d.ts +105 -0
  53. package/build/lib/commands/enum.d.ts.map +1 -0
  54. package/build/lib/commands/enum.js +113 -0
  55. package/build/lib/commands/enum.js.map +1 -0
  56. package/build/lib/commands/file-movement.d.ts +2 -0
  57. package/build/lib/commands/file-movement.d.ts.map +1 -1
  58. package/build/lib/commands/file-movement.js +4 -2
  59. package/build/lib/commands/file-movement.js.map +1 -1
  60. package/build/lib/commands/find.d.ts +1 -0
  61. package/build/lib/commands/find.d.ts.map +1 -1
  62. package/build/lib/commands/find.js +3 -2
  63. package/build/lib/commands/find.js.map +1 -1
  64. package/build/lib/commands/general.d.ts +34 -22
  65. package/build/lib/commands/general.d.ts.map +1 -1
  66. package/build/lib/commands/general.js +28 -11
  67. package/build/lib/commands/general.js.map +1 -1
  68. package/build/lib/commands/geolocation.d.ts +28 -13
  69. package/build/lib/commands/geolocation.d.ts.map +1 -1
  70. package/build/lib/commands/geolocation.js +22 -8
  71. package/build/lib/commands/geolocation.js.map +1 -1
  72. package/build/lib/commands/gesture.d.ts +201 -77
  73. package/build/lib/commands/gesture.d.ts.map +1 -1
  74. package/build/lib/commands/gesture.js +185 -62
  75. package/build/lib/commands/gesture.js.map +1 -1
  76. package/build/lib/commands/hid-event.d.ts +2773 -0
  77. package/build/lib/commands/hid-event.d.ts.map +1 -0
  78. package/build/lib/commands/hid-event.js +1633 -0
  79. package/build/lib/commands/hid-event.js.map +1 -0
  80. package/build/lib/commands/iohid.d.ts +1357 -5
  81. package/build/lib/commands/iohid.d.ts.map +1 -1
  82. package/build/lib/commands/iohid.js +35 -10
  83. package/build/lib/commands/iohid.js.map +1 -1
  84. package/build/lib/commands/keychains.d.ts +2 -1
  85. package/build/lib/commands/keychains.d.ts.map +1 -1
  86. package/build/lib/commands/keychains.js +9 -7
  87. package/build/lib/commands/keychains.js.map +1 -1
  88. package/build/lib/commands/localization.d.ts +8 -34
  89. package/build/lib/commands/localization.d.ts.map +1 -1
  90. package/build/lib/commands/localization.js +16 -23
  91. package/build/lib/commands/localization.js.map +1 -1
  92. package/build/lib/commands/location.d.ts +2 -2
  93. package/build/lib/commands/location.d.ts.map +1 -1
  94. package/build/lib/commands/location.js +6 -7
  95. package/build/lib/commands/location.js.map +1 -1
  96. package/build/lib/commands/lock.js +3 -3
  97. package/build/lib/commands/lock.js.map +1 -1
  98. package/build/lib/commands/log.d.ts +11 -7
  99. package/build/lib/commands/log.d.ts.map +1 -1
  100. package/build/lib/commands/log.js +11 -7
  101. package/build/lib/commands/log.js.map +1 -1
  102. package/build/lib/commands/navigation.d.ts +10 -4
  103. package/build/lib/commands/navigation.d.ts.map +1 -1
  104. package/build/lib/commands/navigation.js +9 -3
  105. package/build/lib/commands/navigation.js.map +1 -1
  106. package/build/lib/commands/notifications.d.ts +12 -26
  107. package/build/lib/commands/notifications.d.ts.map +1 -1
  108. package/build/lib/commands/notifications.js +10 -21
  109. package/build/lib/commands/notifications.js.map +1 -1
  110. package/build/lib/commands/pasteboard.d.ts +15 -5
  111. package/build/lib/commands/pasteboard.d.ts.map +1 -1
  112. package/build/lib/commands/pasteboard.js +13 -3
  113. package/build/lib/commands/pasteboard.js.map +1 -1
  114. package/build/lib/commands/pcap.d.ts +7 -6
  115. package/build/lib/commands/pcap.d.ts.map +1 -1
  116. package/build/lib/commands/pcap.js +7 -6
  117. package/build/lib/commands/pcap.js.map +1 -1
  118. package/build/lib/commands/performance.d.ts +7 -6
  119. package/build/lib/commands/performance.d.ts.map +1 -1
  120. package/build/lib/commands/performance.js +8 -7
  121. package/build/lib/commands/performance.js.map +1 -1
  122. package/build/lib/commands/permissions.d.ts +10 -59
  123. package/build/lib/commands/permissions.d.ts.map +1 -1
  124. package/build/lib/commands/permissions.js +13 -74
  125. package/build/lib/commands/permissions.js.map +1 -1
  126. package/build/lib/commands/proxy-helper.d.ts +7 -4
  127. package/build/lib/commands/proxy-helper.d.ts.map +1 -1
  128. package/build/lib/commands/proxy-helper.js +14 -11
  129. package/build/lib/commands/proxy-helper.js.map +1 -1
  130. package/build/lib/commands/record-audio.d.ts +1 -0
  131. package/build/lib/commands/record-audio.d.ts.map +1 -1
  132. package/build/lib/commands/record-audio.js +5 -1
  133. package/build/lib/commands/record-audio.js.map +1 -1
  134. package/build/lib/commands/recordscreen.js +3 -2
  135. package/build/lib/commands/recordscreen.js.map +1 -1
  136. package/build/lib/commands/source.d.ts +8 -4
  137. package/build/lib/commands/source.d.ts.map +1 -1
  138. package/build/lib/commands/source.js +15 -7
  139. package/build/lib/commands/source.js.map +1 -1
  140. package/build/lib/commands/types.d.ts +302 -37
  141. package/build/lib/commands/types.d.ts.map +1 -1
  142. package/build/lib/commands/types.js +0 -35
  143. package/build/lib/commands/types.js.map +1 -1
  144. package/build/lib/commands/web.d.ts +19 -14
  145. package/build/lib/commands/web.d.ts.map +1 -1
  146. package/build/lib/commands/web.js +23 -17
  147. package/build/lib/commands/web.js.map +1 -1
  148. package/build/lib/commands/xctest.d.ts +17 -99
  149. package/build/lib/commands/xctest.d.ts.map +1 -1
  150. package/build/lib/commands/xctest.js +20 -41
  151. package/build/lib/commands/xctest.js.map +1 -1
  152. package/build/lib/device-log/rotating-log.d.ts +1 -1
  153. package/build/lib/device-log/rotating-log.d.ts.map +1 -1
  154. package/build/lib/driver.d.ts +1836 -91
  155. package/build/lib/driver.d.ts.map +1 -1
  156. package/build/lib/driver.js +11 -6
  157. package/build/lib/driver.js.map +1 -1
  158. package/build/lib/logger.d.ts +1 -1
  159. package/build/lib/logger.d.ts.map +1 -1
  160. package/build/lib/py-ios-device-client.d.ts +1 -0
  161. package/build/lib/py-ios-device-client.d.ts.map +1 -1
  162. package/build/lib/py-ios-device-client.js +10 -10
  163. package/build/lib/py-ios-device-client.js.map +1 -1
  164. package/build/lib/stubs.d.ts +0 -1
  165. package/build/lib/stubs.d.ts.map +1 -1
  166. package/build/lib/types.d.ts +35 -2
  167. package/build/lib/types.d.ts.map +1 -1
  168. package/build/lib/utils.d.ts +20 -8
  169. package/build/lib/utils.d.ts.map +1 -1
  170. package/build/lib/utils.js +58 -36
  171. package/build/lib/utils.js.map +1 -1
  172. package/lib/commands/activeAppInfo.js +5 -3
  173. package/lib/commands/alert.js +16 -7
  174. package/lib/commands/app-management.js +64 -28
  175. package/lib/commands/app-strings.js +3 -3
  176. package/lib/commands/appearance.js +8 -4
  177. package/lib/commands/battery.js +7 -2
  178. package/lib/commands/biometric.js +15 -15
  179. package/lib/commands/certificate.js +22 -28
  180. package/lib/commands/clipboard.js +5 -3
  181. package/lib/commands/condition.js +36 -28
  182. package/lib/commands/context.js +27 -18
  183. package/lib/commands/deviceInfo.js +12 -4
  184. package/lib/commands/element.js +7 -4
  185. package/lib/commands/enum.ts +108 -0
  186. package/lib/commands/file-movement.js +4 -2
  187. package/lib/commands/find.js +5 -2
  188. package/lib/commands/general.js +36 -15
  189. package/lib/commands/geolocation.js +30 -12
  190. package/lib/commands/gesture.js +201 -66
  191. package/lib/commands/hid-event.ts +1634 -0
  192. package/lib/commands/iohid.js +39 -10
  193. package/lib/commands/keychains.js +7 -7
  194. package/lib/commands/localization.js +15 -26
  195. package/lib/commands/location.js +7 -10
  196. package/lib/commands/lock.js +3 -3
  197. package/lib/commands/log.js +11 -7
  198. package/lib/commands/navigation.js +10 -4
  199. package/lib/commands/notifications.js +10 -23
  200. package/lib/commands/pasteboard.js +13 -3
  201. package/lib/commands/pcap.js +7 -6
  202. package/lib/commands/performance.js +10 -7
  203. package/lib/commands/permissions.js +13 -77
  204. package/lib/commands/proxy-helper.js +14 -12
  205. package/lib/commands/record-audio.js +5 -8
  206. package/lib/commands/recordscreen.js +5 -5
  207. package/lib/commands/source.js +17 -7
  208. package/lib/commands/types.ts +350 -38
  209. package/lib/commands/web.js +40 -29
  210. package/lib/commands/xctest.js +20 -44
  211. package/lib/driver.js +20 -6
  212. package/lib/py-ios-device-client.js +35 -32
  213. package/lib/stubs.ts +0 -1
  214. package/lib/types.ts +37 -2
  215. package/lib/utils.js +148 -99
  216. package/npm-shrinkwrap.json +868 -688
  217. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [4.29.0](https://github.com/appium/appium-xcuitest-driver/compare/v4.28.0...v4.29.0) (2023-05-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * update docs and args for more execute methods ([5c4bd32](https://github.com/appium/appium-xcuitest-driver/commit/5c4bd3272701f191d5f1abd104deab31ed6b3595))
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **deps:** appium upgrades ([70c13dc](https://github.com/appium/appium-xcuitest-driver/commit/70c13dc779c2423c3d726aa1dbf7fcedd496ca82))
12
+ * **execute-methods:** begin migration of docstrings to sources ([316c012](https://github.com/appium/appium-xcuitest-driver/commit/316c012fad7d9b3306cbbe767195b351f60aa26d))
13
+
1
14
  ## [4.28.0](https://github.com/appium/appium-xcuitest-driver/compare/v4.27.2...v4.28.0) (2023-05-14)
2
15
 
3
16
 
@@ -1,12 +1,12 @@
1
1
  declare namespace _default {
2
2
  /**
3
- * Returns ActiveApp info.
3
+ * Returns information about the active application.
4
4
  *
5
- * @returns {Promise<object>} The response of `/wda/activeAppInfo'`
5
+ * @returns {Promise<import('./types').ActiveAppInfo>} Active app information
6
6
  * @throws {Error} if an error raised by command
7
7
  * @this {import('../driver').XCUITestDriver}
8
8
  */
9
- function mobileGetActiveAppInfo(this: import("../driver").default): Promise<any>;
9
+ function mobileGetActiveAppInfo(this: import("../driver").default): Promise<import("./types").ActiveAppInfo>;
10
10
  }
11
11
  export default _default;
12
12
  //# sourceMappingURL=activeAppInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"activeAppInfo.d.ts","sourceRoot":"","sources":["../../../lib/commands/activeAppInfo.js"],"names":[],"mappings":";IACE;;;;;;OAMG;IACH,iFAEC"}
1
+ {"version":3,"file":"activeAppInfo.d.ts","sourceRoot":"","sources":["../../../lib/commands/activeAppInfo.js"],"names":[],"mappings":";IACE;;;;;;OAMG;IACH,6GAIC"}
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  /**
5
- * Returns ActiveApp info.
5
+ * Returns information about the active application.
6
6
  *
7
- * @returns {Promise<object>} The response of `/wda/activeAppInfo'`
7
+ * @returns {Promise<import('./types').ActiveAppInfo>} Active app information
8
8
  * @throws {Error} if an error raised by command
9
9
  * @this {import('../driver').XCUITestDriver}
10
10
  */
11
11
  async mobileGetActiveAppInfo() {
12
- return await this.proxyCommand('/wda/activeAppInfo', 'GET');
12
+ return /** @type {import('./types').ActiveAppInfo} */ (await this.proxyCommand('/wda/activeAppInfo', 'GET'));
13
13
  },
14
14
  };
15
15
  //# sourceMappingURL=activeAppInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"activeAppInfo.js","sourceRoot":"","sources":["../../../lib/commands/activeAppInfo.js"],"names":[],"mappings":";;AAAA,kBAAe;IACb;;;;;;OAMG;IACH,KAAK,CAAC,sBAAsB;QAC1B,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"activeAppInfo.js","sourceRoot":"","sources":["../../../lib/commands/activeAppInfo.js"],"names":[],"mappings":";;AAAA,kBAAe;IACb;;;;;;OAMG;IACH,KAAK,CAAC,sBAAsB;QAC1B,OAAO,8CAA8C,CAAC,CACpD,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CACrD,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -2,36 +2,45 @@ declare namespace _default {
2
2
  /**
3
3
  * @this {XCUITestDriver}
4
4
  */
5
- function getAlertText(this: import("../driver").default): Promise<any>;
5
+ function getAlertText(this: import("../driver").default): Promise<string | null>;
6
6
  /**
7
7
  * @param {string} value
8
8
  * @this {XCUITestDriver}
9
+ * @returns {Promise<void>}
9
10
  */
10
- function setAlertText(this: import("../driver").default, value: string): Promise<any>;
11
+ function setAlertText(this: import("../driver").default, value: string): Promise<void>;
11
12
  /**
12
13
  * @param { {buttonLabel?: string} } opts
14
+ * @returns {Promise<void>}
13
15
  * @this {XCUITestDriver}
14
16
  */
15
17
  function postAcceptAlert(this: import("../driver").default, opts?: {
16
18
  buttonLabel?: string | undefined;
17
- }): Promise<any>;
19
+ }): Promise<void>;
18
20
  /**
19
21
  * @param { {buttonLabel?: string} } opts
22
+ * @returns {Promise<void>}
20
23
  * @this {XCUITestDriver}
21
24
  */
22
25
  function postDismissAlert(this: import("../driver").default, opts?: {
23
26
  buttonLabel?: string | undefined;
24
- }): Promise<any>;
27
+ }): Promise<void>;
25
28
  /**
29
+ * @internal
26
30
  * @this {XCUITestDriver}
31
+ * @returns {Promise<string[]>} The list of button labels
27
32
  */
28
- function getAlertButtons(this: import("../driver").default): Promise<any>;
33
+ function getAlertButtons(this: import("../driver").default): Promise<string[]>;
29
34
  /**
30
- * @param {AlertAction} action
31
- * @param {string} [buttonLabel]
35
+ * Tries to apply the given action to the currently visible alert.
36
+ *
37
+ * @param {AlertAction} action - The actual action to apply.
38
+ * @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`.
39
+ * @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
40
+ * @remarks This should really be separate commands.
32
41
  * @this {XCUITestDriver}
33
42
  */
34
- function mobileHandleAlert(this: import("../driver").default, action: AlertAction, buttonLabel?: string | undefined): Promise<any>;
43
+ function mobileHandleAlert(this: import("../driver").default, action: AlertAction, buttonLabel?: string | undefined): Promise<void | string[]>;
35
44
  }
36
45
  export default _default;
37
46
  export type AlertAction = 'accept' | 'dismiss' | 'getButtons';
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";IAcE;;OAEG;IACH,uEAEC;IACD;;;OAGG;IACH,sFAEC;IACD;;;OAGG;IACH;;qBAEC;IACD;;;OAGG;IACH;;qBAEC;IACD;;OAEG;IACH,0EAEC;IACD;;;;OAIG;IACH,mIAcC;;;0BAIU,QAAQ,GAAC,SAAS,GAAC,YAAY;6BAI/B,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";IAcE;;OAEG;IACH,iFAEC;IACD;;;;OAIG;IACH,uFAEC;IACD;;;;OAIG;IACH;;sBAEC;IACD;;;;OAIG;IACH;;sBAEC;IACD;;;;OAIG;IACH,+EAEC;IACD;;;;;;;;OAQG;IACH,+IAcC;;;0BAIU,QAAQ,GAAC,SAAS,GAAC,YAAY;6BAI/B,OAAO,WAAW,EAAE,cAAc"}
@@ -17,38 +17,47 @@ exports.default = {
17
17
  * @this {XCUITestDriver}
18
18
  */
19
19
  async getAlertText() {
20
- return await this.proxyCommand('/alert/text', 'GET');
20
+ return /** @type {string|null} */ (await this.proxyCommand('/alert/text', 'GET'));
21
21
  },
22
22
  /**
23
23
  * @param {string} value
24
24
  * @this {XCUITestDriver}
25
+ * @returns {Promise<void>}
25
26
  */
26
27
  async setAlertText(value) {
27
- return await this.proxyCommand('/alert/text', 'POST', { value });
28
+ await this.proxyCommand('/alert/text', 'POST', { value });
28
29
  },
29
30
  /**
30
31
  * @param { {buttonLabel?: string} } opts
32
+ * @returns {Promise<void>}
31
33
  * @this {XCUITestDriver}
32
34
  */
33
35
  async postAcceptAlert(opts = {}) {
34
- return await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
36
+ await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
35
37
  },
36
38
  /**
37
39
  * @param { {buttonLabel?: string} } opts
40
+ * @returns {Promise<void>}
38
41
  * @this {XCUITestDriver}
39
42
  */
40
43
  async postDismissAlert(opts = {}) {
41
- return await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
44
+ await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
42
45
  },
43
46
  /**
47
+ * @internal
44
48
  * @this {XCUITestDriver}
49
+ * @returns {Promise<string[]>} The list of button labels
45
50
  */
46
51
  async getAlertButtons() {
47
- return await this.proxyCommand('/wda/alert/buttons', 'GET');
52
+ return /** @type {string[]} */ (await this.proxyCommand('/wda/alert/buttons', 'GET'));
48
53
  },
49
54
  /**
50
- * @param {AlertAction} action
51
- * @param {string} [buttonLabel]
55
+ * Tries to apply the given action to the currently visible alert.
56
+ *
57
+ * @param {AlertAction} action - The actual action to apply.
58
+ * @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`.
59
+ * @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
60
+ * @remarks This should really be separate commands.
52
61
  * @this {XCUITestDriver}
53
62
  */
54
63
  async mobileHandleAlert(action, buttonLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,IAAI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ACD;;;;;;;;OAQG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW;QACzC,QAAQ,MAAM,EAAE;YACd,KAAK,QAAQ;gBACX,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;YACnD,KAAK,SAAS;gBACZ,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;YACpD,KAAK,YAAY;gBACf,OAAO,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YACtC;gBACE,MAAM,IAAI,KAAK,CACb,2EAA2E;oBACzE,IAAI,MAAM,wBAAwB,CACrC,CAAC;SACL;IACH,CAAC;CACF,CAAC;AAEF;;GAEG;AAEH;;GAEG"}
@@ -1,56 +1,87 @@
1
1
  declare namespace _default {
2
2
  /**
3
- * @param {string} app
4
- * @param {string} [strategy]
5
- * @param {number} [timeoutMs]
3
+ * Installs the given application to the device under test.
4
+ *
5
+ * Please ensure the app is built for a correct architecture and is signed with a proper developer signature (for real devices) prior to calling this.
6
+ * @param {string} app - See docs for `appium:app` capability
7
+ * @param {import('./types').AppInstallStrategy} [strategy] - One of possible app installation strategies on real devices. This argument is ignored on simulators. If not provided, then the value of `appium:appInstallStrategy` is used. If the latter is also not provided, then `serial` is used. See the description of `appium:appInstallStrategy` capability for more details on allowed values.
8
+ * @param {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices. If not provided, then the value of `appium:appPushTimeout` capability is used. If the capability is not provided then the default is 240000ms (4 minutes).
9
+ * @privateRemarks Link to capability docs
10
+ * @returns {Promise<void>}
6
11
  * @this {XCUITestDriver}
7
12
  */
8
- function mobileInstallApp(this: import("../driver").default, app: string, timeoutMs?: number | undefined, strategy?: string | undefined): Promise<void>;
13
+ function mobileInstallApp(this: import("../driver").default, app: string, timeoutMs?: number | undefined, strategy?: import("./types").AppInstallStrategy | undefined): Promise<void>;
9
14
  /**
10
- * @param {string} bundleId
15
+ * Checks whether the given application is installed on the device under test.
16
+ *
17
+ * @param {string} bundleId - The bundle identifier of the application to be checked
18
+ * @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
11
19
  * @this {XCUITestDriver}
12
20
  */
13
- function mobileIsAppInstalled(this: import("../driver").default, bundleId: string): Promise<any>;
21
+ function mobileIsAppInstalled(this: import("../driver").default, bundleId: string): Promise<boolean>;
14
22
  /**
15
- * @param {string} bundleId
23
+ * Removes/uninstalls the given application from the device under test.
24
+ *
25
+ * @param {string} bundleId - The bundle identifier of the application to be removed
26
+ * @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
16
27
  * @this {XCUITestDriver}
17
28
  */
18
29
  function mobileRemoveApp(this: import("../driver").default, bundleId: string): Promise<boolean>;
19
30
  /**
20
- * @param {string} bundleId
21
- * @param {any|any[]} [args]
22
- * @param {any} [environment]
31
+ * Executes the given app on the device under test.
32
+ *
33
+ * If the app is already running it will be activated. If the app is not installed or cannot be launched then an exception is thrown.
34
+ * @param {string} bundleId - The bundle identifier of the application to be launched
35
+ * @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
36
+ * @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
37
+ * @returns {Promise<void>}
23
38
  * @this {XCUITestDriver}
24
39
  */
25
- function mobileLaunchApp(this: import("../driver").default, bundleId: string, args?: any, environment?: any): Promise<any>;
40
+ function mobileLaunchApp(this: import("../driver").default, bundleId: string, args?: string | string[] | undefined, environment?: any): Promise<void>;
26
41
  /**
27
- * @param {string} bundleId
42
+ * Terminates the given app on the device under test.
43
+ *
44
+ * This command performs termination via [XCTest's `terminate`](https://developer.apple.com/documentation/xctest/xcuiapplication/1500637-terminate) API. If the app is not installed an exception is thrown. If the app is not running then nothing is done.
45
+ * @param {string} bundleId - The bundle identifier of the application to be terminated
46
+ * @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
28
47
  * @this {XCUITestDriver}
29
48
  */
30
- function mobileTerminateApp(this: import("../driver").default, bundleId: string): Promise<any>;
49
+ function mobileTerminateApp(this: import("../driver").default, bundleId: string): Promise<boolean>;
31
50
  /**
32
- * @param {string} bundleId
51
+ * Activate the given app on the device under test.
52
+ *
53
+ * This pushes the app to the foreground if it is running in the background. An exception is thrown if the app is not install or isn't running. Nothing is done if the app is already in the foreground.
54
+ *
55
+ * @param {string} bundleId - The bundle identifier of the application to be activated
56
+ * @returns {Promise<void>}
33
57
  * @this {XCUITestDriver}
34
58
  */
35
- function mobileActivateApp(this: import("../driver").default, bundleId: string): Promise<any>;
59
+ function mobileActivateApp(this: import("../driver").default, bundleId: string): Promise<void>;
36
60
  /**
37
- * Kill the given bundle id process via instruments service.
38
- * @see https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
39
- * @param {string} bundleId
40
- * @returns {Promise<boolean>} Returns true if the bundle id process was killed. Otherwise false.
61
+ * Kill the given app on the real device under test by instruments service.
62
+ *
63
+ * If the app is not running or kill failed, then nothing is done.
64
+ *
65
+ * @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
66
+ * @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
67
+ * @see https://github.com/YueChen-C/py-ios-device
68
+ * @param {string} bundleId - The bundle identifier of the application to be killed
69
+ * @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
70
+ * @group Real Device Only
41
71
  * @this {XCUITestDriver}
42
72
  */
43
73
  function mobileKillApp(this: import("../driver").default, bundleId: string): Promise<boolean>;
44
74
  /**
45
- * Returns the current application state
75
+ * Queries the state of an installed application from the device under test.
76
+ *
77
+ * If the app with the given `bundleId` is not installed, an exception will be thrown.
46
78
  *
47
- * @param {string} bundleId - Options set, which must contain `bundleId` property
48
- * @returns {Promise<import('./types').AppState>} The actual application state code. See
49
- * https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
50
- * to get the list of possible values.
79
+ * @param {string} bundleId - The bundle identifier of the application to be queried
80
+ * @returns {Promise<AppState>} The actual application state code
81
+ * @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
51
82
  * @this {XCUITestDriver}
52
83
  */
53
- function mobileQueryAppState(this: import("../driver").default, bundleId: string): Promise<import("./types").AppState>;
84
+ function mobileQueryAppState(this: import("../driver").default, bundleId: string): Promise<import("./enum").AppState>;
54
85
  /**
55
86
  * @param {string} appPath
56
87
  * @param {object} opts
@@ -62,30 +93,32 @@ declare namespace _default {
62
93
  * @param {object} opts
63
94
  * @this {XCUITestDriver}
64
95
  */
65
- function activateApp(this: import("../driver").default, bundleId: string, opts?: any, ...args: any[]): Promise<any>;
96
+ function activateApp(this: import("../driver").default, bundleId: string, opts?: any, ...args: any[]): Promise<void>;
66
97
  /**
67
98
  * @param {string} bundleId
68
99
  * @this {XCUITestDriver}
69
100
  */
70
- function isAppInstalled(this: import("../driver").default, bundleId: string): Promise<any>;
101
+ function isAppInstalled(this: import("../driver").default, bundleId: string): Promise<boolean>;
71
102
  /**
72
103
  * @param {string} bundleId
73
104
  * @this {XCUITestDriver}
74
105
  */
75
- function terminateApp(this: import("../driver").default, bundleId: string): Promise<any>;
106
+ function terminateApp(this: import("../driver").default, bundleId: string): Promise<void>;
76
107
  /**
77
108
  * @param {string} bundleId
78
109
  * @this {XCUITestDriver}
79
110
  */
80
- function queryAppState(this: import("../driver").default, bundleId: string): Promise<import("./types").AppState>;
111
+ function queryAppState(this: import("../driver").default, bundleId: string): Promise<import("./enum").AppState>;
81
112
  /**
82
113
  * List applications installed on the real device under test
83
114
  *
84
- * @param {'User'|'System'} [applicationType='User']
85
- * @returns {Promise<Record<string,any>[]>} A list of apps, where each item is a map where keys are
86
- * bundle identifiers and values are maps of platform-specific app properties.
115
+ * Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
116
+ * @param {'User'|'System'} applicationType - The type of applications to list.
117
+ * @returns {Promise<Record<string,any>[]>} A list of apps where each item is a mapping of bundle identifiers to maps of platform-specific app properties.
118
+ * @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
119
+ * @group Real Device Only
87
120
  */
88
- function mobileListApps(applicationType?: "User" | "System" | undefined): Promise<Record<string, any>[]>;
121
+ function mobileListApps(applicationType?: "User" | "System"): Promise<Record<string, any>[]>;
89
122
  /**
90
123
  * Close app (simulate device home button). It is possible to restore
91
124
  * the app after the timeout or keep it minimized based on the parameter value.
@@ -100,8 +133,9 @@ declare namespace _default {
100
133
  */
101
134
  function background(this: import("../driver").default, seconds?: number | {
102
135
  timeout: number | null;
103
- } | undefined): Promise<any>;
136
+ } | undefined): Promise<unknown>;
104
137
  }
105
138
  export default _default;
106
139
  export type XCUITestDriver = import('../driver').XCUITestDriver;
140
+ export type AppState = import('./enum').AppState;
107
141
  //# sourceMappingURL=app-management.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";IAME;;;;;OAKG;IACH,wJAmBC;IACD;;;OAGG;IACH,iGAKC;IACD;;;OAGG;IACH,gGAiBC;IACD;;;;;OAKG;IACH,2HAUC;IACD;;;OAGG;IACH,+FAEC;IACD;;;OAGG;IACH,8FAEC;IAED;;;;;;OAMG;IACH,8FAOC;IAED;;;;;;;;OAQG;IACH,uHAEC;IAED;;;;OAIG;IACH,sHAEC;IACD;;;;OAIG;IACH,oHAGC;IACD;;;OAGG;IACH,2FAEC;IACD;;;OAGG;IACH,yFAEC;IACD;;;OAGG;IACH,iHAEC;IAED;;;;;;OAMG;IACH,yGAWC;IAED;;;;;;;;;;;OAWG;IACH;;iCAgCC;;;6BAIU,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";IAME;;;;;;;;;;OAUG;IACH,sLAmBC;IACD;;;;;;OAMG;IACH,qGAKC;IACD;;;;;;OAMG;IACH,gGAiBC;IACD;;;;;;;;;OASG;IACH,sJAUC;IACD;;;;;;;OAOG;IACH,mGAIC;IACD;;;;;;;;OAQG;IACH,+FAEC;IAED;;;;;;;;;;;;OAYG;IACH,8FAOC;IAED;;;;;;;;;OASG;IACH,sHAEC;IAED;;;;OAIG;IACH,sHAEC;IACD;;;;OAIG;IACH,qHAGC;IACD;;;OAGG;IACH,+FAEC;IACD;;;OAGG;IACH,0FAEC;IACD;;;OAGG;IACH,gHAEC;IAED;;;;;;;;OAQG;IACH,6FAWC;IAED;;;;;;;;;;;OAWG;IACH;;qCAgCC;;;6BAIU,OAAO,WAAW,EAAE,cAAc;uBAClC,OAAO,QAAQ,EAAE,QAAQ"}
@@ -9,9 +9,14 @@ const driver_1 = require("appium/driver");
9
9
  const appium_ios_device_1 = require("appium-ios-device");
10
10
  exports.default = {
11
11
  /**
12
- * @param {string} app
13
- * @param {string} [strategy]
14
- * @param {number} [timeoutMs]
12
+ * Installs the given application to the device under test.
13
+ *
14
+ * Please ensure the app is built for a correct architecture and is signed with a proper developer signature (for real devices) prior to calling this.
15
+ * @param {string} app - See docs for `appium:app` capability
16
+ * @param {import('./types').AppInstallStrategy} [strategy] - One of possible app installation strategies on real devices. This argument is ignored on simulators. If not provided, then the value of `appium:appInstallStrategy` is used. If the latter is also not provided, then `serial` is used. See the description of `appium:appInstallStrategy` capability for more details on allowed values.
17
+ * @param {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices. If not provided, then the value of `appium:appPushTimeout` capability is used. If the capability is not provided then the default is 240000ms (4 minutes).
18
+ * @privateRemarks Link to capability docs
19
+ * @returns {Promise<void>}
15
20
  * @this {XCUITestDriver}
16
21
  */
17
22
  async mobileInstallApp(app, timeoutMs, strategy) {
@@ -27,7 +32,10 @@ exports.default = {
27
32
  this.log.info(`Installation of '${srcAppPath}' succeeded`);
28
33
  },
29
34
  /**
30
- * @param {string} bundleId
35
+ * Checks whether the given application is installed on the device under test.
36
+ *
37
+ * @param {string} bundleId - The bundle identifier of the application to be checked
38
+ * @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
31
39
  * @this {XCUITestDriver}
32
40
  */
33
41
  async mobileIsAppInstalled(bundleId) {
@@ -37,7 +45,10 @@ exports.default = {
37
45
  return installed;
38
46
  },
39
47
  /**
40
- * @param {string} bundleId
48
+ * Removes/uninstalls the given application from the device under test.
49
+ *
50
+ * @param {string} bundleId - The bundle identifier of the application to be removed
51
+ * @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
41
52
  * @this {XCUITestDriver}
42
53
  */
43
54
  async mobileRemoveApp(bundleId) {
@@ -57,9 +68,13 @@ exports.default = {
57
68
  }
58
69
  },
59
70
  /**
60
- * @param {string} bundleId
61
- * @param {any|any[]} [args]
62
- * @param {any} [environment]
71
+ * Executes the given app on the device under test.
72
+ *
73
+ * If the app is already running it will be activated. If the app is not installed or cannot be launched then an exception is thrown.
74
+ * @param {string} bundleId - The bundle identifier of the application to be launched
75
+ * @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
76
+ * @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
77
+ * @returns {Promise<void>}
63
78
  * @this {XCUITestDriver}
64
79
  */
65
80
  async mobileLaunchApp(bundleId, args, environment) {
@@ -71,27 +86,42 @@ exports.default = {
71
86
  if (environment) {
72
87
  launchOptions.environment = environment;
73
88
  }
74
- return await this.proxyCommand('/wda/apps/launch', 'POST', launchOptions);
89
+ await this.proxyCommand('/wda/apps/launch', 'POST', launchOptions);
75
90
  },
76
91
  /**
77
- * @param {string} bundleId
92
+ * Terminates the given app on the device under test.
93
+ *
94
+ * This command performs termination via [XCTest's `terminate`](https://developer.apple.com/documentation/xctest/xcuiapplication/1500637-terminate) API. If the app is not installed an exception is thrown. If the app is not running then nothing is done.
95
+ * @param {string} bundleId - The bundle identifier of the application to be terminated
96
+ * @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
78
97
  * @this {XCUITestDriver}
79
98
  */
80
99
  async mobileTerminateApp(bundleId) {
81
- return await this.proxyCommand('/wda/apps/terminate', 'POST', { bundleId });
100
+ return /** @type {boolean} */ (await this.proxyCommand('/wda/apps/terminate', 'POST', { bundleId }));
82
101
  },
83
102
  /**
84
- * @param {string} bundleId
103
+ * Activate the given app on the device under test.
104
+ *
105
+ * This pushes the app to the foreground if it is running in the background. An exception is thrown if the app is not install or isn't running. Nothing is done if the app is already in the foreground.
106
+ *
107
+ * @param {string} bundleId - The bundle identifier of the application to be activated
108
+ * @returns {Promise<void>}
85
109
  * @this {XCUITestDriver}
86
110
  */
87
111
  async mobileActivateApp(bundleId) {
88
- return await this.proxyCommand('/wda/apps/activate', 'POST', { bundleId });
112
+ await this.proxyCommand('/wda/apps/activate', 'POST', { bundleId });
89
113
  },
90
114
  /**
91
- * Kill the given bundle id process via instruments service.
92
- * @see https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
93
- * @param {string} bundleId
94
- * @returns {Promise<boolean>} Returns true if the bundle id process was killed. Otherwise false.
115
+ * Kill the given app on the real device under test by instruments service.
116
+ *
117
+ * If the app is not running or kill failed, then nothing is done.
118
+ *
119
+ * @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
120
+ * @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
121
+ * @see https://github.com/YueChen-C/py-ios-device
122
+ * @param {string} bundleId - The bundle identifier of the application to be killed
123
+ * @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
124
+ * @group Real Device Only
95
125
  * @this {XCUITestDriver}
96
126
  */
97
127
  async mobileKillApp(bundleId) {
@@ -102,16 +132,17 @@ exports.default = {
102
132
  return await this.opts.device.terminateApp(bundleId);
103
133
  },
104
134
  /**
105
- * Returns the current application state
135
+ * Queries the state of an installed application from the device under test.
136
+ *
137
+ * If the app with the given `bundleId` is not installed, an exception will be thrown.
106
138
  *
107
- * @param {string} bundleId - Options set, which must contain `bundleId` property
108
- * @returns {Promise<import('./types').AppState>} The actual application state code. See
109
- * https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
110
- * to get the list of possible values.
139
+ * @param {string} bundleId - The bundle identifier of the application to be queried
140
+ * @returns {Promise<AppState>} The actual application state code
141
+ * @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
111
142
  * @this {XCUITestDriver}
112
143
  */
113
144
  async mobileQueryAppState(bundleId) {
114
- return await this.proxyCommand('/wda/apps/state', 'POST', { bundleId });
145
+ return /** @type {AppState} */ (await this.proxyCommand('/wda/apps/state', 'POST', { bundleId }));
115
146
  },
116
147
  /**
117
148
  * @param {string} appPath
@@ -142,7 +173,7 @@ exports.default = {
142
173
  * @this {XCUITestDriver}
143
174
  */
144
175
  async terminateApp(bundleId) {
145
- return await this.mobileTerminateApp(bundleId);
176
+ await this.mobileTerminateApp(bundleId);
146
177
  },
147
178
  /**
148
179
  * @param {string} bundleId
@@ -154,11 +185,13 @@ exports.default = {
154
185
  /**
155
186
  * List applications installed on the real device under test
156
187
  *
157
- * @param {'User'|'System'} [applicationType='User']
158
- * @returns {Promise<Record<string,any>[]>} A list of apps, where each item is a map where keys are
159
- * bundle identifiers and values are maps of platform-specific app properties.
188
+ * Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
189
+ * @param {'User'|'System'} applicationType - The type of applications to list.
190
+ * @returns {Promise<Record<string,any>[]>} A list of apps where each item is a mapping of bundle identifiers to maps of platform-specific app properties.
191
+ * @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
192
+ * @group Real Device Only
160
193
  */
161
- async mobileListApps(applicationType) {
194
+ async mobileListApps(applicationType = 'User') {
162
195
  if (!this.isRealDevice()) {
163
196
  throw new driver_1.errors.NotImplementedError(`This extension is only supported on real devices`);
164
197
  }
@@ -218,5 +251,6 @@ exports.default = {
218
251
  };
219
252
  /**
220
253
  * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
254
+ * @typedef {import('./enum').AppState} AppState
221
255
  */
222
256
  //# sourceMappingURL=app-management.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,4CAAwC;AACxC,0CAAqC;AACrC,yDAA2C;AAE3C,kBAAe;IACb;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ;QAC7C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAChE,IAAI,CAAC,GAAG,CAAC,IAAI,CACX,eAAe,UAAU,YAAY,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,GAAG;YACvF,uEAAuE;YACvE,cAAc,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CACzC,CAAC;QACF,IAAI,CAAC,CAAC,MAAM,YAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE;YAClC,IAAI,CAAC,GAAG,CAAC,aAAa,CACpB,uBAAuB,UAAU,uCAAuC,CACzE,CAAC;SACH;QACD,uEAAuE;QACvE,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAC/B,UAAU,EACV,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,EACrC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,kBAAkB,CACzC,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,UAAU,aAAa,CAAC,CAAC;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,UAAU,CAAC,cAAc,CAAC,CAAC;gBAC5C,IAAI,QAAQ,IAAI,CAAC,EAAE;oBACjB,MAAM,GAAG,EAAC,QAAQ,EAAC,CAAC;oBACpB,QAAQ,GAAG,aAAa,CAAC;iBAC1B;qBAAM;oBACL,QAAQ,GAAG,UAAU,CAAC;iBACvB;aACF;QACH,CAAC,CAAC;QACF,IAAI,OAAO,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,gBAAC,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;YAChE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;YAChC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;SACzF;aAAM;YACL,cAAc,CAAC,OAAO,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,mDAAmD;gBACjD,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,4BAA4B,CACzD,CAAC;SACH;QACD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,KAAK,UAAU,CAAC,CAAC;IACpF,CAAC;CACF,CAAC;AAEF;;;GAGG"}
@@ -2,14 +2,14 @@ declare namespace _default {
2
2
  /**
3
3
  * Return the language-specific strings for an app
4
4
  *
5
- * @param {string} language - the language to retrieve strings for
6
- * @param {string|null} stringFile - the path to the localized strings file if not in the default location
5
+ * @param {string} language - The language abbreviation to fetch app strings mapping for. If no language is provided then strings for the 'en language would be returned
6
+ * @param {string|null} [stringFile=null] - Relative path to the corresponding .strings file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted, then Appium will make its best guess where the file is.
7
7
  *
8
- * @returns A record of localized keys to localized text
8
+ * @returns {Promise<import('@appium/types').StringRecord<string>>} A record of localized keys to localized text
9
9
  *
10
10
  * @this {XCUITestDriver}
11
11
  */
12
- function getStrings(this: import("../driver").default, language: string, stringFile?: string | null): Promise<{}>;
12
+ function getStrings(this: import("../driver").default, language: string, stringFile?: string | null | undefined): Promise<import("@appium/types").StringRecord<string>>;
13
13
  }
14
14
  export default _default;
15
15
  export type XCUITestDriver = import('../driver').XCUITestDriver;
@@ -1 +1 @@
1
- {"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":";IAGE;;;;;;;;;OASG;IACH,kHASC;;;6BAIU,OAAO,WAAW,EAAE,cAAc"}
1
+ {"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":";IAGE;;;;;;;;;OASG;IACH,wKASC;;;6BAIU,OAAO,WAAW,EAAE,cAAc"}
@@ -5,10 +5,10 @@ exports.default = {
5
5
  /**
6
6
  * Return the language-specific strings for an app
7
7
  *
8
- * @param {string} language - the language to retrieve strings for
9
- * @param {string|null} stringFile - the path to the localized strings file if not in the default location
8
+ * @param {string} language - The language abbreviation to fetch app strings mapping for. If no language is provided then strings for the 'en language would be returned
9
+ * @param {string|null} [stringFile=null] - Relative path to the corresponding .strings file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted, then Appium will make its best guess where the file is.
10
10
  *
11
- * @returns A record of localized keys to localized text
11
+ * @returns {Promise<import('@appium/types').StringRecord<string>>} A record of localized keys to localized text
12
12
  *
13
13
  * @this {XCUITestDriver}
14
14
  */