appium-xcuitest-driver 10.3.0 → 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 (252) hide show
  1. package/CHANGELOG.md +6 -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 -38
  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 +319 -235
  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/lib/commands/active-app-info.js +12 -0
  194. package/lib/commands/alert.js +68 -65
  195. package/lib/commands/app-management.js +308 -301
  196. package/lib/commands/app-strings.js +24 -26
  197. package/lib/commands/appearance.js +54 -56
  198. package/lib/commands/audit.js +18 -20
  199. package/lib/commands/battery.js +35 -37
  200. package/lib/commands/biometric.js +44 -46
  201. package/lib/commands/certificate.js +226 -215
  202. package/lib/commands/clipboard.js +30 -32
  203. package/lib/commands/condition.js +98 -100
  204. package/lib/commands/content-size.js +36 -38
  205. package/lib/commands/context.js +495 -490
  206. package/lib/commands/deviceInfo.js +19 -20
  207. package/lib/commands/element.js +367 -357
  208. package/lib/commands/execute.js +72 -72
  209. package/lib/commands/file-movement.js +132 -134
  210. package/lib/commands/find.js +160 -159
  211. package/lib/commands/general.js +238 -231
  212. package/lib/commands/geolocation.js +6 -14
  213. package/lib/commands/gesture.js +525 -515
  214. package/lib/commands/increase-contrast.js +30 -32
  215. package/lib/commands/iohid.js +32 -34
  216. package/lib/commands/keyboard.js +49 -51
  217. package/lib/commands/keychains.js +12 -14
  218. package/lib/commands/localization.js +24 -26
  219. package/lib/commands/location.js +102 -104
  220. package/lib/commands/lock.js +38 -38
  221. package/lib/commands/log.js +197 -198
  222. package/lib/commands/memory.js +40 -42
  223. package/lib/commands/navigation.js +96 -100
  224. package/lib/commands/notifications.js +57 -59
  225. package/lib/commands/pasteboard.js +37 -39
  226. package/lib/commands/pcap.js +84 -86
  227. package/lib/commands/performance.js +132 -133
  228. package/lib/commands/permissions.js +67 -69
  229. package/lib/commands/proxy-helper.js +60 -61
  230. package/lib/commands/record-audio.js +115 -120
  231. package/lib/commands/recordscreen.js +145 -149
  232. package/lib/commands/screenshots.js +116 -116
  233. package/lib/commands/simctl.js +25 -29
  234. package/lib/commands/source.js +42 -46
  235. package/lib/commands/timeouts.js +59 -63
  236. package/lib/commands/web.js +878 -858
  237. package/lib/commands/xctest-record-screen.js +103 -105
  238. package/lib/commands/xctest.js +134 -139
  239. package/lib/driver.js +287 -235
  240. package/lib/execute-method-map.ts +9 -0
  241. package/npm-shrinkwrap.json +2 -2
  242. package/package.json +1 -1
  243. package/build/lib/commands/activeAppInfo.d.ts +0 -12
  244. package/build/lib/commands/activeAppInfo.d.ts.map +0 -1
  245. package/build/lib/commands/activeAppInfo.js +0 -15
  246. package/build/lib/commands/activeAppInfo.js.map +0 -1
  247. package/build/lib/commands/index.d.ts +0 -96
  248. package/build/lib/commands/index.d.ts.map +0 -1
  249. package/build/lib/commands/index.js +0 -100
  250. package/build/lib/commands/index.js.map +0 -1
  251. package/lib/commands/activeAppInfo.js +0 -14
  252. package/lib/commands/index.js +0 -95
@@ -1 +1 @@
1
- {"version":3,"file":"iohid.d.ts","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":";IAkCE;;;;;;;;;;;;;;;OAeG;IACH,iFALW,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEZ,MAAM,GAAC,MAAM,oBAiBvB;6BAhCyC,aAAa"}
@@ -1,7 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mobilePerformIoHidEvent = mobilePerformIoHidEvent;
3
4
  const driver_1 = require("appium/driver");
4
5
  const hid_event_1 = require("./hid-event");
