appium-xcuitest-driver 10.2.2 → 10.4.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 (262) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/active-app-info.d.ts +9 -0
  3. package/build/lib/commands/active-app-info.d.ts.map +1 -0
  4. package/build/lib/commands/active-app-info.js +14 -0
  5. package/build/lib/commands/active-app-info.js.map +1 -0
  6. package/build/lib/commands/alert.d.ts +42 -45
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +66 -62
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +150 -153
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +300 -286
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/app-strings.d.ts +14 -17
  15. package/build/lib/commands/app-strings.d.ts.map +1 -1
  16. package/build/lib/commands/app-strings.js +23 -24
  17. package/build/lib/commands/app-strings.js.map +1 -1
  18. package/build/lib/commands/appearance.d.ts +19 -22
  19. package/build/lib/commands/appearance.d.ts.map +1 -1
  20. package/build/lib/commands/appearance.js +56 -56
  21. package/build/lib/commands/appearance.js.map +1 -1
  22. package/build/lib/commands/audit.d.ts +22 -17
  23. package/build/lib/commands/audit.d.ts.map +1 -1
  24. package/build/lib/commands/audit.js +17 -18
  25. package/build/lib/commands/audit.js.map +1 -1
  26. package/build/lib/commands/battery.d.ts +11 -14
  27. package/build/lib/commands/battery.d.ts.map +1 -1
  28. package/build/lib/commands/battery.js +36 -37
  29. package/build/lib/commands/battery.js.map +1 -1
  30. package/build/lib/commands/biometric.d.ts +30 -33
  31. package/build/lib/commands/biometric.d.ts.map +1 -1
  32. package/build/lib/commands/biometric.js +42 -41
  33. package/build/lib/commands/biometric.js.map +1 -1
  34. package/build/lib/commands/certificate.d.ts +48 -45
  35. package/build/lib/commands/certificate.d.ts.map +1 -1
  36. package/build/lib/commands/certificate.js +218 -205
  37. package/build/lib/commands/certificate.js.map +1 -1
  38. package/build/lib/commands/clipboard.d.ts +19 -22
  39. package/build/lib/commands/clipboard.d.ts.map +1 -1
  40. package/build/lib/commands/clipboard.js +30 -30
  41. package/build/lib/commands/clipboard.js.map +1 -1
  42. package/build/lib/commands/condition.d.ts +49 -26
  43. package/build/lib/commands/condition.d.ts.map +1 -1
  44. package/build/lib/commands/condition.js +87 -86
  45. package/build/lib/commands/condition.js.map +1 -1
  46. package/build/lib/commands/content-size.d.ts +26 -29
  47. package/build/lib/commands/content-size.d.ts.map +1 -1
  48. package/build/lib/commands/content-size.js +36 -36
  49. package/build/lib/commands/content-size.js.map +1 -1
  50. package/build/lib/commands/context.d.ts +161 -108
  51. package/build/lib/commands/context.d.ts.map +1 -1
  52. package/build/lib/commands/context.js +530 -517
  53. package/build/lib/commands/context.js.map +1 -1
  54. package/build/lib/commands/deviceInfo.d.ts +9 -12
  55. package/build/lib/commands/deviceInfo.d.ts.map +1 -1
  56. package/build/lib/commands/deviceInfo.js +17 -18
  57. package/build/lib/commands/deviceInfo.js.map +1 -1
  58. package/build/lib/commands/element.d.ts +102 -105
  59. package/build/lib/commands/element.d.ts.map +1 -1
  60. package/build/lib/commands/element.js +337 -323
  61. package/build/lib/commands/element.js.map +1 -1
  62. package/build/lib/commands/execute.d.ts +24 -19
  63. package/build/lib/commands/execute.d.ts.map +1 -1
  64. package/build/lib/commands/execute.js +63 -62
  65. package/build/lib/commands/execute.js.map +1 -1
  66. package/build/lib/commands/file-movement.d.ts +77 -80
  67. package/build/lib/commands/file-movement.d.ts.map +1 -1
  68. package/build/lib/commands/file-movement.js +130 -124
  69. package/build/lib/commands/file-movement.js.map +1 -1
  70. package/build/lib/commands/find.d.ts +18 -21
  71. package/build/lib/commands/find.d.ts.map +1 -1
  72. package/build/lib/commands/find.js +158 -156
  73. package/build/lib/commands/find.js.map +1 -1
  74. package/build/lib/commands/general.d.ts +124 -116
  75. package/build/lib/commands/general.d.ts.map +1 -1
  76. package/build/lib/commands/general.js +248 -232
  77. package/build/lib/commands/general.js.map +1 -1
  78. package/build/lib/commands/geolocation.d.ts +43 -46
  79. package/build/lib/commands/geolocation.d.ts.map +1 -1
  80. package/build/lib/commands/geolocation.js +10 -11
  81. package/build/lib/commands/geolocation.js.map +1 -1
  82. package/build/lib/commands/gesture.d.ts +273 -276
  83. package/build/lib/commands/gesture.d.ts.map +1 -1
  84. package/build/lib/commands/gesture.js +506 -492
  85. package/build/lib/commands/gesture.js.map +1 -1
  86. package/build/lib/commands/increase-contrast.d.ts +20 -23
  87. package/build/lib/commands/increase-contrast.d.ts.map +1 -1
  88. package/build/lib/commands/increase-contrast.js +30 -30
  89. package/build/lib/commands/increase-contrast.js.map +1 -1
  90. package/build/lib/commands/iohid.d.ts +1370 -1373
  91. package/build/lib/commands/iohid.d.ts.map +1 -1
  92. package/build/lib/commands/iohid.js +30 -31
  93. package/build/lib/commands/iohid.js.map +1 -1
  94. package/build/lib/commands/keyboard.d.ts +29 -32
  95. package/build/lib/commands/keyboard.d.ts.map +1 -1
  96. package/build/lib/commands/keyboard.js +53 -51
  97. package/build/lib/commands/keyboard.js.map +1 -1
  98. package/build/lib/commands/keychains.d.ts +9 -12
  99. package/build/lib/commands/keychains.d.ts.map +1 -1
  100. package/build/lib/commands/keychains.js +13 -14
  101. package/build/lib/commands/keychains.js.map +1 -1
  102. package/build/lib/commands/localization.d.ts +16 -19
  103. package/build/lib/commands/localization.d.ts.map +1 -1
  104. package/build/lib/commands/localization.js +25 -26
  105. package/build/lib/commands/localization.js.map +1 -1
  106. package/build/lib/commands/location.d.ts +36 -39
  107. package/build/lib/commands/location.d.ts.map +1 -1
  108. package/build/lib/commands/location.js +99 -98
  109. package/build/lib/commands/location.js.map +1 -1
  110. package/build/lib/commands/lock.d.ts +21 -24
  111. package/build/lib/commands/lock.d.ts.map +1 -1
  112. package/build/lib/commands/lock.js +39 -38
  113. package/build/lib/commands/lock.js.map +1 -1
  114. package/build/lib/commands/log.d.ts +43 -37
  115. package/build/lib/commands/log.d.ts.map +1 -1
  116. package/build/lib/commands/log.js +174 -171
  117. package/build/lib/commands/log.js.map +1 -1
  118. package/build/lib/commands/memory.d.ts +9 -12
  119. package/build/lib/commands/memory.d.ts.map +1 -1
  120. package/build/lib/commands/memory.js +37 -39
  121. package/build/lib/commands/memory.js.map +1 -1
  122. package/build/lib/commands/navigation.d.ts +30 -33
  123. package/build/lib/commands/navigation.d.ts.map +1 -1
  124. package/build/lib/commands/navigation.js +92 -92
  125. package/build/lib/commands/navigation.js.map +1 -1
  126. package/build/lib/commands/notifications.d.ts +26 -29
  127. package/build/lib/commands/notifications.d.ts.map +1 -1
  128. package/build/lib/commands/notifications.js +53 -53
  129. package/build/lib/commands/notifications.js.map +1 -1
  130. package/build/lib/commands/pasteboard.d.ts +21 -24
  131. package/build/lib/commands/pasteboard.d.ts.map +1 -1
  132. package/build/lib/commands/pasteboard.js +37 -37
  133. package/build/lib/commands/pasteboard.js.map +1 -1
  134. package/build/lib/commands/pcap.d.ts +39 -26
  135. package/build/lib/commands/pcap.d.ts.map +1 -1
  136. package/build/lib/commands/pcap.js +81 -81
  137. package/build/lib/commands/pcap.js.map +1 -1
  138. package/build/lib/commands/performance.d.ts +63 -44
  139. package/build/lib/commands/performance.d.ts.map +1 -1
  140. package/build/lib/commands/performance.js +105 -105
  141. package/build/lib/commands/performance.js.map +1 -1
  142. package/build/lib/commands/permissions.d.ts +33 -36
  143. package/build/lib/commands/permissions.d.ts.map +1 -1
  144. package/build/lib/commands/permissions.js +66 -65
  145. package/build/lib/commands/permissions.js.map +1 -1
  146. package/build/lib/commands/proxy-helper.d.ts +12 -15
  147. package/build/lib/commands/proxy-helper.d.ts.map +1 -1
  148. package/build/lib/commands/proxy-helper.js +53 -54
  149. package/build/lib/commands/proxy-helper.js.map +1 -1
  150. package/build/lib/commands/record-audio.d.ts +49 -29
  151. package/build/lib/commands/record-audio.d.ts.map +1 -1
  152. package/build/lib/commands/record-audio.js +100 -104
  153. package/build/lib/commands/record-audio.js.map +1 -1
  154. package/build/lib/commands/recordscreen.d.ts +54 -18
  155. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  156. package/build/lib/commands/recordscreen.js +127 -129
  157. package/build/lib/commands/recordscreen.js.map +1 -1
  158. package/build/lib/commands/screenshots.d.ts +14 -17
  159. package/build/lib/commands/screenshots.d.ts.map +1 -1
  160. package/build/lib/commands/screenshots.js +108 -107
  161. package/build/lib/commands/screenshots.js.map +1 -1
  162. package/build/lib/commands/simctl.d.ts +11 -14
  163. package/build/lib/commands/simctl.d.ts.map +1 -1
  164. package/build/lib/commands/simctl.js +23 -26
  165. package/build/lib/commands/simctl.js.map +1 -1
  166. package/build/lib/commands/source.d.ts +14 -17
  167. package/build/lib/commands/source.d.ts.map +1 -1
  168. package/build/lib/commands/source.js +40 -43
  169. package/build/lib/commands/source.js.map +1 -1
  170. package/build/lib/commands/timeouts.d.ts +44 -33
  171. package/build/lib/commands/timeouts.d.ts.map +1 -1
  172. package/build/lib/commands/timeouts.js +65 -63
  173. package/build/lib/commands/timeouts.js.map +1 -1
  174. package/build/lib/commands/web.d.ts +247 -197
  175. package/build/lib/commands/web.d.ts.map +1 -1
  176. package/build/lib/commands/web.js +815 -786
  177. package/build/lib/commands/web.js.map +1 -1
  178. package/build/lib/commands/xctest-record-screen.d.ts +63 -66
  179. package/build/lib/commands/xctest-record-screen.d.ts.map +1 -1
  180. package/build/lib/commands/xctest-record-screen.js +103 -102
  181. package/build/lib/commands/xctest-record-screen.js.map +1 -1
  182. package/build/lib/commands/xctest.d.ts +55 -51
  183. package/build/lib/commands/xctest.d.ts.map +1 -1
  184. package/build/lib/commands/xctest.js +116 -117
  185. package/build/lib/commands/xctest.js.map +1 -1
  186. package/build/lib/driver.d.ts +278 -1597
  187. package/build/lib/driver.d.ts.map +1 -1
  188. package/build/lib/driver.js +320 -236
  189. package/build/lib/driver.js.map +1 -1
  190. package/build/lib/execute-method-map.d.ts.map +1 -1
  191. package/build/lib/execute-method-map.js +9 -0
  192. package/build/lib/execute-method-map.js.map +1 -1
  193. package/build/lib/real-device.d.ts +1 -1
  194. package/build/lib/real-device.d.ts.map +1 -1
  195. package/build/lib/real-device.js +2 -2
  196. package/build/lib/real-device.js.map +1 -1
  197. package/lib/commands/active-app-info.js +12 -0
  198. package/lib/commands/alert.js +68 -65
  199. package/lib/commands/app-management.js +308 -301
  200. package/lib/commands/app-strings.js +24 -26
  201. package/lib/commands/appearance.js +54 -56
  202. package/lib/commands/audit.js +18 -20
  203. package/lib/commands/battery.js +35 -37
  204. package/lib/commands/biometric.js +44 -46
  205. package/lib/commands/certificate.js +226 -215
  206. package/lib/commands/clipboard.js +30 -32
  207. package/lib/commands/condition.js +98 -100
  208. package/lib/commands/content-size.js +36 -38
  209. package/lib/commands/context.js +495 -490
  210. package/lib/commands/deviceInfo.js +19 -20
  211. package/lib/commands/element.js +367 -357
  212. package/lib/commands/execute.js +72 -72
  213. package/lib/commands/file-movement.js +132 -134
  214. package/lib/commands/find.js +160 -159
  215. package/lib/commands/general.js +238 -231
  216. package/lib/commands/geolocation.js +6 -14
  217. package/lib/commands/gesture.js +525 -515
  218. package/lib/commands/increase-contrast.js +30 -32
  219. package/lib/commands/iohid.js +32 -34
  220. package/lib/commands/keyboard.js +49 -51
  221. package/lib/commands/keychains.js +12 -14
  222. package/lib/commands/localization.js +24 -26
  223. package/lib/commands/location.js +102 -104
  224. package/lib/commands/lock.js +38 -38
  225. package/lib/commands/log.js +197 -198
  226. package/lib/commands/memory.js +40 -43
  227. package/lib/commands/navigation.js +96 -100
  228. package/lib/commands/notifications.js +57 -59
  229. package/lib/commands/pasteboard.js +37 -39
  230. package/lib/commands/pcap.js +84 -86
  231. package/lib/commands/performance.js +132 -133
  232. package/lib/commands/permissions.js +67 -69
  233. package/lib/commands/proxy-helper.js +60 -61
  234. package/lib/commands/record-audio.js +115 -120
  235. package/lib/commands/recordscreen.js +145 -149
  236. package/lib/commands/screenshots.js +116 -116
  237. package/lib/commands/simctl.js +25 -29
  238. package/lib/commands/source.js +42 -46
  239. package/lib/commands/timeouts.js +59 -63
  240. package/lib/commands/web.js +878 -858
  241. package/lib/commands/xctest-record-screen.js +103 -105
  242. package/lib/commands/xctest.js +134 -139
  243. package/lib/driver.js +288 -236
  244. package/lib/execute-method-map.ts +9 -0
  245. package/lib/real-device.js +2 -2
  246. package/npm-shrinkwrap.json +440 -76
  247. package/package.json +2 -1
  248. package/build/lib/commands/activeAppInfo.d.ts +0 -12
  249. package/build/lib/commands/activeAppInfo.d.ts.map +0 -1
  250. package/build/lib/commands/activeAppInfo.js +0 -15
  251. package/build/lib/commands/activeAppInfo.js.map +0 -1
  252. package/build/lib/commands/index.d.ts +0 -96
  253. package/build/lib/commands/index.d.ts.map +0 -1
  254. package/build/lib/commands/index.js +0 -100
  255. package/build/lib/commands/index.js.map +0 -1
  256. package/build/lib/real-device-clients/devicectl.d.ts +0 -204
  257. package/build/lib/real-device-clients/devicectl.d.ts.map +0 -1
  258. package/build/lib/real-device-clients/devicectl.js +0 -264
  259. package/build/lib/real-device-clients/devicectl.js.map +0 -1
  260. package/lib/commands/activeAppInfo.js +0 -14
  261. package/lib/commands/index.js +0 -95
  262. package/lib/real-device-clients/devicectl.js +0 -291
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [10.4.0](https://github.com/appium/appium-xcuitest-driver/compare/v10.3.0...v10.4.0) (2025-11-02)
2
+
3
+ ### Features
4
+
5
+ * Make command exports more straightforward ([#2646](https://github.com/appium/appium-xcuitest-driver/issues/2646)) ([254bc04](https://github.com/appium/appium-xcuitest-driver/commit/254bc0468bba9cee4437286495ba7c0273ddd16e))
6
+
7
+ ## [10.3.0](https://github.com/appium/appium-xcuitest-driver/compare/v10.2.2...v10.3.0) (2025-11-02)
8
+
9
+ ### Features
10
+
11
+ * Switch to devicectl module usage ([#2644](https://github.com/appium/appium-xcuitest-driver/issues/2644)) ([7e7e642](https://github.com/appium/appium-xcuitest-driver/commit/7e7e64263a225e90bf48d1e14b7fd961acba9ede))
12
+
1
13
  ## [10.2.2](https://github.com/appium/appium-xcuitest-driver/compare/v10.2.1...v10.2.2) (2025-10-17)
2
14
 
3
15
  ### Miscellaneous Chores
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Returns information about the active application.
3
+ *
4
+ * @returns {Promise<import('./types').ActiveAppInfo>} Active app information
5
+ * @throws {Error} if an error raised by command
6
+ * @this {import('../driver').XCUITestDriver}
7
+ */
8
+ export function mobileGetActiveAppInfo(this: import("../driver").XCUITestDriver): Promise<import("./types").ActiveAppInfo>;
9
+ //# sourceMappingURL=active-app-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-app-info.d.ts","sourceRoot":"","sources":["../../../lib/commands/active-app-info.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,kFAJa,OAAO,CAAC,OAAO,SAAS,EAAE,aAAa,CAAC,CAQpD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mobileGetActiveAppInfo = mobileGetActiveAppInfo;
4
+ /**
5
+ * Returns information about the active application.
6
+ *
7
+ * @returns {Promise<import('./types').ActiveAppInfo>} Active app information
8
+ * @throws {Error} if an error raised by command
9
+ * @this {import('../driver').XCUITestDriver}
10
+ */
11
+ async function mobileGetActiveAppInfo() {
12
+ return /** @type {import('./types').ActiveAppInfo} */ (await this.proxyCommand('/wda/activeAppInfo', 'GET'));
13
+ }
14
+ //# sourceMappingURL=active-app-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-app-info.js","sourceRoot":"","sources":["../../../lib/commands/active-app-info.js"],"names":[],"mappings":";;AAOA,wDAIC;AAXD;;;;;;GAMG;AACI,KAAK,UAAU,sBAAsB;IAC1C,OAAO,8CAA8C,CAAC,CACpD,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CACrD,CAAC;AACJ,CAAC"}
@@ -1,48 +1,45 @@
1
- declare namespace _default {
2
- /**
3
- * @this {XCUITestDriver}
4
- */
5
- function getAlertText(this: import("../driver").XCUITestDriver): Promise<string | null>;
6
- /**
7
- * @param {string} value
8
- * @this {XCUITestDriver}
9
- * @returns {Promise<void>}
10
- */
11
- function setAlertText(this: import("../driver").XCUITestDriver, value: string): Promise<void>;
12
- /**
13
- * @param { {buttonLabel?: string} } opts
14
- * @returns {Promise<void>}
15
- * @this {XCUITestDriver}
16
- */
17
- function postAcceptAlert(this: import("../driver").XCUITestDriver, opts?: {
18
- buttonLabel?: string;
19
- }): Promise<void>;
20
- /**
21
- * @param { {buttonLabel?: string} } opts
22
- * @returns {Promise<void>}
23
- * @this {XCUITestDriver}
24
- */
25
- function postDismissAlert(this: import("../driver").XCUITestDriver, opts?: {
26
- buttonLabel?: string;
27
- }): Promise<void>;
28
- /**
29
- * @internal
30
- * @this {XCUITestDriver}
31
- * @returns {Promise<string[]>} The list of button labels
32
- */
33
- function getAlertButtons(this: import("../driver").XCUITestDriver): Promise<string[]>;
34
- /**
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.
41
- * @this {XCUITestDriver}
42
- */
43
- function mobileHandleAlert(this: import("../driver").XCUITestDriver, action: AlertAction, buttonLabel?: string): Promise<string[] | void>;
44
- }
45
- export default _default;
1
+ /**
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>}
9
+ */
10
+ export function setAlertText(this: import("../driver").XCUITestDriver, value: string): Promise<void>;
11
+ /**
12
+ * @param { {buttonLabel?: string} } opts
13
+ * @returns {Promise<void>}
14
+ * @this {XCUITestDriver}
15
+ */
16
+ export function postAcceptAlert(this: import("../driver").XCUITestDriver, opts?: {
17
+ buttonLabel?: string;
18
+ }): Promise<void>;
19
+ /**
20
+ * @param { {buttonLabel?: string} } opts
21
+ * @returns {Promise<void>}
22
+ * @this {XCUITestDriver}
23
+ */
24
+ export function postDismissAlert(this: import("../driver").XCUITestDriver, opts?: {
25
+ buttonLabel?: string;
26
+ }): Promise<void>;
27
+ /**
28
+ * @internal
29
+ * @this {XCUITestDriver}
30
+ * @returns {Promise<string[]>} The list of button labels
31
+ */
32
+ export function getAlertButtons(this: import("../driver").XCUITestDriver): Promise<string[]>;
33
+ /**
34
+ * Tries to apply the given action to the currently visible alert.
35
+ *
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.
39
+ * @remarks This should really be separate commands.
40
+ * @this {XCUITestDriver}
41
+ */
42
+ export function mobileHandleAlert(this: import("../driver").XCUITestDriver, action: AlertAction, buttonLabel?: string): Promise<string[] | void>;
46
43
  export type AlertAction = "accept" | "dismiss" | "getButtons";
47
44
  export type XCUITestDriver = import("../driver").XCUITestDriver;
48
45
  //# sourceMappingURL=alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";IAcE;;OAEG;IACH,wFAEC;IACD;;;;OAIG;IACH,uEAJW,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAIzB;IACD;;;;OAIG;IACH,0EAJY;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAC,GACrB,OAAO,CAAC,IAAI,CAAC,CAKzB;IACD;;;;OAIG;IACH,2EAJY;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAC,GACrB,OAAO,CAAC,IAAI,CAAC,CAKzB;IACD;;;;OAIG;IACH,oEAFa,OAAO,CAAC,MAAM,EAAE,CAAC,CAI7B;IACD;;;;;;;;OAQG;IACH,6EANW,WAAW,gBACX,MAAM,GACJ,OAAO,CAAC,MAAM,EAAE,GAAC,IAAI,CAAC,CAkBlC;;;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":"AAAA;;GAEG;AACH,+FAEC;AAED;;;;GAIG;AACH,8EAJW,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;;GAIG;AACH,iFAJY;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAC,GACrB,OAAO,CAAC,IAAI,CAAC,CAKzB;AAED;;;;GAIG;AACH,kFAJY;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAC,GACrB,OAAO,CAAC,IAAI,CAAC,CAKzB;AAED;;;;GAIG;AACH,2EAFa,OAAO,CAAC,MAAM,EAAE,CAAC,CAI7B;AAED;;;;;;;;GAQG;AACH,oFANW,WAAW,gBACX,MAAM,GACJ,OAAO,CAAC,MAAM,EAAE,GAAC,IAAI,CAAC,CAkBlC;0BAgBY,QAAQ,GAAC,SAAS,GAAC,YAAY;6BAI/B,OAAO,WAAW,EAAE,cAAc"}
@@ -1,5 +1,71 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAlertText = getAlertText;
4
+ exports.setAlertText = setAlertText;
5
+ exports.postAcceptAlert = postAcceptAlert;
6
+ exports.postDismissAlert = postDismissAlert;
7
+ exports.getAlertButtons = getAlertButtons;
8
+ exports.mobileHandleAlert = mobileHandleAlert;
9
+ /**
10
+ * @this {XCUITestDriver}
11
+ */
12
+ async function getAlertText() {
13
+ return /** @type {string|null} */ (await this.proxyCommand('/alert/text', 'GET'));
14
+ }
15
+ /**
16
+ * @param {string} value
17
+ * @this {XCUITestDriver}
18
+ * @returns {Promise<void>}
19
+ */
20
+ async function setAlertText(value) {
21
+ await this.proxyCommand('/alert/text', 'POST', { value });
22
+ }
23
+ /**
24
+ * @param { {buttonLabel?: string} } opts
25
+ * @returns {Promise<void>}
26
+ * @this {XCUITestDriver}
27
+ */
28
+ async function postAcceptAlert(opts = {}) {
29
+ await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
30
+ }
31
+ /**
32
+ * @param { {buttonLabel?: string} } opts
33
+ * @returns {Promise<void>}
34
+ * @this {XCUITestDriver}
35
+ */
36
+ async function postDismissAlert(opts = {}) {
37
+ await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
38
+ }
39
+ /**
40
+ * @internal
41
+ * @this {XCUITestDriver}
42
+ * @returns {Promise<string[]>} The list of button labels
43
+ */
44
+ async function getAlertButtons() {
45
+ return /** @type {string[]} */ (await this.proxyCommand('/wda/alert/buttons', 'GET'));
46
+ }
47
+ /**
48
+ * Tries to apply the given action to the currently visible alert.
49
+ *
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
+ * @remarks This should really be separate commands.
54
+ * @this {XCUITestDriver}
55
+ */
56
+ async function mobileHandleAlert(action, buttonLabel) {
57
+ switch (action) {
58
+ case 'accept':
59
+ return await this.postAcceptAlert({ buttonLabel });
60
+ case 'dismiss':
61
+ return await this.postDismissAlert({ buttonLabel });
62
+ case 'getButtons':
63
+ return await this.getAlertButtons();
64
+ default:
65
+ throw new Error(`The 'action' value should be either 'accept', 'dismiss' or 'getButtons'. ` +
66
+ `'${action}' is provided instead.`);
67
+ }
68
+ }
3
69
  /**
4
70
  *
5
71
  * @param { {buttonLabel?: string} } opts
@@ -12,68 +78,6 @@ function toAlertParams(opts = {}) {
12
78
  }
13
79
  return params;
14
80
  }
15
- exports.default = {
16
- /**
17
- * @this {XCUITestDriver}
18
- */
19
- async getAlertText() {
20
- return /** @type {string|null} */ (await this.proxyCommand('/alert/text', 'GET'));
21
- },
22
- /**
23
- * @param {string} value
24
- * @this {XCUITestDriver}
25
- * @returns {Promise<void>}
26
- */
27
- async setAlertText(value) {
28
- await this.proxyCommand('/alert/text', 'POST', { value });
29
- },
30
- /**
31
- * @param { {buttonLabel?: string} } opts
32
- * @returns {Promise<void>}
33
- * @this {XCUITestDriver}
34
- */
35
- async postAcceptAlert(opts = {}) {
36
- await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
37
- },
38
- /**
39
- * @param { {buttonLabel?: string} } opts
40
- * @returns {Promise<void>}
41
- * @this {XCUITestDriver}
42
- */
43
- async postDismissAlert(opts = {}) {
44
- await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
45
- },
46
- /**
47
- * @internal
48
- * @this {XCUITestDriver}
49
- * @returns {Promise<string[]>} The list of button labels
50
- */
51
- async getAlertButtons() {
52
- return /** @type {string[]} */ (await this.proxyCommand('/wda/alert/buttons', 'GET'));
53
- },
54
- /**
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.
61
- * @this {XCUITestDriver}
62
- */
63
- async mobileHandleAlert(action, buttonLabel) {
64
- switch (action) {
65
- case 'accept':
66
- return await this.postAcceptAlert({ buttonLabel });
67
- case 'dismiss':
68
- return await this.postDismissAlert({ buttonLabel });
69
- case 'getButtons':
70
- return await this.getAlertButtons();
71
- default:
72
- throw new Error(`The 'action' value should be either 'accept', 'dismiss' or 'getButtons'. ` +
73
- `'${action}' is provided instead.`);
74
- }
75
- },
76
- };
77
81
  /**
78
82
  * @typedef {'accept'|'dismiss'|'getButtons'} AlertAction
79
83
  */
@@ -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,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,kBAAe;IACb;;OAEG;IACH,KAAK,CAAC,YAAY;QAChB,OAAO,0BAA0B,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IACpF,CAAC;IACD;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,KAAK;QACtB,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC;IAC1D,CAAC;IACD;;;;OAIG;IACH,KAAK,CAAC,eAAe,CAAC,IAAI,GAAG,EAAE;QAC7B,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC;IACD;;;;OAIG;IACH,KAAK,CAAC,gBAAgB,CAAC,IAAI,GAAG,EAAE;QAC9B,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACzE,CAAC;IACD;;;;OAIG;IACH,KAAK,CAAC,eAAe;QACnB,OAAO,uBAAuB,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,CAAC;IACxF,CAAC;IACD;;;;;;;;OAQG;IACH,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW;QACzC,QAAQ,MAAM,EAAE,CAAC;YACf,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;QACN,CAAC;IACH,CAAC;CACF,CAAC;AAEF;;GAEG;AAEH;;GAEG"}
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,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,KAAK;IACtC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe,CAAC,IAAI,GAAG,EAAE;IAC7C,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,gBAAgB,CAAC,IAAI,GAAG,EAAE;IAC9C,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe;IACnC,OAAO,uBAAuB,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,CAAC;AACxF,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,iBAAiB,CAAC,MAAM,EAAE,WAAW;IACzD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;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;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AAEH;;GAEG"}
@@ -1,156 +1,153 @@
1
- declare namespace _default {
2
- /**
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 {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices.
8
- * 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
- * @param {boolean} [checkVersion] - If the application installation follows currently installed application's version status if provided.
10
- * No checking occurs if no this option.
11
- * @privateRemarks Link to capability docs
12
- * @returns {Promise<void>}
13
- * @this {XCUITestDriver}
14
- */
15
- function mobileInstallApp(this: import("../driver").XCUITestDriver, app: string, timeoutMs?: number, checkVersion?: boolean): Promise<void>;
16
- /**
17
- * Checks whether the given application is installed on the device under test.
18
- * Offload app is handled as not installed.
19
- *
20
- * @param {string} bundleId - The bundle identifier of the application to be checked
21
- * @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
22
- * @this {XCUITestDriver}
23
- */
24
- function mobileIsAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
25
- /**
26
- * Removes/uninstalls the given application from the device under test.
27
- * Offload app data could also be removed.
28
- *
29
- * @param {string} bundleId - The bundle identifier of the application to be removed
30
- * @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
31
- * @this {XCUITestDriver}
32
- */
33
- function mobileRemoveApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
34
- /**
35
- * Executes the given app on the device under test.
36
- *
37
- * 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.
38
- * @param {string} bundleId - The bundle identifier of the application to be launched
39
- * @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
40
- * @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
41
- * @returns {Promise<void>}
42
- * @this {XCUITestDriver}
43
- */
44
- function mobileLaunchApp(this: import("../driver").XCUITestDriver, bundleId: string, args?: string | string[], environment?: object): Promise<void>;
45
- /**
46
- * Terminates the given app on the device under test.
47
- *
48
- * 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.
49
- * @param {string} bundleId - The bundle identifier of the application to be terminated
50
- * @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
51
- * @this {XCUITestDriver}
52
- */
53
- function mobileTerminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
54
- /**
55
- * Activate the given app on the device under test.
56
- *
57
- * 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.
58
- *
59
- * @param {string} bundleId - The bundle identifier of the application to be activated
60
- * @returns {Promise<void>}
61
- * @this {XCUITestDriver}
62
- */
63
- function mobileActivateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<void>;
64
- /**
65
- * Kill the given app on the real device under test by instruments service.
66
- *
67
- * If the app is not running or kill failed, then nothing is done.
68
- *
69
- * @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
70
- * @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
71
- * @see https://github.com/YueChen-C/py-ios-device
72
- * @param {string} bundleId - The bundle identifier of the application to be killed
73
- * @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
74
- * @group Real Device Only
75
- * @this {XCUITestDriver}
76
- */
77
- function mobileKillApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
78
- /**
79
- * Queries the state of an installed application from the device under test.
80
- *
81
- * If the app with the given `bundleId` is not installed, an exception will be thrown.
82
- *
83
- * @param {string} bundleId - The bundle identifier of the application to be queried
84
- * @returns {Promise<AppState>} The actual application state code
85
- * @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
86
- * @this {XCUITestDriver}
87
- */
88
- function mobileQueryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<AppState>;
89
- /**
90
- * @param {string} appPath
91
- * @param {object} opts
92
- * @this {XCUITestDriver}
93
- */
94
- function installApp(appPath: string, { timeoutMs, strategy }?: object): Promise<void>;
95
- /**
96
- * @param {string} bundleId
97
- * @param {object} opts
98
- * @this {XCUITestDriver}
99
- */
100
- function activateApp(bundleId: string, opts?: object, ...args: any[]): Promise<void>;
101
- /**
102
- * @param {string} bundleId
103
- * @this {XCUITestDriver}
104
- */
105
- function isAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
106
- /**
107
- * @param {string} bundleId
108
- * @this {XCUITestDriver}
109
- * @returns {Promise<boolean>}
110
- */
111
- function terminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
112
- /**
113
- * @param {string} bundleId
114
- * @this {XCUITestDriver}
115
- */
116
- function queryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<import("./enum").AppState>;
117
- /**
118
- * List applications installed on the real device under test
119
- *
120
- * Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
121
- * @param {'User'|'System'} applicationType - The type of applications to list.
122
- * @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.
123
- * @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
124
- * @group Real Device Only
125
- */
126
- function mobileListApps(applicationType?: "User" | "System"): Promise<Record<string, any>[]>;
127
- /**
128
- * Deletes application data files, so it could start from the clean state next time
129
- * it is launched.
130
- * This API only works on a Simulator.
131
- *
132
- * @param {string} bundleId Application bundle identifier
133
- * @this {XCUITestDriver}
134
- * @returns {Promise<boolean>} true if any files from the app's data container have been deleted
135
- */
136
- function mobileClearApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
137
- /**
138
- * Close app (simulate device home button). It is possible to restore
139
- * the app after the timeout or keep it minimized based on the parameter value.
140
- *
141
- * @param {number|{timeout: number?}} [seconds]
142
- * - any positive number of seconds: come back after X seconds
143
- * - any negative number of seconds or zero: never come back
144
- * - undefined/null: never come back
145
- * - {timeout: 5000}: come back after 5 seconds
146
- * - {timeout: null}, {timeout: -2}: never come back
147
- * @this {XCUITestDriver}
148
- */
149
- function background(this: import("../driver").XCUITestDriver, seconds?: number | {
150
- timeout: number | null;
151
- }): Promise<unknown>;
152
- }
153
- export default _default;
1
+ /**
2
+ * Installs the given application to the device under test.
3
+ *
4
+ * 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.
5
+ * @param {string} app - See docs for `appium:app` capability
6
+ * @param {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices.
7
+ * 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).
8
+ * @param {boolean} [checkVersion] - If the application installation follows currently installed application's version status if provided.
9
+ * No checking occurs if no this option.
10
+ * @privateRemarks Link to capability docs
11
+ * @returns {Promise<void>}
12
+ * @this {XCUITestDriver}
13
+ */
14
+ export function mobileInstallApp(this: import("../driver").XCUITestDriver, app: string, timeoutMs?: number, checkVersion?: boolean): Promise<void>;
15
+ /**
16
+ * Checks whether the given application is installed on the device under test.
17
+ * Offload app is handled as not installed.
18
+ *
19
+ * @param {string} bundleId - The bundle identifier of the application to be checked
20
+ * @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
21
+ * @this {XCUITestDriver}
22
+ */
23
+ export function mobileIsAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
24
+ /**
25
+ * Removes/uninstalls the given application from the device under test.
26
+ * Offload app data could also be removed.
27
+ *
28
+ * @param {string} bundleId - The bundle identifier of the application to be removed
29
+ * @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
30
+ * @this {XCUITestDriver}
31
+ */
32
+ export function mobileRemoveApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
33
+ /**
34
+ * Executes the given app on the device under test.
35
+ *
36
+ * 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.
37
+ * @param {string} bundleId - The bundle identifier of the application to be launched
38
+ * @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
39
+ * @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
40
+ * @returns {Promise<void>}
41
+ * @this {XCUITestDriver}
42
+ */
43
+ export function mobileLaunchApp(this: import("../driver").XCUITestDriver, bundleId: string, args?: string | string[], environment?: object): Promise<void>;
44
+ /**
45
+ * Terminates the given app on the device under test.
46
+ *
47
+ * 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.
48
+ * @param {string} bundleId - The bundle identifier of the application to be terminated
49
+ * @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
50
+ * @this {XCUITestDriver}
51
+ */
52
+ export function mobileTerminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
53
+ /**
54
+ * Activate the given app on the device under test.
55
+ *
56
+ * 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.
57
+ *
58
+ * @param {string} bundleId - The bundle identifier of the application to be activated
59
+ * @returns {Promise<void>}
60
+ * @this {XCUITestDriver}
61
+ */
62
+ export function mobileActivateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<void>;
63
+ /**
64
+ * Kill the given app on the real device under test by instruments service.
65
+ *
66
+ * If the app is not running or kill failed, then nothing is done.
67
+ *
68
+ * @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
69
+ * @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
70
+ * @see https://github.com/YueChen-C/py-ios-device
71
+ * @param {string} bundleId - The bundle identifier of the application to be killed
72
+ * @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
73
+ * @group Real Device Only
74
+ * @this {XCUITestDriver}
75
+ */
76
+ export function mobileKillApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
77
+ /**
78
+ * Queries the state of an installed application from the device under test.
79
+ *
80
+ * If the app with the given `bundleId` is not installed, an exception will be thrown.
81
+ *
82
+ * @param {string} bundleId - The bundle identifier of the application to be queried
83
+ * @returns {Promise<AppState>} The actual application state code
84
+ * @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
85
+ * @this {XCUITestDriver}
86
+ */
87
+ export function mobileQueryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<AppState>;
88
+ /**
89
+ * @param {string} appPath
90
+ * @param {object} opts
91
+ * @this {XCUITestDriver}
92
+ */
93
+ export function installApp(appPath: string, { timeoutMs, strategy }?: object): Promise<void>;
94
+ /**
95
+ * @param {string} bundleId
96
+ * @param {object} opts
97
+ * @this {XCUITestDriver}
98
+ */
99
+ export function activateApp(bundleId: string, opts?: object, ...args: any[]): Promise<any>;
100
+ /**
101
+ * @param {string} bundleId
102
+ * @this {XCUITestDriver}
103
+ */
104
+ export function isAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
105
+ /**
106
+ * @param {string} bundleId
107
+ * @this {XCUITestDriver}
108
+ * @returns {Promise<boolean>}
109
+ */
110
+ export function terminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
111
+ /**
112
+ * @param {string} bundleId
113
+ * @this {XCUITestDriver}
114
+ */
115
+ export function queryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<import("./enum").AppState>;
116
+ /**
117
+ * List applications installed on the real device under test
118
+ *
119
+ * Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
120
+ * @param {'User'|'System'} applicationType - The type of applications to list.
121
+ * @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.
122
+ * @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
123
+ * @group Real Device Only
124
+ */
125
+ export function mobileListApps(applicationType?: "User" | "System"): Promise<Record<string, any>[]>;
126
+ /**
127
+ * Deletes application data files, so it could start from the clean state next time
128
+ * it is launched.
129
+ * This API only works on a Simulator.
130
+ *
131
+ * @param {string} bundleId Application bundle identifier
132
+ * @this {XCUITestDriver}
133
+ * @returns {Promise<boolean>} true if any files from the app's data container have been deleted
134
+ */
135
+ export function mobileClearApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
136
+ /**
137
+ * Close app (simulate device home button). It is possible to restore
138
+ * the app after the timeout or keep it minimized based on the parameter value.
139
+ *
140
+ * @param {number|{timeout: number?}} [seconds]
141
+ * - any positive number of seconds: come back after X seconds
142
+ * - any negative number of seconds or zero: never come back
143
+ * - undefined/null: never come back
144
+ * - {timeout: 5000}: come back after 5 seconds
145
+ * - {timeout: null}, {timeout: -2}: never come back
146
+ * @this {XCUITestDriver}
147
+ */
148
+ export function background(this: import("../driver").XCUITestDriver, seconds?: number | {
149
+ timeout: number | null;
150
+ }): Promise<unknown>;
154
151
  export type XCUITestDriver = import("../driver").XCUITestDriver;
155
152
  export type AppState = import("./enum").AppState;
156
153
  //# sourceMappingURL=app-management.d.ts.map