@limrun/appium-xcuitest-driver 10.4.3-lim.1

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 (444) hide show
  1. package/CHANGELOG.md +2600 -0
  2. package/LICENSE +201 -0
  3. package/README.md +55 -0
  4. package/build/index.d.ts +5 -0
  5. package/build/index.js +41 -0
  6. package/build/lib/app-infos-cache.d.ts +62 -0
  7. package/build/lib/app-infos-cache.d.ts.map +1 -0
  8. package/build/lib/app-infos-cache.js +180 -0
  9. package/build/lib/app-infos-cache.js.map +1 -0
  10. package/build/lib/app-utils.d.ts +89 -0
  11. package/build/lib/app-utils.d.ts.map +1 -0
  12. package/build/lib/app-utils.js +657 -0
  13. package/build/lib/app-utils.js.map +1 -0
  14. package/build/lib/commands/active-app-info.d.ts +9 -0
  15. package/build/lib/commands/active-app-info.d.ts.map +1 -0
  16. package/build/lib/commands/active-app-info.js +14 -0
  17. package/build/lib/commands/active-app-info.js.map +1 -0
  18. package/build/lib/commands/advanced-battery-types.d.ts +444 -0
  19. package/build/lib/commands/advanced-battery-types.d.ts.map +1 -0
  20. package/build/lib/commands/advanced-battery-types.js +8 -0
  21. package/build/lib/commands/advanced-battery-types.js.map +1 -0
  22. package/build/lib/commands/alert.d.ts +45 -0
  23. package/build/lib/commands/alert.d.ts.map +1 -0
  24. package/build/lib/commands/alert.js +87 -0
  25. package/build/lib/commands/alert.js.map +1 -0
  26. package/build/lib/commands/app-management.d.ts +153 -0
  27. package/build/lib/commands/app-management.d.ts.map +1 -0
  28. package/build/lib/commands/app-management.js +323 -0
  29. package/build/lib/commands/app-management.js.map +1 -0
  30. package/build/lib/commands/app-strings.d.ts +16 -0
  31. package/build/lib/commands/app-strings.d.ts.map +1 -0
  32. package/build/lib/commands/app-strings.js +30 -0
  33. package/build/lib/commands/app-strings.js.map +1 -0
  34. package/build/lib/commands/appearance.d.ts +22 -0
  35. package/build/lib/commands/appearance.d.ts.map +1 -0
  36. package/build/lib/commands/appearance.js +74 -0
  37. package/build/lib/commands/appearance.js.map +1 -0
  38. package/build/lib/commands/audit.d.ts +43 -0
  39. package/build/lib/commands/audit.d.ts.map +1 -0
  40. package/build/lib/commands/audit.js +31 -0
  41. package/build/lib/commands/audit.js.map +1 -0
  42. package/build/lib/commands/battery.d.ts +13 -0
  43. package/build/lib/commands/battery.d.ts.map +1 -0
  44. package/build/lib/commands/battery.js +49 -0
  45. package/build/lib/commands/battery.js.map +1 -0
  46. package/build/lib/commands/bidi/constants.d.ts +6 -0
  47. package/build/lib/commands/bidi/constants.d.ts.map +1 -0
  48. package/build/lib/commands/bidi/constants.js +10 -0
  49. package/build/lib/commands/bidi/constants.js.map +1 -0
  50. package/build/lib/commands/bidi/models.d.ts +9 -0
  51. package/build/lib/commands/bidi/models.d.ts.map +1 -0
  52. package/build/lib/commands/bidi/models.js +54 -0
  53. package/build/lib/commands/bidi/models.js.map +1 -0
  54. package/build/lib/commands/bidi/types.d.ts +26 -0
  55. package/build/lib/commands/bidi/types.d.ts.map +1 -0
  56. package/build/lib/commands/bidi/types.js +4 -0
  57. package/build/lib/commands/bidi/types.js.map +1 -0
  58. package/build/lib/commands/biometric.d.ts +32 -0
  59. package/build/lib/commands/biometric.d.ts.map +1 -0
  60. package/build/lib/commands/biometric.js +54 -0
  61. package/build/lib/commands/biometric.js.map +1 -0
  62. package/build/lib/commands/certificate.d.ts +50 -0
  63. package/build/lib/commands/certificate.d.ts.map +1 -0
  64. package/build/lib/commands/certificate.js +454 -0
  65. package/build/lib/commands/certificate.js.map +1 -0
  66. package/build/lib/commands/clipboard.d.ts +21 -0
  67. package/build/lib/commands/clipboard.d.ts.map +1 -0
  68. package/build/lib/commands/clipboard.js +36 -0
  69. package/build/lib/commands/clipboard.js.map +1 -0
  70. package/build/lib/commands/condition.d.ts +102 -0
  71. package/build/lib/commands/condition.d.ts.map +1 -0
  72. package/build/lib/commands/condition.js +146 -0
  73. package/build/lib/commands/condition.js.map +1 -0
  74. package/build/lib/commands/content-size.d.ts +30 -0
  75. package/build/lib/commands/content-size.d.ts.map +1 -0
  76. package/build/lib/commands/content-size.js +67 -0
  77. package/build/lib/commands/content-size.js.map +1 -0
  78. package/build/lib/commands/context.d.ts +191 -0
  79. package/build/lib/commands/context.d.ts.map +1 -0
  80. package/build/lib/commands/context.js +625 -0
  81. package/build/lib/commands/context.js.map +1 -0
  82. package/build/lib/commands/deviceInfo.d.ts +12 -0
  83. package/build/lib/commands/deviceInfo.d.ts.map +1 -0
  84. package/build/lib/commands/deviceInfo.js +25 -0
  85. package/build/lib/commands/deviceInfo.js.map +1 -0
  86. package/build/lib/commands/element.d.ts +108 -0
  87. package/build/lib/commands/element.d.ts.map +1 -0
  88. package/build/lib/commands/element.js +395 -0
  89. package/build/lib/commands/element.js.map +1 -0
  90. package/build/lib/commands/enum.d.ts +105 -0
  91. package/build/lib/commands/enum.d.ts.map +1 -0
  92. package/build/lib/commands/enum.js +113 -0
  93. package/build/lib/commands/enum.js.map +1 -0
  94. package/build/lib/commands/execute.d.ts +33 -0
  95. package/build/lib/commands/execute.d.ts.map +1 -0
  96. package/build/lib/commands/execute.js +142 -0
  97. package/build/lib/commands/execute.js.map +1 -0
  98. package/build/lib/commands/file-movement.d.ts +90 -0
  99. package/build/lib/commands/file-movement.d.ts.map +1 -0
  100. package/build/lib/commands/file-movement.js +477 -0
  101. package/build/lib/commands/file-movement.js.map +1 -0
  102. package/build/lib/commands/find.d.ts +21 -0
  103. package/build/lib/commands/find.d.ts.map +1 -0
  104. package/build/lib/commands/find.js +199 -0
  105. package/build/lib/commands/find.js.map +1 -0
  106. package/build/lib/commands/general.d.ts +137 -0
  107. package/build/lib/commands/general.d.ts.map +1 -0
  108. package/build/lib/commands/general.js +270 -0
  109. package/build/lib/commands/general.js.map +1 -0
  110. package/build/lib/commands/geolocation.d.ts +57 -0
  111. package/build/lib/commands/geolocation.d.ts.map +1 -0
  112. package/build/lib/commands/geolocation.js +58 -0
  113. package/build/lib/commands/geolocation.js.map +1 -0
  114. package/build/lib/commands/gesture.d.ts +283 -0
  115. package/build/lib/commands/gesture.d.ts.map +1 -0
  116. package/build/lib/commands/gesture.js +565 -0
  117. package/build/lib/commands/gesture.js.map +1 -0
  118. package/build/lib/commands/hid-event.d.ts +2773 -0
  119. package/build/lib/commands/hid-event.d.ts.map +1 -0
  120. package/build/lib/commands/hid-event.js +1633 -0
  121. package/build/lib/commands/hid-event.js.map +1 -0
  122. package/build/lib/commands/increase-contrast.d.ts +24 -0
  123. package/build/lib/commands/increase-contrast.d.ts.map +1 -0
  124. package/build/lib/commands/increase-contrast.js +49 -0
  125. package/build/lib/commands/increase-contrast.js.map +1 -0
  126. package/build/lib/commands/iohid.d.ts +1372 -0
  127. package/build/lib/commands/iohid.d.ts.map +1 -0
  128. package/build/lib/commands/iohid.js +63 -0
  129. package/build/lib/commands/iohid.js.map +1 -0
  130. package/build/lib/commands/keyboard.d.ts +32 -0
  131. package/build/lib/commands/keyboard.d.ts.map +1 -0
  132. package/build/lib/commands/keyboard.js +67 -0
  133. package/build/lib/commands/keyboard.js.map +1 -0
  134. package/build/lib/commands/keychains.d.ts +10 -0
  135. package/build/lib/commands/keychains.d.ts.map +1 -0
  136. package/build/lib/commands/keychains.js +22 -0
  137. package/build/lib/commands/keychains.js.map +1 -0
  138. package/build/lib/commands/localization.d.ts +17 -0
  139. package/build/lib/commands/localization.d.ts.map +1 -0
  140. package/build/lib/commands/localization.js +34 -0
  141. package/build/lib/commands/localization.js.map +1 -0
  142. package/build/lib/commands/location.d.ts +40 -0
  143. package/build/lib/commands/location.d.ts.map +1 -0
  144. package/build/lib/commands/location.js +121 -0
  145. package/build/lib/commands/location.js.map +1 -0
  146. package/build/lib/commands/lock.d.ts +23 -0
  147. package/build/lib/commands/lock.d.ts.map +1 -0
  148. package/build/lib/commands/lock.js +49 -0
  149. package/build/lib/commands/lock.js.map +1 -0
  150. package/build/lib/commands/log.d.ts +68 -0
  151. package/build/lib/commands/log.d.ts.map +1 -0
  152. package/build/lib/commands/log.js +287 -0
  153. package/build/lib/commands/log.js.map +1 -0
  154. package/build/lib/commands/memory.d.ts +11 -0
  155. package/build/lib/commands/memory.d.ts.map +1 -0
  156. package/build/lib/commands/memory.js +49 -0
  157. package/build/lib/commands/memory.js.map +1 -0
  158. package/build/lib/commands/navigation.d.ts +44 -0
  159. package/build/lib/commands/navigation.d.ts.map +1 -0
  160. package/build/lib/commands/navigation.js +121 -0
  161. package/build/lib/commands/navigation.js.map +1 -0
  162. package/build/lib/commands/notifications.d.ts +28 -0
  163. package/build/lib/commands/notifications.d.ts.map +1 -0
  164. package/build/lib/commands/notifications.js +64 -0
  165. package/build/lib/commands/notifications.js.map +1 -0
  166. package/build/lib/commands/pasteboard.d.ts +23 -0
  167. package/build/lib/commands/pasteboard.d.ts.map +1 -0
  168. package/build/lib/commands/pasteboard.js +43 -0
  169. package/build/lib/commands/pasteboard.js.map +1 -0
  170. package/build/lib/commands/pcap.d.ts +54 -0
  171. package/build/lib/commands/pcap.d.ts.map +1 -0
  172. package/build/lib/commands/pcap.js +149 -0
  173. package/build/lib/commands/pcap.js.map +1 -0
  174. package/build/lib/commands/performance.d.ts +85 -0
  175. package/build/lib/commands/performance.d.ts.map +1 -0
  176. package/build/lib/commands/performance.js +331 -0
  177. package/build/lib/commands/performance.js.map +1 -0
  178. package/build/lib/commands/permissions.d.ts +36 -0
  179. package/build/lib/commands/permissions.d.ts.map +1 -0
  180. package/build/lib/commands/permissions.js +80 -0
  181. package/build/lib/commands/permissions.js.map +1 -0
  182. package/build/lib/commands/proxy-helper.d.ts +15 -0
  183. package/build/lib/commands/proxy-helper.d.ts.map +1 -0
  184. package/build/lib/commands/proxy-helper.js +117 -0
  185. package/build/lib/commands/proxy-helper.js.map +1 -0
  186. package/build/lib/commands/record-audio.d.ts +69 -0
  187. package/build/lib/commands/record-audio.d.ts.map +1 -0
  188. package/build/lib/commands/record-audio.js +228 -0
  189. package/build/lib/commands/record-audio.js.map +1 -0
  190. package/build/lib/commands/recordscreen.d.ts +89 -0
  191. package/build/lib/commands/recordscreen.d.ts.map +1 -0
  192. package/build/lib/commands/recordscreen.js +326 -0
  193. package/build/lib/commands/recordscreen.js.map +1 -0
  194. package/build/lib/commands/screenshots.d.ts +16 -0
  195. package/build/lib/commands/screenshots.d.ts.map +1 -0
  196. package/build/lib/commands/screenshots.js +129 -0
  197. package/build/lib/commands/screenshots.js.map +1 -0
  198. package/build/lib/commands/simctl.d.ts +27 -0
  199. package/build/lib/commands/simctl.d.ts.map +1 -0
  200. package/build/lib/commands/simctl.js +65 -0
  201. package/build/lib/commands/simctl.js.map +1 -0
  202. package/build/lib/commands/source.d.ts +16 -0
  203. package/build/lib/commands/source.d.ts.map +1 -0
  204. package/build/lib/commands/source.js +128 -0
  205. package/build/lib/commands/source.js.map +1 -0
  206. package/build/lib/commands/timeouts.d.ts +53 -0
  207. package/build/lib/commands/timeouts.d.ts.map +1 -0
  208. package/build/lib/commands/timeouts.js +71 -0
  209. package/build/lib/commands/timeouts.js.map +1 -0
  210. package/build/lib/commands/types.d.ts +539 -0
  211. package/build/lib/commands/types.d.ts.map +1 -0
  212. package/build/lib/commands/types.js +3 -0
  213. package/build/lib/commands/types.js.map +1 -0
  214. package/build/lib/commands/web.d.ts +297 -0
  215. package/build/lib/commands/web.d.ts.map +1 -0
  216. package/build/lib/commands/web.js +1029 -0
  217. package/build/lib/commands/web.js.map +1 -0
  218. package/build/lib/commands/xctest-record-screen.d.ts +92 -0
  219. package/build/lib/commands/xctest-record-screen.d.ts.map +1 -0
  220. package/build/lib/commands/xctest-record-screen.js +193 -0
  221. package/build/lib/commands/xctest-record-screen.js.map +1 -0
  222. package/build/lib/commands/xctest.d.ts +71 -0
  223. package/build/lib/commands/xctest.d.ts.map +1 -0
  224. package/build/lib/commands/xctest.js +257 -0
  225. package/build/lib/commands/xctest.js.map +1 -0
  226. package/build/lib/css-converter.d.ts +10 -0
  227. package/build/lib/css-converter.d.ts.map +1 -0
  228. package/build/lib/css-converter.js +258 -0
  229. package/build/lib/css-converter.js.map +1 -0
  230. package/build/lib/desired-caps.d.ts +506 -0
  231. package/build/lib/desired-caps.d.ts.map +1 -0
  232. package/build/lib/desired-caps.js +400 -0
  233. package/build/lib/desired-caps.js.map +1 -0
  234. package/build/lib/device-connections-factory.d.ts +13 -0
  235. package/build/lib/device-connections-factory.d.ts.map +1 -0
  236. package/build/lib/device-connections-factory.js +244 -0
  237. package/build/lib/device-connections-factory.js.map +1 -0
  238. package/build/lib/device-log/helpers.d.ts +10 -0
  239. package/build/lib/device-log/helpers.d.ts.map +1 -0
  240. package/build/lib/device-log/helpers.js +37 -0
  241. package/build/lib/device-log/helpers.js.map +1 -0
  242. package/build/lib/device-log/ios-crash-log.d.ts +34 -0
  243. package/build/lib/device-log/ios-crash-log.d.ts.map +1 -0
  244. package/build/lib/device-log/ios-crash-log.js +141 -0
  245. package/build/lib/device-log/ios-crash-log.js.map +1 -0
  246. package/build/lib/device-log/ios-device-log.d.ts +19 -0
  247. package/build/lib/device-log/ios-device-log.d.ts.map +1 -0
  248. package/build/lib/device-log/ios-device-log.js +42 -0
  249. package/build/lib/device-log/ios-device-log.js.map +1 -0
  250. package/build/lib/device-log/ios-log.d.ts +24 -0
  251. package/build/lib/device-log/ios-log.d.ts.map +1 -0
  252. package/build/lib/device-log/ios-log.js +50 -0
  253. package/build/lib/device-log/ios-log.js.map +1 -0
  254. package/build/lib/device-log/ios-performance-log.d.ts +18 -0
  255. package/build/lib/device-log/ios-performance-log.d.ts.map +1 -0
  256. package/build/lib/device-log/ios-performance-log.js +43 -0
  257. package/build/lib/device-log/ios-performance-log.js.map +1 -0
  258. package/build/lib/device-log/ios-simulator-log.d.ts +38 -0
  259. package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -0
  260. package/build/lib/device-log/ios-simulator-log.js +184 -0
  261. package/build/lib/device-log/ios-simulator-log.js.map +1 -0
  262. package/build/lib/device-log/line-consuming-log.d.ts +9 -0
  263. package/build/lib/device-log/line-consuming-log.d.ts.map +1 -0
  264. package/build/lib/device-log/line-consuming-log.js +16 -0
  265. package/build/lib/device-log/line-consuming-log.js.map +1 -0
  266. package/build/lib/device-log/safari-console-log.d.ts +67 -0
  267. package/build/lib/device-log/safari-console-log.d.ts.map +1 -0
  268. package/build/lib/device-log/safari-console-log.js +81 -0
  269. package/build/lib/device-log/safari-console-log.js.map +1 -0
  270. package/build/lib/device-log/safari-network-log.d.ts +75 -0
  271. package/build/lib/device-log/safari-network-log.d.ts.map +1 -0
  272. package/build/lib/device-log/safari-network-log.js +47 -0
  273. package/build/lib/device-log/safari-network-log.js.map +1 -0
  274. package/build/lib/doctor/checks.d.ts +3 -0
  275. package/build/lib/doctor/checks.d.ts.map +1 -0
  276. package/build/lib/doctor/checks.js +39 -0
  277. package/build/lib/doctor/checks.js.map +1 -0
  278. package/build/lib/doctor/optional-checks.d.ts +46 -0
  279. package/build/lib/doctor/optional-checks.d.ts.map +1 -0
  280. package/build/lib/doctor/optional-checks.js +129 -0
  281. package/build/lib/doctor/optional-checks.js.map +1 -0
  282. package/build/lib/doctor/required-checks.d.ts +42 -0
  283. package/build/lib/doctor/required-checks.d.ts.map +1 -0
  284. package/build/lib/doctor/required-checks.js +94 -0
  285. package/build/lib/doctor/required-checks.js.map +1 -0
  286. package/build/lib/doctor/utils.d.ts +8 -0
  287. package/build/lib/doctor/utils.d.ts.map +1 -0
  288. package/build/lib/doctor/utils.js +21 -0
  289. package/build/lib/doctor/utils.js.map +1 -0
  290. package/build/lib/driver.d.ts +2429 -0
  291. package/build/lib/driver.d.ts.map +1 -0
  292. package/build/lib/driver.js +1967 -0
  293. package/build/lib/driver.js.map +1 -0
  294. package/build/lib/execute-method-map.d.ts +552 -0
  295. package/build/lib/execute-method-map.d.ts.map +1 -0
  296. package/build/lib/execute-method-map.js +586 -0
  297. package/build/lib/execute-method-map.js.map +1 -0
  298. package/build/lib/ios-fs-helpers.d.ts +75 -0
  299. package/build/lib/ios-fs-helpers.d.ts.map +1 -0
  300. package/build/lib/ios-fs-helpers.js +370 -0
  301. package/build/lib/ios-fs-helpers.js.map +1 -0
  302. package/build/lib/ios-generic-simulators.d.ts +6 -0
  303. package/build/lib/ios-generic-simulators.d.ts.map +1 -0
  304. package/build/lib/ios-generic-simulators.js +14 -0
  305. package/build/lib/ios-generic-simulators.js.map +1 -0
  306. package/build/lib/logger.d.ts +3 -0
  307. package/build/lib/logger.d.ts.map +1 -0
  308. package/build/lib/logger.js +6 -0
  309. package/build/lib/logger.js.map +1 -0
  310. package/build/lib/method-map.d.ts +229 -0
  311. package/build/lib/method-map.d.ts.map +1 -0
  312. package/build/lib/method-map.js +200 -0
  313. package/build/lib/method-map.js.map +1 -0
  314. package/build/lib/real-device-clients/base-device-client.d.ts +22 -0
  315. package/build/lib/real-device-clients/base-device-client.d.ts.map +1 -0
  316. package/build/lib/real-device-clients/base-device-client.js +14 -0
  317. package/build/lib/real-device-clients/base-device-client.js.map +1 -0
  318. package/build/lib/real-device-clients/py-ios-device-client.d.ts +21 -0
  319. package/build/lib/real-device-clients/py-ios-device-client.d.ts.map +1 -0
  320. package/build/lib/real-device-clients/py-ios-device-client.js +125 -0
  321. package/build/lib/real-device-clients/py-ios-device-client.js.map +1 -0
  322. package/build/lib/real-device-management.d.ts +53 -0
  323. package/build/lib/real-device-management.d.ts.map +1 -0
  324. package/build/lib/real-device-management.js +128 -0
  325. package/build/lib/real-device-management.js.map +1 -0
  326. package/build/lib/real-device.d.ts +112 -0
  327. package/build/lib/real-device.d.ts.map +1 -0
  328. package/build/lib/real-device.js +352 -0
  329. package/build/lib/real-device.js.map +1 -0
  330. package/build/lib/simulator-management.d.ts +96 -0
  331. package/build/lib/simulator-management.d.ts.map +1 -0
  332. package/build/lib/simulator-management.js +278 -0
  333. package/build/lib/simulator-management.js.map +1 -0
  334. package/build/lib/stubs.d.ts +3 -0
  335. package/build/lib/stubs.d.ts.map +1 -0
  336. package/build/lib/stubs.js +3 -0
  337. package/build/lib/stubs.js.map +1 -0
  338. package/build/lib/types.d.ts +31 -0
  339. package/build/lib/types.d.ts.map +1 -0
  340. package/build/lib/types.js +3 -0
  341. package/build/lib/types.js.map +1 -0
  342. package/build/lib/utils.d.ts +191 -0
  343. package/build/lib/utils.d.ts.map +1 -0
  344. package/build/lib/utils.js +549 -0
  345. package/build/lib/utils.js.map +1 -0
  346. package/build/lib/xcrun.d.ts +3 -0
  347. package/build/lib/xcrun.d.ts.map +1 -0
  348. package/build/lib/xcrun.js +17 -0
  349. package/build/lib/xcrun.js.map +1 -0
  350. package/index.js +7 -0
  351. package/lib/app-infos-cache.js +187 -0
  352. package/lib/app-utils.js +710 -0
  353. package/lib/commands/active-app-info.js +12 -0
  354. package/lib/commands/advanced-battery-types.ts +454 -0
  355. package/lib/commands/alert.js +88 -0
  356. package/lib/commands/app-management.js +346 -0
  357. package/lib/commands/app-strings.js +30 -0
  358. package/lib/commands/appearance.js +71 -0
  359. package/lib/commands/audit.js +31 -0
  360. package/lib/commands/battery.js +45 -0
  361. package/lib/commands/bidi/constants.ts +6 -0
  362. package/lib/commands/bidi/models.ts +55 -0
  363. package/lib/commands/bidi/types.ts +31 -0
  364. package/lib/commands/biometric.js +53 -0
  365. package/lib/commands/certificate.js +497 -0
  366. package/lib/commands/clipboard.js +35 -0
  367. package/lib/commands/condition.js +155 -0
  368. package/lib/commands/content-size.js +68 -0
  369. package/lib/commands/context.js +705 -0
  370. package/lib/commands/deviceInfo.js +27 -0
  371. package/lib/commands/element.js +423 -0
  372. package/lib/commands/enum.ts +108 -0
  373. package/lib/commands/execute.js +153 -0
  374. package/lib/commands/file-movement.js +510 -0
  375. package/lib/commands/find.js +205 -0
  376. package/lib/commands/general.js +278 -0
  377. package/lib/commands/geolocation.js +56 -0
  378. package/lib/commands/gesture.js +596 -0
  379. package/lib/commands/hid-event.ts +1634 -0
  380. package/lib/commands/increase-contrast.js +50 -0
  381. package/lib/commands/iohid.js +64 -0
  382. package/lib/commands/keyboard.js +62 -0
  383. package/lib/commands/keychains.js +18 -0
  384. package/lib/commands/localization.js +30 -0
  385. package/lib/commands/location.js +131 -0
  386. package/lib/commands/lock.js +46 -0
  387. package/lib/commands/log.js +327 -0
  388. package/lib/commands/memory.js +51 -0
  389. package/lib/commands/navigation.js +125 -0
  390. package/lib/commands/notifications.js +66 -0
  391. package/lib/commands/pasteboard.js +42 -0
  392. package/lib/commands/pcap.js +168 -0
  393. package/lib/commands/performance.js +392 -0
  394. package/lib/commands/permissions.js +85 -0
  395. package/lib/commands/proxy-helper.js +122 -0
  396. package/lib/commands/record-audio.js +264 -0
  397. package/lib/commands/recordscreen.js +391 -0
  398. package/lib/commands/screenshots.js +137 -0
  399. package/lib/commands/simctl.js +71 -0
  400. package/lib/commands/source.js +131 -0
  401. package/lib/commands/timeouts.js +68 -0
  402. package/lib/commands/types.ts +648 -0
  403. package/lib/commands/web.js +1113 -0
  404. package/lib/commands/xctest-record-screen.js +204 -0
  405. package/lib/commands/xctest.js +285 -0
  406. package/lib/css-converter.js +311 -0
  407. package/lib/desired-caps.js +396 -0
  408. package/lib/device-connections-factory.js +269 -0
  409. package/lib/device-log/helpers.ts +40 -0
  410. package/lib/device-log/ios-crash-log.ts +166 -0
  411. package/lib/device-log/ios-device-log.ts +51 -0
  412. package/lib/device-log/ios-log.ts +70 -0
  413. package/lib/device-log/ios-performance-log.ts +50 -0
  414. package/lib/device-log/ios-simulator-log.ts +202 -0
  415. package/lib/device-log/line-consuming-log.ts +16 -0
  416. package/lib/device-log/safari-console-log.ts +117 -0
  417. package/lib/device-log/safari-network-log.ts +120 -0
  418. package/lib/doctor/checks.ts +3 -0
  419. package/lib/doctor/optional-checks.ts +173 -0
  420. package/lib/doctor/required-checks.ts +120 -0
  421. package/lib/doctor/utils.ts +18 -0
  422. package/lib/driver.js +2316 -0
  423. package/lib/execute-method-map.ts +585 -0
  424. package/lib/ios-fs-helpers.js +355 -0
  425. package/lib/ios-generic-simulators.js +11 -0
  426. package/lib/logger.js +5 -0
  427. package/lib/method-map.js +196 -0
  428. package/lib/real-device-clients/base-device-client.ts +34 -0
  429. package/lib/real-device-clients/py-ios-device-client.ts +149 -0
  430. package/lib/real-device-management.js +133 -0
  431. package/lib/real-device.js +347 -0
  432. package/lib/simulator-management.js +324 -0
  433. package/lib/stubs.ts +3 -0
  434. package/lib/types.ts +33 -0
  435. package/lib/utils.js +551 -0
  436. package/lib/xcrun.js +16 -0
  437. package/package.json +175 -0
  438. package/scripts/build-docs.js +56 -0
  439. package/scripts/build-wda.js +42 -0
  440. package/scripts/download-wda-sim.mjs +68 -0
  441. package/scripts/image-mounter.mjs +239 -0
  442. package/scripts/open-wda.mjs +15 -0
  443. package/scripts/tunnel-creation.mjs +359 -0
  444. package/scripts/utils.js +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iohid.d.ts","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,wFALW,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEZ,MAAM,GAAC,MAAM,oBAiBvB;6BAhCyC,aAAa"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mobilePerformIoHidEvent = mobilePerformIoHidEvent;