6
+ /**
7
+ * Emulates triggering of the given low-level IO HID device event.
8
+ *
9
+ * Popular constants:
10
+ * - `kHIDPage_Consumer` = `0x0C`
11
+ * - `kHIDUsage_Csmr_VolumeIncrement` = `0xE9` (Volume Up)
12
+ * - `kHIDUsage_Csmr_VolumeDecrement` = `0xEA` (Volume Down)
13
+ * - `kHIDUsage_Csmr_Menu` = `0x40` (Home)
14
+ * - `kHIDUsage_Csmr_Power` = `0x30` (Power)
15
+ * - `kHIDUsage_Csmr_Snapshot` = `0x65` (Power + Home)
16
+ *
17
+ * @param {HIDPageEvent} page - The event page identifier
18
+ * @param {HIDUsageEvent} usage - The event usage identifier (usages are defined per-page)
19
+ * @param {number|string} durationSeconds - The event duration in float seconds (XCTest uses `0.005` for a single press event)
20
+ * @this {import('../driver').XCUITestDriver}
21
+ */
22
+ async function mobilePerformIoHidEvent(page, usage, durationSeconds) {
23
+ if (!isHIDPageEvent(page)) {
24
+ throw new driver_1.errors.InvalidArgumentError(`'page' argument must be a valid HIDPageEvent identifier`);
25
+ }
26
+ if (!isHIDUsageEvent(usage)) {
27
+ throw new driver_1.errors.InvalidArgumentError(`'usage' must be a valid HIDUsageEvent identifier`);
28
+ }
29
+ const duration = parseFloat(String(durationSeconds));
30
+ if (Number.isNaN(duration)) {
31
+ throw new driver_1.errors.InvalidArgumentError(`'durationSeconds' argument must be a valid number`);
32
+ }
33
+ return await this.proxyCommand('/wda/performIoHidEvent', 'POST', { page, usage, duration });
34
+ }
5
35
  /**
6
36
  * Type guard for {@linkcode HIDUsageEvent}
7
37
  * @param {any} value
@@ -30,35 +60,4 @@ function isHIDPageEvent(value) {
30
60
  }
31
61
  return value in hid_event_1.HIDPageEvent;
32
62
  }
33
- exports.default = {
34
- /**
35
- * Emulates triggering of the given low-level IO HID device event.
36
- *
37
- * Popular constants:
38
- * - `kHIDPage_Consumer` = `0x0C`
39
- * - `kHIDUsage_Csmr_VolumeIncrement` = `0xE9` (Volume Up)
40
- * - `kHIDUsage_Csmr_VolumeDecrement` = `0xEA` (Volume Down)
41
- * - `kHIDUsage_Csmr_Menu` = `0x40` (Home)
42
- * - `kHIDUsage_Csmr_Power` = `0x30` (Power)
43
- * - `kHIDUsage_Csmr_Snapshot` = `0x65` (Power + Home)
44
- *
45
- * @param {HIDPageEvent} page - The event page identifier
46
- * @param {HIDUsageEvent} usage - The event usage identifier (usages are defined per-page)
47
- * @param {number|string} durationSeconds - The event duration in float seconds (XCTest uses `0.005` for a single press event)
48
- * @this {import('../driver').XCUITestDriver}
49
- */
50
- async mobilePerformIoHidEvent(page, usage, durationSeconds) {
51
- if (!isHIDPageEvent(page)) {
52
- throw new driver_1.errors.InvalidArgumentError(`'page' argument must be a valid HIDPageEvent identifier`);
53
- }
54
- if (!isHIDUsageEvent(usage)) {
55
- throw new driver_1.errors.InvalidArgumentError(`'usage' must be a valid HIDUsageEvent identifier`);
56
- }
57
- const duration = parseFloat(String(durationSeconds));
58
- if (Number.isNaN(duration)) {
59
- throw new driver_1.errors.InvalidArgumentError(`'durationSeconds' argument must be a valid number`);
60
- }
61
- return await this.proxyCommand('/wda/performIoHidEvent', 'POST', { page, usage, duration });
62
- },
63
- };
64
63
  //# sourceMappingURL=iohid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"iohid.js","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":";;AAAA,0CAAqC;AACrC,2CAAwD;AAExD;;;;GAIG;AACH,SAAS,eAAe,CAAC,KAAK;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,yBAAa,CAAC;AAChC,CAAC;AAED;;;;IAII;AACJ,SAAS,cAAc,CAAC,KAAK;IAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,wBAAY,CAAC;AAC/B,CAAC;AAED,kBAAe;IACb;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe;QACxD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,yDAAyD,CAC1D,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,kDAAkD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AAS,eAAe,CAAC,KAAK;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,yBAAa,CAAC;AAChC,CAAC;AAED;;;;IAII;AACJ,SAAS,cAAc,CAAC,KAAK;IAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,IAAI,wBAAY,CAAC;AAC/B,CAAC"}
