spana-test 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (548) hide show
  1. package/.agents/skills/spana-testing/SKILL.md +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +5 -2
  4. package/dist/{accessibility-audit-YZOPUY3D.js → accessibility-audit-MHQ65DUD.js} +61 -12
  5. package/dist/accessibility-audit-MHQ65DUD.js.map +1 -0
  6. package/dist/agent/index.d.ts +3 -11
  7. package/dist/agent/index.d.ts.map +1 -0
  8. package/dist/agent/index.js +38 -15
  9. package/dist/agent/index.js.map +1 -1
  10. package/dist/{session-uT8xL03K.d.ts → agent/session.d.ts} +14 -46
  11. package/dist/agent/session.d.ts.map +1 -0
  12. package/dist/{agent-fixture-5C4MCWRD.js → agent-fixture-H6GOUHNX.js} +3 -3
  13. package/dist/{agent-fixture-5C4MCWRD.js.map → agent-fixture-H6GOUHNX.js.map} +0 -0
  14. package/dist/{allure-FGVR5LND.js → allure-XOM7BXL5.js} +5 -2
  15. package/dist/{allure-FGVR5LND.js.map → allure-XOM7BXL5.js.map} +1 -1
  16. package/dist/{android-6BOQTMM3.js → android-C2S4B4TH.js} +3 -3
  17. package/dist/{android-6BOQTMM3.js.map → android-C2S4B4TH.js.map} +0 -0
  18. package/dist/api/agent-fixture.d.ts +119 -0
  19. package/dist/api/agent-fixture.d.ts.map +1 -0
  20. package/dist/api/app.d.ts +399 -0
  21. package/dist/api/app.d.ts.map +1 -0
  22. package/dist/api/expect.d.ts +180 -0
  23. package/dist/api/expect.d.ts.map +1 -0
  24. package/dist/api/fixtures.d.ts +165 -0
  25. package/dist/api/fixtures.d.ts.map +1 -0
  26. package/dist/api/flow.d.ts +123 -0
  27. package/dist/api/flow.d.ts.map +1 -0
  28. package/dist/api/index.d.ts +4 -0
  29. package/dist/api/index.d.ts.map +1 -0
  30. package/dist/api/snapshots.d.ts +26 -0
  31. package/dist/api/snapshots.d.ts.map +1 -0
  32. package/dist/api/storybook.d.ts +18 -0
  33. package/dist/api/storybook.d.ts.map +1 -0
  34. package/dist/api/suite.d.ts +46 -0
  35. package/dist/api/suite.d.ts.map +1 -0
  36. package/dist/app-W6PRRBMD.js +13 -0
  37. package/dist/{app-RSDPDTKT.js.map → app-W6PRRBMD.js.map} +0 -0
  38. package/dist/appium-CC77BJNK.js +935 -0
  39. package/dist/appium-CC77BJNK.js.map +1 -0
  40. package/dist/{appium-server-66GVUL24.js → appium-server-M6CWWUWF.js} +5 -2
  41. package/dist/{appium-server-66GVUL24.js.map → appium-server-M6CWWUWF.js.map} +1 -1
  42. package/dist/{baseline-manager-5TIUCNP5.js → baseline-manager-LVUVH2MJ.js} +5 -2
  43. package/dist/{baseline-manager-5TIUCNP5.js.map → baseline-manager-LVUVH2MJ.js.map} +1 -1
  44. package/dist/bridge-server-S3DHK7XE.js +12 -0
  45. package/dist/{cache-command-PANUAEMZ.js.map → bridge-server-S3DHK7XE.js.map} +0 -0
  46. package/dist/{cache-command-PANUAEMZ.js → cache-command-OL7HUK2K.js} +3 -3
  47. package/dist/{chunk-DGUM43GV.js.map → cache-command-OL7HUK2K.js.map} +0 -0
  48. package/dist/channels/android-cdp.d.ts +71 -0
  49. package/dist/channels/android-cdp.d.ts.map +1 -0
  50. package/dist/channels/apple-webinspector.d.ts +85 -0
  51. package/dist/channels/apple-webinspector.d.ts.map +1 -0
  52. package/dist/channels/bidi-client.d.ts +79 -0
  53. package/dist/channels/bidi-client.d.ts.map +1 -0
  54. package/dist/channels/bridge-server.d.ts +69 -0
  55. package/dist/channels/bridge-server.d.ts.map +1 -0
  56. package/dist/channels/cdp-client.d.ts +115 -0
  57. package/dist/channels/cdp-client.d.ts.map +1 -0
  58. package/dist/channels/dom-channel.d.ts +246 -0
  59. package/dist/channels/dom-channel.d.ts.map +1 -0
  60. package/dist/channels/index.d.ts +8 -0
  61. package/dist/channels/index.d.ts.map +1 -0
  62. package/dist/channels/webkit-inspector.d.ts +85 -0
  63. package/dist/channels/webkit-inspector.d.ts.map +1 -0
  64. package/dist/channels/ws-server.d.ts +21 -0
  65. package/dist/channels/ws-server.d.ts.map +1 -0
  66. package/dist/chunk-27H6NDA5.js +845 -0
  67. package/dist/chunk-27H6NDA5.js.map +1 -0
  68. package/dist/{chunk-WV3ALL3H.js → chunk-2MA5G2VH.js} +6 -2
  69. package/dist/{chunk-WV3ALL3H.js.map → chunk-2MA5G2VH.js.map} +1 -1
  70. package/dist/chunk-4LJ3KYCX.js +94 -0
  71. package/dist/chunk-4LJ3KYCX.js.map +1 -0
  72. package/dist/chunk-5SDVP53E.js +1046 -0
  73. package/dist/chunk-5SDVP53E.js.map +1 -0
  74. package/dist/{chunk-FPQAJNE3.js → chunk-5T7LSBDM.js} +288 -101
  75. package/dist/chunk-5T7LSBDM.js.map +1 -0
  76. package/dist/chunk-6C2EILMC.js +2589 -0
  77. package/dist/chunk-6C2EILMC.js.map +1 -0
  78. package/dist/{chunk-3IZMPNE7.js → chunk-7IUD55GY.js} +1333 -941
  79. package/dist/chunk-7IUD55GY.js.map +1 -0
  80. package/dist/{chunk-JPZCZHL4.js → chunk-7Q7TSUNL.js} +6 -1
  81. package/dist/{chunk-JPZCZHL4.js.map → chunk-7Q7TSUNL.js.map} +1 -1
  82. package/dist/{chunk-X2TJP7LB.js → chunk-7WHQIQPM.js} +11 -1
  83. package/dist/chunk-7WHQIQPM.js.map +1 -0
  84. package/dist/chunk-A7Z52TDQ.js +97 -0
  85. package/dist/chunk-A7Z52TDQ.js.map +1 -0
  86. package/dist/{chunk-WZAQANN6.js → chunk-BUNMIMGA.js} +9 -3
  87. package/dist/{chunk-WZAQANN6.js.map → chunk-BUNMIMGA.js.map} +1 -1
  88. package/dist/chunk-DMF2BPPA.js +547 -0
  89. package/dist/chunk-DMF2BPPA.js.map +1 -0
  90. package/dist/{chunk-Z6K4QQAR.js → chunk-FHCOPLYB.js} +36 -7
  91. package/dist/chunk-FHCOPLYB.js.map +1 -0
  92. package/dist/{chunk-3SH5JQF7.js → chunk-FSPMFRJO.js} +6 -1
  93. package/dist/{chunk-3SH5JQF7.js.map → chunk-FSPMFRJO.js.map} +1 -1
  94. package/dist/chunk-FTXUQMGH.js +56 -0
  95. package/dist/chunk-FTXUQMGH.js.map +1 -0
  96. package/dist/chunk-FUXFXFBM.js +1962 -0
  97. package/dist/chunk-FUXFXFBM.js.map +1 -0
  98. package/dist/{chunk-SIJJVN2D.js → chunk-FV7ONGQ7.js} +9 -3
  99. package/dist/{chunk-SIJJVN2D.js.map → chunk-FV7ONGQ7.js.map} +1 -1
  100. package/dist/{chunk-VUNH4AJD.js → chunk-GDVHJBR2.js} +9 -5
  101. package/dist/{chunk-VUNH4AJD.js.map → chunk-GDVHJBR2.js.map} +1 -1
  102. package/dist/chunk-GLNTGHR6.js +330 -0
  103. package/dist/chunk-GLNTGHR6.js.map +1 -0
  104. package/dist/{chunk-OPTNFLBL.js → chunk-HIGFQRWM.js} +7 -1
  105. package/dist/{chunk-OPTNFLBL.js.map → chunk-HIGFQRWM.js.map} +1 -1
  106. package/dist/chunk-HJY5YN4N.js +272 -0
  107. package/dist/chunk-HJY5YN4N.js.map +1 -0
  108. package/dist/chunk-HNQLWFHL.js +40 -0
  109. package/dist/chunk-HNQLWFHL.js.map +1 -0
  110. package/dist/chunk-HUYC4OAL.js +72 -0
  111. package/dist/chunk-HUYC4OAL.js.map +1 -0
  112. package/dist/chunk-HWS3XUEF.js +109 -0
  113. package/dist/chunk-HWS3XUEF.js.map +1 -0
  114. package/dist/chunk-IDIHDVGC.js +328 -0
  115. package/dist/chunk-IDIHDVGC.js.map +1 -0
  116. package/dist/{chunk-4SA7JK5D.js → chunk-IUK3RJ6W.js} +38 -20
  117. package/dist/{chunk-4SA7JK5D.js.map → chunk-IUK3RJ6W.js.map} +1 -1
  118. package/dist/chunk-K4K2ACT2.js +179 -0
  119. package/dist/chunk-K4K2ACT2.js.map +1 -0
  120. package/dist/chunk-LKGF75QJ.js +654 -0
  121. package/dist/chunk-LKGF75QJ.js.map +1 -0
  122. package/dist/chunk-MAKZK7GY.js +935 -0
  123. package/dist/chunk-MAKZK7GY.js.map +1 -0
  124. package/dist/chunk-MPJCUL2B.js +154 -0
  125. package/dist/chunk-MPJCUL2B.js.map +1 -0
  126. package/dist/chunk-MUMIMDRJ.js +24 -0
  127. package/dist/chunk-MUMIMDRJ.js.map +1 -0
  128. package/dist/{chunk-KJPHH2TW.js → chunk-NHT3XSX3.js} +6 -1
  129. package/dist/{chunk-KJPHH2TW.js.map → chunk-NHT3XSX3.js.map} +1 -1
  130. package/dist/{chunk-6PTUVG6A.js → chunk-NWGA3R2E.js} +7 -18
  131. package/dist/chunk-NWGA3R2E.js.map +1 -0
  132. package/dist/{chunk-3FSZNKEF.js → chunk-NXET4BFJ.js} +7 -1
  133. package/dist/{chunk-3FSZNKEF.js.map → chunk-NXET4BFJ.js.map} +1 -1
  134. package/dist/chunk-PPRNCRTS.js +1104 -0
  135. package/dist/chunk-PPRNCRTS.js.map +1 -0
  136. package/dist/{chunk-64UZQP7Z.js → chunk-PRQTAIYA.js} +30 -4
  137. package/dist/chunk-PRQTAIYA.js.map +1 -0
  138. package/dist/{chunk-4KK4E3N3.js → chunk-RHQJSPOS.js} +1289 -187
  139. package/dist/chunk-RHQJSPOS.js.map +1 -0
  140. package/dist/{chunk-CY3DKTBZ.js → chunk-RIXZISMX.js} +6 -1
  141. package/dist/{chunk-CY3DKTBZ.js.map → chunk-RIXZISMX.js.map} +1 -1
  142. package/dist/{chunk-S7MSBZ3F.js → chunk-TFEXYI6N.js} +6 -1
  143. package/dist/{chunk-S7MSBZ3F.js.map → chunk-TFEXYI6N.js.map} +1 -1
  144. package/dist/chunk-U56N5JCJ.js +19842 -0
  145. package/dist/chunk-U56N5JCJ.js.map +1 -0
  146. package/dist/{chunk-IHVZKQQW.js → chunk-UKUXNFQP.js} +6 -1
  147. package/dist/{chunk-IHVZKQQW.js.map → chunk-UKUXNFQP.js.map} +1 -1
  148. package/dist/{chunk-SGZMO456.js → chunk-VWJNINPX.js} +667 -123
  149. package/dist/chunk-VWJNINPX.js.map +1 -0
  150. package/dist/chunk-WFC4DCFF.js +529 -0
  151. package/dist/chunk-WFC4DCFF.js.map +1 -0
  152. package/dist/{chunk-26NJXP55.js → chunk-WJH5K42V.js} +6 -2
  153. package/dist/{chunk-26NJXP55.js.map → chunk-WJH5K42V.js.map} +1 -1
  154. package/dist/chunk-X5FRYDZ3.js +91 -0
  155. package/dist/chunk-X5FRYDZ3.js.map +1 -0
  156. package/dist/{chunk-VP6V4XEJ.js → chunk-XD6A3VXB.js} +10 -5
  157. package/dist/{chunk-VP6V4XEJ.js.map → chunk-XD6A3VXB.js.map} +1 -1
  158. package/dist/{chunk-2AFWVHQK.js → chunk-XVL4FHXA.js} +6 -1
  159. package/dist/{chunk-2AFWVHQK.js.map → chunk-XVL4FHXA.js.map} +1 -1
  160. package/dist/chunk-YFTHJRDO.js +37 -0
  161. package/dist/chunk-YFTHJRDO.js.map +1 -0
  162. package/dist/{chunk-LAMTF4LX.js → chunk-ZIETAMAD.js} +6 -1
  163. package/dist/{chunk-LAMTF4LX.js.map → chunk-ZIETAMAD.js.map} +1 -1
  164. package/dist/cli/cache-command.d.ts +29 -0
  165. package/dist/cli/cache-command.d.ts.map +1 -0
  166. package/dist/cli/command-errors.d.ts +7 -0
  167. package/dist/cli/command-errors.d.ts.map +1 -0
  168. package/dist/cli/config-loader.d.ts +11 -0
  169. package/dist/cli/config-loader.d.ts.map +1 -0
  170. package/dist/cli/doctor-command.d.ts +64 -0
  171. package/dist/cli/doctor-command.d.ts.map +1 -0
  172. package/dist/cli/gen-types-command.d.ts +2 -0
  173. package/dist/cli/gen-types-command.d.ts.map +1 -0
  174. package/dist/cli/index.d.ts +2 -0
  175. package/dist/cli/index.d.ts.map +1 -0
  176. package/dist/cli/init-command.d.ts +7 -0
  177. package/dist/cli/init-command.d.ts.map +1 -0
  178. package/dist/cli/init-flow-command.d.ts +11 -0
  179. package/dist/cli/init-flow-command.d.ts.map +1 -0
  180. package/dist/cli/iteration.d.ts +44 -0
  181. package/dist/cli/iteration.d.ts.map +1 -0
  182. package/dist/cli/scaffolds.d.ts +13 -0
  183. package/dist/cli/scaffolds.d.ts.map +1 -0
  184. package/dist/cli/studio-command.d.ts +8 -0
  185. package/dist/cli/studio-command.d.ts.map +1 -0
  186. package/dist/cli/test-command.d.ts +61 -0
  187. package/dist/cli/test-command.d.ts.map +1 -0
  188. package/dist/cli/watch-mode.d.ts +9 -0
  189. package/dist/cli/watch-mode.d.ts.map +1 -0
  190. package/dist/cli.js +86 -30
  191. package/dist/cli.js.map +1 -1
  192. package/dist/cloud/browserstack.d.ts +9 -0
  193. package/dist/cloud/browserstack.d.ts.map +1 -0
  194. package/dist/cloud/common.d.ts +26 -0
  195. package/dist/cloud/common.d.ts.map +1 -0
  196. package/dist/cloud/provider.d.ts +21 -0
  197. package/dist/cloud/provider.d.ts.map +1 -0
  198. package/dist/cloud/saucelabs.d.ts +9 -0
  199. package/dist/cloud/saucelabs.d.ts.map +1 -0
  200. package/dist/{compiler-X6WTFMYF.js → compiler-44UW2FID.js} +7 -3
  201. package/dist/{compiler-X6WTFMYF.js.map → compiler-44UW2FID.js.map} +1 -1
  202. package/dist/config-loader-7W7OEWRG.js +10 -0
  203. package/dist/{config-loader-CNGIW2XK.js.map → config-loader-7W7OEWRG.js.map} +0 -0
  204. package/dist/{console-DIYEJSSP.js → console-T6TVZ65G.js} +8 -2
  205. package/dist/console-T6TVZ65G.js.map +1 -0
  206. package/dist/core/accessibility-audit.d.ts +29 -0
  207. package/dist/core/accessibility-audit.d.ts.map +1 -0
  208. package/dist/core/artifacts.d.ts +27 -0
  209. package/dist/core/artifacts.d.ts.map +1 -0
  210. package/dist/core/baseline-manager.d.ts +18 -0
  211. package/dist/core/baseline-manager.d.ts.map +1 -0
  212. package/dist/core/benchmark.d.ts +21 -0
  213. package/dist/core/benchmark.d.ts.map +1 -0
  214. package/dist/core/debug-repl.d.ts +17 -0
  215. package/dist/core/debug-repl.d.ts.map +1 -0
  216. package/dist/core/engine.d.ts +51 -0
  217. package/dist/core/engine.d.ts.map +1 -0
  218. package/dist/core/filters.d.ts +248 -0
  219. package/dist/core/filters.d.ts.map +1 -0
  220. package/dist/core/flow-generator.d.ts +13 -0
  221. package/dist/core/flow-generator.d.ts.map +1 -0
  222. package/dist/core/graphemes.d.ts +2 -0
  223. package/dist/core/graphemes.d.ts.map +1 -0
  224. package/dist/core/index.d.ts +6 -0
  225. package/dist/core/index.d.ts.map +1 -0
  226. package/dist/core/native-accel.d.ts +21 -0
  227. package/dist/core/native-accel.d.ts.map +1 -0
  228. package/dist/core/network-cache.d.ts +68 -0
  229. package/dist/core/network-cache.d.ts.map +1 -0
  230. package/dist/core/orchestrator.d.ts +44 -0
  231. package/dist/core/orchestrator.d.ts.map +1 -0
  232. package/dist/core/parallel.d.ts +42 -0
  233. package/dist/core/parallel.d.ts.map +1 -0
  234. package/dist/core/port-allocator.d.ts +16 -0
  235. package/dist/core/port-allocator.d.ts.map +1 -0
  236. package/dist/core/projects.d.ts +60 -0
  237. package/dist/core/projects.d.ts.map +1 -0
  238. package/dist/core/replay-cache.d.ts +127 -0
  239. package/dist/core/replay-cache.d.ts.map +1 -0
  240. package/dist/core/runner.d.ts +50 -0
  241. package/dist/core/runner.d.ts.map +1 -0
  242. package/dist/core/screenshot-compare.d.ts +50 -0
  243. package/dist/core/screenshot-compare.d.ts.map +1 -0
  244. package/dist/core/session-manager.d.ts +35 -0
  245. package/dist/core/session-manager.d.ts.map +1 -0
  246. package/dist/core/step-recorder.d.ts +20 -0
  247. package/dist/core/step-recorder.d.ts.map +1 -0
  248. package/dist/core/target-matrix.d.ts +29 -0
  249. package/dist/core/target-matrix.d.ts.map +1 -0
  250. package/dist/core/trace-viewer.d.ts +91 -0
  251. package/dist/core/trace-viewer.d.ts.map +1 -0
  252. package/dist/core/validator.d.ts +18 -0
  253. package/dist/core/validator.d.ts.map +1 -0
  254. package/dist/core/video-recorder.d.ts +120 -0
  255. package/dist/core/video-recorder.d.ts.map +1 -0
  256. package/dist/core/worker-pool.d.ts +87 -0
  257. package/dist/core/worker-pool.d.ts.map +1 -0
  258. package/dist/{daemon-manager-2EQDVUVM.js → daemon-manager-2SK5PHJR.js} +3 -3
  259. package/dist/{daemon-manager-2EQDVUVM.js.map → daemon-manager-2SK5PHJR.js.map} +0 -0
  260. package/dist/device/android.d.ts +66 -0
  261. package/dist/device/android.d.ts.map +1 -0
  262. package/dist/device/discover.d.ts +15 -0
  263. package/dist/device/discover.d.ts.map +1 -0
  264. package/dist/device/index.d.ts +4 -0
  265. package/dist/device/index.d.ts.map +1 -0
  266. package/dist/device/ios.d.ts +126 -0
  267. package/dist/device/ios.d.ts.map +1 -0
  268. package/dist/diagnostics/live-inspector.d.ts +121 -0
  269. package/dist/diagnostics/live-inspector.d.ts.map +1 -0
  270. package/dist/diagnostics/native-logs.d.ts +38 -0
  271. package/dist/diagnostics/native-logs.d.ts.map +1 -0
  272. package/dist/discover-6ULCTB5T.js +15 -0
  273. package/dist/{discover-NKDMB4UI.js.map → discover-6ULCTB5T.js.map} +0 -0
  274. package/dist/{doctor-command-6ZVJWCW7.js → doctor-command-4CQQLB7M.js} +24 -14
  275. package/dist/{doctor-command-6ZVJWCW7.js.map → doctor-command-4CQQLB7M.js.map} +1 -1
  276. package/dist/driver-3MEIFYST.js +19 -0
  277. package/dist/{filters-MQG2RMPX.js.map → driver-3MEIFYST.js.map} +0 -0
  278. package/dist/driver-QTIAADUZ.js +19 -0
  279. package/dist/{github-pr-YMWIPCCZ.js.map → driver-QTIAADUZ.js.map} +0 -0
  280. package/dist/drivers/adapter-registry.d.ts +96 -0
  281. package/dist/drivers/adapter-registry.d.ts.map +1 -0
  282. package/dist/drivers/appium/android.d.ts +22 -0
  283. package/dist/drivers/appium/android.d.ts.map +1 -0
  284. package/dist/drivers/appium/client.d.ts +26 -0
  285. package/dist/drivers/appium/client.d.ts.map +1 -0
  286. package/dist/drivers/appium/ios.d.ts +28 -0
  287. package/dist/drivers/appium/ios.d.ts.map +1 -0
  288. package/dist/drivers/appium/window-size.d.ts +8 -0
  289. package/dist/drivers/appium/window-size.d.ts.map +1 -0
  290. package/dist/drivers/browser-extensions.d.ts +62 -0
  291. package/dist/drivers/browser-extensions.d.ts.map +1 -0
  292. package/dist/drivers/cdp-browser.d.ts +129 -0
  293. package/dist/drivers/cdp-browser.d.ts.map +1 -0
  294. package/dist/drivers/common/xml-tokenizer.d.ts +26 -0
  295. package/dist/drivers/common/xml-tokenizer.d.ts.map +1 -0
  296. package/dist/drivers/device-controls.d.ts +36 -0
  297. package/dist/drivers/device-controls.d.ts.map +1 -0
  298. package/dist/drivers/electrobun.d.ts +47 -0
  299. package/dist/drivers/electrobun.d.ts.map +1 -0
  300. package/dist/drivers/electron.d.ts +36 -0
  301. package/dist/drivers/electron.d.ts.map +1 -0
  302. package/dist/drivers/index.d.ts +2 -0
  303. package/dist/drivers/index.d.ts.map +1 -0
  304. package/dist/drivers/launch-options.d.ts +10 -0
  305. package/dist/drivers/launch-options.d.ts.map +1 -0
  306. package/dist/drivers/network-profiles.d.ts +9 -0
  307. package/dist/drivers/network-profiles.d.ts.map +1 -0
  308. package/dist/drivers/playwright-parser.d.ts +16 -0
  309. package/dist/drivers/playwright-parser.d.ts.map +1 -0
  310. package/dist/drivers/playwright.d.ts +65 -0
  311. package/dist/drivers/playwright.d.ts.map +1 -0
  312. package/dist/drivers/raw-driver.d.ts +403 -0
  313. package/dist/drivers/raw-driver.d.ts.map +1 -0
  314. package/dist/drivers/uiautomator2/client.d.ts +77 -0
  315. package/dist/drivers/uiautomator2/client.d.ts.map +1 -0
  316. package/dist/drivers/uiautomator2/driver.d.ts +20 -0
  317. package/dist/drivers/uiautomator2/driver.d.ts.map +1 -0
  318. package/dist/drivers/uiautomator2/index.d.ts +5 -0
  319. package/dist/drivers/uiautomator2/index.d.ts.map +1 -0
  320. package/dist/drivers/uiautomator2/installer.d.ts +20 -0
  321. package/dist/drivers/uiautomator2/installer.d.ts.map +1 -0
  322. package/dist/drivers/uiautomator2/pagesource.d.ts +12 -0
  323. package/dist/drivers/uiautomator2/pagesource.d.ts.map +1 -0
  324. package/dist/drivers/wasm-utils.d.ts +100 -0
  325. package/dist/drivers/wasm-utils.d.ts.map +1 -0
  326. package/dist/drivers/wasm.d.ts +57 -0
  327. package/dist/drivers/wasm.d.ts.map +1 -0
  328. package/dist/drivers/wda/client.d.ts +116 -0
  329. package/dist/drivers/wda/client.d.ts.map +1 -0
  330. package/dist/drivers/wda/driver.d.ts +26 -0
  331. package/dist/drivers/wda/driver.d.ts.map +1 -0
  332. package/dist/drivers/wda/index.d.ts +5 -0
  333. package/dist/drivers/wda/index.d.ts.map +1 -0
  334. package/dist/drivers/wda/installer.d.ts +51 -0
  335. package/dist/drivers/wda/installer.d.ts.map +1 -0
  336. package/dist/drivers/wda/pagesource.d.ts +12 -0
  337. package/dist/drivers/wda/pagesource.d.ts.map +1 -0
  338. package/dist/electrobun-MPAHMSI2.js +15 -0
  339. package/dist/{installer-5UHTYQTB.js.map → electrobun-MPAHMSI2.js.map} +0 -0
  340. package/dist/electron-SQACDON3.js +9 -0
  341. package/dist/{ios-Y4TO5MBR.js.map → electron-SQACDON3.js.map} +0 -0
  342. package/dist/errors.d.ts +82 -0
  343. package/dist/errors.d.ts.map +1 -0
  344. package/dist/{filters-MQG2RMPX.js → filters-5DCGGJRN.js} +3 -3
  345. package/dist/{local-DM3YBSV5.js.map → filters-5DCGGJRN.js.map} +0 -0
  346. package/dist/gherkin/compiler.d.ts +3 -0
  347. package/dist/gherkin/compiler.d.ts.map +1 -0
  348. package/dist/gherkin/index.d.ts +7 -0
  349. package/dist/gherkin/index.d.ts.map +1 -0
  350. package/dist/gherkin/matcher.d.ts +9 -0
  351. package/dist/gherkin/matcher.d.ts.map +1 -0
  352. package/dist/gherkin/registry.d.ts +28 -0
  353. package/dist/gherkin/registry.d.ts.map +1 -0
  354. package/dist/gherkin/steps.d.ts +13 -31
  355. package/dist/gherkin/steps.d.ts.map +1 -0
  356. package/dist/gherkin/steps.js +5 -2
  357. package/dist/gherkin/steps.js.map +1 -1
  358. package/dist/gherkin/world.d.ts +15 -0
  359. package/dist/gherkin/world.d.ts.map +1 -0
  360. package/dist/{github-pr-YMWIPCCZ.js → github-pr-RYO6IAKD.js} +3 -3
  361. package/dist/{machine-6H25TRTU.js.map → github-pr-RYO6IAKD.js.map} +0 -0
  362. package/dist/{html-FLMWPFQD.js → html-KJ2QAGF4.js} +6 -3
  363. package/dist/{html-FLMWPFQD.js.map → html-KJ2QAGF4.js.map} +1 -1
  364. package/dist/index.d.ts +57 -2267
  365. package/dist/index.d.ts.map +1 -0
  366. package/dist/index.js +460 -69
  367. package/dist/index.js.map +1 -1
  368. package/dist/{init-command-Z3QREABL.js → init-command-V5VGN3IS.js} +5 -2
  369. package/dist/{init-command-Z3QREABL.js.map → init-command-V5VGN3IS.js.map} +1 -1
  370. package/dist/{init-flow-command-4EKRVTNT.js → init-flow-command-INYUCC6N.js} +6 -3
  371. package/dist/{init-flow-command-4EKRVTNT.js.map → init-flow-command-INYUCC6N.js.map} +1 -1
  372. package/dist/{installer-5UHTYQTB.js → installer-DMTY47SI.js} +5 -5
  373. package/dist/{provider-YIPU5K42.js.map → installer-DMTY47SI.js.map} +0 -0
  374. package/dist/installer-KL2NCILK.js +17 -0
  375. package/dist/{runner-WOVZWUQR.js.map → installer-KL2NCILK.js.map} +0 -0
  376. package/dist/{ios-Y4TO5MBR.js → ios-SZ4RBI7Q.js} +4 -4
  377. package/dist/{server-ING5D5ZJ.js.map → ios-SZ4RBI7Q.js.map} +0 -0
  378. package/dist/json-57Z2YSES.js +39 -0
  379. package/dist/json-57Z2YSES.js.map +1 -0
  380. package/dist/{junit-CGB3LKHD.js → junit-MHD5AXBU.js} +26 -6
  381. package/dist/junit-MHD5AXBU.js.map +1 -0
  382. package/dist/{local-DM3YBSV5.js → local-SWHWINSA.js} +11 -12
  383. package/dist/{session-5TNWVGQQ.js.map → local-SWHWINSA.js.map} +0 -0
  384. package/dist/{machine-6H25TRTU.js → machine-NOOFRT45.js} +3 -3
  385. package/dist/{validator-WO5IL7IY.js.map → machine-NOOFRT45.js.map} +0 -0
  386. package/dist/machine.d.ts +20 -0
  387. package/dist/machine.d.ts.map +1 -0
  388. package/dist/mcp/server.d.ts +73 -0
  389. package/dist/mcp/server.d.ts.map +1 -0
  390. package/dist/pagesource-KIQ5T5MA.js +9 -0
  391. package/dist/pagesource-KIQ5T5MA.js.map +1 -0
  392. package/dist/pagesource-KKG7WMFJ.js +9 -0
  393. package/dist/pagesource-KKG7WMFJ.js.map +1 -0
  394. package/dist/playwright-42QYIZEE.js +28 -0
  395. package/dist/playwright-42QYIZEE.js.map +1 -0
  396. package/dist/{provider-YIPU5K42.js → provider-CBAXZ2VA.js} +3 -3
  397. package/dist/provider-CBAXZ2VA.js.map +1 -0
  398. package/dist/{redact-U72BUBBR.js → redact-OG4M3IEU.js} +5 -2
  399. package/dist/{redact-U72BUBBR.js.map → redact-OG4M3IEU.js.map} +1 -1
  400. package/dist/report/allure.d.ts +3 -0
  401. package/dist/report/allure.d.ts.map +1 -0
  402. package/dist/report/classify-error.d.ts +7 -0
  403. package/dist/report/classify-error.d.ts.map +1 -0
  404. package/dist/report/code-frame.d.ts +16 -0
  405. package/dist/report/code-frame.d.ts.map +1 -0
  406. package/dist/report/console.d.ts +7 -0
  407. package/dist/report/console.d.ts.map +1 -0
  408. package/dist/report/failure-bundle.d.ts +66 -0
  409. package/dist/report/failure-bundle.d.ts.map +1 -0
  410. package/dist/report/failure-diagnostics.d.ts +11 -0
  411. package/dist/report/failure-diagnostics.d.ts.map +1 -0
  412. package/dist/report/github-pr.d.ts +20 -0
  413. package/dist/report/github-pr.d.ts.map +1 -0
  414. package/dist/report/html.d.ts +3 -0
  415. package/dist/report/html.d.ts.map +1 -0
  416. package/dist/report/index.d.ts +8 -0
  417. package/dist/report/index.d.ts.map +1 -0
  418. package/dist/report/json.d.ts +3 -0
  419. package/dist/report/json.d.ts.map +1 -0
  420. package/dist/report/junit.d.ts +3 -0
  421. package/dist/report/junit.d.ts.map +1 -0
  422. package/dist/report/redact.d.ts +29 -0
  423. package/dist/report/redact.d.ts.map +1 -0
  424. package/dist/report/selector-guardrails.d.ts +12 -0
  425. package/dist/report/selector-guardrails.d.ts.map +1 -0
  426. package/dist/report/types.d.ts +164 -0
  427. package/dist/report/types.d.ts.map +1 -0
  428. package/dist/{runner-WOVZWUQR.js → runner-ABGUVOJG.js} +5 -3
  429. package/dist/runner-ABGUVOJG.js.map +1 -0
  430. package/dist/runtime/appium-server.d.ts +34 -0
  431. package/dist/runtime/appium-server.d.ts.map +1 -0
  432. package/dist/runtime/appium.d.ts +5 -0
  433. package/dist/runtime/appium.d.ts.map +1 -0
  434. package/dist/runtime/capabilities.d.ts +19 -0
  435. package/dist/runtime/capabilities.d.ts.map +1 -0
  436. package/dist/runtime/daemon-manager.d.ts +83 -0
  437. package/dist/runtime/daemon-manager.d.ts.map +1 -0
  438. package/dist/runtime/local.d.ts +38 -0
  439. package/dist/runtime/local.d.ts.map +1 -0
  440. package/dist/runtime/types.d.ts +21 -0
  441. package/dist/runtime/types.d.ts.map +1 -0
  442. package/dist/runtime/web-server.d.ts +57 -0
  443. package/dist/runtime/web-server.d.ts.map +1 -0
  444. package/dist/schemas/config.d.ts +812 -0
  445. package/dist/schemas/config.d.ts.map +1 -0
  446. package/dist/schemas/device.d.ts +12 -0
  447. package/dist/schemas/device.d.ts.map +1 -0
  448. package/dist/schemas/element.d.ts +66 -0
  449. package/dist/schemas/element.d.ts.map +1 -0
  450. package/dist/schemas/index.d.ts +5 -0
  451. package/dist/schemas/index.d.ts.map +1 -0
  452. package/dist/schemas/selector.d.ts +193 -0
  453. package/dist/schemas/selector.d.ts.map +1 -0
  454. package/dist/screenshot-compare-BJRJHKNQ.js +12 -0
  455. package/dist/screenshot-compare-BJRJHKNQ.js.map +1 -0
  456. package/dist/server-2Y46CDVB.js +6749 -0
  457. package/dist/server-2Y46CDVB.js.map +1 -0
  458. package/dist/{server-ING5D5ZJ.js → server-ZCBZ4UYF.js} +3 -3
  459. package/dist/server-ZCBZ4UYF.js.map +1 -0
  460. package/dist/session-5XW6TKF4.js +39 -0
  461. package/dist/session-5XW6TKF4.js.map +1 -0
  462. package/dist/smart/auto-wait.d.ts +38 -0
  463. package/dist/smart/auto-wait.d.ts.map +1 -0
  464. package/dist/smart/channel-resolver.d.ts +90 -0
  465. package/dist/smart/channel-resolver.d.ts.map +1 -0
  466. package/dist/smart/coordinator.d.ts +162 -0
  467. package/dist/smart/coordinator.d.ts.map +1 -0
  468. package/dist/smart/diagnostics.d.ts +15 -0
  469. package/dist/smart/diagnostics.d.ts.map +1 -0
  470. package/dist/smart/element-matcher.d.ts +24 -0
  471. package/dist/smart/element-matcher.d.ts.map +1 -0
  472. package/dist/smart/hierarchy-cache.d.ts +16 -0
  473. package/dist/smart/hierarchy-cache.d.ts.map +1 -0
  474. package/dist/smart/index.d.ts +4 -0
  475. package/dist/smart/index.d.ts.map +1 -0
  476. package/dist/studio/api.d.ts +317 -0
  477. package/dist/studio/api.d.ts.map +1 -0
  478. package/dist/studio/context.d.ts +7 -0
  479. package/dist/studio/context.d.ts.map +1 -0
  480. package/dist/studio/core/element-tree.d.ts +15 -0
  481. package/dist/studio/core/element-tree.d.ts.map +1 -0
  482. package/dist/studio/effect-handler.d.ts +3 -0
  483. package/dist/studio/effect-handler.d.ts.map +1 -0
  484. package/dist/studio/procedures.d.ts +4 -0
  485. package/dist/studio/procedures.d.ts.map +1 -0
  486. package/dist/studio/recording-session.d.ts +31 -0
  487. package/dist/studio/recording-session.d.ts.map +1 -0
  488. package/dist/studio/routers/devices.d.ts +11 -0
  489. package/dist/studio/routers/devices.d.ts.map +1 -0
  490. package/dist/studio/routers/inspector.d.ts +104 -0
  491. package/dist/studio/routers/inspector.d.ts.map +1 -0
  492. package/dist/studio/routers/recording.d.ts +130 -0
  493. package/dist/studio/routers/recording.d.ts.map +1 -0
  494. package/dist/studio/routers/tests.d.ts +93 -0
  495. package/dist/studio/routers/tests.d.ts.map +1 -0
  496. package/dist/studio/server.d.ts +12 -0
  497. package/dist/studio/server.d.ts.map +1 -0
  498. package/dist/{studio-command-KK7A3KN6.js → studio-command-BNBOL424.js} +6 -3
  499. package/dist/{studio-command-KK7A3KN6.js.map → studio-command-BNBOL424.js.map} +1 -1
  500. package/dist/{test-command-QGIJBRH7.js → test-command-T4PLAZXU.js} +311 -1080
  501. package/dist/test-command-T4PLAZXU.js.map +1 -0
  502. package/dist/{validator-WO5IL7IY.js → validator-AJNOFBQM.js} +4 -4
  503. package/dist/validator-AJNOFBQM.js.map +1 -0
  504. package/dist/watch-mode-NR5MHNNL.js +10 -0
  505. package/dist/watch-mode-NR5MHNNL.js.map +1 -0
  506. package/native/darwin-arm64/libspana_native.dylib +0 -0
  507. package/native/darwin-x64/libspana_native.dylib +0 -0
  508. package/native/linux-arm64/libspana_native.so +0 -0
  509. package/native/linux-x64/libspana_native.so +0 -0
  510. package/native/win32-x64/spana_native.dll +0 -0
  511. package/package.json +16 -19
  512. package/studio-dist/assets/index-CHLA4F7b.css +2 -0
  513. package/studio-dist/assets/index-DXGUfzm3.js +23 -0
  514. package/studio-dist/index.html +2 -2
  515. package/dist/accessibility-audit-YZOPUY3D.js.map +0 -1
  516. package/dist/app-RSDPDTKT.js +0 -10
  517. package/dist/chunk-3IZMPNE7.js.map +0 -1
  518. package/dist/chunk-4KK4E3N3.js.map +0 -1
  519. package/dist/chunk-54ASKII6.js +0 -183
  520. package/dist/chunk-54ASKII6.js.map +0 -1
  521. package/dist/chunk-64UZQP7Z.js.map +0 -1
  522. package/dist/chunk-6PTUVG6A.js.map +0 -1
  523. package/dist/chunk-DGUM43GV.js +0 -11
  524. package/dist/chunk-FPQAJNE3.js.map +0 -1
  525. package/dist/chunk-FXBWACUT.js +0 -4378
  526. package/dist/chunk-FXBWACUT.js.map +0 -1
  527. package/dist/chunk-SGZMO456.js.map +0 -1
  528. package/dist/chunk-WS2TVNMY.js +0 -2494
  529. package/dist/chunk-WS2TVNMY.js.map +0 -1
  530. package/dist/chunk-X2TJP7LB.js.map +0 -1
  531. package/dist/chunk-XA6LWLZQ.js +0 -310
  532. package/dist/chunk-XA6LWLZQ.js.map +0 -1
  533. package/dist/chunk-Z6K4QQAR.js.map +0 -1
  534. package/dist/config-loader-CNGIW2XK.js +0 -9
  535. package/dist/console-DIYEJSSP.js.map +0 -1
  536. package/dist/discover-NKDMB4UI.js +0 -15
  537. package/dist/flow-DddAj1xv.d.ts +0 -1913
  538. package/dist/json-JMRPUVY2.js +0 -20
  539. package/dist/json-JMRPUVY2.js.map +0 -1
  540. package/dist/junit-CGB3LKHD.js.map +0 -1
  541. package/dist/screenshot-compare-POTXVUTL.js +0 -136
  542. package/dist/screenshot-compare-POTXVUTL.js.map +0 -1
  543. package/dist/server-JNQ2PLCC.js +0 -855
  544. package/dist/server-JNQ2PLCC.js.map +0 -1
  545. package/dist/session-5TNWVGQQ.js +0 -21
  546. package/dist/test-command-QGIJBRH7.js.map +0 -1
  547. package/studio-dist/assets/index-CBFsOh-9.js +0 -193
  548. package/studio-dist/assets/index-DH_18EyL.css +0 -1