4
+ const driver_1 = require("appium/driver");
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
+ }
35
+ /**
36
+ * Type guard for {@linkcode HIDUsageEvent}
37
+ * @param {any} value
38
+ * @returns {value is HIDUsageEvent}
39
+ */
40
+ function isHIDUsageEvent(value) {
41
+ if (typeof value === 'string') {
42
+ value = parseInt(value, 10);
43
+ }
44
+ if (Number.isNaN(value) || typeof value !== 'number') {
45
+ return false;
46
+ }
47
+ return value in hid_event_1.HIDUsageEvent;
48
+ }
49
+ /**
50
+ * Type guard for {@linkcode HIDPageEvent}
51
+ * @param {any} value
52
+ * @returns {value is HIDPageEvent}
53
+ **/
54
+ function isHIDPageEvent(value) {
55
+ if (typeof value === 'string') {
56
+ value = parseInt(value, 10);
57
+ }
58
+ if (Number.isNaN(value) || typeof value !== 'number') {
59
+ return false;
60
+ }
61
+ return value in hid_event_1.HIDPageEvent;
62
+ }
63
+ //# sourceMappingURL=iohid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iohid.js","sourceRoot":"","sources":["../../../lib/commands/iohid.js"],"names":[],"mappings":";;AAmBA,0DAcC;AAjCD,0CAAqC;AACrC,2CAAwD;AAExD;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,uBAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe;IACxE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,kDAAkD,CAAC,CAAC;IAC5F,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;IACrD,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,mDAAmD,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC,CAAC;AAC5F,CAAC;AAED;;;;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"}
@@ -0,0 +1,32 @@
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>;
30
+ export type XCUITestDriver = import("../driver").XCUITestDriver;
31
+ export type Key = import("./types").KeyboardKey;
32
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.hideKeyboard = hideKeyboard;
7
+ exports.mobileHideKeyboard = mobileHideKeyboard;
8
+ exports.isKeyboardShown = isKeyboardShown;
9
+ exports.mobileKeys = mobileKeys;
10
+ const lodash_1 = __importDefault(require("lodash"));
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);
37
+ return true;
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
+ }
61
+ /**
62
+ * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
63
+ */
64
+ /**
65
+ * @typedef {import('./types').KeyboardKey} Key
66
+ */
67
+ //# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";;;;;AAMA,oCAKC;AAMD,gDAKC;AAKD,0CAOC;AAgBD,gCAGC;AArDD,oDAAuB;AAEvB;;;GAGG;AACI,KAAK,UAAU,YAAY,CAAC,QAAQ,EAAE,GAAG,YAAY;IAC1D,mCAAmC;IACnC,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;IACzE,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,kBAAkB,CAAC,IAAI,GAAG,EAAE;IAChD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,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"}
@@ -0,0 +1,10 @@
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>;
10
+ //# sourceMappingURL=keychains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keychains.d.ts","sourceRoot":"","sources":["../../../lib/commands/keychains.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,8FAIC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mobileClearKeychains = mobileClearKeychains;
7
+ const lodash_1 = __importDefault(require("lodash"));
8
+ const utils_1 = require("../utils");
9
+ const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Keychain modification');
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
+ }
22
+ //# sourceMappingURL=keychains.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,17 @@
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>;
17
+ //# sourceMappingURL=localization.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.mobileConfigureLocalization = mobileConfigureLocalization;
7
+ const lodash_1 = __importDefault(require("lodash"));
8
+ const utils_1 = require("../utils");
9
+ const assertSimulator = lodash_1.default.partial(utils_1.assertSimulator, 'Localization configuration');
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
+ }
34
+ //# sourceMappingURL=localization.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,40 @@
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>;
37
+ export type XCUITestDriver = import("../driver").XCUITestDriver;
38
+ export type WDALocationInfo = import("./types").WDALocationInfo;
39
+ export type Location = import("@appium/types").Location;
40
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGeoLocation = getGeoLocation;
4
+ exports.setGeoLocation = setGeoLocation;
5
+ exports.mobileResetLocationService = mobileResetLocationService;
6
+ const appium_ios_device_1 = require("appium-ios-device");
7
+ const driver_1 = require("appium/driver");
8
+ const support_1 = require("appium/support");
9
+ const enum_1 = require("./enum");
10
+ const utils_1 = require("../utils");
11
+ /**
12
+ * Returns location of the device under test.
13
+ * The device under test must allow the location services for WDA
14
+ * as 'Always' to get the location data correctly.
15
+ *
16
+ * The 'latitude', 'longitude' and 'altitude' could be zero even
17
+ * if the Location Services are set to 'Always', because the device
18
+ * needs some time to update the location data.
19
+ *
20
+ * For iOS 17, the return value could be the result of
21
+ * "mobile:getSimulatedLocation" if the simulated location has been previously set
22
+ * "mobile:setSimulatedLocation" already.
23
+ *
24
+ * @returns {Promise<import('./types').LocationWithAltitude>}
25
+ * @throws {Error} If the device under test returns an error message.
26
+ * i.e.: tvOS returns unsupported error
27
+ * @this {XCUITestDriver}
28
+ */
29
+ async function getGeoLocation() {
30
+ // Currently we proxy the setGeoLocation to mobile:setSimulatedLocation for iOS 17+.
31
+ // It would be helpful to address to use "mobile:getSimulatedLocation" for iOS 17+.
32
+ if ((0, utils_1.isIos17OrNewer)(this.opts)) {
33
+ const { latitude, longitude } = await this.mobileGetSimulatedLocation();
34
+ if (latitude && longitude) {
35
+ this.log.debug('Returning the geolocation that has been previously set by mobile:setSimulatedLocation. ' +
36
+ 'mobile:resetSimulatedLocation can reset the location configuration.');
37
+ return { latitude, longitude, altitude: 0 };
38
+ }
39
+ this.log.warn(`No location was set by mobile:setSimulatedLocation. Trying to return the location from the device.`);
40
+ }
41
+ // Please do not change the way to get the location here with '/wda/simulatedLocation'
42
+ // endpoint because they could return different value before setting the simulated location.
43
+ // '/wda/device/location' returns current device location information,
44
+ // but '/wda/simulatedLocation' returns `null` values until the WDA process
45
+ // sets a simulated location. After setting the value, both returns the same values.
46
+ const { authorizationStatus, latitude, longitude, altitude } = /** @type {WDALocationInfo} */ (await this.proxyCommand('/wda/device/location', 'GET'));
47
+ // '3' is 'Always' in the privacy
48
+ // https://developer.apple.com/documentation/corelocation/clauthorizationstatus
49
+ if (authorizationStatus !== enum_1.AuthorizationStatus.authorizedAlways) {
50
+ throw this.log.errorWithException(`Location service must be set to 'Always' in order to ` +
51
+ `retrieve the current geolocation data. Please set it up manually via ` +
52
+ `'Settings > Privacy > Location Services -> WebDriverAgentRunner-Runner'. ` +
53
+ `Or please use 'mobile:getSimulatedLocation'/'mobile:setSimulatedLocation' commands ` +
54
+ `to simulate locations instead.`);
55
+ }
56
+ return { latitude, longitude, altitude };
57
+ }
58
+ /**
59
+ * Set location of the device under test.
60
+ *
61
+ * iOS 17+ real device environment will be via "mobile:setSimulatedLocation" as
62
+ * setting simulated location for XCTest session.
63
+ *
64
+ * @param {Partial<Location>} location
65
+ * @this {XCUITestDriver}
66
+ */
67
+ async function setGeoLocation(location) {
68
+ let { latitude, longitude } = location;
69
+ if (!support_1.util.hasValue(latitude) || !support_1.util.hasValue(longitude)) {
70
+ throw new driver_1.errors.InvalidArgumentError(`Both latitude and longitude should be set`);
71
+ }
72
+ if (this.isSimulator()) {
73
+ await /** @type {import('../driver').Simulator} */ (this.device).setGeolocation(`${latitude}`, `${longitude}`);
74
+ return /** @type {Location} */ ({ latitude, longitude, altitude: 0 });
75
+ }
76
+ if ((0, utils_1.isIos17OrNewer)(this.opts)) {
77
+ this.log.info(`Proxying to mobile:setSimulatedLocation method for iOS 17+ platform version`);
78
+ await this.mobileSetSimulatedLocation(latitude, longitude);
79
+ }
80
+ else {
81
+ const service = await appium_ios_device_1.services.startSimulateLocationService(this.opts.udid);
82
+ try {
83
+ service.setLocation(latitude, longitude);
84
+ }
85
+ catch (e) {
86
+ throw this.log.errorWithException(`Can't set the location on device '${this.opts.udid}'. Original error: ${e.message}`);
87
+ }
88
+ finally {
89
+ service.close();
90
+ }
91
+ }
92
+ return /** @type {Location} */ ({ latitude, longitude, altitude: 0 });
93
+ }
94
+ /**
95
+ * Reset the location service on real device.
96
+ * Raises not implemented error for simulator.
97
+ * @throws {Error} If the device is simulator, or 'resetLocation' raises an error.
98
+ * @this {XCUITestDriver}
99
+ */
100
+ async function mobileResetLocationService() {
101
+ if (this.isSimulator()) {
102
+ throw new driver_1.errors.NotImplementedError();
103
+ }
104
+ const service = await appium_ios_device_1.services.startSimulateLocationService(this.opts.udid);
105
+ try {
106
+ service.resetLocation();
107
+ }
108
+ catch (err) {
109
+ throw this.log.errorWithException(`Failed to reset the location on the device on device '${this.opts.udid}'. ` +
110
+ `Original error: ${err.message}`);
111
+ }
112
+ finally {
113
+ service.close();
114
+ }
115
+ }
116
+ /**
117
+ * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
118
+ * @typedef {import('./types').WDALocationInfo} WDALocationInfo
119
+ * @typedef {import('@appium/types').Location} Location
120
+ */
121
+ //# sourceMappingURL=location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.js","sourceRoot":"","sources":["../../../lib/commands/location.js"],"names":[],"mappings":"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"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Lock the device (and optionally unlock the device after a certain amount of time)
3
+ *
4
+ * @param {number|string} [seconds] - the number of seconds after which to unlock the device. Set to `0` or leave empty to require manual unlock (do not automatically unlock).
5
+ * @defaultValue 0
6
+ * @this {XCUITestDriver}
7
+ */
8
+ export function lock(this: import("../driver").XCUITestDriver, seconds?: number | string): Promise<void>;
9
+ /**
10
+ * Unlock the device
11
+ *
12
+ * @this {XCUITestDriver}
13
+ */
14
+ export function unlock(this: import("../driver").XCUITestDriver): Promise<void>;
15
+ /**
16
+ * Determine whether the device is locked
17
+ *
18
+ * @this {XCUITestDriver}
19
+ * @returns {Promise<boolean>} `true` if the device is locked, `false` otherwise
20
+ */
21
+ export function isLocked(this: import("../driver").XCUITestDriver): Promise<boolean>;
22
+ export type XCUITestDriver = import("../driver").XCUITestDriver;
23
+ //# sourceMappingURL=lock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../lib/commands/lock.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,yEAJW,MAAM,GAAC,MAAM,iBAiBvB;AAED;;;;GAIG;AACH,gFAEC;AAED;;;;;GAKG;AACH,oEAFa,OAAO,CAAC,OAAO,CAAC,CAI5B;6BAGY,OAAO,WAAW,EAAE,cAAc"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.lock = lock;
7
+ exports.unlock = unlock;
8
+ exports.isLocked = isLocked;
9
+ const bluebird_1 = __importDefault(require("bluebird"));
10
+ /**
11
+ * Lock the device (and optionally unlock the device after a certain amount of time)
12
+ *
13
+ * @param {number|string} [seconds] - the number of seconds after which to unlock the device. Set to `0` or leave empty to require manual unlock (do not automatically unlock).
14
+ * @defaultValue 0
15
+ * @this {XCUITestDriver}
16
+ */
17
+ async function lock(seconds) {
18
+ await this.proxyCommand('/wda/lock', 'POST');
19
+ if (isNaN(Number(seconds))) {
20
+ return;
21
+ }
22
+ const floatSeconds = parseFloat(String(seconds));
23
+ if (floatSeconds <= 0) {
24
+ return;
25
+ }
26
+ await bluebird_1.default.delay(floatSeconds * 1000);
27
+ await this.proxyCommand('/wda/unlock', 'POST');
28
+ }
29
+ /**
30
+ * Unlock the device
31
+ *
32
+ * @this {XCUITestDriver}
33
+ */
34
+ async function unlock() {
35
+ await this.proxyCommand('/wda/unlock', 'POST');
36
+ }
37
+ /**
38
+ * Determine whether the device is locked
39
+ *
40
+ * @this {XCUITestDriver}
41
+ * @returns {Promise<boolean>} `true` if the device is locked, `false` otherwise
42
+ */
43
+ async function isLocked() {
44
+ return /** @type {boolean} */ (await this.proxyCommand('/wda/locked', 'GET'));
45
+ }
46
+ /**
47
+ * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
48
+ */
49
+ //# sourceMappingURL=lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../lib/commands/lock.js"],"names":[],"mappings":";;;;;AASA,oBAaC;AAOD,wBAEC;AAQD,4BAEC;AAzCD,wDAAyB;AAEzB;;;;;;GAMG;AACI,KAAK,UAAU,IAAI,CAAC,OAAO;IAChC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7C,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACjD,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO;IACT,CAAC;IAED,MAAM,kBAAC,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACnC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,MAAM;IAC1B,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,QAAQ;IAC5B,OAAO,sBAAsB,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC;AAED;;GAEG"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ *
3
+ * @param {XCUITestDriverLogTypes} logType
4
+ * @param {Partial<Record<XCUITestDriverLogTypes,{getLogs(): Promise<any>}>>} [logsContainer]
5
+ * @this {XCUITestDriver}
6
+ */
7
+ export function extractLogs(this: import("../driver").XCUITestDriver, logType: XCUITestDriverLogTypes, logsContainer?: Partial<Record<XCUITestDriverLogTypes, {
8
+ getLogs(): Promise<any>;
9
+ }>>): Promise<any>;
10
+ /**
11
+ * @this {XCUITestDriver}
12
+ */
13
+ export function startLogCapture(this: import("../driver").XCUITestDriver): Promise<boolean>;
14
+ export class startLogCapture {
15
+ logs: import("../driver").DriverLogs;
16
+ }
17
+ /**
18
+ * Starts an iOS system logs broadcast websocket.
19
+ *
20
+ * The websocket listens on the same host and port as Appium. The endpoint created is `/ws/session/:sessionId:/appium/syslog`.
21
+ *
22
+ * If the websocket is already running, this command does nothing.
23
+ *
24
+ * Each connected webcoket listener will receive syslog lines as soon as they are visible to Appium.
25
+ * @see https://appiumpro.com/editions/55-using-mobile-execution-commands-to-continuously-stream-device-logs-with-appium
26
+ * @returns {Promise<void>}
27
+ * @this {XCUITestDriver}
28
+ */
29
+ export function mobileStartLogsBroadcast(this: import("../driver").XCUITestDriver): Promise<void>;
30
+ export class mobileStartLogsBroadcast {
31
+ _syslogWebsocketListener: ((logRecord: {
32
+ message: string;
33
+ }) => void) | null;
34
+ }
35
+ /**
36
+ * Stops the syslog broadcasting wesocket server previously started by `mobile: startLogsBroadcast`.
37
+ * If no websocket server is running, this command does nothing.
38
+ * @this {XCUITestDriver}
39
+ * @returns {Promise<void>}
40
+ */
41
+ export function mobileStopLogsBroadcast(this: import("../driver").XCUITestDriver): Promise<void>;
42
+ /**
43
+ * https://w3c.github.io/webdriver-bidi/#event-log-entryAdded
44
+ *
45
+ * @template {import('node:events').EventEmitter} EE
46
+ * @this {XCUITestDriver}
47
+ * @param {EE} logEmitter
48
+ * @param {BiDiListenerProperties} properties
49
+ * @returns {[EE, import('./types').LogListener]}
50
+ */
51
+ export function assignBiDiLogListener<EE extends import("node:events").EventEmitter>(this: import("../driver").XCUITestDriver, logEmitter: EE, properties: BiDiListenerProperties): [EE, import("./types").LogListener];
52
+ export const supportedLogTypes: import("@appium/types").LogDefRecord;
53
+ export type XCUITestDriver = import("../driver").XCUITestDriver;
54
+ export type XCUITestDriverLogTypes = keyof typeof SUPPORTED_LOG_TYPES;
55
+ export type AppiumServer = import("@appium/types").AppiumServer;
56
+ export type BiDiListenerProperties = {
57
+ type: string;
58
+ srcEventName?: string | undefined;
59
+ context?: string | undefined;
60
+ entryTransformer?: ((x: any) => import("./types").LogEntry) | undefined;
61
+ };
62
+ /**
63
+ * @type {import('@appium/types').LogDefRecord}
64
+ * @privateRemarks The return types for these getters should be specified
65
+ */
66
+ declare const SUPPORTED_LOG_TYPES: import("@appium/types").LogDefRecord;
67
+ export {};
68
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../lib/commands/log.js"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,+EAJW,sBAAsB,kBACtB,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAC;IAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;CAAC,CAAC,CAAC,gBAwB3E;AAED;;GAEG;AACH,4FAqFC;;IApFC,qCAA2B;;AAsF7B;;;;;;;;;;;GAWG;AACH,oFAHa,OAAO,CAAC,IAAI,CAAC,CA8DzB;;IA5BK;;uBAIC;;AA0BP;;;;;GAKG;AACH,mFAFa,OAAO,CAAC,IAAI,CAAC,CAUzB;AAED;;;;;;;;GAQG;AACH,sCANkD,EAAE,SAAvC,OAAQ,aAAa,EAAE,YAAa,wDAEtC,EAAE,cACF,sBAAsB,GACpB,CAAC,EAAE,EAAE,OAAO,SAAS,EAAE,WAAW,CAAC,CAe/C;AAxOD,qEAAqD;6BAwPxC,OAAO,WAAW,EAAE,cAAc;qCAClC,MAAM,OAAO,mBAAmB;2BAChC,OAAO,eAAe,EAAE,YAAY;;UAKnC,MAAM;;;oCAGS,OAAO,SAAS,EAAE,QAAQ;;AA7SvD;;;GAGG;AACH,mCAHU,OAAO,eAAe,EAAE,YAAY,CAkC5C"}