@@ -1,35 +1,32 @@
1
- declare namespace _default {
2
- /**
3
- * @this {XCUITestDriver}
4
- * @deprecated
5
- */
6
- function hideKeyboard(this: import("../driver").XCUITestDriver, strategy: any, ...possibleKeys: any[]): Promise<boolean>;
7
- /**
8
- * @this {XCUITestDriver}
9
- * @param {string[]} keys
10
- */
11
- function mobileHideKeyboard(this: import("../driver").XCUITestDriver, keys?: string[]): Promise<void>;
12
- /**
13
- * @this {XCUITestDriver}
14
- */
15
- function isKeyboardShown(this: import("../driver").XCUITestDriver): Promise<boolean>;
16
- /**
17
- * Send keys to the given element or to the application under test.
18
- * This API is not supported on tvOS
19
- *
20
- * @since Xcode 15/iOS 17
21
- * @this {import('../driver').XCUITestDriver}
22
- * @param {(Key|string)[]} keys Array of keys to type.
23
- * Each item could either be a string, that represents a key itself (see
24
- * https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
25
- * and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
26
- * or a dictionary, if the key should also be entered with modifiers.
27
- * @param {string?} [elementId=null] uuid of the element to send keys to.
28
- * If the element is not provided then the keys will be sent to the current application.
29
- */
30
- function mobileKeys(this: import("../driver").XCUITestDriver, keys: (Key | string)[], elementId?: string | null): Promise<unknown>;
31
- }
32
- export default _default;
1
+ /**
2
+ * @this {XCUITestDriver}
3
+ * @deprecated
4
+ */
5
+ export function hideKeyboard(this: import("../driver").XCUITestDriver, strategy: any, ...possibleKeys: any[]): Promise<boolean>;
6
+ /**
7
+ * @this {XCUITestDriver}
8
+ * @param {string[]} keys
9
+ */
10
+ export function mobileHideKeyboard(this: import("../driver").XCUITestDriver, keys?: string[]): Promise<void>;
11
+ /**
12
+ * @this {XCUITestDriver}
13
+ */
14
+ export function isKeyboardShown(this: import("../driver").XCUITestDriver): Promise<boolean>;
15
+ /**
16
+ * Send keys to the given element or to the application under test.
17
+ * This API is not supported on tvOS
18
+ *
19
+ * @since Xcode 15/iOS 17
20
+ * @this {import('../driver').XCUITestDriver}
21
+ * @param {(Key|string)[]} keys Array of keys to type.
22
+ * Each item could either be a string, that represents a key itself (see
23
+ * https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
24
+ * and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
25
+ * or a dictionary, if the key should also be entered with modifiers.
26
+ * @param {string?} [elementId=null] uuid of the element to send keys to.
27
+ * If the element is not provided then the keys will be sent to the current application.
28
+ */
29
+ export function mobileKeys(this: import("../driver").XCUITestDriver, keys: (Key | string)[], elementId?: string | null): Promise<unknown>;
33
30
  export type XCUITestDriver = import("../driver").XCUITestDriver;
34
31
  export type Key = import("./types").KeyboardKey;
