@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,625 @@
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.getContextsAndViews = getContextsAndViews;
7
+ exports.useNewSafari = useNewSafari;
8
+ exports.activateRecentWebview = activateRecentWebview;
9
+ exports.listWebFrames = listWebFrames;
10
+ exports.connectToRemoteDebugger = connectToRemoteDebugger;
11
+ exports.mobileGetContexts = mobileGetContexts;
12
+ exports.onPageChange = onPageChange;
13
+ exports.stopRemote = stopRemote;
14
+ exports.setCurrentUrl = setCurrentUrl;
15
+ exports.getCurrentUrl = getCurrentUrl;
16
+ exports.getRecentWebviewContextId = getRecentWebviewContextId;
17
+ exports.isWebContext = isWebContext;
18
+ exports.isWebview = isWebview;
19
+ exports.getNewRemoteDebugger = getNewRemoteDebugger;
20
+ exports.getCurrentContext = getCurrentContext;
21
+ exports.setContext = setContext;
22
+ exports.getContexts = getContexts;
23
+ exports.setWindow = setWindow;
24
+ exports.getWindowHandle = getWindowHandle;
25
+ exports.getWindowHandles = getWindowHandles;
26
+ exports.notifyBiDiContextChange = notifyBiDiContextChange;
27
+ const appium_remote_debugger_1 = require("appium-remote-debugger");
28
+ const driver_1 = require("appium/driver");
29
+ const support_1 = require("appium/support");
30
+ const ios_performance_log_1 = require("../device-log/ios-performance-log");
31
+ const lodash_1 = __importDefault(require("lodash"));
32
+ const utils_1 = require("../utils");
33
+ const models_1 = require("./bidi/models");
34
+ const constants_1 = require("./bidi/constants");
35
+ const log_1 = require("./log");
36
+ const WEBVIEW_WIN = 'WEBVIEW';
37
+ const WEBVIEW_BASE = `${WEBVIEW_WIN}_`;
38
+ const DEFAULT_REMOTE_DEBUGGER_CONNECT_TIMEOUT_MS = 5000;
39
+ const DEFAULT_LIST_WEB_FRAMES_RETRIES = 20;
40
+ const DEFAULT_NATIVE_WINDOW_HANDLE = '1';
41
+ /**
42
+ * @this {XCUITestDriver}
43
+ * @param {boolean} [useUrl=false]
44
+ * @returns {Promise<import('./types').ViewContext[]>}
45
+ */
46
+ async function getContextsAndViews(useUrl = true) {
47
+ this.log.debug('Retrieving contexts and views');
48
+ const webviews = await this.listWebFrames(useUrl);
49
+ /**
50
+ * @type {import('./types').ViewContext[]}
51
+ */
52
+ const ctxs = [{ id: utils_1.NATIVE_WIN, view: {} }];
53
+ this.contexts = [utils_1.NATIVE_WIN];
54
+ for (const view of webviews) {
55
+ ctxs.push({ id: `${WEBVIEW_BASE}${view.id}`, view });
56
+ this.contexts.push(view.id.toString());
57
+ }
58
+ return ctxs;
59
+ }
60
+ /**
61
+ * @deprecated this method is not used anywhere and will be removed in the future
62
+ * @this {XCUITestDriver}
63
+ * @returns {boolean}
64
+ */
65
+ function useNewSafari() {
66
+ return this.isSimulator() && this.isSafari();
67
+ }
68
+ /**
69
+ * @this {XCUITestDriver}
70
+ * @returns {Promise<void>}
71
+ */
72
+ async function activateRecentWebview() {
73
+ this.log.debug('Activating a recent webview');
74
+ const timer = new support_1.timing.Timer().start();
75
+ const contextId = await this.getRecentWebviewContextId(/.*/, /.*/);
76
+ if (contextId) {
77
+ this.log.info(`Picking webview '${contextId}' after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);
78
+ await this.setContext(contextId);
79
+ return;
80
+ }
81
+ const appDict = ( /** @type {RemoteDebugger} */(this.remote)).appDict;
82
+ const errSuffix = `Make sure your web application is debuggable ` +
83
+ `and could be inspected in Safari Web Inspector.`;
84
+ if (lodash_1.default.isEmpty(appDict)) {
85
+ throw new Error(`The remote debugger did not return any connected web applications after ` +
86
+ `${timer.getDuration().asMilliSeconds.toFixed(0)}ms. ` +
87
+ `${errSuffix} ` +
88
+ `You may try to change the 'webviewConnectTimeout' capability value to ` +
89
+ `customize the retrieval timeout.`);
90
+ }
91
+ const errSuffix2 = `${errSuffix} You may try to change the 'webviewConnectRetries' ` +
92
+ `capability value to customize the amount of pages retrieval retries.`;
93
+ const appsWithPages = lodash_1.default.values(appDict).filter(({ pageArray }) => !lodash_1.default.isEmpty(pageArray));
94
+ if (appsWithPages.length > 0) {
95
+ throw new Error(`The remote debugger returned ${support_1.util.pluralize('web application', appsWithPages.length, true)} ` +
96
+ `with pages after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms, ` +
97
+ `although none of them matched our page search criteria. ${errSuffix2}`);
98
+ }
99
+ else {
100
+ throw new Error(`The remote debugger returned ${support_1.util.pluralize('web application', lodash_1.default.size(appDict), true)}, ` +
101
+ `but none of them had pages after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms. ` +
102
+ `${errSuffix2} Also, in rare cases the device restart or device OS upgrade may fix this ` +
103
+ `issue if none of the above advices helps.`);
104
+ }
105
+ }
106
+ /**
107
+ * @this {XCUITestDriver}
108
+ * @returns {Promise<import('../types').Page[]>}
109
+ */
110
+ async function listWebFrames(useUrl = true) {
111
+ const shouldFilterByUrl = useUrl && !this.isRealDevice() && !!this.getCurrentUrl();
112
+ this.log.debug(`Selecting by url: ${shouldFilterByUrl}` +
113
+ (shouldFilterByUrl ? ` (expected url: '${this.getCurrentUrl()}')` : ''));
114
+ if (!this.remote) {
115
+ await this.connectToRemoteDebugger();
116
+ }
117
+ const doListPages = async (/** @type {number} */ retries) => {
118
+ try {
119
+ const pageArray = await ( /** @type {RemoteDebugger} */(this.remote)).selectApp(shouldFilterByUrl ? this.getCurrentUrl() : undefined, retries, this.opts.ignoreAboutBlankUrl);
120
+ if (lodash_1.default.isEmpty(pageArray)) {
121
+ // we have no web frames, but continue anyway
122
+ this.log.debug(`No web frames found after ${support_1.util.pluralize('retry', retries, true)}`);
123
+ }
124
+ return pageArray;
125
+ }
126
+ catch (err) {
127
+ this.log.debug(`No available web pages after ${support_1.util.pluralize('retry', retries, true)}: ${err.message}`);
128
+ return [];
129
+ }
130
+ };
131
+ /** @type {number} */
132
+ const maxRetriesCount = lodash_1.default.isInteger(this.opts.webviewConnectRetries)
133
+ ? Math.max(/** @type {number} */ (this.opts.webviewConnectRetries), 1)
134
+ : DEFAULT_LIST_WEB_FRAMES_RETRIES;
135
+ this.log.debug(`About to select a web application with ${support_1.util.pluralize('retry', maxRetriesCount, true)} ` +
136
+ `and 500ms interval between each retry. Consider customizing the value of 'webviewConnectRetries' ` +
137
+ `capability to change the amount of retries.`);
138
+ return await doListPages(maxRetriesCount);
139
+ }
140
+ /**
141
+ * @this {XCUITestDriver}
142
+ * @returns {Promise<void>}
143
+ */
144
+ async function connectToRemoteDebugger() {
145
+ this.remote = await this.getNewRemoteDebugger();
146
+ // @ts-ignore static is fine
147
+ this.remote.on(appium_remote_debugger_1.RemoteDebugger.EVENT_PAGE_CHANGE, this.onPageChange.bind(this));
148
+ // @ts-ignore static is fine
149
+ this.remote.on(appium_remote_debugger_1.RemoteDebugger.EVENT_FRAMES_DETACHED, () => {
150
+ if (!lodash_1.default.isEmpty(this.curWebFrames)) {
151
+ const curWebFrames = this.curWebFrames;
152
+ this.log.debug(`Clearing ${support_1.util.pluralize('frame', curWebFrames.length, true)}: ${curWebFrames.join(', ')}`);
153
+ }
154
+ this.curWebFrames = [];
155
+ });
156
+ const timeoutMs = this.opts.webviewConnectTimeout ?? DEFAULT_REMOTE_DEBUGGER_CONNECT_TIMEOUT_MS;
157
+ const apps = await this.remote.connect(timeoutMs);
158
+ if (lodash_1.default.isEmpty(apps)) {
159
+ this.log.info(`The remote debugger did not report any active web applications within ${timeoutMs}ms timeout. ` +
160
+ `Consider increasing the value of 'webviewConnectTimeout' capability to wait longer ` +
161
+ `on slower devices.`);
162
+ }
163
+ }
164
+ /**
165
+ * Retrieves the list of available contexts.
166
+ *
167
+ * The list includes extended context information, like URLs and page names.
168
+ * This is different from the standard `getContexts` API, because the latter
169
+ * only has web view names without any additional information.
170
+ *
171
+ * @remarks In situations where multiple web views are available at once, the
172
+ * client code would have to connect to each of them in order to detect the
173
+ * one which needs to be interacted with. This extra effort is not needed with
174
+ * the information provided by this extension.
175
+ * @param {number} [waitForWebviewMs=0] - The period to poll for available webview(s) (in ms)
176
+ * @returns {Promise<Context[]>} The list of available context objects along with their properties.
177
+ * @this {XCUITestDriver}
178
+ */
179
+ async function mobileGetContexts(waitForWebviewMs = 0) {
180
+ // make sure it is a number, so the duration check works properly
181
+ if (!lodash_1.default.isNumber(waitForWebviewMs)) {
182
+ waitForWebviewMs = parseInt(waitForWebviewMs, 10);
183
+ if (isNaN(waitForWebviewMs)) {
184
+ waitForWebviewMs = 0;
185
+ }
186
+ }
187
+ const curOpt = this.opts.fullContextList;
188
+ this.opts.fullContextList = true;
189
+ const timer = new support_1.timing.Timer().start();
190
+ try {
191
+ /** @type {FullContext[]} */
192
+ let contexts;
193
+ do {
194
+ contexts = /** @type {FullContext[]} */ (await this.getContexts());
195
+ if (contexts.length >= 2) {
196
+ this.log.debug(`Found webview context after ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);
197
+ return contexts;
198
+ }
199
+ this.log.debug(`No webviews found in ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);
200
+ } while (timer.getDuration().asMilliSeconds < waitForWebviewMs);
201
+ return contexts;
202
+ }
203
+ finally {
204
+ // reset the option so there are no side effects
205
+ this.opts.fullContextList = curOpt;
206
+ }
207
+ }
208
+ /**
209
+ * @this {XCUITestDriver}
210
+ * @param {import('./types').PageChangeNotification} pageChangeNotification
211
+ * @returns {Promise<void>}
212
+ */
213
+ async function onPageChange(pageChangeNotification) {
214
+ this.log.debug(`Remote debugger notified us of a new page listing: ${JSON.stringify(pageChangeNotification)}`);
215
+ if (this.selectingNewPage) {
216
+ this.log.debug('We are in the middle of selecting a page, ignoring');
217
+ return;
218
+ }
219
+ if (!this.remote?.isConnected) {
220
+ this.log.debug('We have not yet connected, ignoring');
221
+ return;
222
+ }
223
+ const { appIdKey, pageArray } = pageChangeNotification;
224
+ /** @type {string[]} */
225
+ const newIds = [];
226
+ /** @type {string[]} */
227
+ const newPages = [];
228
+ /** @type {string|null} */
229
+ let keyId = null;
230
+ for (const page of pageArray) {
231
+ const id = page.id.toString();
232
+ newIds.push(id);
233
+ if (page.isKey) {
234
+ keyId = id;
235
+ }
236
+ const contextId = `${appIdKey}.${id}`;
237
+ // add if this is a new page
238
+ if (!lodash_1.default.includes(this.contexts, contextId)) {
239
+ if (isUrlIgnored(page.url, this.opts.safariIgnoreWebHostnames)) {
240
+ this.log.info(`Not tracking '${page.url}' page because it is blacklisted. ` +
241
+ `'safariIgnoreWebHostnames'=${this.opts.safariIgnoreWebHostnames}`);
242
+ }
243
+ else {
244
+ newPages.push(id);
245
+ this.contexts.push(contextId);
246
+ }
247
+ }
248
+ }
249
+ if (!keyId) {
250
+ // if there is no key id, pull the first id from the page array and use that
251
+ // as a stand in
252
+ this.log.debug('No key id found. Choosing first id from page array');
253
+ keyId = newIds[0] || null;
254
+ }
255
+ if (!support_1.util.hasValue(this.curContext)) {
256
+ this.log.debug('We do not appear to have window set yet, ignoring');
257
+ return;
258
+ }
259
+ const [curAppIdKey, curPageIdKey] = this.curContext.split('.');
260
+ if (curAppIdKey !== appIdKey) {
261
+ this.log.debug('Page change not referring to currently selected app, ignoring.');
262
+ return;
263
+ }
264
+ /** @type {string|null} */
265
+ let newPage = null;
266
+ if (newPages.length) {
267
+ newPage = /** @type {string} */ (lodash_1.default.last(newPages));
268
+ this.log.debug(`We have new pages, selecting page '${newPage}'`);
269
+ }
270
+ else if (!lodash_1.default.includes(newIds, curPageIdKey)) {
271
+ this.log.debug('New page listing from remote debugger does not contain ' +
272
+ 'current window; assuming it is closed');
273
+ if (!support_1.util.hasValue(keyId)) {
274
+ this.log.error('Do not have our current window anymore, and there ' +
275
+ 'are not any more to load! Doing nothing...');
276
+ this.setCurrentUrl(undefined);
277
+ return;
278
+ }
279
+ this.log.debug(`Debugger already selected page '${keyId}', ` + `confirming that choice.`);
280
+ this.curContext = `${appIdKey}.${keyId}`;
281
+ newPage = keyId;
282
+ }
283
+ else {
284
+ // at this point, there are no new pages, and the current page still exists
285
+ this.log.debug('New page listing is same as old, doing nothing');
286
+ }
287
+ // make sure that the page listing isn't indicating a redirect
288
+ if (support_1.util.hasValue(this.curContext)) {
289
+ const currentPageId = parseInt(String(lodash_1.default.last(this.curContext.split('.'))), 10);
290
+ const page = lodash_1.default.find(pageArray, (p) => parseInt(String(p.id), 10) === currentPageId);
291
+ if (page && page.url !== this.getCurrentUrl()) {
292
+ this.log.debug(`Redirected from '${this.getCurrentUrl()}' to '${page.url}'`);
293
+ this.setCurrentUrl(page.url);
294
+ }
295
+ }
296
+ if (support_1.util.hasValue(newPage)) {
297
+ this.selectingNewPage = true;
298
+ const oldContext = this.curContext;
299
+ this.curContext = `${appIdKey}.${newPage}`;
300
+ try {
301
+ await this.remote.selectPage(appIdKey, parseInt(newPage, 10));
302
+ await notifyBiDiContextChange.bind(this)();
303
+ }
304
+ catch (e) {
305
+ this.log.warn(`Failed to select page: ${e.message}`);
306
+ this.curContext = oldContext;
307
+ }
308
+ finally {
309
+ this.selectingNewPage = false;
310
+ }
311
+ }
312
+ }
313
+ /**
314
+ * @this {XCUITestDriver}
315
+ * @returns {Promise<void>}
316
+ */
317
+ async function stopRemote(closeWindowBeforeDisconnecting = false) {
318
+ if (!this.remote) {
319
+ throw this.log.errorWithException('Tried to leave a web frame but were not in one');
320
+ }
321
+ if (closeWindowBeforeDisconnecting) {
322
+ await this.closeWindow();
323
+ }
324
+ await this.remote.disconnect();
325
+ this.curContext = null;
326
+ await notifyBiDiContextChange.bind(this)();
327
+ this.curWebFrames = [];
328
+ this.remote = null;
329
+ }
330
+ /**
331
+ * @this {XCUITestDriver}
332
+ * @param {string|undefined|null} url
333
+ */
334
+ function setCurrentUrl(url) {
335
+ this._currentUrl = url;
336
+ }
337
+ /**
338
+ * @this {XCUITestDriver}
339
+ * @returns {string|undefined|null}
340
+ */
341
+ function getCurrentUrl() {
342
+ return this._currentUrl;
343
+ }
344
+ /**
345
+ * @param {RegExp} titleRegExp
346
+ * @param {RegExp} urlRegExp
347
+ * @this {XCUITestDriver}
348
+ * @returns {Promise<string|undefined>}
349
+ */
350
+ async function getRecentWebviewContextId(titleRegExp, urlRegExp) {
351
+ if (!lodash_1.default.isRegExp(titleRegExp) && !lodash_1.default.isRegExp(urlRegExp)) {
352
+ throw new driver_1.errors.InvalidArgumentError('A regular expression for either web view title or url must be provided');
353
+ }
354
+ const currentUrl = this.getCurrentUrl();
355
+ const contexts = lodash_1.default.filter(await this.getContextsAndViews(false), 'view');
356
+ // first try to match by current url
357
+ if (currentUrl) {
358
+ const ctx = contexts.find(({ view }) => (view?.url || '') === currentUrl);
359
+ if (ctx) {
360
+ return ctx.id;
361
+ }
362
+ }
363
+ // if not, try to match by regular expression
364
+ return contexts.find(({ view }) => (view?.title && titleRegExp?.test(view.title)) || (view?.url && urlRegExp?.test(view.url)))?.id;
365
+ }
366
+ /**
367
+ * @this {XCUITestDriver}
368
+ * @returns {boolean}
369
+ */
370
+ function isWebContext() {
371
+ return !!this.curContext && this.curContext !== utils_1.NATIVE_WIN;
372
+ }
373
+ /**
374
+ * @this {XCUITestDriver}
375
+ * @returns {boolean}
376
+ */
377
+ function isWebview() {
378
+ return this.isWebContext();
379
+ }
380
+ /**
381
+ * @this {XCUITestDriver}
382
+ * @returns {Promise<RemoteDebugger>}
383
+ */
384
+ async function getNewRemoteDebugger() {
385
+ const socketPath = this.isRealDevice()
386
+ ? undefined
387
+ : (await /** @type {import('../driver').Simulator} */ (this.device).getWebInspectorSocket() ?? undefined);
388
+ return (0, appium_remote_debugger_1.createRemoteDebugger)({
389
+ bundleId: this.opts.bundleId,
390
+ additionalBundleIds: this.opts.additionalWebviewBundleIds,
391
+ isSafari: this.isSafari(),
392
+ includeSafari: this.opts.includeSafariInWebviews,
393
+ pageLoadMs: this.pageLoadMs,
394
+ platformVersion: this.opts.platformVersion,
395
+ socketPath,
396
+ remoteDebugProxy: this.opts.remoteDebugProxy,
397
+ garbageCollectOnExecute: support_1.util.hasValue(this.opts.safariGarbageCollect)
398
+ ? !!this.opts.safariGarbageCollect
399
+ : false,
400
+ udid: this.opts.udid,
401
+ logAllCommunication: this.opts.safariLogAllCommunication,
402
+ logAllCommunicationHexDump: this.opts.safariLogAllCommunicationHexDump,
403
+ socketChunkSize: this.opts.safariSocketChunkSize,
404
+ webInspectorMaxFrameLength: this.opts.safariWebInspectorMaxFrameLength,
405
+ pageLoadStrategy: this.caps.pageLoadStrategy,
406
+ }, this.isRealDevice());
407
+ }
408
+ /**
409
+ * @this {XCUITestDriver}
410
+ * @returns {Promise<string>}
411
+ */
412
+ async function getCurrentContext() {
413
+ if (this.curContext && this.curContext !== utils_1.NATIVE_WIN) {
414
+ return `${WEBVIEW_BASE}${this.curContext}`;
415
+ }
416
+ return utils_1.NATIVE_WIN;
417
+ }
418
+ /**
419
+ * Set context
420
+ *
421
+ * @param {string|Context} name - The name of context to set. It could be 'null' as NATIVE_WIN.
422
+ * @param {any} [callback] The callback. (It is not called in this method)
423
+ * @param {boolean} [skipReadyCheck=false] - Whether it waits for the new context is ready
424
+ * @this {XCUITestDriver}
425
+ * @returns {Promise<void>}
426
+ */
427
+ async function setContext(name, callback, skipReadyCheck = false) {
428
+ function alreadyInContext(desired, current) {
429
+ return (desired === current ||
430
+ (desired === null && current === utils_1.NATIVE_WIN) ||
431
+ (desired === utils_1.NATIVE_WIN && current === null));
432
+ }
433
+ function isNativeContext(context) {
434
+ return context === utils_1.NATIVE_WIN || context === null;
435
+ }
436
+ // allow the full context list to be passed in
437
+ const strName = String(typeof name === 'object' && name.id ? name.id : name);
438
+ this.log.debug(`Attempting to set context to '${strName || utils_1.NATIVE_WIN}' from '${this.curContext ? this.curContext : utils_1.NATIVE_WIN}'`);
439
+ if (alreadyInContext(strName, this.curContext) ||
440
+ alreadyInContext(lodash_1.default.replace(strName, WEBVIEW_BASE, ''), this.curContext)) {
441
+ // already in the named context, no need to do anything
442
+ this.log.debug(`Already in '${strName || utils_1.NATIVE_WIN}' context. Doing nothing.`);
443
+ return;
444
+ }
445
+ if (isNativeContext(strName)) {
446
+ // switching into the native context
447
+ this.curContext = null;
448
+ await notifyBiDiContextChange.bind(this)();
449
+ return;
450
+ }
451
+ // switching into a webview context
452
+ // if contexts have not already been retrieved, get them
453
+ if (lodash_1.default.isUndefined(this.contexts)) {
454
+ await this.getContexts();
455
+ }
456
+ let contextId = lodash_1.default.replace(strName, WEBVIEW_BASE, '');
457
+ if (contextId === '') {
458
+ // allow user to pass in "WEBVIEW" without an index
459
+ // the second context will be the first webview as
460
+ // the first is always NATIVE_APP
461
+ contextId = /** @type {string[]} */ (this.contexts)[1];
462
+ }
463
+ if (!lodash_1.default.includes(this.contexts, contextId)) {
464
+ throw new driver_1.errors.NoSuchContextError();
465
+ }
466
+ const oldContext = this.curContext;
467
+ this.curContext = this.curWindowHandle = contextId;
468
+ // `contextId` will be in the form of `appId.pageId` in this case
469
+ const [appIdKey, pageIdKey] = lodash_1.default.map(contextId.split('.'), (id) => parseInt(id, 10));
470
+ try {
471
+ this.selectingNewPage = true;
472
+ await ( /** @type {RemoteDebugger} */(this.remote)).selectPage(appIdKey, pageIdKey, skipReadyCheck);
473
+ await notifyBiDiContextChange.bind(this)();
474
+ }
475
+ catch (err) {
476
+ this.curContext = this.curWindowHandle = oldContext;
477
+ throw err;
478
+ }
479
+ finally {
480
+ this.selectingNewPage = false;
481
+ }
482
+ // attempt to start performance logging, if requested
483
+ if (this.opts.enablePerformanceLogging && this.remote) {
484
+ const context = this.curContext;
485
+ this.log.debug(`Starting performance log on '${context}'`);
486
+ [this.logs.performance,] = log_1.assignBiDiLogListener.bind(this)(new ios_performance_log_1.IOSPerformanceLog({
487
+ remoteDebugger: this.remote,
488
+ log: this.log,
489
+ }), {
490
+ type: 'performance',
491
+ context,
492
+ });
493
+ await this.logs.performance?.startCapture();
494
+ }
495
+ // start safari logging if the logs handlers are active
496
+ if (name && name !== utils_1.NATIVE_WIN && this.logs) {
497
+ if (this.logs.safariConsole) {
498
+ ( /** @type {RemoteDebugger} */(this.remote)).startConsole(this.logs.safariConsole.onConsoleLogEvent.bind(this.logs.safariConsole));
499
+ }
500
+ if (this.logs.safariNetwork) {
501
+ ( /** @type {RemoteDebugger} */(this.remote)).startNetwork(this.logs.safariNetwork.onNetworkEvent.bind(this.logs.safariNetwork));
502
+ }
503
+ }
504
+ }
505
+ /**
506
+ * @this {XCUITestDriver}
507
+ * @returns {Promise<string[]|FullContext[]>}
508
+ */
509
+ async function getContexts() {
510
+ this.log.debug('Getting list of available contexts');
511
+ const contexts = await this.getContextsAndViews(false);
512
+ if (this.opts.fullContextList) {
513
+ return /** @type {import('./types').FullContext[]} */ (contexts.map((context) => ({
514
+ id: context.id.toString(),
515
+ title: context.view?.title,
516
+ url: context.view?.url,
517
+ bundleId: context.view?.bundleId,
518
+ })));
519
+ }
520
+ return /** @type {string[]} */ (contexts.map((context) => context.id.toString()));
521
+ }
522
+ /**
523
+ * @this {XCUITestDriver}
524
+ * @param {string} name
525
+ * @param {boolean} [skipReadyCheck]
526
+ * @returns {Promise<void>}
527
+ */
528
+ async function setWindow(name, skipReadyCheck) {
529
+ if (!this.isWebContext()) {
530
+ // https://github.com/appium/appium/issues/20710
531
+ return;
532
+ }
533
+ try {
534
+ await this.setContext(name, lodash_1.default.noop, skipReadyCheck);
535
+ }
536
+ catch (err) {
537
+ // translate the error in terms of windows
538
+ throw (0, driver_1.isErrorType)(err, driver_1.errors.NoSuchContextError) ? new driver_1.errors.NoSuchWindowError() : err;
539
+ }
540
+ }
541
+ /**
542
+ * @this {XCUITestDriver}
543
+ * @returns {Promise<string>}
544
+ */
545
+ async function getWindowHandle() {
546
+ if (!this.isWebContext()) {
547
+ // https://github.com/appium/appium/issues/20710
548
+ return DEFAULT_NATIVE_WINDOW_HANDLE;
549
+ }
550
+ if (!this.curContext) {
551
+ throw new driver_1.errors.InvalidContextError();
552
+ }
553
+ this.log.debug(`Getting current window handle`);
554
+ return this.curContext;
555
+ }
556
+ /**
557
+ * @this {XCUITestDriver}
558
+ * @returns {Promise<string[]>}
559
+ */
560
+ async function getWindowHandles() {
561
+ if (!this.isWebContext()) {
562
+ // https://github.com/appium/appium/issues/20710
563
+ return [DEFAULT_NATIVE_WINDOW_HANDLE];
564
+ }
565
+ this.log.debug('Getting list of available window handles');
566
+ const contexts = await this.getContextsAndViews(false);
567
+ return (contexts
568
+ // get rid of the native app context
569
+ .filter((context) => context.id !== utils_1.NATIVE_WIN)
570
+ // get the `app.id` format expected
571
+ .map((context) =>
572
+ // This is non-nullable because the `FullContext` having `id` `NATIVE_WIN`
573
+ // _looks like_ the only with an empty view.
574
+ context.view?.id?.toString() ?? ''));
575
+ }
576
+ /**
577
+ * Checks if a URL is blacklisted in the 'safariIgnoreWebHostnames' capability
578
+ *
579
+ * @param {string} url
580
+ * @param {string} [safariIgnoreWebHostnames]
581
+ * @returns {boolean}
582
+ */
583
+ function isUrlIgnored(url, safariIgnoreWebHostnames) {
584
+ if (!safariIgnoreWebHostnames || lodash_1.default.isEmpty(safariIgnoreWebHostnames)) {
585
+ return false;
586
+ }
587
+ const ignoredHosts = safariIgnoreWebHostnames
588
+ .split(',')
589
+ .map((b) => b.trim())
590
+ .filter((b) => !lodash_1.default.isEmpty(b));
591
+ for (const ignoredHost of ignoredHosts) {
592
+ if (ignoredHost === 'about:blank' && url === 'about:blank') {
593
+ return true;
594
+ }
595
+ else {
596
+ try {
597
+ const hostname = new URL(url).hostname;
598
+ if (hostname === ignoredHost) {
599
+ return true;
600
+ }
601
+ }
602
+ catch {
603
+ // do nothing if invalid URL
604
+ }
605
+ }
606
+ }
607
+ return false;
608
+ }
609
+ /**
610
+ * https://github.com/appium/appium/issues/20741
611
+ *
612
+ * @this {XCUITestDriver}
613
+ * @returns {Promise<void>}
614
+ */
615
+ async function notifyBiDiContextChange() {
616
+ const name = await this.getCurrentContext();
617
+ this.eventEmitter.emit(constants_1.BIDI_EVENT_NAME, (0, models_1.makeContextUpdatedEvent)(name));
618
+ this.eventEmitter.emit(constants_1.BIDI_EVENT_NAME, (0, models_1.makeObsoleteContextUpdatedEvent)(name));
619
+ }
620
+ /**
621
+ * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
622
+ * @typedef {import('./types').Context} Context
623
+ * @typedef {import('./types').FullContext} FullContext
624
+ */
625
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../lib/commands/context.js"],"names":[],"mappings":";;;;;AAyBA,kDAaC;AAOD,oCAEC;AAMD,sDAsCC;AAMD,sCAwCC;AAMD,0DA2BC;AAiBD,8CAgCC;AAOD,oCAiHC;AAMD,gCAaC;AAMD,sCAEC;AAMD,sCAEC;AAQD,8DAqBC;AAMD,oCAEC;AAMD,8BAEC;AAMD,oDA0BC;AAMD,8CAKC;AAWD,gCAmGC;AAMD,kCAeC;AAQD,8BAWC;AAMD,0CAUC;AAMD,4CAkBC;AAyCD,0DAIC;AAzrBD,mEAA4E;AAC5E,0CAAkD;AAClD,4CAA4C;AAC5C,2EAAoE;AACpE,oDAAuB;AACvB,oCAAsC;AACtC,0CAGuB;AACvB,gDAAmD;AACnD,+BAA8C;AAE9C,MAAM,WAAW,GAAG,SAAS,CAAC;AAC9B,MAAM,YAAY,GAAG,GAAG,WAAW,GAAG,CAAC;AACvC,MAAM,0CAA0C,GAAG,IAAI,CAAC;AACxD,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AAC,CAAC,CAAC,CAAC;IAChC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,WAAW,KAAK,aAAa,IAAI,GAAG,KAAK,aAAa,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;gBACvC,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;oBAC7B,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,4BAA4B;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,uBAAuB;IAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC5C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,2BAAe,EAAE,IAAA,gCAAuB,EAAC,IAAI,CAAC,CAAC,CAAC;IACvE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,2BAAe,EAAE,IAAA,wCAA+B,EAAC,IAAI,CAAC,CAAC,CAAC;AACjF,CAAC;AAGD;;;;GAIG"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Returns the miscellaneous information about the device under test.
3
+ *
4
+ * Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
5
+ *
6
+ * @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
7
+ * @this {import('../driver').XCUITestDriver}
8
+ */
9
+ export function mobileGetDeviceInfo(this: import("../driver").XCUITestDriver): Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>;
10
+ export type DeviceInfo = import("./types").DeviceInfo;
11
+ export type LockdownInfo = import("./types").LockdownInfo;
12
+ //# sourceMappingURL=deviceInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,+EAHa,OAAO,CAAC,UAAU,GAAG,CAAC,UAAU,GAAG,YAAY,CAAC,CAAC,CAc7D;yBAGY,OAAO,SAAS,EAAE,UAAU;2BAC5B,OAAO,SAAS,EAAE,YAAY"}