@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,549 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.DEFAULT_TIMEOUT_KEY = exports.getDriverInfo = exports.NATIVE_WIN = exports.UDID_AUTO = void 0;
40
+ exports.removeAllSessionWebSocketHandlers = removeAllSessionWebSocketHandlers;
41
+ exports.assertSimulator = assertSimulator;
42
+ exports.isTvOs = isTvOs;
43
+ exports.normalizePlatformName = normalizePlatformName;
44
+ exports.shouldSetInitialSafariUrl = shouldSetInitialSafariUrl;
45
+ exports.isIos17OrNewer = isIos17OrNewer;
46
+ exports.isIos18OrNewer = isIos18OrNewer;
47
+ exports.getAndCheckXcodeVersion = getAndCheckXcodeVersion;
48
+ exports.getAndCheckIosSdkVersion = getAndCheckIosSdkVersion;
49
+ exports.checkAppPresent = checkAppPresent;
50
+ exports.clearSystemFiles = clearSystemFiles;
51
+ exports.translateDeviceName = translateDeviceName;
52
+ exports.normalizeCommandTimeouts = normalizeCommandTimeouts;
53
+ exports.markSystemFilesForCleanup = markSystemFilesForCleanup;
54
+ exports.printUser = printUser;
55
+ exports.getPIDsListeningOnPort = getPIDsListeningOnPort;
56
+ exports.encodeBase64OrUpload = encodeBase64OrUpload;
57
+ exports.isLocalHost = isLocalHost;
58
+ exports.normalizePlatformVersion = normalizePlatformVersion;
59
+ exports.clearLogs = clearLogs;
60
+ exports.requireArgs = requireArgs;
61
+ const xcode = __importStar(require("@limrun/appium-xcode"));
62
+ const driver_1 = require("appium/driver");
63
+ const support_1 = require("appium/support");
64
+ const bluebird_1 = __importDefault(require("bluebird"));
65
+ const lodash_1 = __importDefault(require("lodash"));
66
+ const node_os_1 = __importDefault(require("node:os"));
67
+ const node_path_1 = __importDefault(require("node:path"));
68
+ const node_url_1 = __importDefault(require("node:url"));
69
+ const semver = __importStar(require("semver"));
70
+ const teen_process_1 = require("teen_process");
71
+ const ios_generic_simulators_1 = __importDefault(require("./ios-generic-simulators"));
72
+ const logger_1 = __importDefault(require("./logger"));
73
+ const desired_caps_1 = require("./desired-caps");
74
+ exports.UDID_AUTO = 'auto';
75
+ const MODULE_NAME = 'appium-xcuitest-driver';
76
+ const DEFAULT_TIMEOUT_KEY = 'default';
77
+ exports.DEFAULT_TIMEOUT_KEY = DEFAULT_TIMEOUT_KEY;
78
+ const XCTEST_LOG_FILES_PATTERNS = [
79
+ /^Session-WebDriverAgentRunner.*\.log$/i,
80
+ /^StandardOutputAndStandardError\.txt$/i,
81
+ ];
82
+ const XCTEST_LOGS_CACHE_FOLDER_PREFIX = 'com.apple.dt.XCTest';
83
+ exports.NATIVE_WIN = 'NATIVE_APP';
84
+ /**
85
+ * @privateRemarks Is the minimum version really Xcode 7.3?
86
+ * @returns {Promise<XcodeVersion>}
87
+ */
88
+ async function getAndCheckXcodeVersion() {
89
+ /** @type {XcodeVersion} */
90
+ let version;
91
+ try {
92
+ version = /** @type {XcodeVersion} */ (await xcode.getVersion(true));
93
+ }
94
+ catch (err) {
95
+ logger_1.default.error(err);
96
+ throw new Error(`Could not determine Xcode version: ${err.message}`);
97
+ }
98
+ // we do not support Xcodes < 7.3,
99
+ if (version.versionFloat < 7.3) {
100
+ const msg = `Xcode ${version.versionString} is not supported. Please upgrade to version 7.3 or higher`;
101
+ logger_1.default.error(msg);
102
+ throw new Error(msg);
103
+ }
104
+ return version;
105
+ }
106
+ /**
107
+ * @returns {Promise<string|null>}
108
+ */
109
+ async function getAndCheckIosSdkVersion() {
110
+ try {
111
+ return '26';
112
+ return await xcode.getMaxIOSSDK();
113
+ }
114
+ catch (err) {
115
+ throw logger_1.default.errorWithException(`Could not determine iOS SDK version: ${err.message}`);
116
+ }
117
+ }
118
+ /**
119
+ * Get the generic simulator for a given IOS version and device type (iPhone, iPad)
120
+ *
121
+ * @param {string|number} platformVersion IOS version. e.g.) 13.0
122
+ * @param {string} deviceName Type of IOS device. Can be iPhone, iPad (possibly more in the future)
123
+ *
124
+ * @returns {string?} Generic iPhone or iPad simulator (if applicable)
125
+ */
126
+ function getGenericSimulatorForIosVersion(platformVersion, deviceName) {
127
+ const genericSimulators = ios_generic_simulators_1.default[deviceName];
128
+ if (!genericSimulators) {
129
+ return null;
130
+ }
131
+ // Find the highest iOS version in the list that is below the provided version
132
+ let result = null;
133
+ const compareVersions = ([simOne], [simTwo]) => support_1.util.compareVersions(simOne, '<', simTwo) ? -1 : 1;
134
+ for (const [platformVersionFromList, iosSimulator] of genericSimulators.sort(compareVersions)) {
135
+ if (support_1.util.compareVersions(platformVersionFromList, '>', String(platformVersion))) {
136
+ break;
137
+ }
138
+ result = iosSimulator;
139
+ }
140
+ return result;
141
+ }
142
+ /**
143
+ *
144
+ * @param {string} platformVersion
145
+ * @param {string} deviceName
146
+ * @returns {string}
147
+ */
148
+ function translateDeviceName(platformVersion, deviceName) {
149
+ if (!deviceName) {
150
+ return deviceName;
151
+ }
152
+ const deviceNameTranslated = getGenericSimulatorForIosVersion(platformVersion, `${deviceName}`.toLowerCase().trim());
153
+ if (!deviceNameTranslated) {
154
+ return deviceName;
155
+ }
156
+ logger_1.default.debug(`Changing deviceName from '${deviceName}' to '${deviceNameTranslated}'`);
157
+ return deviceNameTranslated;
158
+ }
159
+ /**
160
+ * @param {string[]} locations
161
+ * @returns {Promise<void>}
162
+ */
163
+ async function clearLogs(locations) {
164
+ logger_1.default.debug('Clearing log files');
165
+ const cleanupPromises = [];
166
+ for (const location of locations) {
167
+ if (!(await support_1.fs.exists(location))) {
168
+ continue;
169
+ }
170
+ cleanupPromises.push((async () => {
171
+ let size;
172
+ try {
173
+ const { stdout } = await (0, teen_process_1.exec)('du', ['-sh', location]);
174
+ size = stdout.trim().split(/\s+/)[0];
175
+ }
176
+ catch { }
177
+ try {
178
+ logger_1.default.debug(`Deleting '${location}'. ${size ? `Freeing ${size}.` : ''}`);
179
+ await support_1.fs.rimraf(location);
180
+ }
181
+ catch (err) {
182
+ logger_1.default.warn(`Unable to delete '${location}': ${err.message}`);
183
+ }
184
+ })());
185
+ }
186
+ if (!lodash_1.default.isEmpty(cleanupPromises)) {
187
+ await bluebird_1.default.all(cleanupPromises);
188
+ }
189
+ logger_1.default.debug('Finished clearing log files');
190
+ }
191
+ // This map contains derived data logs folders as keys
192
+ // and values are the count of times the particular
193
+ // folder has been scheduled for removal
194
+ const derivedDataCleanupMarkers = new Map();
195
+ async function markSystemFilesForCleanup(wda) {
196
+ if (!wda || !(await wda.retrieveDerivedDataPath())) {
197
+ logger_1.default.warn('No WebDriverAgent derived data available, so unable to mark system files for cleanup');
198
+ return;
199
+ }
200
+ const logsRoot = node_path_1.default.resolve(await wda.retrieveDerivedDataPath(), 'Logs');
201
+ let markersCount = 0;
202
+ if (derivedDataCleanupMarkers.has(logsRoot)) {
203
+ markersCount = derivedDataCleanupMarkers.get(logsRoot);
204
+ }
205
+ derivedDataCleanupMarkers.set(logsRoot, ++markersCount);
206
+ }
207
+ async function clearSystemFiles(wda) {
208
+ // only want to clear the system files for the particular WDA xcode run
209
+ if (!wda || !(await wda.retrieveDerivedDataPath())) {
210
+ logger_1.default.warn('No WebDriverAgent derived data available, so unable to clear system files');
211
+ return;
212
+ }
213
+ const logsRoot = node_path_1.default.resolve(await wda.retrieveDerivedDataPath(), 'Logs');
214
+ if (derivedDataCleanupMarkers.has(logsRoot)) {
215
+ let markersCount = derivedDataCleanupMarkers.get(logsRoot);
216
+ derivedDataCleanupMarkers.set(logsRoot, --markersCount);
217
+ if (markersCount > 0) {
218
+ logger_1.default.info(`Not cleaning '${logsRoot}' folder, because the other session does not expect it to be cleaned`);
219
+ return;
220
+ }
221
+ }
222
+ derivedDataCleanupMarkers.set(logsRoot, 0);
223
+ // Cleaning up big temporary files created by XCTest: https://github.com/appium/appium/issues/9410
224
+ const globPattern = `${node_os_1.default.tmpdir()}/${XCTEST_LOGS_CACHE_FOLDER_PREFIX}*/`;
225
+ const dstFolders = await support_1.fs.glob(globPattern);
226
+ if (lodash_1.default.isEmpty(dstFolders)) {
227
+ logger_1.default.debug(`Did not find the temporary XCTest logs root at '${globPattern}'`);
228
+ }
229
+ else {
230
+ // perform the cleanup asynchronously
231
+ /** @type {Promise[]} */
232
+ const promises = [];
233
+ for (const dstFolder of dstFolders) {
234
+ const promise = (async () => {
235
+ try {
236
+ await support_1.fs.walkDir(dstFolder, true, (itemPath, isDir) => {
237
+ if (isDir) {
238
+ return;
239
+ }
240
+ const fileName = node_path_1.default.basename(itemPath);
241
+ if (XCTEST_LOG_FILES_PATTERNS.some((p) => p.test(fileName))) {
242
+ support_1.fs.rimraf(itemPath);
243
+ }
244
+ });
245
+ }
246
+ catch (e) {
247
+ logger_1.default.debug(e.stack);
248
+ logger_1.default.info(e.message);
249
+ }
250
+ })();
251
+ promises.push(promise);
252
+ }
253
+ logger_1.default.debug(`Started XCTest logs cleanup in '${dstFolders}'`);
254
+ if (promises.length) {
255
+ await bluebird_1.default.all(promises);
256
+ }
257
+ }
258
+ if (await support_1.fs.exists(logsRoot)) {
259
+ logger_1.default.info(`Cleaning test logs in '${logsRoot}' folder`);
260
+ await clearLogs([logsRoot]);
261
+ return;
262
+ }
263
+ logger_1.default.info(`There is no ${logsRoot} folder, so not cleaning files`);
264
+ }
265
+ async function checkAppPresent(app) {
266
+ logger_1.default.debug(`Checking whether app '${app}' is actually present on file system`);
267
+ if (!(await support_1.fs.exists(app))) {
268
+ throw logger_1.default.errorWithException(`Could not find app at '${app}'`);
269
+ }
270
+ logger_1.default.debug('App is present');
271
+ }
272
+ /**
273
+ * Reads the content to the current module's package.json
274
+ *
275
+ * @returns {Promise<Record<string, any>>} The full path to module root
276
+ * @throws {Error} If the current module's package.json cannot be determined
277
+ */
278
+ const getModuleManifest = lodash_1.default.memoize(async function getModuleManifest() {
279
+ let currentDir = node_path_1.default.dirname(node_path_1.default.resolve(__filename));
280
+ let isAtFsRoot = false;
281
+ while (!isAtFsRoot) {
282
+ const manifestPath = node_path_1.default.join(currentDir, 'package.json');
283
+ try {
284
+ if (await support_1.fs.exists(manifestPath)) {
285
+ const manifest = JSON.parse(await support_1.fs.readFile(manifestPath, 'utf8'));
286
+ if (manifest.name === MODULE_NAME) {
287
+ return manifest;
288
+ }
289
+ }
290
+ }
291
+ catch { }
292
+ currentDir = node_path_1.default.dirname(currentDir);
293
+ isAtFsRoot = currentDir.length <= node_path_1.default.dirname(currentDir).length;
294
+ }
295
+ throw new Error(`Cannot find the package manifest of the ${MODULE_NAME} Node.js module`);
296
+ });
297
+ /**
298
+ * @typedef {Object} DriverInfo
299
+ * @property {string} version Driver version string
300
+ * @property {string} built Driver build timestamp
301
+ */
302
+ /**
303
+ * @returns {DriverInfo}
304
+ */
305
+ const getDriverInfo = lodash_1.default.memoize(async function getDriverInfo() {
306
+ const [stat, manifest] = await bluebird_1.default.all([
307
+ support_1.fs.stat(node_path_1.default.resolve(__dirname, '..')),
308
+ getModuleManifest(),
309
+ ]);
310
+ return {
311
+ built: stat.mtime.toString(),
312
+ version: manifest.version,
313
+ };
314
+ });
315
+ exports.getDriverInfo = getDriverInfo;
316
+ function normalizeCommandTimeouts(value) {
317
+ // The value is normalized already
318
+ if (typeof value !== 'string') {
319
+ return value;
320
+ }
321
+ let result = {};
322
+ // Use as default timeout for all commands if a single integer value is provided
323
+ if (!isNaN(Number(value))) {
324
+ result[DEFAULT_TIMEOUT_KEY] = lodash_1.default.toInteger(value);
325
+ return result;
326
+ }
327
+ // JSON object has been provided. Let's parse it
328
+ try {
329
+ result = JSON.parse(value);
330
+ if (!lodash_1.default.isPlainObject(result)) {
331
+ throw new Error();
332
+ }
333
+ }
334
+ catch {
335
+ throw logger_1.default.errorWithException(`"commandTimeouts" capability should be a valid JSON object. "${value}" was given instead`);
336
+ }
337
+ for (let [cmd, timeout] of lodash_1.default.toPairs(result)) {
338
+ if (!lodash_1.default.isInteger(timeout) || timeout <= 0) {
339
+ throw logger_1.default.errorWithException(`The timeout for "${cmd}" should be a valid natural number of milliseconds. "${timeout}" was given instead`);
340
+ }
341
+ }
342
+ return result;
343
+ }
344
+ async function printUser() {
345
+ try {
346
+ let { stdout } = await (0, teen_process_1.exec)('whoami');
347
+ logger_1.default.debug(`Current user: '${stdout.trim()}'`);
348
+ }
349
+ catch (err) {
350
+ logger_1.default.debug(`Unable to get username running server: ${err.message}`);
351
+ }
352
+ }
353
+ /**
354
+ * Get the IDs of processes listening on the particular system port.
355
+ * It is also possible to apply additional filtering based on the
356
+ * process command line.
357
+ *
358
+ * @param {string|number} port - The port number.
359
+ * @param {?Function} filteringFunc - Optional lambda function, which
360
+ * receives command line string of the particular process
361
+ * listening on given port, and is expected to return
362
+ * either true or false to include/exclude the corresponding PID
363
+ * from the resulting array.
364
+ * @returns {Promise<string[]>} - the list of matched process ids.
365
+ */
366
+ async function getPIDsListeningOnPort(port, filteringFunc = null) {
367
+ const result = [];
368
+ try {
369
+ // This only works since Mac OS X El Capitan
370
+ const { stdout } = await (0, teen_process_1.exec)('lsof', ['-ti', `tcp:${port}`]);
371
+ result.push(...stdout.trim().split(/\n+/));
372
+ }
373
+ catch {
374
+ return result;
375
+ }
376
+ if (!lodash_1.default.isFunction(filteringFunc)) {
377
+ return result;
378
+ }
379
+ return await bluebird_1.default.filter(result, async (x) => {
380
+ const { stdout } = await (0, teen_process_1.exec)('ps', ['-p', x, '-o', 'command']);
381
+ return await filteringFunc(stdout);
382
+ });
383
+ }
384
+ /**
385
+ * @typedef {Object} UploadOptions
386
+ *
387
+ * @property {string} [user] - The name of the user for the remote authentication. Only works if `remotePath` is provided.
388
+ * @property {string} [pass] - The password for the remote authentication. Only works if `remotePath` is provided.
389
+ * @property {import('axios').Method} [method] - The http multipart upload method name. The 'PUT' one is used by default.
390
+ * Only works if `remotePath` is provided.
391
+ * @property {import('@appium/types').HTTPHeaders} [headers] - Additional headers mapping for multipart http(s) uploads
392
+ * @property {string} [fileFieldName] [file] - The name of the form field, where the file content BLOB should be stored for
393
+ * http(s) uploads
394
+ * @property {Record<string, any> | [string, any][]} [formFields] - Additional form fields for multipart http(s) uploads
395
+ */
396
+ /**
397
+ * Encodes the given local file to base64 and returns the resulting string
398
+ * or uploads it to a remote server using http/https or ftp protocols
399
+ * if `remotePath` is set
400
+ *
401
+ * @param {string} localPath - The path to an existing local file
402
+ * @param {string|null} [remotePath] - The path to the remote location, where
403
+ * this file should be uploaded
404
+ * @param {UploadOptions} uploadOptions - Set of upload options
405
+ * @returns {Promise<string>} Either an empty string if the upload was successful or
406
+ * base64-encoded file representation if `remotePath` is falsy
407
+ */
408
+ async function encodeBase64OrUpload(localPath, remotePath = null, uploadOptions = {}) {
409
+ if (!(await support_1.fs.exists(localPath))) {
410
+ throw logger_1.default.errorWithException(`The file at '${localPath}' does not exist or is not accessible`);
411
+ }
412
+ if (lodash_1.default.isEmpty(remotePath)) {
413
+ const { size } = await support_1.fs.stat(localPath);
414
+ logger_1.default.debug(`The size of the file is ${support_1.util.toReadableSizeString(size)}`);
415
+ return (await support_1.util.toInMemoryBase64(localPath)).toString();
416
+ }
417
+ const { user, pass, method, headers, fileFieldName, formFields } = uploadOptions;
418
+ const options = {
419
+ method: method || 'PUT',
420
+ headers,
421
+ fileFieldName,
422
+ formFields,
423
+ };
424
+ if (user && pass) {
425
+ options.auth = { user, pass };
426
+ }
427
+ await support_1.net.uploadFile(localPath, /** @type {string} */ (remotePath), options);
428
+ return '';
429
+ }
430
+ /**
431
+ * Stops and removes all web socket handlers that are listening
432
+ * in scope of the current session.
433
+ *
434
+ * @this {XCUITestDriver}
435
+ * @returns {Promise<void>}
436
+ */
437
+ async function removeAllSessionWebSocketHandlers() {
438
+ if (!this.sessionId || !lodash_1.default.isFunction(this.server?.getWebSocketHandlers)) {
439
+ return;
440
+ }
441
+ const activeHandlers = await this.server.getWebSocketHandlers(this.sessionId);
442
+ for (const pathname of lodash_1.default.keys(activeHandlers)) {
443
+ await this.server.removeWebSocketHandler(pathname);
444
+ }
445
+ }
446
+ /**
447
+ * Returns true if the urlString is localhost
448
+ * @param {string} urlString
449
+ * @returns {boolean} Return true if the urlString is localhost
450
+ */
451
+ function isLocalHost(urlString) {
452
+ try {
453
+ const hostname = /** @type {string} */ (node_url_1.default.parse(urlString).hostname);
454
+ return ['localhost', '127.0.0.1', '::1', '::ffff:127.0.0.1'].includes(hostname);
455
+ }
456
+ catch {
457
+ logger_1.default.warn(`'${urlString}' cannot be parsed as a valid URL`);
458
+ }
459
+ return false;
460
+ }
461
+ /**
462
+ * Normalizes platformVersion to a valid iOS version string
463
+ *
464
+ * @param {string} originalVersion - Loose version number, that can be parsed by semver
465
+ * @return {string} iOS version number in <major>.<minor> format
466
+ * @throws {Error} if the version number cannot be parsed
467
+ */
468
+ function normalizePlatformVersion(originalVersion) {
469
+ const normalizedVersion = semver.coerce(originalVersion);
470
+ if (!normalizedVersion) {
471
+ throw new Error(`The platform version '${originalVersion}' should be a valid version number`);
472
+ }
473
+ return `${normalizedVersion.major}.${normalizedVersion.minor}`;
474
+ }
475
+ /**
476
+ * Assert the presence of particular keys in the given object
477
+ *
478
+ * @param {string|Array<string>} argNames one or more key names
479
+ * @param {Object} opts the object to check
480
+ * @returns {Object} the same given object
481
+ */
482
+ function requireArgs(argNames, opts = {}) {
483
+ for (const argName of lodash_1.default.isArray(argNames) ? argNames : [argNames]) {
484
+ if (!lodash_1.default.has(opts, argName)) {
485
+ throw new driver_1.errors.InvalidArgumentError(`'${argName}' argument must be provided`);
486
+ }
487
+ }
488
+ return opts;
489
+ }
490
+ /**
491
+ * Asserts that the given driver is running on a Simulator and return
492
+ * the simlator instance.
493
+ *
494
+ * @param {string} action - Description of action
495
+ * @param {import('./driver').XCUITestDriver} driver
496
+ * @returns {Simulator}
497
+ */
498
+ function assertSimulator(action, driver) {
499
+ if (!driver.isSimulator()) {
500
+ throw new Error(`${lodash_1.default.upperFirst(action)} can only be performed on Simulator`);
501
+ }
502
+ return /** @type{Simulator} */ (driver.device);
503
+ }
504
+ /**
505
+ * Check if platform name is the TV OS one.
506
+ *
507
+ * @param {string|null|undefined} platformName
508
+ * @returns {boolean}
509
+ */
510
+ function isTvOs(platformName) {
511
+ return lodash_1.default.toLower(platformName ?? '') === lodash_1.default.toLower(desired_caps_1.PLATFORM_NAME_TVOS);
512
+ }
513
+ /**
514
+ * Return normalized platform name.
515
+ *
516
+ * @param {string|null|undefined} platformName
517
+ * @returns {string}
518
+ */
519
+ function normalizePlatformName(platformName) {
520
+ return isTvOs(platformName) ? desired_caps_1.PLATFORM_NAME_TVOS : desired_caps_1.PLATFORM_NAME_IOS;
521
+ }
522
+ /**
523
+ * @param {import('./driver').XCUITestDriverOpts} opts
524
+ * @returns {boolean}
525
+ */
526
+ function shouldSetInitialSafariUrl(opts) {
527
+ return !(opts.safariInitialUrl === '' || (opts.noReset && lodash_1.default.isNil(opts.safariInitialUrl)))
528
+ && !opts.initialDeeplinkUrl;
529
+ }
530
+ /**
531
+ * @param {import('./driver').XCUITestDriverOpts} opts
532
+ * @returns {boolean}
533
+ */
534
+ function isIos17OrNewer(opts) {
535
+ return !!opts.platformVersion && support_1.util.compareVersions(opts.platformVersion, '>=', '17.0');
536
+ }
537
+ /**
538
+ * @param {import('./driver').XCUITestDriverOpts} opts
539
+ * @returns {boolean}
540
+ */
541
+ function isIos18OrNewer(opts) {
542
+ return !!opts.platformVersion && support_1.util.compareVersions(opts.platformVersion, '>=', '18.0');
543
+ }
544
+ /**
545
+ * @typedef {import('@limrun/appium-xcode').XcodeVersion} XcodeVersion
546
+ * @typedef {import('@limrun/appium-ios-simulator').Simulator} Simulator
547
+ * @typedef {import('./driver').XCUITestDriver} XCUITestDriver
548
+ */
549
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0ZA,8EASC;AAwDD,0CAKC;AAQD,wBAEC;AAQD,sDAEC;AAMD,8DAG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AgB,cAAc,CAAC,IAAI;IACjC,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,IAAI,cAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC5F,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAI;IACjC,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,IAAI,cAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC5F,CAAC;AAqBD;;;;GAIG"}
@@ -0,0 +1,3 @@
1
+ export function requireXcrun(): Promise<string>;
2
+ export const XCRUN: "xcrun";
3
+ //# sourceMappingURL=xcrun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xcrun.d.ts","sourceRoot":"","sources":["../../lib/xcrun.js"],"names":[],"mappings":"AAIA,gDASC;AAXD,oBAAc,OAAO,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XCRUN = void 0;
4
+ exports.requireXcrun = requireXcrun;
5
+ const support_1 = require("appium/support");
6
+ const XCRUN = 'xcrun';
7
+ exports.XCRUN = XCRUN;
8
+ async function requireXcrun() {
9
+ try {
10
+ return await support_1.fs.which(XCRUN);
11
+ }
12
+ catch {
13
+ throw new Error(`${XCRUN} has not been found in PATH. ` +
14
+ `Please make sure XCode development tools are installed`);
15
+ }
16
+ }
17
+ //# sourceMappingURL=xcrun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xcrun.js","sourceRoot":"","sources":["../../lib/xcrun.js"],"names":[],"mappings":";;;AAeQ,oCAAY;AAfpB,4CAAkC;AAElC,MAAM,KAAK,GAAG,OAAO,CAAC;AAaA,sBAAK;AAX3B,KAAK,UAAU,YAAY;IACzB,IAAI,CAAC;QACH,OAAO,MAAM,YAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,+BAA+B;YACrC,wDAAwD,CAC3D,CAAC;IACJ,CAAC;AACH,CAAC"}
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import {XCUITestDriver} from './lib/driver';
2
+
3
+ export {XCUITestDriver};
4
+
5
+ export * as doctor from './lib/doctor/checks';
6
+
7
+ export default XCUITestDriver;