35
32
  //# sourceMappingURL=keyboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";IAGE;;;OAGG;IACH,yHAKC;IAED;;;OAGG;IACH,6EAFW,MAAM,EAAE,iBAOlB;IAED;;OAEG;IACH,qFAOC;IAED;;;;;;;;;;;;;OAaG;IACH,oEARW,CAAC,GAAG,GAAC,MAAM,CAAC,EAAE,cAKd,MAAM,OAAC,oBAMjB;;;6BAIU,OAAO,WAAW,EAAE,cAAc;kBAIlC,OAAO,SAAS,EAAE,WAAW"}
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,gIAKC;AAED;;;GAGG;AACH,oFAFW,MAAM,EAAE,iBAOlB;AAED;;GAEG;AACH,4FAOC;AAED;;;;;;;;;;;;;GAaG;AACH,2EARW,CAAC,GAAG,GAAC,MAAM,CAAC,EAAE,cAKd,MAAM,OAAC,oBAMjB;6BAGY,OAAO,WAAW,EAAE,cAAc;kBAIlC,OAAO,SAAS,EAAE,WAAW"}
@@ -3,59 +3,61 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.hideKeyboard = hideKeyboard;
7
+ exports.mobileHideKeyboard = mobileHideKeyboard;
8
+ exports.isKeyboardShown = isKeyboardShown;
9
+ exports.mobileKeys = mobileKeys;
6
10
  const lodash_1 = __importDefault(require("lodash"));
