@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,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mobileGetDeviceInfo = mobileGetDeviceInfo;
4
+ const appium_ios_device_1 = require("appium-ios-device");
5
+ /**
6
+ * Returns the miscellaneous information about the device under test.
7
+ *
8
+ * Since XCUITest driver v4.2.0, this includes device information via lockdown in a real device.
9
+ *
10
+ * @returns {Promise<DeviceInfo | (DeviceInfo & LockdownInfo)>} The response of `/wda/device/info'`
11
+ * @this {import('../driver').XCUITestDriver}
12
+ */
13
+ async function mobileGetDeviceInfo() {
14
+ const infoByWda = /** @type {import('./types').DeviceInfo} */ (await this.proxyCommand('/wda/device/info', 'GET'));
15
+ if (this.isRealDevice()) {
16
+ const lockdownInfo = await appium_ios_device_1.utilities.getDeviceInfo(this.device.udid);
17
+ return { ...infoByWda, ...{ lockdownInfo } };
18
+ }
19
+ return infoByWda;
20
+ }
21
+ /**
22
+ * @typedef {import('./types').DeviceInfo} DeviceInfo
23
+ * @typedef {import('./types').LockdownInfo} LockdownInfo
24
+ */
25
+ //# sourceMappingURL=deviceInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceInfo.js","sourceRoot":"","sources":["../../../lib/commands/deviceInfo.js"],"names":[],"mappings":";;AAUA,kDAWC;AArBD,yDAA4C;AAE5C;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB;IACvC,MAAM,SAAS,GAAG,2CAA2C,CAAC,CAC5D,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CACnD,CAAC;IAEF,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,MAAM,6BAAS,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,OAAO,EAAC,GAAG,SAAS,EAAE,GAAG,EAAC,YAAY,EAAC,EAAC,CAAC;IAC3C,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @this {XCUITestDriver}
3
+ */
4
+ export function elementDisplayed(this: import("../driver").XCUITestDriver, el: any): Promise<any>;
5
+ /**
6
+ * @this {XCUITestDriver}
7
+ */
8
+ export function elementEnabled(this: import("../driver").XCUITestDriver, el: any): Promise<any>;
9
+ /**
10
+ * @this {XCUITestDriver}
11
+ */
12
+ export function elementSelected(this: import("../driver").XCUITestDriver, el: any): Promise<any>;
13
+ /**
14
+ * @this {XCUITestDriver}
15
+ */
16
+ export function getName(this: import("../driver").XCUITestDriver, el: any): Promise<any>;
17
+ /**
18
+ * @this {XCUITestDriver}
19
+ */
20
+ export function getNativeAttribute(this: import("../driver").XCUITestDriver, attribute: any, el: any): Promise<string | null>;
21
+ /**
22
+ * @this {XCUITestDriver}
23
+ */
24
+ export function getAttribute(this: import("../driver").XCUITestDriver, attribute: any, el: any): Promise<any>;
25
+ /**
26
+ * @this {XCUITestDriver}
27
+ */
28
+ export function getProperty(this: import("../driver").XCUITestDriver, property: any, el: any): Promise<any>;
29
+ /**
30
+ * @this {XCUITestDriver}
31
+ */
32
+ export function getText(this: import("../driver").XCUITestDriver, el: any): Promise<any>;
33
+ /**
34
+ * @this {XCUITestDriver}
35
+ * @returns {Promise<import('@appium/types').Rect>}
36
+ */
37
+ export function getElementRect(this: import("../driver").XCUITestDriver, el: any): Promise<import("@appium/types").Rect>;
38
+ /**
39
+ * Get the position of an element on screen
40
+ *
41
+ * @param {string|Element} elementId - the element ID
42
+ * @returns {Promise<Position>} The position of the element
43
+ * @deprecated Use {@linkcode XCUITestDriver.getElementRect} instead
44
+ * @this {XCUITestDriver}
45
+ */
46
+ export function getLocation(this: import("../driver").XCUITestDriver, elementId: string | Element): Promise<Position>;
47
+ /**
48
+ * Alias for {@linkcode XCUITestDriver.getLocation}
49
+ * @param {string|Element} elementId - the element ID
50
+ * @returns {Promise<Position>} The position of the element
51
+ * @deprecated Use {@linkcode XCUITestDriver.getElementRect} instead
52
+ * @this {XCUITestDriver}
53
+ */
54
+ export function getLocationInView(this: import("../driver").XCUITestDriver, elementId: string | Element): Promise<Position>;
55
+ /**
56
+ * Get the size of an element
57
+ * @param {string|Element} el - the element ID
58
+ * @returns {Promise<Size>} The position of the element
59
+ * @this {XCUITestDriver}
60
+ */
61
+ export function getSize(this: import("../driver").XCUITestDriver, el: string | Element): Promise<Size>;
62
+ /**
63
+ * Alias for {@linkcode setValue}
64
+ *
65
+ * @param {string} value - the value to set
66
+ * @param {string} el - the element to set the value of
67
+ * @deprecated
68
+ * @this {XCUITestDriver}
69
+ */
70
+ export function setValueImmediate(this: import("../driver").XCUITestDriver, value: string, el: string): Promise<void>;
71
+ /**
72
+ * @this {XCUITestDriver}
73
+ */
74
+ export function setValue(this: import("../driver").XCUITestDriver, value: any, el: any): Promise<void>;
75
+ /**
76
+ * Set value with Atom for Web. This method calls `type` atom only.
77
+ * Expected to be called as part of {@linkcode setValue}.
78
+ * @this {XCUITestDriver}
79
+ * @param {import('./types').AtomsElement<string>} atomsElement A target element to type the given value.
80
+ * @param {string|string[]} value The actual text to type.
81
+ */
82
+ export function setValueWithWebAtom(this: import("../driver").XCUITestDriver, atomsElement: import("./types").AtomsElement<string>, value: string | string[]): Promise<void>;
83
+ /**
84
+ * Send keys to the app
85
+ * @param {string[]} value - Array of keys to send
86
+ * @this {XCUITestDriver}
87
+ * @deprecated Use {@linkcode XCUITestDriver.setValue} instead
88
+ */
89
+ export function keys(this: import("../driver").XCUITestDriver, value: string[]): Promise<void>;
90
+ /**
91
+ * @this {XCUITestDriver}
92
+ */
93
+ export function clear(this: import("../driver").XCUITestDriver, el: any): Promise<void>;
94
+ /**
95
+ * @this {XCUITestDriver}
96
+ */
97
+ export function getContentSize(this: import("../driver").XCUITestDriver, el: any): Promise<string>;
98
+ /**
99
+ * @this {XCUITestDriver}
100
+ * @returns {Promise<Rect>}
101
+ */
102
+ export function getNativeRect(this: import("../driver").XCUITestDriver, el: any): Promise<Rect>;
103
+ export type XCUITestDriver = import("../driver").XCUITestDriver;
104
+ export type Element = import("@appium/types").Element;
105
+ export type Position = import("@appium/types").Position;
106
+ export type Size = import("@appium/types").Size;
107
+ export type Rect = import("@appium/types").Rect;
108
+ //# sourceMappingURL=element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAIA;;GAEG;AACH,kGAQC;AAED;;GAEG;AACH,gGAQC;AAED;;GAEG;AACH,iGAQC;AAED;;GAEG;AACH,yFASC;AAED;;GAEG;AACH,8HAkBC;AAED;;GAEG;AACH,8GAOC;AAED;;GAEG;AACH,4GAOC;AAED;;GAEG;AACH,yFAOC;AAED;;;GAGG;AACH,mFAFa,OAAO,CAAC,OAAO,eAAe,EAAE,IAAI,CAAC,CAYjD;AAED;;;;;;;GAOG;AACH,iFALW,MAAM,GAAC,OAAO,GACZ,OAAO,CAAC,QAAQ,CAAC,CAuB7B;AAED;;;;;;GAMG;AACH,uFALW,MAAM,GAAC,OAAO,GACZ,OAAO,CAAC,QAAQ,CAAC,CAM7B;AAED;;;;;GAKG;AACH,sEAJW,MAAM,GAAC,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAWzB;AAED;;;;;;;GAOG;AACH,mFALW,MAAM,MACN,MAAM,iBAUhB;AAED;;GAEG;AACH,uGAmBC;AAED;;;;;;GAMG;AACH,4FAHW,OAAO,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,SACtC,MAAM,GAAC,MAAM,EAAE,iBAqBzB;AAED;;;;;GAKG;AACH,sEAJW,MAAM,EAAE,iBAQlB;AAED;;GAEG;AACH,wFAQC;AAED;;GAEG;AACH,mGA4EC;AAED;;;GAGG;AACH,kFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;6BAiDY,OAAO,WAAW,EAAE,cAAc;sBAClC,OAAO,eAAe,EAAE,OAAO;uBAC/B,OAAO,eAAe,EAAE,QAAQ;mBAChC,OAAO,eAAe,EAAE,IAAI;mBAC5B,OAAO,eAAe,EAAE,IAAI"}
@@ -0,0 +1,395 @@
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.elementDisplayed = elementDisplayed;
7
+ exports.elementEnabled = elementEnabled;
8
+ exports.elementSelected = elementSelected;
9
+ exports.getName = getName;
10
+ exports.getNativeAttribute = getNativeAttribute;
11
+ exports.getAttribute = getAttribute;
12
+ exports.getProperty = getProperty;
13
+ exports.getText = getText;
14
+ exports.getElementRect = getElementRect;
15
+ exports.getLocation = getLocation;
16
+ exports.getLocationInView = getLocationInView;
17
+ exports.getSize = getSize;
18
+ exports.setValueImmediate = setValueImmediate;
19
+ exports.setValue = setValue;
20
+ exports.setValueWithWebAtom = setValueWithWebAtom;
21
+ exports.keys = keys;
22
+ exports.clear = clear;
23
+ exports.getContentSize = getContentSize;
24
+ exports.getNativeRect = getNativeRect;
25
+ const lodash_1 = __importDefault(require("lodash"));
26
+ const driver_1 = require("appium/driver");
27
+ const support_1 = require("appium/support");
28
+ /**
29
+ * @this {XCUITestDriver}
30
+ */
31
+ async function elementDisplayed(el) {
32
+ el = support_1.util.unwrapElement(el);
33
+ if (this.isWebContext()) {
34
+ const atomsElement = this.getAtomsElement(el);
35
+ return await this.executeAtom('is_displayed', [atomsElement]);
36
+ }
37
+ return await this.proxyCommand(`/element/${el}/displayed`, 'GET');
38
+ }
39
+ /**
40
+ * @this {XCUITestDriver}
41
+ */
42
+ async function elementEnabled(el) {
43
+ el = support_1.util.unwrapElement(el);
44
+ if (this.isWebContext()) {
45
+ const atomsElement = this.getAtomsElement(el);
46
+ return await this.executeAtom('is_enabled', [atomsElement]);
47
+ }
48
+ return await this.proxyCommand(`/element/${el}/enabled`, 'GET');
49
+ }
50
+ /**
51
+ * @this {XCUITestDriver}
52
+ */
53
+ async function elementSelected(el) {
54
+ el = support_1.util.unwrapElement(el);
55
+ if (this.isWebContext()) {
56
+ const atomsElement = this.getAtomsElement(el);
57
+ return await this.executeAtom('is_selected', [atomsElement]);
58
+ }
59
+ return await this.proxyCommand(`/element/${el}/selected`, 'GET');
60
+ }
61
+ /**
62
+ * @this {XCUITestDriver}
63
+ */
64
+ async function getName(el) {
65
+ el = support_1.util.unwrapElement(el);
66
+ if (this.isWebContext()) {
67
+ const atomsElement = this.getAtomsElement(el);
68
+ const script = 'return arguments[0].tagName.toLowerCase()';
69
+ return await this.executeAtom('execute_script', [script, [atomsElement]]);
70
+ }
71
+ return await this.proxyCommand(`/element/${el}/name`, 'GET');
72
+ }
73
+ /**
74
+ * @this {XCUITestDriver}
75
+ */
76
+ async function getNativeAttribute(attribute, el) {
77
+ if (attribute === 'contentSize') {
78
+ // don't proxy requests for the content size of a scrollable element
79
+ return await this.getContentSize(el);
80
+ }
81
+ el = support_1.util.unwrapElement(el);
82
+ // otherwise let WDA handle attribute requests
83
+ let value = /** @type {string|number|null|undefined|boolean} */ (await this.proxyCommand(`/element/${el}/attribute/${attribute}`, 'GET'));
84
+ // Transform the result for the case when WDA returns an integer representation for a boolean value
85
+ if ([0, 1].includes(/** @type {number} */ (value))) {
86
+ value = !!value;
87
+ }
88
+ // The returned value must be of type string according to https://www.w3.org/TR/webdriver/#get-element-attribute
89
+ return lodash_1.default.isNull(value) || lodash_1.default.isString(value) ? value : JSON.stringify(value);
90
+ }
91
+ /**
92
+ * @this {XCUITestDriver}
93
+ */
94
+ async function getAttribute(attribute, el) {
95
+ el = support_1.util.unwrapElement(el);
96
+ if (!this.isWebContext()) {
97
+ return await this.getNativeAttribute(attribute, el);
98
+ }
99
+ const atomsElement = this.getAtomsElement(el);
100
+ return await this.executeAtom('get_attribute_value', [atomsElement, attribute]);
101
+ }
102
+ /**
103
+ * @this {XCUITestDriver}
104
+ */
105
+ async function getProperty(property, el) {
106
+ el = support_1.util.unwrapElement(el);
107
+ if (!this.isWebContext()) {
108
+ return await this.getNativeAttribute(property, el);
109
+ }
110
+ const atomsElement = this.getAtomsElement(el);
111
+ return await this.executeAtom('get_attribute_value', [atomsElement, property]);
112
+ }
113
+ /**
114
+ * @this {XCUITestDriver}
115
+ */
116
+ async function getText(el) {
117
+ el = support_1.util.unwrapElement(el);
118
+ if (!this.isWebContext()) {
119
+ return await this.proxyCommand(`/element/${el}/text`, 'GET');
120
+ }
121
+ let atomsElement = this.getAtomsElement(el);
122
+ return await this.executeAtom('get_text', [atomsElement]);
123
+ }
124
+ /**
125
+ * @this {XCUITestDriver}
126
+ * @returns {Promise<import('@appium/types').Rect>}
127
+ */
128
+ async function getElementRect(el) {
129
+ if (this.isWebContext()) {
130
+ // Mobile safari doesn't support rect
131
+ const { x, y } = await this.getLocation(el);
132
+ const { width, height } = await this.getSize(el);
133
+ return { x, y, width, height };
134
+ }
135
+ el = support_1.util.unwrapElement(el);
136
+ return await this.getNativeRect(el);
137
+ }
138
+ /**
139
+ * Get the position of an element on screen
140
+ *
141
+ * @param {string|Element} elementId - the element ID
142
+ * @returns {Promise<Position>} The position of the element
143
+ * @deprecated Use {@linkcode XCUITestDriver.getElementRect} instead
144
+ * @this {XCUITestDriver}
145
+ */
146
+ async function getLocation(elementId) {
147
+ const el = support_1.util.unwrapElement(elementId);
148
+ if (this.isWebContext()) {
149
+ const atomsElement = this.getAtomsElement(el);
150
+ let loc = await this.executeAtom('get_top_left_coordinates', [atomsElement]);
151
+ if (this.opts.absoluteWebLocations) {
152
+ const script = 'return [' +
153
+ 'Math.max(window.pageXOffset,document.documentElement.scrollLeft,document.body.scrollLeft),' +
154
+ 'Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop)];';
155
+ const [xOffset, yOffset] = /** @type {[number, number]} */ (await this.execute(script));
156
+ loc.x += xOffset;
157
+ loc.y += yOffset;
158
+ }
159
+ return loc;
160
+ }
161
+ const rect = await this.getElementRect(el);
162
+ return { x: rect.x, y: rect.y };
163
+ }
164
+ /**
165
+ * Alias for {@linkcode XCUITestDriver.getLocation}
166
+ * @param {string|Element} elementId - the element ID
167
+ * @returns {Promise<Position>} The position of the element
168
+ * @deprecated Use {@linkcode XCUITestDriver.getElementRect} instead
169
+ * @this {XCUITestDriver}
170
+ */
171
+ async function getLocationInView(elementId) {
172
+ return await this.getLocation(elementId);
173
+ }
174
+ /**
175
+ * Get the size of an element
176
+ * @param {string|Element} el - the element ID
177
+ * @returns {Promise<Size>} The position of the element
178
+ * @this {XCUITestDriver}
179
+ */
180
+ async function getSize(el) {
181
+ el = support_1.util.unwrapElement(el);
182
+ if (this.isWebContext()) {
183
+ return await this.executeAtom('get_size', [this.getAtomsElement(el)]);
184
+ }
185
+ const rect = await this.getElementRect(el);
186
+ return { width: rect.width, height: rect.height };
187
+ }
188
+ /**
189
+ * Alias for {@linkcode setValue}
190
+ *
191
+ * @param {string} value - the value to set
192
+ * @param {string} el - the element to set the value of
193
+ * @deprecated
194
+ * @this {XCUITestDriver}
195
+ */
196
+ async function setValueImmediate(value, el) {
197
+ // WDA does not provide no way to set the value directly
198
+ this.log.info('There is currently no way to bypass typing using XCUITest. Setting value through keyboard');
199
+ await this.setValue(value, el);
200
+ }
201
+ /**
202
+ * @this {XCUITestDriver}
203
+ */
204
+ async function setValue(value, el) {
205
+ el = support_1.util.unwrapElement(el);
206
+ if (!this.isWebContext()) {
207
+ await this.proxyCommand(`/element/${el}/value`, 'POST', {
208
+ value: prepareInputValue(value),
209
+ });
210
+ return;
211
+ }
212
+ const atomsElement = this.getAtomsElement(el);
213
+ await this.executeAtom('click', [atomsElement]);
214
+ if (this.opts.sendKeyStrategy !== 'oneByOne') {
215
+ await this.setValueWithWebAtom(atomsElement, value);
216
+ return;
217
+ }
218
+ for (const char of prepareInputValue(value)) {
219
+ await this.setValueWithWebAtom(atomsElement, char);
220
+ }
221
+ }
222
+ /**
223
+ * Set value with Atom for Web. This method calls `type` atom only.
224
+ * Expected to be called as part of {@linkcode setValue}.
225
+ * @this {XCUITestDriver}
226
+ * @param {import('./types').AtomsElement<string>} atomsElement A target element to type the given value.
227
+ * @param {string|string[]} value The actual text to type.
228
+ */
229
+ async function setValueWithWebAtom(atomsElement, value) {
230
+ await this.executeAtom('type', [atomsElement, value]);
231
+ if (this.opts.skipTriggerInputEventAfterSendkeys) {
232
+ return;
233
+ }
234
+ function triggerInputEvent(/** @type {EventTarget & {_valueTracker?: any}} */ input) {
235
+ let lastValue = '';
236
+ let event = new Event('input', { bubbles: true });
237
+ let tracker = input._valueTracker;
238
+ if (tracker) {
239
+ tracker.setValue(lastValue);
240
+ }
241
+ input.dispatchEvent(event);
242
+ }
243
+ const scriptAsString = `return (${triggerInputEvent}).apply(null, arguments)`;
244
+ await this.executeAtom('execute_script', [scriptAsString, [atomsElement]]);
245
+ }
246
+ /**
247
+ * Send keys to the app
248
+ * @param {string[]} value - Array of keys to send
249
+ * @this {XCUITestDriver}
250
+ * @deprecated Use {@linkcode XCUITestDriver.setValue} instead
251
+ */
252
+ async function keys(value) {
253
+ await this.proxyCommand('/wda/keys', 'POST', {
254
+ value: prepareInputValue(value),
255
+ });
256
+ }
257
+ /**
258
+ * @this {XCUITestDriver}
259
+ */
260
+ async function clear(el) {
261
+ el = support_1.util.unwrapElement(el);
262
+ if (this.isWebContext()) {
263
+ const atomsElement = this.getAtomsElement(el);
264
+ await this.executeAtom('clear', [atomsElement]);
265
+ return;
266
+ }
267
+ await this.proxyCommand(`/element/${el}/clear`, 'POST');
268
+ }
269
+ /**
270
+ * @this {XCUITestDriver}
271
+ */
272
+ async function getContentSize(el) {
273
+ if (this.isWebContext()) {
274
+ throw new driver_1.errors.NotYetImplementedError('Support for getContentSize for web context is not yet implemented. Please contact an Appium dev');
275
+ }
276
+ const type = await this.getAttribute('type', el);
277
+ if (type !== 'XCUIElementTypeTable' && type !== 'XCUIElementTypeCollectionView') {
278
+ throw new Error(`Can't get content size for type '${type}', only for ` + `tables and collection views`);
279
+ }
280
+ let locator = '*';
281
+ if (type === 'XCUIElementTypeTable') {
282
+ // only find table cells, not just any children
283
+ locator = 'XCUIElementTypeCell';
284
+ }
285
+ let contentHeight = 0;
286
+ const children = await this.findElOrEls(`class chain`, locator, true, el);
287
+ if (children.length === 1) {
288
+ // if we know there's only one element, we can optimize to make just one
289
+ // call to WDA
290
+ const rect = await this.getElementRect(lodash_1.default.head(children));
291
+ contentHeight = rect.height;
292
+ }
293
+ else if (children.length) {
294
+ // otherwise if we have multiple elements, logic differs based on element
295
+ // type
296
+ switch (type) {
297
+ case 'XCUIElementTypeTable': {
298
+ const firstRect = await this.getElementRect(lodash_1.default.head(children));
299
+ const lastRect = await this.getElementRect(lodash_1.default.last(children));
300
+ contentHeight = lastRect.y + lastRect.height - firstRect.y;
301
+ break;
302
+ }
303
+ case 'XCUIElementTypeCollectionView': {
304
+ let elsInRow = 1; // we know there must be at least one element in the row
305
+ let firstRect = await this.getElementRect(lodash_1.default.head(children));
306
+ let initialRects = [firstRect];
307
+ for (let i = 1; i < children.length; i++) {
308
+ const rect = await this.getElementRect(children[i]);
309
+ initialRects.push(rect);
310
+ if (rect.y !== firstRect.y) {
311
+ elsInRow = i;
312
+ break;
313
+ }
314
+ }
315
+ const spaceBetweenEls = initialRects[elsInRow].y -
316
+ initialRects[elsInRow - 1].y -
317
+ initialRects[elsInRow - 1].height;
318
+ const numRows = Math.ceil(children.length / elsInRow);
319
+ // assume all cells are the same height
320
+ contentHeight = numRows * firstRect.height + spaceBetweenEls * (numRows - 1);
321
+ break;
322
+ }
323
+ default:
324
+ throw new Error(`Programming error: type '${type}' was not ` +
325
+ `valid but should have already been rejected`);
326
+ }
327
+ }
328
+ const size = await this.getSize(el);
329
+ const origin = await this.getLocationInView(el);
330
+ // attributes have to be strings, so stringify this up
331
+ return JSON.stringify({
332
+ width: size.width,
333
+ height: size.height,
334
+ top: origin.y,
335
+ left: origin.x,
336
+ scrollableOffset: contentHeight,
337
+ });
338
+ }
339
+ /**
340
+ * @this {XCUITestDriver}
341
+ * @returns {Promise<Rect>}
342
+ */
343
+ async function getNativeRect(el) {
344
+ return /** @type {Rect} */ (await this.proxyCommand(`/element/${el}/rect`, 'GET'));
345
+ }
346
+ /**
347
+ * Prepares the input value to be passed as an argument to WDA.
348
+ *
349
+ * @param {string|string[]|number} inp The actual text to type.
350
+ * @example
351
+ * ```js
352
+ * // Acceptable values of `inp`:
353
+ * ['some text']
354
+ * ['s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't']
355
+ * 'some text'
356
+ * 1234
357
+ * ```
358
+ * @throws {Error} If the value is not acceptable for input
359
+ * @returns {string[]} The preprocessed value
360
+ */
361
+ function prepareInputValue(inp) {
362
+ if (![lodash_1.default.isArray, lodash_1.default.isString, lodash_1.default.isFinite].some((f) => f(inp))) {
363
+ throw new Error(`Only strings, numbers and arrays are supported as input arguments. ` +
364
+ `Received: ${JSON.stringify(inp)}`);
365
+ }
366
+ // make it into a string, so then we assure
367
+ // the array items are single characters
368
+ if (lodash_1.default.isArray(inp)) {
369
+ inp = inp.join('');
370
+ }
371
+ else if (lodash_1.default.isFinite(inp)) {
372
+ inp = `${inp}`;
373
+ }
374
+ // The `split` method must not be used on the string
375
+ // to properly handle all Unicode code points
376
+ return [...String(inp)].map((k) => {
377
+ if (['\uE006', '\uE007'].includes(k)) {
378
+ // RETURN or ENTER
379
+ return '\n';
380
+ }
381
+ if (['\uE003', '\ue017'].includes(k)) {
382
+ // BACKSPACE or DELETE
383
+ return '\b';
384
+ }
385
+ return k;
386
+ });
387
+ }
388
+ /**
389
+ * @typedef {import('../driver').XCUITestDriver} XCUITestDriver
390
+ * @typedef {import('@appium/types').Element} Element
391
+ * @typedef {import('@appium/types').Position} Position
392
+ * @typedef {import('@appium/types').Size} Size
393
+ * @typedef {import('@appium/types').Rect} Rect
394
+ */
395
+ //# sourceMappingURL=element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";;;;;AAOA,4CAQC;AAKD,wCAQC;AAKD,0CAQC;AAKD,0BASC;AAKD,gDAkBC;AAKD,oCAOC;AAKD,kCAOC;AAKD,0BAOC;AAMD,wCAUC;AAUD,kCAmBC;AASD,8CAEC;AAQD,0BAQC;AAUD,8CAMC;AAKD,4BAmBC;AASD,kDAmBC;AAQD,oBAIC;AAKD,sBAQC;AAKD,wCA4EC;AAMD,sCAEC;AAhXD,oDAAuB;AACvB,0CAAqC;AACrC,4CAAoC;AAEpC;;GAEG;AACI,KAAK,UAAU,gBAAgB,CAAC,EAAE;IACvC,EAAE,GAAG,cAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC9C,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc,CAAC,EAAE;IACrC,EAAE,GAAG,cAAI,CAAC,aAAa,CAAC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E,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC7D,MAAM,IAAI,KAAK,CACb,qEAAqE;YACnE,aAAa,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CACrC,CAAC;IACJ,CAAC;IAED,2CAA2C;IAC3C,wCAAwC;IACxC,IAAI,gBAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACnB,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC;SAAM,IAAI,gBAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,GAAG,GAAG,GAAG,GAAG,EAAE,CAAC;IACjB,CAAC;IACD,oDAAoD;IACpD,6CAA6C;IAC7C,OAAO,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAChC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,kBAAkB;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,sBAAsB;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Mapping of permission resource name to identifier.
3
+ * @see https://developer.apple.com/documentation/xctest/xcuiprotectedresource?language=objc
4
+ */
5
+ export declare enum PermissionService {
6
+ calendar = 2,
7
+ camera = 6,
8
+ contacts = 1,
9
+ health = -1073741827,
10
+ homekit = 8,
11
+ keyboardnet = -1073741825,
12
+ location = -1073741826,
13
+ medialibrary = 7,
14
+ microphone = 5,
15
+ photos = 4,
16
+ reminders = 3,
17
+ systemroot = 1073741824,
18
+ userdesktop = 1073741825,
19
+ userdocuments = 1073741827,
20
+ userdownloads = 1073741826,
21
+ bluetooth = -1073741824
22
+ }
23
+ /**
24
+ * @see https://developer.apple.com/documentation/corelocation/clauthorizationstatus
25
+ */
26
+ export declare enum AuthorizationStatus {
27
+ notDetermined = 0,
28
+ restricted = 1,
29
+ denied = 2,
30
+ authorizedAlways = 3,
31
+ authorizedWhenInUse = 4
32
+ }
33
+ /**
34
+ * Thermal state of an iOS device.
35
+ *
36
+ * Returned (since iOS 11.0) within a {@linkcode DeviceInfo} response.
37
+ * @see https://developer.apple.com/documentation/foundation/nsprocessinfothermalstate
38
+ */
39
+ export declare enum ThermalState {
40
+ /**
41
+ * The thermal state is within normal limits.
42
+ */
43
+ NSProcessInfoThermalStateNominal = 0,
44
+ /**
45
+ * The thermal state is slightly elevated.
46
+ */
47
+ NSProcessInfoThermalStateFair = 1,
48
+ /**
49
+ * The thermal state is high.
50
+ */
51
+ NSProcessInfoThermalStateSerious = 2,
52
+ /**
53
+ * The thermal state is significantly impacting the performance of the system and the device needs to cool down.
54
+ */
55
+ NSProcessInfoThermalStateCritical = 3
56
+ }
57
+ /**
58
+ * Application state code.
59
+ * @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
60
+ */
61
+ export declare enum AppState {
62
+ /**
63
+ * The application's current state is not known.
64
+ */
65
+ XCUIApplicationStateUnknown = 0,
66
+ /**
67
+ * The application is not running
68
+ */
69
+ XCUIApplicationStateNotRunning = 1,
70
+ /**
71
+ * The application is running in the background, but is suspended.
72
+ */
73
+ XCUIApplicationStateRunningBackgroundSuspended = 2,
74
+ /**
75
+ * The application is running in the background.
76
+ */
77
+ XCUIApplicationStateRunningBackground = 3,
78
+ /**
79
+ * The application is running in the foreground.
80
+ */
81
+ XCUIApplicationStateRunningForeground = 4
82
+ }
83
+ /**
84
+ * Battery state
85
+ * @see {@linkcode BatteryInfo}
86
+ */
87
+ export declare enum BatteryState {
88
+ /**
89
+ * The battery state is unknown.
90
+ */
91
+ UIDeviceBatteryStateUnknown = 0,
92
+ /**
93
+ * The device is running on battery and discharging.
94
+ */
95
+ UIDeviceBatteryStateUnplugged = 1,
96
+ /**
97
+ * The device is plugged in, less than 100%, and charging.
98
+ */
99
+ UIDeviceBatteryStateCharging = 2,
100
+ /**
101
+ * The device is plugged in and is at 100% charge.
102
+ */
103
+ UIDeviceBatteryStateFull = 3
104
+ }
105
+ //# sourceMappingURL=enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../lib/commands/enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,iBAAiB;IAC3B,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,MAAM,cAAc;IACpB,OAAO,IAAI;IACX,WAAW,cAAc;IACzB,QAAQ,cAAc;IACtB,YAAY,IAAI;IAChB,UAAU,IAAI;IACd,MAAM,IAAI;IACV,SAAS,IAAI;IACb,UAAU,aAAa;IACvB,WAAW,aAAa;IACxB,aAAa,aAAa;IAC1B,aAAa,aAAa;IAC1B,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC7B,aAAa,IAAI;IACjB,UAAU,IAAI;IACd,MAAM,IAAI;IACV,gBAAgB,IAAI;IACpB,mBAAmB,IAAI;CACxB;AAED;;;;;GAKG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,gCAAgC,IAAI;IACpC;;OAEG;IACH,6BAA6B,IAAI;IACjC;;OAEG;IACH,gCAAgC,IAAI;IACpC;;OAEG;IACH,iCAAiC,IAAI;CACtC;AACD;;;GAGG;AACH,oBAAY,QAAQ;IAClB;;OAEG;IACH,2BAA2B,IAAI;IAC/B;;OAEG;IACH,8BAA8B,IAAI;IAClC;;OAEG;IACH,8CAA8C,IAAI;IAClD;;OAEG;IACH,qCAAqC,IAAI;IACzC;;OAEG;IACH,qCAAqC,IAAI;CAC1C;AAED;;;GAGG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,2BAA2B,IAAI;IAC/B;;OAEG;IACH,6BAA6B,IAAI;IACjC;;OAEG;IACH,4BAA4B,IAAI;IAChC;;OAEG;IACH,wBAAwB,IAAI;CAC7B"}