@@ -0,0 +1,935 @@
1
+ import {
2
+ detectProvider
3
+ } from "./chunk-7WHQIQPM.js";
4
+ import {
5
+ parseIOSHierarchy
6
+ } from "./chunk-4LJ3KYCX.js";
7
+ import {
8
+ parseAndroidHierarchy
9
+ } from "./chunk-X5FRYDZ3.js";
10
+ import "./chunk-MPJCUL2B.js";
11
+ import {
12
+ deviceEffect
13
+ } from "./chunk-HWS3XUEF.js";
14
+ import {
15
+ resolveNetworkConditions
16
+ } from "./chunk-HNQLWFHL.js";
17
+ import "./chunk-XVL4FHXA.js";
18
+ import {
19
+ splitGraphemes
20
+ } from "./chunk-MUMIMDRJ.js";
21
+ import {
22
+ buildIOSLaunchConfiguration,
23
+ hasLaunchDeviceState
24
+ } from "./chunk-NWGA3R2E.js";
25
+ import {
26
+ DriverError
27
+ } from "./chunk-A7Z52TDQ.js";
28
+ import {
29
+ init_esm_shims
30
+ } from "./chunk-FTXUQMGH.js";
31
+
32
+ // src/runtime/appium.ts
33
+ init_esm_shims();
34
+ import { Effect as Effect3 } from "effect";
35
+
36
+ // src/drivers/appium/client.ts
37
+ init_esm_shims();
38
+ var AppiumClient = class {
39
+ baseUrl;
40
+ authHeader = null;
41
+ sessionId = null;
42
+ sessionCaps = {};
43
+ constructor(serverUrl) {
44
+ const parsed = new URL(serverUrl);
45
+ if (parsed.username || parsed.password) {
46
+ const username = decodeURIComponent(parsed.username);
47
+ const password = decodeURIComponent(parsed.password);
48
+ this.authHeader = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
49
+ parsed.username = "";
50
+ parsed.password = "";
51
+ }
52
+ this.baseUrl = parsed.toString().replace(/\/+$/, "");
53
+ }
54
+ createHeaders() {
55
+ return {
56
+ "Content-Type": "application/json",
57
+ ...this.authHeader ? { Authorization: this.authHeader } : {}
58
+ };
59
+ }
60
+ // ---------------------------------------------------------------------------
61
+ // HTTP helpers
62
+ // ---------------------------------------------------------------------------
63
+ async request(method, path, body) {
64
+ const url = `${this.baseUrl}${path}`;
65
+ const init = {
66
+ method,
67
+ headers: this.createHeaders()
68
+ };
69
+ if (body !== void 0) {
70
+ init.body = JSON.stringify(body);
71
+ }
72
+ const res = await fetch(url, init);
73
+ const text = await res.text();
74
+ let parsed;
75
+ try {
76
+ parsed = JSON.parse(text);
77
+ } catch {
78
+ throw new Error(`Appium: failed to parse response: ${text}`);
79
+ }
80
+ if (!res.ok) {
81
+ const val = parsed.value;
82
+ const msg = val?.message ?? val?.error ?? text;
83
+ throw new Error(`Appium ${method} ${path} -> ${res.status}: ${msg}`);
84
+ }
85
+ if (parsed.value !== null && typeof parsed.value === "object" && "error" in parsed.value) {
86
+ const val = parsed.value;
87
+ throw new Error(`Appium error: ${val.message ?? val.error}`);
88
+ }
89
+ return parsed.value;
90
+ }
91
+ sessionPath(suffix) {
92
+ if (this.sessionId === null) {
93
+ throw new Error("Appium: no active session");
94
+ }
95
+ return `/session/${this.sessionId}${suffix}`;
96
+ }
97
+ // ---------------------------------------------------------------------------
98
+ // Session management
99
+ // ---------------------------------------------------------------------------
100
+ async createSession(capabilities) {
101
+ const body = {
102
+ capabilities: {
103
+ alwaysMatch: capabilities
104
+ }
105
+ };
106
+ const res = await fetch(`${this.baseUrl}/session`, {
107
+ method: "POST",
108
+ headers: this.createHeaders(),
109
+ body: JSON.stringify(body)
110
+ });
111
+ const text = await res.text();
112
+ let parsed;
113
+ try {
114
+ parsed = JSON.parse(text);
115
+ } catch {
116
+ throw new Error(`Appium: failed to parse session response: ${text}`);
117
+ }
118
+ if (!res.ok) {
119
+ const val = parsed["value"];
120
+ throw new Error(`Appium: failed to create session: ${val?.message ?? text}`);
121
+ }
122
+ const value = parsed["value"];
123
+ const sessionId = value?.["sessionId"] ?? parsed["sessionId"];
124
+ if (!sessionId) {
125
+ throw new Error(`Appium: no sessionId in session response: ${text}`);
126
+ }
127
+ this.sessionId = sessionId;
128
+ this.sessionCaps = value?.["capabilities"] ?? {};
129
+ return sessionId;
130
+ }
131
+ async deleteSession() {
132
+ if (this.sessionId === null) return;
133
+ const path = `/session/${this.sessionId}`;
134
+ this.sessionId = null;
135
+ this.sessionCaps = {};
136
+ await fetch(`${this.baseUrl}${path}`, { method: "DELETE", headers: this.createHeaders() });
137
+ }
138
+ getSessionId() {
139
+ return this.sessionId;
140
+ }
141
+ getSessionCaps() {
142
+ return this.sessionCaps;
143
+ }
144
+ // ---------------------------------------------------------------------------
145
+ // WebView / hybrid context switching
146
+ // ---------------------------------------------------------------------------
147
+ async getContexts() {
148
+ return this.request("GET", this.sessionPath("/contexts"));
149
+ }
150
+ async getCurrentContext() {
151
+ return this.request("GET", this.sessionPath("/context"));
152
+ }
153
+ async setContext(contextId) {
154
+ await this.request("POST", this.sessionPath("/context"), { name: contextId });
155
+ }
156
+ // ---------------------------------------------------------------------------
157
+ // Scripting (execute in current context — works in WebView contexts)
158
+ // ---------------------------------------------------------------------------
159
+ async executeScript(script, args = []) {
160
+ return this.request("POST", this.sessionPath("/execute/sync"), { script, args });
161
+ }
162
+ };
163
+
164
+ // src/drivers/appium/android.ts
165
+ init_esm_shims();
166
+ import { Effect } from "effect";
167
+
168
+ // src/drivers/appium/window-size.ts
169
+ init_esm_shims();
170
+ async function getAppiumWindowSize(client) {
171
+ try {
172
+ return await client.request("GET", client.sessionPath("/window/size"));
173
+ } catch (error) {
174
+ const message = error instanceof Error ? error.message : String(error);
175
+ if (!message.includes("/window/size") || !message.includes("-> 404:")) {
176
+ throw error;
177
+ }
178
+ const rect = await client.request("GET", client.sessionPath("/window/rect"));
179
+ return { width: rect.width, height: rect.height };
180
+ }
181
+ }
182
+
183
+ // src/drivers/appium/android.ts
184
+ function createAppiumAndroidDriver(client, defaultBundleId) {
185
+ const mobile = async (command, params) => {
186
+ await client.request("POST", client.sessionPath("/execute/sync"), {
187
+ script: `mobile: ${command}`,
188
+ args: [params]
189
+ });
190
+ };
191
+ const service = {
192
+ setGeolocation: (point) => deviceEffect("setGeolocation", () => mobile("setGeolocation", { ...point })),
193
+ setPermission: (appPackage, permission, state) => deviceEffect(
194
+ "setPermission",
195
+ () => mobile("changePermissions", {
196
+ appPackage,
197
+ permissions: [permission],
198
+ action: state === "grant" ? "grant" : "revoke",
199
+ target: "pm"
200
+ })
201
+ ),
202
+ simulateBiometric: (options) => deviceEffect("simulateBiometric", () => {
203
+ if (options.type !== "fingerprint")
204
+ throw new Error("Only fingerprint simulation is supported on Android");
205
+ return mobile("fingerprint", { fingerprintId: options.fingerId });
206
+ }),
207
+ setOrientation: (orientation) => deviceEffect("setOrientation", async () => {
208
+ await client.request("POST", client.sessionPath("/orientation"), {
209
+ orientation: orientation.toUpperCase()
210
+ });
211
+ }),
212
+ // -----------------------------------------------------------------------
213
+ // Hierarchy
214
+ // -----------------------------------------------------------------------
215
+ dumpHierarchy: () => Effect.tryPromise({
216
+ try: () => client.request("GET", client.sessionPath("/source")),
217
+ catch: (e) => new DriverError({ message: `Failed to get page source: ${e}` })
218
+ }),
219
+ // -----------------------------------------------------------------------
220
+ // Coordinate-level actions
221
+ // -----------------------------------------------------------------------
222
+ tapAtCoordinate: (x, y) => Effect.tryPromise({
223
+ try: () => client.request("POST", client.sessionPath("/actions"), {
224
+ actions: [
225
+ {
226
+ type: "pointer",
227
+ id: "finger1",
228
+ parameters: { pointerType: "touch" },
229
+ actions: [
230
+ { type: "pointerMove", duration: 0, x, y },
231
+ { type: "pointerDown", button: 0 },
232
+ { type: "pointerUp", button: 0 }
233
+ ]
234
+ }
235
+ ]
236
+ }),
237
+ catch: (e) => new DriverError({ message: `Tap failed: ${e}` })
238
+ }),
239
+ doubleTapAtCoordinate: (x, y) => Effect.tryPromise({
240
+ try: async () => {
241
+ const tapSequence = [
242
+ {
243
+ type: "pointer",
244
+ id: "finger1",
245
+ parameters: { pointerType: "touch" },
246
+ actions: [
247
+ { type: "pointerMove", duration: 0, x, y },
248
+ { type: "pointerDown", button: 0 },
249
+ { type: "pointerUp", button: 0 }
250
+ ]
251
+ }
252
+ ];
253
+ await client.request("POST", client.sessionPath("/actions"), { actions: tapSequence });
254
+ await new Promise((resolve) => setTimeout(resolve, 100));
255
+ await client.request("POST", client.sessionPath("/actions"), { actions: tapSequence });
256
+ },
257
+ catch: (e) => new DriverError({ message: `Double tap failed: ${e}` })
258
+ }),
259
+ longPressAtCoordinate: (x, y, duration) => Effect.tryPromise({
260
+ try: () => client.request("POST", client.sessionPath("/actions"), {
261
+ actions: [
262
+ {
263
+ type: "pointer",
264
+ id: "finger1",
265
+ parameters: { pointerType: "touch" },
266
+ actions: [
267
+ { type: "pointerMove", duration: 0, x, y },
268
+ { type: "pointerDown", button: 0 },
269
+ { type: "pause", duration },
270
+ { type: "pointerUp", button: 0 }
271
+ ]
272
+ }
273
+ ]
274
+ }),
275
+ catch: (e) => new DriverError({ message: `Long press failed: ${e}` })
276
+ }),
277
+ swipe: (sx, sy, ex, ey, dur) => Effect.tryPromise({
278
+ try: () => client.request("POST", client.sessionPath("/actions"), {
279
+ actions: [
280
+ {
281
+ type: "pointer",
282
+ id: "finger1",
283
+ parameters: { pointerType: "touch" },
284
+ actions: [
285
+ { type: "pointerMove", duration: 0, x: sx, y: sy },
286
+ { type: "pointerDown", button: 0 },
287
+ { type: "pointerMove", duration: dur, x: ex, y: ey },
288
+ { type: "pointerUp", button: 0 }
289
+ ]
290
+ }
291
+ ]
292
+ }),
293
+ catch: (e) => new DriverError({ message: `Swipe failed: ${e}` })
294
+ }),
295
+ // -----------------------------------------------------------------------
296
+ // Text input
297
+ // -----------------------------------------------------------------------
298
+ inputText: (text) => Effect.tryPromise({
299
+ try: () => {
300
+ const keyActions = [];
301
+ for (const segment of splitGraphemes(text)) {
302
+ keyActions.push({ type: "keyDown", value: segment });
303
+ keyActions.push({ type: "keyUp", value: segment });
304
+ }
305
+ return client.request("POST", client.sessionPath("/actions"), {
306
+ actions: [
307
+ {
308
+ type: "key",
309
+ id: "keyboard",
310
+ actions: keyActions
311
+ }
312
+ ]
313
+ });
314
+ },
315
+ catch: (e) => new DriverError({ message: `Input text failed: ${e}` })
316
+ }),
317
+ pressKey: (key) => Effect.tryPromise({
318
+ try: () => client.request("POST", client.sessionPath("/appium/device/press_keycode"), {
319
+ keycode: parseInt(key, 10) || 0
320
+ }),
321
+ catch: (e) => new DriverError({ message: `Press key failed: ${e}` })
322
+ }),
323
+ hideKeyboard: () => Effect.tryPromise({
324
+ try: () => client.request("POST", client.sessionPath("/appium/device/hide_keyboard")),
325
+ catch: (e) => new DriverError({ message: `Hide keyboard failed: ${e}` })
326
+ }),
327
+ // -----------------------------------------------------------------------
328
+ // Queries
329
+ // -----------------------------------------------------------------------
330
+ takeScreenshot: () => Effect.tryPromise({
331
+ try: async () => {
332
+ const base64 = await client.request("GET", client.sessionPath("/screenshot"));
333
+ return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
334
+ },
335
+ catch: (e) => new DriverError({ message: `Screenshot failed: ${e}` })
336
+ }),
337
+ getDeviceInfo: () => Effect.tryPromise({
338
+ try: async () => {
339
+ const size = await getAppiumWindowSize(client);
340
+ const caps = client.getSessionCaps();
341
+ return {
342
+ platform: "android",
343
+ deviceId: client.getSessionId() ?? "appium",
344
+ name: caps["deviceName"] ?? "Android Device (Appium)",
345
+ isEmulator: false,
346
+ screenWidth: size.width,
347
+ screenHeight: size.height,
348
+ driverType: "appium"
349
+ };
350
+ },
351
+ catch: (e) => new DriverError({ message: `Get device info failed: ${e}` })
352
+ }),
353
+ // -----------------------------------------------------------------------
354
+ // App lifecycle
355
+ // -----------------------------------------------------------------------
356
+ launchApp: (bundleId, opts) => Effect.tryPromise({
357
+ try: async () => {
358
+ if (opts?.clearState) {
359
+ try {
360
+ await client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
361
+ appId: bundleId
362
+ });
363
+ } catch {
364
+ }
365
+ await client.executeScript("mobile: clearApp", [{ appId: bundleId }]);
366
+ }
367
+ if (opts?.clearKeychain) {
368
+ console.warn("clearKeychain is not supported on Android, skipping.");
369
+ }
370
+ if (opts?.launchArguments && Object.keys(opts.launchArguments).length > 0) {
371
+ throw new DriverError({
372
+ message: "launchArguments are not supported in Appium Android mode. Remove launchArguments from your config or use local mode."
373
+ });
374
+ }
375
+ if (hasLaunchDeviceState(opts?.deviceState)) {
376
+ console.warn(
377
+ "deviceState launch overrides are not supported during Appium Android relaunches. Set launchOptions.deviceState in config to apply Android language/locale/timeZone at session start."
378
+ );
379
+ }
380
+ if (opts?.deepLink) {
381
+ await client.executeScript("mobile: deepLink", [
382
+ { url: opts.deepLink, package: bundleId }
383
+ ]);
384
+ } else {
385
+ await client.request("POST", client.sessionPath("/appium/device/activate_app"), {
386
+ appId: bundleId
387
+ });
388
+ }
389
+ },
390
+ catch: (e) => new DriverError({ message: `Launch app failed: ${e}` })
391
+ }),
392
+ stopApp: (bundleId) => Effect.tryPromise({
393
+ try: () => client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
394
+ appId: bundleId
395
+ }),
396
+ catch: (e) => new DriverError({ message: `Stop app failed: ${e}` })
397
+ }),
398
+ killApp: (bundleId) => Effect.tryPromise({
399
+ try: () => client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
400
+ appId: bundleId
401
+ }),
402
+ catch: (e) => new DriverError({ message: `Kill app failed: ${e}` })
403
+ }),
404
+ clearAppState: (bundleId) => Effect.tryPromise({
405
+ try: async () => {
406
+ try {
407
+ await client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
408
+ appId: bundleId
409
+ });
410
+ } catch {
411
+ }
412
+ await client.executeScript("mobile: clearApp", [{ appId: bundleId }]);
413
+ },
414
+ catch: (e) => new DriverError({ message: `Clear app state failed: ${e}` })
415
+ }),
416
+ // -----------------------------------------------------------------------
417
+ // Navigation
418
+ // -----------------------------------------------------------------------
419
+ openLink: (url) => Effect.tryPromise({
420
+ try: () => {
421
+ const args = { url };
422
+ if (defaultBundleId) args.package = defaultBundleId;
423
+ return client.executeScript("mobile: deepLink", [args]);
424
+ },
425
+ catch: (e) => new DriverError({ message: `Open link failed: ${e}` })
426
+ }),
427
+ back: () => Effect.tryPromise({
428
+ try: () => client.request("POST", client.sessionPath("/back")),
429
+ catch: (e) => new DriverError({ message: `Back failed: ${e}` })
430
+ }),
431
+ // -----------------------------------------------------------------------
432
+ // Scripting (works when switched to a WebView context)
433
+ // -----------------------------------------------------------------------
434
+ evaluate: (script, ...args) => Effect.tryPromise({
435
+ try: () => client.executeScript(
436
+ typeof script === "function" ? `return (${script})(...arguments)` : script,
437
+ args
438
+ ),
439
+ catch: (e) => new DriverError({ message: `evaluate() failed: ${e}` })
440
+ }),
441
+ // -----------------------------------------------------------------------
442
+ // WebView / hybrid context switching
443
+ // -----------------------------------------------------------------------
444
+ getContexts: () => Effect.tryPromise({
445
+ try: () => client.getContexts(),
446
+ catch: (e) => new DriverError({ message: `getContexts failed: ${e}` })
447
+ }),
448
+ getCurrentContext: () => Effect.tryPromise({
449
+ try: () => client.getCurrentContext(),
450
+ catch: (e) => new DriverError({ message: `getCurrentContext failed: ${e}` })
451
+ }),
452
+ setContext: (contextId) => Effect.tryPromise({
453
+ try: () => client.setContext(contextId),
454
+ catch: (e) => new DriverError({ message: `setContext failed: ${e}` })
455
+ }),
456
+ // -----------------------------------------------------------------------
457
+ // Network conditions
458
+ // -----------------------------------------------------------------------
459
+ setNetworkConditions: (conditions) => Effect.tryPromise({
460
+ try: () => {
461
+ const resolved = resolveNetworkConditions(conditions);
462
+ const hasAnyValue = conditions.profile !== void 0 || conditions.offline !== void 0 || conditions.latencyMs !== void 0 || conditions.downloadThroughputKbps !== void 0 || conditions.uploadThroughputKbps !== void 0;
463
+ if (!hasAnyValue) {
464
+ return client.executeScript("mobile: setConnectivity", [
465
+ { wifi: true, data: true, airplaneMode: false }
466
+ ]);
467
+ }
468
+ if (resolved.offline) {
469
+ return client.executeScript("mobile: setConnectivity", [
470
+ { wifi: false, data: false, airplaneMode: true }
471
+ ]);
472
+ }
473
+ return client.executeScript("mobile: setConnectivity", [
474
+ { wifi: true, data: true, airplaneMode: false }
475
+ ]);
476
+ },
477
+ catch: (e) => new DriverError({ message: `setNetworkConditions failed: ${e}` })
478
+ })
479
+ };
480
+ return Effect.succeed(service);
481
+ }
482
+
483
+ // src/drivers/appium/ios.ts
484
+ init_esm_shims();
485
+ import { Effect as Effect2 } from "effect";
486
+ function createAppiumIOSDriver(client) {
487
+ const mobile = async (command, params) => {
488
+ await client.request("POST", client.sessionPath("/execute/sync"), {
489
+ script: `mobile: ${command}`,
490
+ args: [params]
491
+ });
492
+ };
493
+ const service = {
494
+ setOrientation: (orientation) => deviceEffect("setOrientation", async () => {
495
+ await client.request("POST", client.sessionPath("/orientation"), {
496
+ orientation: orientation.toUpperCase()
497
+ });
498
+ }),
499
+ setGeolocation: ({ latitude, longitude }) => deviceEffect("setGeolocation", () => mobile("setSimulatedLocation", { latitude, longitude })),
500
+ setPermission: (bundleId, permission, state) => deviceEffect(
501
+ "setPermission",
502
+ () => mobile("setPermission", {
503
+ bundleId,
504
+ access: { [permission]: state === "grant" ? "yes" : "no" }
505
+ })
506
+ ),
507
+ setBiometricEnrollment: (isEnabled) => deviceEffect("setBiometricEnrollment", () => mobile("enrollBiometric", { isEnabled })),
508
+ simulateBiometric: (options) => deviceEffect("simulateBiometric", () => {
509
+ if (options.type === "fingerprint") throw new Error("Use touchId or faceId on iOS");
510
+ return mobile("sendBiometricMatch", { type: options.type, match: options.match ?? true });
511
+ }),
512
+ sendPushNotification: (bundleId, payload) => deviceEffect("sendPushNotification", () => mobile("pushNotification", { bundleId, payload })),
513
+ // -----------------------------------------------------------------------
514
+ // Hierarchy
515
+ // -----------------------------------------------------------------------
516
+ dumpHierarchy: () => Effect2.tryPromise({
517
+ try: () => client.request("GET", client.sessionPath("/source")),
518
+ catch: (e) => new DriverError({ message: `Failed to get page source: ${e}` })
519
+ }),
520
+ // -----------------------------------------------------------------------
521
+ // Coordinate-level actions (W3C touch pointer actions for iOS)
522
+ // -----------------------------------------------------------------------
523
+ tapAtCoordinate: (x, y) => Effect2.tryPromise({
524
+ try: () => client.request("POST", client.sessionPath("/actions"), {
525
+ actions: [
526
+ {
527
+ type: "pointer",
528
+ id: "finger1",
529
+ parameters: { pointerType: "touch" },
530
+ actions: [
531
+ { type: "pointerMove", duration: 0, x, y },
532
+ { type: "pointerDown", button: 0 },
533
+ { type: "pointerUp", button: 0 }
534
+ ]
535
+ }
536
+ ]
537
+ }),
538
+ catch: (e) => new DriverError({ message: `Tap failed: ${e}` })
539
+ }),
540
+ doubleTapAtCoordinate: (x, y) => Effect2.tryPromise({
541
+ try: () => client.request("POST", client.sessionPath("/actions"), {
542
+ actions: [
543
+ {
544
+ type: "pointer",
545
+ id: "finger1",
546
+ parameters: { pointerType: "touch" },
547
+ actions: [
548
+ { type: "pointerMove", duration: 0, x, y },
549
+ { type: "pointerDown", button: 0 },
550
+ { type: "pointerUp", button: 0 },
551
+ { type: "pause", duration: 40 },
552
+ { type: "pointerDown", button: 0 },
553
+ { type: "pointerUp", button: 0 }
554
+ ]
555
+ }
556
+ ]
557
+ }),
558
+ catch: (e) => new DriverError({ message: `Double tap failed: ${e}` })
559
+ }),
560
+ longPressAtCoordinate: (x, y, duration) => Effect2.tryPromise({
561
+ try: () => client.request("POST", client.sessionPath("/actions"), {
562
+ actions: [
563
+ {
564
+ type: "pointer",
565
+ id: "finger1",
566
+ parameters: { pointerType: "touch" },
567
+ actions: [
568
+ { type: "pointerMove", duration: 0, x, y },
569
+ { type: "pointerDown", button: 0 },
570
+ { type: "pause", duration },
571
+ { type: "pointerUp", button: 0 }
572
+ ]
573
+ }
574
+ ]
575
+ }),
576
+ catch: (e) => new DriverError({ message: `Long press failed: ${e}` })
577
+ }),
578
+ swipe: (sx, sy, ex, ey, dur) => Effect2.tryPromise({
579
+ try: () => client.request("POST", client.sessionPath("/actions"), {
580
+ actions: [
581
+ {
582
+ type: "pointer",
583
+ id: "finger1",
584
+ parameters: { pointerType: "touch" },
585
+ actions: [
586
+ { type: "pointerMove", duration: 0, x: sx, y: sy },
587
+ { type: "pointerDown", button: 0 },
588
+ { type: "pointerMove", duration: dur, x: ex, y: ey },
589
+ { type: "pointerUp", button: 0 }
590
+ ]
591
+ }
592
+ ]
593
+ }),
594
+ catch: (e) => new DriverError({ message: `Swipe failed: ${e}` })
595
+ }),
596
+ // -----------------------------------------------------------------------
597
+ // Text input
598
+ // -----------------------------------------------------------------------
599
+ inputText: (text) => Effect2.tryPromise({
600
+ try: () => {
601
+ const keyActions = [];
602
+ for (const segment of splitGraphemes(text)) {
603
+ keyActions.push({ type: "keyDown", value: segment });
604
+ keyActions.push({ type: "keyUp", value: segment });
605
+ }
606
+ return client.request("POST", client.sessionPath("/actions"), {
607
+ actions: [
608
+ {
609
+ type: "key",
610
+ id: "keyboard",
611
+ actions: keyActions
612
+ }
613
+ ]
614
+ });
615
+ },
616
+ catch: (e) => new DriverError({ message: `Input text failed: ${e}` })
617
+ }),
618
+ pressKey: (key) => Effect2.tryPromise({
619
+ try: () => client.request("POST", client.sessionPath("/actions"), {
620
+ actions: [
621
+ {
622
+ type: "key",
623
+ id: "keyboard",
624
+ actions: [
625
+ { type: "keyDown", value: key },
626
+ { type: "keyUp", value: key }
627
+ ]
628
+ }
629
+ ]
630
+ }),
631
+ catch: (e) => new DriverError({ message: `Press key failed: ${e}` })
632
+ }),
633
+ hideKeyboard: () => Effect2.tryPromise({
634
+ try: () => client.request("POST", client.sessionPath("/appium/device/hide_keyboard")),
635
+ catch: (e) => new DriverError({ message: `Hide keyboard failed: ${e}` })
636
+ }),
637
+ // -----------------------------------------------------------------------
638
+ // Queries
639
+ // -----------------------------------------------------------------------
640
+ takeScreenshot: () => Effect2.tryPromise({
641
+ try: async () => {
642
+ const base64 = await client.request("GET", client.sessionPath("/screenshot"));
643
+ return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
644
+ },
645
+ catch: (e) => new DriverError({ message: `Screenshot failed: ${e}` })
646
+ }),
647
+ getDeviceInfo: () => Effect2.tryPromise({
648
+ try: async () => {
649
+ const size = await getAppiumWindowSize(client);
650
+ const caps = client.getSessionCaps();
651
+ return {
652
+ platform: "ios",
653
+ deviceId: client.getSessionId() ?? "appium",
654
+ name: caps["deviceName"] ?? "iOS Device (Appium)",
655
+ isEmulator: false,
656
+ screenWidth: size.width,
657
+ screenHeight: size.height,
658
+ driverType: "appium"
659
+ };
660
+ },
661
+ catch: (e) => new DriverError({ message: `Get device info failed: ${e}` })
662
+ }),
663
+ // -----------------------------------------------------------------------
664
+ // App lifecycle
665
+ // -----------------------------------------------------------------------
666
+ launchApp: (bundleId, opts) => Effect2.tryPromise({
667
+ try: async () => {
668
+ const launchConfig = buildIOSLaunchConfiguration(opts);
669
+ if (opts?.clearState) {
670
+ try {
671
+ await client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
672
+ appId: bundleId
673
+ });
674
+ } catch {
675
+ }
676
+ try {
677
+ await client.executeScript("mobile: clearApp", [{ bundleId }]);
678
+ } catch (e) {
679
+ console.warn(
680
+ `mobile: clearApp unavailable on this provider; falling back to terminate-only. In-memory state will still be reset. (${e})`
681
+ );
682
+ }
683
+ }
684
+ if (!launchConfig) {
685
+ await client.request("POST", client.sessionPath("/appium/device/activate_app"), {
686
+ appId: bundleId
687
+ });
688
+ }
689
+ if (opts?.clearKeychain) {
690
+ console.warn(
691
+ "clearKeychain is not available via Appium on iOS. Use local mode with xcrun simctl for keychain operations."
692
+ );
693
+ }
694
+ if (launchConfig) {
695
+ try {
696
+ await client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
697
+ appId: bundleId
698
+ });
699
+ } catch {
700
+ }
701
+ await client.executeScript("mobile: launchApp", [
702
+ {
703
+ bundleId,
704
+ arguments: launchConfig.arguments,
705
+ environment: launchConfig.environment
706
+ }
707
+ ]);
708
+ }
709
+ if (opts?.deepLink) {
710
+ await client.request("POST", client.sessionPath("/url"), {
711
+ url: opts.deepLink
712
+ });
713
+ }
714
+ },
715
+ catch: (e) => new DriverError({ message: `Launch app failed: ${e}` })
716
+ }),
717
+ stopApp: (bundleId) => Effect2.tryPromise({
718
+ try: () => client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
719
+ appId: bundleId
720
+ }),
721
+ catch: (e) => new DriverError({ message: `Stop app failed: ${e}` })
722
+ }),
723
+ killApp: (bundleId) => Effect2.tryPromise({
724
+ try: () => client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
725
+ appId: bundleId
726
+ }),
727
+ catch: (e) => new DriverError({ message: `Kill app failed: ${e}` })
728
+ }),
729
+ clearAppState: (bundleId) => Effect2.tryPromise({
730
+ try: async () => {
731
+ try {
732
+ await client.request("POST", client.sessionPath("/appium/device/terminate_app"), {
733
+ appId: bundleId
734
+ });
735
+ } catch {
736
+ }
737
+ await client.executeScript("mobile: clearApp", [{ bundleId }]);
738
+ },
739
+ catch: (e) => new DriverError({
740
+ message: `Clear app state failed: ${e}. Note: clearApp may not be available on all iOS Appium providers. If this persists, consider using terminate + uninstall + install instead.`
741
+ })
742
+ }),
743
+ // -----------------------------------------------------------------------
744
+ // Navigation
745
+ // -----------------------------------------------------------------------
746
+ openLink: (url) => Effect2.tryPromise({
747
+ try: () => client.request("POST", client.sessionPath("/url"), { url }),
748
+ catch: (e) => new DriverError({ message: `Open link failed: ${e}` })
749
+ }),
750
+ back: () => Effect2.fail(
751
+ new DriverError({
752
+ message: "back() is not supported on iOS. Use navigation within the app or swipe gestures."
753
+ })
754
+ ),
755
+ // -----------------------------------------------------------------------
756
+ // Scripting (works when switched to a WebView context)
757
+ // -----------------------------------------------------------------------
758
+ evaluate: (script, ...args) => Effect2.tryPromise({
759
+ try: () => client.executeScript(
760
+ typeof script === "function" ? `return (${script})(...arguments)` : script,
761
+ args
762
+ ),
763
+ catch: (e) => new DriverError({ message: `evaluate() failed: ${e}` })
764
+ }),
765
+ // -----------------------------------------------------------------------
766
+ // WebView / hybrid context switching
767
+ // -----------------------------------------------------------------------
768
+ getContexts: () => Effect2.tryPromise({
769
+ try: () => client.getContexts(),
770
+ catch: (e) => new DriverError({ message: `getContexts failed: ${e}` })
771
+ }),
772
+ getCurrentContext: () => Effect2.tryPromise({
773
+ try: () => client.getCurrentContext(),
774
+ catch: (e) => new DriverError({ message: `getCurrentContext failed: ${e}` })
775
+ }),
776
+ setContext: (contextId) => Effect2.tryPromise({
777
+ try: () => client.setContext(contextId),
778
+ catch: (e) => new DriverError({ message: `setContext failed: ${e}` })
779
+ }),
780
+ // -----------------------------------------------------------------------
781
+ // Network conditions
782
+ // -----------------------------------------------------------------------
783
+ setNetworkConditions: (conditions) => Effect2.tryPromise({
784
+ try: () => {
785
+ const resolved = resolveNetworkConditions(conditions);
786
+ const hasAnyValue = conditions.profile !== void 0 || conditions.offline !== void 0 || conditions.latencyMs !== void 0 || conditions.downloadThroughputKbps !== void 0 || conditions.uploadThroughputKbps !== void 0;
787
+ if (!hasAnyValue) {
788
+ return client.executeScript("mobile: setConnectivity", [
789
+ { wifi: true, data: true, airplaneMode: false }
790
+ ]);
791
+ }
792
+ if (resolved.offline) {
793
+ return client.executeScript("mobile: setConnectivity", [
794
+ { wifi: false, data: false, airplaneMode: true }
795
+ ]);
796
+ }
797
+ return client.executeScript("mobile: setConnectivity", [
798
+ { wifi: true, data: true, airplaneMode: false }
799
+ ]);
800
+ },
801
+ catch: (e) => new DriverError({ message: `setNetworkConditions failed: ${e}` })
802
+ })
803
+ };
804
+ return Effect2.succeed(service);
805
+ }
806
+
807
+ // src/runtime/appium.ts
808
+ async function buildAppiumAndroidRuntime(config, appiumUrl, caps) {
809
+ const appId = caps["appium:appPackage"] ?? config.apps?.android?.packageName ?? "";
810
+ const client = new AppiumClient(appiumUrl);
811
+ await client.createSession({
812
+ platformName: "Android",
813
+ ...caps
814
+ });
815
+ const driver = await Effect3.runPromise(createAppiumAndroidDriver(client, appId || void 0));
816
+ const deviceInfo = await Effect3.runPromise(driver.getDeviceInfo());
817
+ const sessionId = client.getSessionId() ?? void 0;
818
+ const sessionCaps = client.getSessionCaps();
819
+ const detectedProvider = detectProvider(appiumUrl);
820
+ const providerName = detectedProvider?.name();
821
+ return {
822
+ runtime: {
823
+ driver,
824
+ cleanup: async () => {
825
+ try {
826
+ await client.deleteSession();
827
+ } catch {
828
+ }
829
+ },
830
+ metadata: {
831
+ platform: "android",
832
+ mode: "appium",
833
+ sessionId,
834
+ sessionCaps,
835
+ provider: providerName
836
+ }
837
+ },
838
+ engineConfig: {
839
+ appId,
840
+ platform: "android",
841
+ coordinatorConfig: {
842
+ parse: parseAndroidHierarchy,
843
+ defaults: {
844
+ timeout: config.defaults?.waitTimeout,
845
+ pollInterval: config.defaults?.pollInterval,
846
+ settleTimeout: config.defaults?.settleTimeout,
847
+ initialPollInterval: config.defaults?.initialPollInterval
848
+ },
849
+ waitForIdleTimeout: config.defaults?.waitForIdleTimeout,
850
+ typingDelay: config.defaults?.typingDelay,
851
+ hierarchyCacheTtl: config.defaults?.hierarchyCacheTtl,
852
+ screenWidth: deviceInfo.screenWidth,
853
+ screenHeight: deviceInfo.screenHeight
854
+ },
855
+ autoLaunch: false,
856
+ // Appium manages app lifecycle
857
+ flowTimeout: config.defaults?.waitTimeout ? config.defaults.waitTimeout * 10 : 6e4,
858
+ artifactConfig: config.artifacts,
859
+ launchOptions: config.launchOptions,
860
+ hooks: config.hooks,
861
+ visualRegression: config.visualRegression
862
+ }
863
+ };
864
+ }
865
+ async function buildAppiumIOSRuntime(config, appiumUrl, caps) {
866
+ const appId = caps["appium:bundleId"] ?? config.apps?.ios?.bundleId ?? "";
867
+ const client = new AppiumClient(appiumUrl);
868
+ await client.createSession({
869
+ platformName: "iOS",
870
+ "appium:automationName": "XCUITest",
871
+ ...caps
872
+ });
873
+ const snapshotMaxDepth = config.defaults?.snapshotMaxDepth ?? 100;
874
+ try {
875
+ await client.request("POST", client.sessionPath("/appium/settings"), {
876
+ settings: { snapshotMaxDepth }
877
+ });
878
+ } catch (e) {
879
+ console.warn(`Failed to set snapshotMaxDepth (continuing): ${e}`);
880
+ }
881
+ const driver = await Effect3.runPromise(createAppiumIOSDriver(client));
882
+ const deviceInfo = await Effect3.runPromise(driver.getDeviceInfo());
883
+ const sessionId = client.getSessionId() ?? void 0;
884
+ const sessionCaps = client.getSessionCaps();
885
+ const detectedProvider = detectProvider(appiumUrl);
886
+ const providerName = detectedProvider?.name();
887
+ return {
888
+ runtime: {
889
+ driver,
890
+ cleanup: async () => {
891
+ try {
892
+ await client.deleteSession();
893
+ } catch {
894
+ }
895
+ },
896
+ metadata: {
897
+ platform: "ios",
898
+ mode: "appium",
899
+ sessionId,
900
+ sessionCaps,
901
+ provider: providerName
902
+ }
903
+ },
904
+ engineConfig: {
905
+ appId,
906
+ platform: "ios",
907
+ coordinatorConfig: {
908
+ parse: parseIOSHierarchy,
909
+ defaults: {
910
+ timeout: config.defaults?.waitTimeout,
911
+ pollInterval: config.defaults?.pollInterval,
912
+ settleTimeout: config.defaults?.settleTimeout,
913
+ initialPollInterval: config.defaults?.initialPollInterval
914
+ },
915
+ waitForIdleTimeout: config.defaults?.waitForIdleTimeout,
916
+ typingDelay: config.defaults?.typingDelay,
917
+ hierarchyCacheTtl: config.defaults?.hierarchyCacheTtl,
918
+ screenWidth: deviceInfo.screenWidth,
919
+ screenHeight: deviceInfo.screenHeight
920
+ },
921
+ autoLaunch: false,
922
+ // Appium manages app lifecycle
923
+ flowTimeout: config.defaults?.waitTimeout ? config.defaults.waitTimeout * 10 : 6e4,
924
+ artifactConfig: config.artifacts,
925
+ launchOptions: config.launchOptions,
926
+ hooks: config.hooks,
927
+ visualRegression: config.visualRegression
928
+ }
929
+ };
930
+ }
931
+ export {
932
+ buildAppiumAndroidRuntime,
933
+ buildAppiumIOSRuntime
934
+ };
935
+ //# sourceMappingURL=appium-CC77BJNK.js.map