7
- exports.default = {
8
- /**
9
- * @this {XCUITestDriver}
10
- * @deprecated
11
- */
12
- async hideKeyboard(strategy, ...possibleKeys) {
13
- // last parameter is the session id
14
- const keyNames = lodash_1.default.compact(possibleKeys.slice(0, -1)).map((x) => `${x}`);
15
- await this.mobileHideKeyboard(keyNames);
11
+ /**
12
+ * @this {XCUITestDriver}
13
+ * @deprecated
14
+ */
15
+ async function hideKeyboard(strategy, ...possibleKeys) {
16
+ // last parameter is the session id
17
+ const keyNames = lodash_1.default.compact(possibleKeys.slice(0, -1)).map((x) => `${x}`);
18
+ await this.mobileHideKeyboard(keyNames);
19
+ return true;
20
+ }
21
+ /**
22
+ * @this {XCUITestDriver}
23
+ * @param {string[]} keys
24
+ */
25
+ async function mobileHideKeyboard(keys = []) {
26
+ if (!keys.includes('done')) {
27
+ keys.push('done');
28
+ }
29
+ await this.proxyCommand('/wda/keyboard/dismiss', 'POST', { keyNames: keys });
30
+ }
31
+ /**
32
+ * @this {XCUITestDriver}
33
+ */
34
+ async function isKeyboardShown() {
35
+ try {
36
+ await this.findNativeElementOrElements('class name', 'XCUIElementTypeKeyboard', false);
16
37
  return true;
17
- },
18
- /**
19
- * @this {XCUITestDriver}
20
- * @param {string[]} keys
21
- */
22
- async mobileHideKeyboard(keys = []) {
23
- if (!keys.includes('done')) {
24
- keys.push('done');
25
- }
26
- await this.proxyCommand('/wda/keyboard/dismiss', 'POST', { keyNames: keys });
27
- },
28
- /**
29
- * @this {XCUITestDriver}
30
- */
31
- async isKeyboardShown() {
32
- try {
33
- await this.findNativeElementOrElements('class name', 'XCUIElementTypeKeyboard', false);
34
- return true;
35
- }
36
- catch {
37
- return false;
38
- }
39
- },
40
- /**
41
- * Send keys to the given element or to the application under test.
42
- * This API is not supported on tvOS
43
- *
44
- * @since Xcode 15/iOS 17
45
- * @this {import('../driver').XCUITestDriver}
46
- * @param {(Key|string)[]} keys Array of keys to type.
47
- * Each item could either be a string, that represents a key itself (see
48
- * https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
49
- * and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
50
- * or a dictionary, if the key should also be entered with modifiers.
51
- * @param {string?} [elementId=null] uuid of the element to send keys to.
52
- * If the element is not provided then the keys will be sent to the current application.
53
- */
54
- async mobileKeys(keys, elementId = null) {
55
- const url = `/wda/element/${elementId || 0}/keyboardInput`;
56
- return await this.proxyCommand(url, 'POST', { keys });
57
- },
58
- };
38
+ }
39
+ catch {
40
+ return false;
41
+ }
42
+ }
43
+ /**
44
+ * Send keys to the given element or to the application under test.
45
+ * This API is not supported on tvOS
46
+ *
47
+ * @since Xcode 15/iOS 17
48
+ * @this {import('../driver').XCUITestDriver}
49
+ * @param {(Key|string)[]} keys Array of keys to type.
50
+ * Each item could either be a string, that represents a key itself (see
51
+ * https://developer.apple.com/documentation/xctest/xcuielement/1500604-typekey?language=objc
52
+ * and https://developer.apple.com/documentation/xctest/xcuikeyboardkey?language=objc)
53
+ * or a dictionary, if the key should also be entered with modifiers.
54
+ * @param {string?} [elementId=null] uuid of the element to send keys to.
55
+ * If the element is not provided then the keys will be sent to the current application.
56
+ */
57
+ async function mobileKeys(keys, elementId = null) {
58
+ const url = `/wda/element/${elementId || 0}/keyboardInput`;
59
+ return await this.proxyCommand(url, 'POST', { keys });
60
+ }
59
61
  /**
60
62
  * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
61
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAEvB,kBAAe;IACb;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG,YAAY;QAC1C,mCAAmC;QACnC,MAAM,QAAQ,GAAG,gBAAC,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzE,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,kBAAkB,CAAC,IAAI,GAAG,EAAE;QAChC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpB,CAAC;QACD,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,EA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AC,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,MAAM,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC7E,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,2BAA2B,CAAC,YAAY,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAAC;QACvF,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IACrD,MAAM,GAAG,GAAG,gBAAgB,SAAS,IAAI,CAAC,gBAAgB,CAAC;IAC3D,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AAEH;;GAEG"}
@@ -1,13 +1,10 @@
1
- declare namespace _default {
2
- /**
3
- * Clears keychains on a simulated device.
4
- *
5
- * @throws {Error} If current device is not a Simulator or there was an error
6
- * while clearing keychains.
7
- * @this {import('../driver').XCUITestDriver}
8
- * @group Simulator Only
9
- */
10
- function mobileClearKeychains(this: import("../driver").XCUITestDriver): Promise<void>;
11
- }
12
- export default _default;
1
+ /**
2
+ * Clears keychains on a simulated device.
3
+ *
4
+ * @throws {Error} If current device is not a Simulator or there was an error
5
+ * while clearing keychains.
6
+ * @this {import('../driver').XCUITestDriver}
7
+ * @group Simulator Only
8
+ */
9
+ export function mobileClearKeychains(this: import("../driver").XCUITestDriver): Promise<void>;
13
10
  //# sourceMappingURL=keychains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keychains.d.ts","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":";IAME;;;;;;;OAOG;IACH,uFAIC"}
1
+ {"version":3,"file":"keychains.d.ts","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,8FAIC"}
@@ -3,21 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mobileClearKeychains = mobileClearKeychains;
6
7
  const lodash_1 = __importDefault(require("lodash"));
7
8
  const utils_1 = require("../utils");
8
9
  const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Keychain modification');
9
- exports.default = {
10
- /**
11
- * Clears keychains on a simulated device.
12
- *
13
- * @throws {Error} If current device is not a Simulator or there was an error
14
- * while clearing keychains.
15
- * @this {import('../driver').XCUITestDriver}
16
- * @group Simulator Only
17
- */
18
- async mobileClearKeychains() {
19
- assertSimulator(this);
20
- await /** @type {import('../driver').Simulator} */ (this.device).clearKeychains();
21
- },
22
- };
10
+ /**
11
+ * Clears keychains on a simulated device.
12
+ *
13
+ * @throws {Error} If current device is not a Simulator or there was an error
14
+ * while clearing keychains.
15
+ * @this {import('../driver').XCUITestDriver}
16
+ * @group Simulator Only
17
+ */
18
+ async function mobileClearKeychains() {
19
+ assertSimulator(this);
20
+ await /** @type {import('../driver').Simulator} */ (this.device).clearKeychains();
21
+ }
23
22
  //# sourceMappingURL=keychains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keychains.js","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,uBAAuB,CAAC,CAAC;AAE7E,kBAAe;IACb;;;;;;;OAOG;IACH,KAAK,CAAC,oBAAoB;QACxB,eAAe,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,cAAc,EAAE,CAAC;IACpF,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"keychains.js","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":";;;;;AAaA,oDAIC;AAjBD,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,uBAAuB,CAAC,CAAC;AAE7E;;;;;;;GAOG;AACI,KAAK,UAAU,oBAAoB;IACxC,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,cAAc,EAAE,CAAC;AACpF,CAAC"}
@@ -1,20 +1,17 @@
1
- declare namespace _default {
2
- /**
3
- * Change localization settings on the currently booted simulator
4
- *
5
- * The changed settings are only applied for _newly started_ applications and activities.
6
- * Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
7
- *
8
- * The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
9
- * @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
10
- * @param {import('./types').LanguageOptions} [language] - Language options
11
- * @param {import('./types').LocaleOptions} [locale] - Locale options
12
- * @throws {Error} If there was a failure while setting the preferences
13
- * @returns {Promise<boolean>} `true` if any of settings has been successfully changed
14
- * @group Simulator Only
15
- * @this {import('../driver').XCUITestDriver}
16
- */
17
- function mobileConfigureLocalization(this: import("../driver").XCUITestDriver, keyboard?: import("./types").KeyboardOptions, language?: import("./types").LanguageOptions, locale?: import("./types").LocaleOptions): Promise<boolean>;
18
- }
19
- export default _default;
1
+ /**
2
+ * Change localization settings on the currently booted simulator
3
+ *
4
+ * The changed settings are only applied for _newly started_ applications and activities.
5
+ * Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
6
+ *
7
+ * The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
8
+ * @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
9
+ * @param {import('./types').LanguageOptions} [language] - Language options
10
+ * @param {import('./types').LocaleOptions} [locale] - Locale options
11
+ * @throws {Error} If there was a failure while setting the preferences
12
+ * @returns {Promise<boolean>} `true` if any of settings has been successfully changed
13
+ * @group Simulator Only
14
+ * @this {import('../driver').XCUITestDriver}
15
+ */
16
+ export function mobileConfigureLocalization(this: import("../driver").XCUITestDriver, keyboard?: import("./types").KeyboardOptions, language?: import("./types").LanguageOptions, locale?: import("./types").LocaleOptions): Promise<boolean>;
20
17
  //# sourceMappingURL=localization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":";IAME;;;;;;;;;;;;;;OAcG;IACH,0FARW,OAAO,SAAS,EAAE,eAAe,aACjC,OAAO,SAAS,EAAE,eAAe,WACjC,OAAO,SAAS,EAAE,aAAa,GAE7B,OAAO,CAAC,OAAO,CAAC,CAa5B"}
1
+ {"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,iGARW,OAAO,SAAS,EAAE,eAAe,aACjC,OAAO,SAAS,EAAE,eAAe,WACjC,OAAO,SAAS,EAAE,aAAa,GAE7B,OAAO,CAAC,OAAO,CAAC,CAa5B"}
@@ -3,33 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mobileConfigureLocalization = mobileConfigureLocalization;
6
7
  const lodash_1 = __importDefault(require("lodash"));
7
8
  const utils_1 = require("../utils");
8
9
  const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Localization configuration');
9
- exports.default = {
10
- /**
11
- * Change localization settings on the currently booted simulator
12
- *
13
- * The changed settings are only applied for _newly started_ applications and activities.
14
- * Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
15
- *
16
- * The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
17
- * @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
18
- * @param {import('./types').LanguageOptions} [language] - Language options
19
- * @param {import('./types').LocaleOptions} [locale] - Locale options
20
- * @throws {Error} If there was a failure while setting the preferences
21
- * @returns {Promise<boolean>} `true` if any of settings has been successfully changed
22
- * @group Simulator Only
23
- * @this {import('../driver').XCUITestDriver}
24
- */
25
- async mobileConfigureLocalization(keyboard, language, locale) {
26
- assertSimulator(this);
27
- const localizationOptions = { locale, keyboard };
28
- if (language) {
29
- // Assign skipSyncUiDialogTranslation: true option in order to avoid shutting down the WDA session
30
- localizationOptions.language = Object.assign(language, { skipSyncUiDialogTranslation: true });
31
- }
32
- return await /** @type {import('../driver').Simulator} */ (this.device).configureLocalization(localizationOptions);
33
- },
34
- };
10
+ /**
11
+ * Change localization settings on the currently booted simulator
12
+ *
13
+ * The changed settings are only applied for _newly started_ applications and activities.
14
+ * Currently running applications will be unchanged. This means, for example, that the keyboard should be hidden and shown again in order to observe the changed layout, and corresponding apps must be restarted in order to observe their interface using the newly set locale/language.
15
+ *
16
+ * The driver performs no strict checking of the arguments (such as locale names). Be aware that an incorrect or invalid string may cause unexpected behavior.
17
+ * @param {import('./types').KeyboardOptions} [keyboard] - Keyboard options
18
+ * @param {import('./types').LanguageOptions} [language] - Language options
19
+ * @param {import('./types').LocaleOptions} [locale] - Locale options
20
+ * @throws {Error} If there was a failure while setting the preferences
21
+ * @returns {Promise<boolean>} `true` if any of settings has been successfully changed
22
+ * @group Simulator Only
23
+ * @this {import('../driver').XCUITestDriver}
24
+ */
25
+ async function mobileConfigureLocalization(keyboard, language, locale) {
26
+ assertSimulator(this);
27
+ const localizationOptions = { locale, keyboard };
28
+ if (language) {
29
+ // Assign skipSyncUiDialogTranslation: true option in order to avoid shutting down the WDA session
30
+ localizationOptions.language = Object.assign(language, { skipSyncUiDialogTranslation: true });
31
+ }
32
+ return await /** @type {import('../driver').Simulator} */ (this.device).configureLocalization(localizationOptions);
33
+ }
35
34
  //# sourceMappingURL=localization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,4BAA4B,CAAC,CAAC;AAElF,kBAAe;IACb;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM;QAC1D,eAAe,CAAC,IAAI,CAAC,CAAC;QAEtB,MAAM,mBAAmB,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC;QAC/C,IAAI,QAAQ,EAAE,CAAC;YACb,kGAAkG;YAClG,mBAAmB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAC,2BAA2B,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;IACrH,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"localization.js","sourceRoot":"","sources":["../../../lib/commands/localization.js"],"names":[],"mappings":";;;;;AAoBA,kEASC;AA7BD,oDAAuB;AACvB,oCAA6D;AAE7D,MAAM,eAAe,GAAG,gBAAC,CAAC,OAAO,CAAC,uBAAgB,EAAE,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM;IAC1E,eAAe,CAAC,IAAI,CAAC,CAAC;IAEtB,MAAM,mBAAmB,GAAG,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC;IAC/C,IAAI,QAAQ,EAAE,CAAC;QACb,kGAAkG;QAClG,mBAAmB,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAC,2BAA2B,EAAE,IAAI,EAAC,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;AACrH,CAAC"}
@@ -1,42 +1,39 @@
1
- declare namespace _default {
2
- /**
3
- * Returns location of the device under test.
4
- * The device under test must allow the location services for WDA
5
- * as 'Always' to get the location data correctly.
6
- *
7
- * The 'latitude', 'longitude' and 'altitude' could be zero even
8
- * if the Location Services are set to 'Always', because the device
9
- * needs some time to update the location data.
10
- *
11
- * For iOS 17, the return value could be the result of
12
- * "mobile:getSimulatedLocation" if the simulated location has been previously set
13
- * "mobile:setSimulatedLocation" already.
14
- *
15
- * @returns {Promise<import('./types').LocationWithAltitude>}
16
- * @throws {Error} If the device under test returns an error message.
17
- * i.e.: tvOS returns unsupported error
18
- * @this {XCUITestDriver}
19
- */
20
- function getGeoLocation(this: import("../driver").XCUITestDriver): Promise<import("./types").LocationWithAltitude>;
21
- /**
22
- * Set location of the device under test.
23
- *
24
- * iOS 17+ real device environment will be via "mobile:setSimulatedLocation" as
25
- * setting simulated location for XCTest session.
26
- *
27
- * @param {Partial<Location>} location
28
- * @this {XCUITestDriver}
29
- */
30
- function setGeoLocation(this: import("../driver").XCUITestDriver, location: Partial<Location>): Promise<import("@appium/types").Location>;
31
- /**
32
- * Reset the location service on real device.
33
- * Raises not implemented error for simulator.
34
- * @throws {Error} If the device is simulator, or 'resetLocation' raises an error.
35
- * @this {XCUITestDriver}
36
- */
37
- function mobileResetLocationService(this: import("../driver").XCUITestDriver): Promise<void>;
38
- }
39
- export default _default;
1
+ /**
2
+ * Returns location of the device under test.
3
+ * The device under test must allow the location services for WDA
4
+ * as 'Always' to get the location data correctly.
5
+ *
6
+ * The 'latitude', 'longitude' and 'altitude' could be zero even
7
+ * if the Location Services are set to 'Always', because the device
8
+ * needs some time to update the location data.
9
+ *
10
+ * For iOS 17, the return value could be the result of
11
+ * "mobile:getSimulatedLocation" if the simulated location has been previously set
12
+ * "mobile:setSimulatedLocation" already.
13
+ *
14
+ * @returns {Promise<import('./types').LocationWithAltitude>}
15
+ * @throws {Error} If the device under test returns an error message.
16
+ * i.e.: tvOS returns unsupported error
17
+ * @this {XCUITestDriver}
18
+ */
19
+ export function getGeoLocation(this: import("../driver").XCUITestDriver): Promise<import("./types").LocationWithAltitude>;
20
+ /**
21
+ * Set location of the device under test.
22
+ *
23
+ * iOS 17+ real device environment will be via "mobile:setSimulatedLocation" as
24
+ * setting simulated location for XCTest session.
25
+ *
26
+ * @param {Partial<Location>} location
27
+ * @this {XCUITestDriver}
28
+ */
29
+ export function setGeoLocation(this: import("../driver").XCUITestDriver, location: Partial<Location>): Promise<import("@appium/types").Location>;
30
+ /**
31
+ * Reset the location service on real device.
32
+ * Raises not implemented error for simulator.
33
+ * @throws {Error} If the device is simulator, or 'resetLocation' raises an error.
34
+ * @this {XCUITestDriver}
35
+ */
36
+ export function mobileResetLocationService(this: import("../driver").XCUITestDriver): Promise<void>;
40
37
  export type XCUITestDriver = import("../driver").XCUITestDriver;
41
38
  export type WDALocationInfo = import("./types").WDALocationInfo;
42
39
  export type Location = import("@appium/types").Location;
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":";IAOE;;;;;;;;;;;;;;;;;OAiBG;IACH,mEALa,OAAO,CAAC,OAAO,SAAS,EAAE,oBAAoB,CAAC,CAyC3D;IAED;;;;;;;;OAQG;IACH,4EAHW,OAAO,CAAC,QAAQ,CAAC,6CAgC3B;IAED;;;;;OAKG;IACH,6FAgBC;;;6BAIU,OAAO,WAAW,EAAE,cAAc;8BAClC,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,eAAe,EAAE,QAAQ"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,0EALa,OAAO,CAAC,OAAO,SAAS,EAAE,oBAAoB,CAAC,CAyC3D;AAED;;;;;;;;GAQG;AACH,mFAHW,OAAO,CAAC,QAAQ,CAAC,6CAgC3B;AAED;;;;;GAKG;AACH,oGAgBC;6BAGY,OAAO,WAAW,EAAE,cAAc;8BAClC,OAAO,SAAS,EAAE,eAAe;uBACjC,OAAO,eAAe,EAAE,QAAQ"}