spana-test 0.11.0 → 0.12.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.
- package/.agents/skills/spana-testing/SKILL.md +0 -0
- package/LICENSE +0 -0
- package/README.md +4 -1
- package/dist/{accessibility-audit-YZOPUY3D.js → accessibility-audit-MHQ65DUD.js} +61 -12
- package/dist/accessibility-audit-MHQ65DUD.js.map +1 -0
- package/dist/agent/index.d.ts +3 -11
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +20 -15
- package/dist/agent/index.js.map +1 -1
- package/dist/{session-uT8xL03K.d.ts → agent/session.d.ts} +14 -46
- package/dist/agent/session.d.ts.map +1 -0
- package/dist/{agent-fixture-5C4MCWRD.js → agent-fixture-H6GOUHNX.js} +3 -3
- package/dist/{agent-fixture-5C4MCWRD.js.map → agent-fixture-H6GOUHNX.js.map} +0 -0
- package/dist/{allure-FGVR5LND.js → allure-XOM7BXL5.js} +5 -2
- package/dist/{allure-FGVR5LND.js.map → allure-XOM7BXL5.js.map} +1 -1
- package/dist/{android-6BOQTMM3.js → android-C2S4B4TH.js} +3 -3
- package/dist/{android-6BOQTMM3.js.map → android-C2S4B4TH.js.map} +0 -0
- package/dist/api/agent-fixture.d.ts +119 -0
- package/dist/api/agent-fixture.d.ts.map +1 -0
- package/dist/api/app.d.ts +359 -0
- package/dist/api/app.d.ts.map +1 -0
- package/dist/api/expect.d.ts +167 -0
- package/dist/api/expect.d.ts.map +1 -0
- package/dist/api/fixtures.d.ts +165 -0
- package/dist/api/fixtures.d.ts.map +1 -0
- package/dist/api/flow.d.ts +123 -0
- package/dist/api/flow.d.ts.map +1 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/snapshots.d.ts +26 -0
- package/dist/api/snapshots.d.ts.map +1 -0
- package/dist/api/storybook.d.ts +18 -0
- package/dist/api/storybook.d.ts.map +1 -0
- package/dist/api/suite.d.ts +46 -0
- package/dist/api/suite.d.ts.map +1 -0
- package/dist/app-CBHH5GMB.js +10 -0
- package/dist/{app-RSDPDTKT.js.map → app-CBHH5GMB.js.map} +0 -0
- package/dist/{appium-server-66GVUL24.js → appium-server-M6CWWUWF.js} +5 -2
- package/dist/{appium-server-66GVUL24.js.map → appium-server-M6CWWUWF.js.map} +1 -1
- package/dist/{baseline-manager-5TIUCNP5.js → baseline-manager-LVUVH2MJ.js} +5 -2
- package/dist/{baseline-manager-5TIUCNP5.js.map → baseline-manager-LVUVH2MJ.js.map} +1 -1
- package/dist/{cache-command-PANUAEMZ.js → cache-command-OL7HUK2K.js} +3 -3
- package/dist/{cache-command-PANUAEMZ.js.map → cache-command-OL7HUK2K.js.map} +0 -0
- package/dist/channels/android-cdp.d.ts +71 -0
- package/dist/channels/android-cdp.d.ts.map +1 -0
- package/dist/channels/apple-webinspector.d.ts +85 -0
- package/dist/channels/apple-webinspector.d.ts.map +1 -0
- package/dist/channels/bidi-client.d.ts +79 -0
- package/dist/channels/bidi-client.d.ts.map +1 -0
- package/dist/channels/bridge-server.d.ts +69 -0
- package/dist/channels/bridge-server.d.ts.map +1 -0
- package/dist/channels/cdp-client.d.ts +102 -0
- package/dist/channels/cdp-client.d.ts.map +1 -0
- package/dist/channels/dom-channel.d.ts +246 -0
- package/dist/channels/dom-channel.d.ts.map +1 -0
- package/dist/channels/index.d.ts +8 -0
- package/dist/channels/index.d.ts.map +1 -0
- package/dist/channels/webkit-inspector.d.ts +85 -0
- package/dist/channels/webkit-inspector.d.ts.map +1 -0
- package/dist/channels/ws-server.d.ts +21 -0
- package/dist/channels/ws-server.d.ts.map +1 -0
- package/dist/{chunk-WV3ALL3H.js → chunk-2MA5G2VH.js} +6 -2
- package/dist/{chunk-WV3ALL3H.js.map → chunk-2MA5G2VH.js.map} +1 -1
- package/dist/{chunk-4SA7JK5D.js → chunk-53TGNQTM.js} +14 -10
- package/dist/{chunk-4SA7JK5D.js.map → chunk-53TGNQTM.js.map} +1 -1
- package/dist/{chunk-JPZCZHL4.js → chunk-7Q7TSUNL.js} +6 -1
- package/dist/{chunk-JPZCZHL4.js.map → chunk-7Q7TSUNL.js.map} +1 -1
- package/dist/{chunk-X2TJP7LB.js → chunk-7WHQIQPM.js} +11 -1
- package/dist/chunk-7WHQIQPM.js.map +1 -0
- package/dist/{chunk-WZAQANN6.js → chunk-AMBU26PB.js} +9 -3
- package/dist/{chunk-WZAQANN6.js.map → chunk-AMBU26PB.js.map} +1 -1
- package/dist/{chunk-3IZMPNE7.js → chunk-BWEQ4XT2.js} +1216 -101
- package/dist/chunk-BWEQ4XT2.js.map +1 -0
- package/dist/{chunk-SIJJVN2D.js → chunk-F2YUBD4E.js} +9 -3
- package/dist/{chunk-SIJJVN2D.js.map → chunk-F2YUBD4E.js.map} +1 -1
- package/dist/chunk-F3AFZ6UX.js +326 -0
- package/dist/chunk-F3AFZ6UX.js.map +1 -0
- package/dist/{chunk-Z6K4QQAR.js → chunk-FHCOPLYB.js} +36 -7
- package/dist/chunk-FHCOPLYB.js.map +1 -0
- package/dist/{chunk-3SH5JQF7.js → chunk-FSPMFRJO.js} +6 -1
- package/dist/{chunk-3SH5JQF7.js.map → chunk-FSPMFRJO.js.map} +1 -1
- package/dist/chunk-FTXUQMGH.js +56 -0
- package/dist/chunk-FTXUQMGH.js.map +1 -0
- package/dist/{chunk-SGZMO456.js → chunk-GAWJL6Q3.js} +180 -37
- package/dist/chunk-GAWJL6Q3.js.map +1 -0
- package/dist/{chunk-WS2TVNMY.js → chunk-GDDCZ2PL.js} +168 -43
- package/dist/chunk-GDDCZ2PL.js.map +1 -0
- package/dist/{chunk-OPTNFLBL.js → chunk-HIGFQRWM.js} +7 -1
- package/dist/{chunk-OPTNFLBL.js.map → chunk-HIGFQRWM.js.map} +1 -1
- package/dist/{chunk-4KK4E3N3.js → chunk-LQQNE2OE.js} +943 -172
- package/dist/chunk-LQQNE2OE.js.map +1 -0
- package/dist/{chunk-KJPHH2TW.js → chunk-NHT3XSX3.js} +6 -1
- package/dist/{chunk-KJPHH2TW.js.map → chunk-NHT3XSX3.js.map} +1 -1
- package/dist/{chunk-3FSZNKEF.js → chunk-NXET4BFJ.js} +7 -1
- package/dist/{chunk-3FSZNKEF.js.map → chunk-NXET4BFJ.js.map} +1 -1
- package/dist/{chunk-FPQAJNE3.js → chunk-OQRGR542.js} +285 -98
- package/dist/chunk-OQRGR542.js.map +1 -0
- package/dist/{chunk-FXBWACUT.js → chunk-PPAPRKQU.js} +392 -31
- package/dist/chunk-PPAPRKQU.js.map +1 -0
- package/dist/{chunk-64UZQP7Z.js → chunk-PRQTAIYA.js} +30 -4
- package/dist/chunk-PRQTAIYA.js.map +1 -0
- package/dist/{chunk-VUNH4AJD.js → chunk-QOL44BNJ.js} +7 -3
- package/dist/{chunk-VUNH4AJD.js.map → chunk-QOL44BNJ.js.map} +1 -1
- package/dist/{chunk-CY3DKTBZ.js → chunk-RIXZISMX.js} +6 -1
- package/dist/{chunk-CY3DKTBZ.js.map → chunk-RIXZISMX.js.map} +1 -1
- package/dist/{chunk-S7MSBZ3F.js → chunk-TFEXYI6N.js} +6 -1
- package/dist/{chunk-S7MSBZ3F.js.map → chunk-TFEXYI6N.js.map} +1 -1
- package/dist/chunk-U56N5JCJ.js +19842 -0
- package/dist/chunk-U56N5JCJ.js.map +1 -0
- package/dist/{chunk-IHVZKQQW.js → chunk-UKUXNFQP.js} +6 -1
- package/dist/{chunk-IHVZKQQW.js.map → chunk-UKUXNFQP.js.map} +1 -1
- package/dist/{chunk-54ASKII6.js → chunk-VOYJQDSI.js} +6 -1
- package/dist/{chunk-54ASKII6.js.map → chunk-VOYJQDSI.js.map} +1 -1
- package/dist/{chunk-26NJXP55.js → chunk-WJH5K42V.js} +6 -2
- package/dist/{chunk-26NJXP55.js.map → chunk-WJH5K42V.js.map} +1 -1
- package/dist/{chunk-VP6V4XEJ.js → chunk-XD6A3VXB.js} +10 -5
- package/dist/{chunk-VP6V4XEJ.js.map → chunk-XD6A3VXB.js.map} +1 -1
- package/dist/{chunk-6PTUVG6A.js → chunk-XQRXQBDQ.js} +7 -1
- package/dist/{chunk-6PTUVG6A.js.map → chunk-XQRXQBDQ.js.map} +1 -1
- package/dist/{chunk-2AFWVHQK.js → chunk-XVL4FHXA.js} +6 -1
- package/dist/{chunk-2AFWVHQK.js.map → chunk-XVL4FHXA.js.map} +1 -1
- package/dist/{chunk-LAMTF4LX.js → chunk-ZIETAMAD.js} +6 -1
- package/dist/{chunk-LAMTF4LX.js.map → chunk-ZIETAMAD.js.map} +1 -1
- package/dist/cli/cache-command.d.ts +29 -0
- package/dist/cli/cache-command.d.ts.map +1 -0
- package/dist/cli/command-errors.d.ts +7 -0
- package/dist/cli/command-errors.d.ts.map +1 -0
- package/dist/cli/config-loader.d.ts +11 -0
- package/dist/cli/config-loader.d.ts.map +1 -0
- package/dist/cli/doctor-command.d.ts +64 -0
- package/dist/cli/doctor-command.d.ts.map +1 -0
- package/dist/cli/gen-types-command.d.ts +2 -0
- package/dist/cli/gen-types-command.d.ts.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/init-command.d.ts +7 -0
- package/dist/cli/init-command.d.ts.map +1 -0
- package/dist/cli/init-flow-command.d.ts +11 -0
- package/dist/cli/init-flow-command.d.ts.map +1 -0
- package/dist/cli/iteration.d.ts +44 -0
- package/dist/cli/iteration.d.ts.map +1 -0
- package/dist/cli/scaffolds.d.ts +13 -0
- package/dist/cli/scaffolds.d.ts.map +1 -0
- package/dist/cli/studio-command.d.ts +8 -0
- package/dist/cli/studio-command.d.ts.map +1 -0
- package/dist/cli/test-command.d.ts +61 -0
- package/dist/cli/test-command.d.ts.map +1 -0
- package/dist/cli/watch-mode.d.ts +9 -0
- package/dist/cli/watch-mode.d.ts.map +1 -0
- package/dist/cli.js +84 -28
- package/dist/cli.js.map +1 -1
- package/dist/cloud/browserstack.d.ts +9 -0
- package/dist/cloud/browserstack.d.ts.map +1 -0
- package/dist/cloud/common.d.ts +26 -0
- package/dist/cloud/common.d.ts.map +1 -0
- package/dist/cloud/provider.d.ts +21 -0
- package/dist/cloud/provider.d.ts.map +1 -0
- package/dist/cloud/saucelabs.d.ts +9 -0
- package/dist/cloud/saucelabs.d.ts.map +1 -0
- package/dist/{compiler-X6WTFMYF.js → compiler-44UW2FID.js} +7 -3
- package/dist/{compiler-X6WTFMYF.js.map → compiler-44UW2FID.js.map} +1 -1
- package/dist/config-loader-V26XXHPH.js +10 -0
- package/dist/{chunk-DGUM43GV.js.map → config-loader-V26XXHPH.js.map} +0 -0
- package/dist/{console-DIYEJSSP.js → console-T6TVZ65G.js} +8 -2
- package/dist/console-T6TVZ65G.js.map +1 -0
- package/dist/core/accessibility-audit.d.ts +29 -0
- package/dist/core/accessibility-audit.d.ts.map +1 -0
- package/dist/core/artifacts.d.ts +27 -0
- package/dist/core/artifacts.d.ts.map +1 -0
- package/dist/core/baseline-manager.d.ts +18 -0
- package/dist/core/baseline-manager.d.ts.map +1 -0
- package/dist/core/benchmark.d.ts +21 -0
- package/dist/core/benchmark.d.ts.map +1 -0
- package/dist/core/debug-repl.d.ts +17 -0
- package/dist/core/debug-repl.d.ts.map +1 -0
- package/dist/core/engine.d.ts +51 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/core/filters.d.ts +248 -0
- package/dist/core/filters.d.ts.map +1 -0
- package/dist/core/flow-generator.d.ts +13 -0
- package/dist/core/flow-generator.d.ts.map +1 -0
- package/dist/core/graphemes.d.ts +2 -0
- package/dist/core/graphemes.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/native-accel.d.ts +21 -0
- package/dist/core/native-accel.d.ts.map +1 -0
- package/dist/core/network-cache.d.ts +68 -0
- package/dist/core/network-cache.d.ts.map +1 -0
- package/dist/core/orchestrator.d.ts +44 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/parallel.d.ts +42 -0
- package/dist/core/parallel.d.ts.map +1 -0
- package/dist/core/port-allocator.d.ts +16 -0
- package/dist/core/port-allocator.d.ts.map +1 -0
- package/dist/core/projects.d.ts +60 -0
- package/dist/core/projects.d.ts.map +1 -0
- package/dist/core/replay-cache.d.ts +127 -0
- package/dist/core/replay-cache.d.ts.map +1 -0
- package/dist/core/runner.d.ts +50 -0
- package/dist/core/runner.d.ts.map +1 -0
- package/dist/core/screenshot-compare.d.ts +50 -0
- package/dist/core/screenshot-compare.d.ts.map +1 -0
- package/dist/core/session-manager.d.ts +35 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/step-recorder.d.ts +20 -0
- package/dist/core/step-recorder.d.ts.map +1 -0
- package/dist/core/target-matrix.d.ts +29 -0
- package/dist/core/target-matrix.d.ts.map +1 -0
- package/dist/core/trace-viewer.d.ts +91 -0
- package/dist/core/trace-viewer.d.ts.map +1 -0
- package/dist/core/validator.d.ts +18 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/video-recorder.d.ts +120 -0
- package/dist/core/video-recorder.d.ts.map +1 -0
- package/dist/core/worker-pool.d.ts +87 -0
- package/dist/core/worker-pool.d.ts.map +1 -0
- package/dist/{daemon-manager-2EQDVUVM.js → daemon-manager-2SK5PHJR.js} +3 -3
- package/dist/{config-loader-CNGIW2XK.js.map → daemon-manager-2SK5PHJR.js.map} +0 -0
- package/dist/device/android.d.ts +66 -0
- package/dist/device/android.d.ts.map +1 -0
- package/dist/device/discover.d.ts +15 -0
- package/dist/device/discover.d.ts.map +1 -0
- package/dist/device/index.d.ts +4 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/ios.d.ts +126 -0
- package/dist/device/ios.d.ts.map +1 -0
- package/dist/diagnostics/live-inspector.d.ts +121 -0
- package/dist/diagnostics/live-inspector.d.ts.map +1 -0
- package/dist/diagnostics/native-logs.d.ts +38 -0
- package/dist/diagnostics/native-logs.d.ts.map +1 -0
- package/dist/discover-43C3BE7I.js +15 -0
- package/dist/{daemon-manager-2EQDVUVM.js.map → discover-43C3BE7I.js.map} +0 -0
- package/dist/{doctor-command-6ZVJWCW7.js → doctor-command-CLKEEOAX.js} +14 -11
- package/dist/{doctor-command-6ZVJWCW7.js.map → doctor-command-CLKEEOAX.js.map} +1 -1
- package/dist/drivers/adapter-registry.d.ts +96 -0
- package/dist/drivers/adapter-registry.d.ts.map +1 -0
- package/dist/drivers/appium/android.d.ts +22 -0
- package/dist/drivers/appium/android.d.ts.map +1 -0
- package/dist/drivers/appium/client.d.ts +26 -0
- package/dist/drivers/appium/client.d.ts.map +1 -0
- package/dist/drivers/appium/ios.d.ts +28 -0
- package/dist/drivers/appium/ios.d.ts.map +1 -0
- package/dist/drivers/appium/window-size.d.ts +8 -0
- package/dist/drivers/appium/window-size.d.ts.map +1 -0
- package/dist/drivers/browser-extensions.d.ts +62 -0
- package/dist/drivers/browser-extensions.d.ts.map +1 -0
- package/dist/drivers/cdp-browser.d.ts +102 -0
- package/dist/drivers/cdp-browser.d.ts.map +1 -0
- package/dist/drivers/common/xml-tokenizer.d.ts +26 -0
- package/dist/drivers/common/xml-tokenizer.d.ts.map +1 -0
- package/dist/drivers/device-controls.d.ts +36 -0
- package/dist/drivers/device-controls.d.ts.map +1 -0
- package/dist/drivers/electrobun.d.ts +47 -0
- package/dist/drivers/electrobun.d.ts.map +1 -0
- package/dist/drivers/electron.d.ts +36 -0
- package/dist/drivers/electron.d.ts.map +1 -0
- package/dist/drivers/index.d.ts +2 -0
- package/dist/drivers/index.d.ts.map +1 -0
- package/dist/drivers/launch-options.d.ts +10 -0
- package/dist/drivers/launch-options.d.ts.map +1 -0
- package/dist/drivers/network-profiles.d.ts +9 -0
- package/dist/drivers/network-profiles.d.ts.map +1 -0
- package/dist/drivers/playwright-parser.d.ts +16 -0
- package/dist/drivers/playwright-parser.d.ts.map +1 -0
- package/dist/drivers/playwright.d.ts +69 -0
- package/dist/drivers/playwright.d.ts.map +1 -0
- package/dist/drivers/raw-driver.d.ts +399 -0
- package/dist/drivers/raw-driver.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/client.d.ts +77 -0
- package/dist/drivers/uiautomator2/client.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/driver.d.ts +20 -0
- package/dist/drivers/uiautomator2/driver.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/index.d.ts +5 -0
- package/dist/drivers/uiautomator2/index.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/installer.d.ts +20 -0
- package/dist/drivers/uiautomator2/installer.d.ts.map +1 -0
- package/dist/drivers/uiautomator2/pagesource.d.ts +12 -0
- package/dist/drivers/uiautomator2/pagesource.d.ts.map +1 -0
- package/dist/drivers/wda/client.d.ts +116 -0
- package/dist/drivers/wda/client.d.ts.map +1 -0
- package/dist/drivers/wda/driver.d.ts +26 -0
- package/dist/drivers/wda/driver.d.ts.map +1 -0
- package/dist/drivers/wda/index.d.ts +5 -0
- package/dist/drivers/wda/index.d.ts.map +1 -0
- package/dist/drivers/wda/installer.d.ts +51 -0
- package/dist/drivers/wda/installer.d.ts.map +1 -0
- package/dist/drivers/wda/pagesource.d.ts +12 -0
- package/dist/drivers/wda/pagesource.d.ts.map +1 -0
- package/dist/errors.d.ts +82 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/{filters-MQG2RMPX.js → filters-5DCGGJRN.js} +3 -3
- package/dist/{discover-NKDMB4UI.js.map → filters-5DCGGJRN.js.map} +0 -0
- package/dist/gherkin/compiler.d.ts +3 -0
- package/dist/gherkin/compiler.d.ts.map +1 -0
- package/dist/gherkin/index.d.ts +7 -0
- package/dist/gherkin/index.d.ts.map +1 -0
- package/dist/gherkin/matcher.d.ts +9 -0
- package/dist/gherkin/matcher.d.ts.map +1 -0
- package/dist/gherkin/registry.d.ts +28 -0
- package/dist/gherkin/registry.d.ts.map +1 -0
- package/dist/gherkin/steps.d.ts +13 -31
- package/dist/gherkin/steps.d.ts.map +1 -0
- package/dist/gherkin/steps.js +5 -2
- package/dist/gherkin/steps.js.map +1 -1
- package/dist/gherkin/world.d.ts +15 -0
- package/dist/gherkin/world.d.ts.map +1 -0
- package/dist/{github-pr-YMWIPCCZ.js → github-pr-RYO6IAKD.js} +3 -3
- package/dist/{filters-MQG2RMPX.js.map → github-pr-RYO6IAKD.js.map} +0 -0
- package/dist/{html-FLMWPFQD.js → html-KJ2QAGF4.js} +6 -3
- package/dist/{html-FLMWPFQD.js.map → html-KJ2QAGF4.js.map} +1 -1
- package/dist/index.d.ts +54 -2267
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -30
- package/dist/index.js.map +1 -1
- package/dist/{init-command-Z3QREABL.js → init-command-V5VGN3IS.js} +5 -2
- package/dist/{init-command-Z3QREABL.js.map → init-command-V5VGN3IS.js.map} +1 -1
- package/dist/{init-flow-command-4EKRVTNT.js → init-flow-command-INYUCC6N.js} +6 -3
- package/dist/{init-flow-command-4EKRVTNT.js.map → init-flow-command-INYUCC6N.js.map} +1 -1
- package/dist/{installer-5UHTYQTB.js → installer-DMTY47SI.js} +5 -5
- package/dist/{github-pr-YMWIPCCZ.js.map → installer-DMTY47SI.js.map} +0 -0
- package/dist/{ios-Y4TO5MBR.js → ios-SZ4RBI7Q.js} +4 -4
- package/dist/{installer-5UHTYQTB.js.map → ios-SZ4RBI7Q.js.map} +0 -0
- package/dist/json-57Z2YSES.js +39 -0
- package/dist/json-57Z2YSES.js.map +1 -0
- package/dist/{junit-CGB3LKHD.js → junit-MHD5AXBU.js} +26 -6
- package/dist/junit-MHD5AXBU.js.map +1 -0
- package/dist/{local-DM3YBSV5.js → local-RH5EFGYF.js} +12 -12
- package/dist/{ios-Y4TO5MBR.js.map → local-RH5EFGYF.js.map} +0 -0
- package/dist/{machine-6H25TRTU.js → machine-NOOFRT45.js} +3 -3
- package/dist/{local-DM3YBSV5.js.map → machine-NOOFRT45.js.map} +0 -0
- package/dist/machine.d.ts +20 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/mcp/server.d.ts +73 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/{provider-YIPU5K42.js → provider-CBAXZ2VA.js} +3 -3
- package/dist/{machine-6H25TRTU.js.map → provider-CBAXZ2VA.js.map} +0 -0
- package/dist/{redact-U72BUBBR.js → redact-OG4M3IEU.js} +5 -2
- package/dist/{redact-U72BUBBR.js.map → redact-OG4M3IEU.js.map} +1 -1
- package/dist/report/allure.d.ts +3 -0
- package/dist/report/allure.d.ts.map +1 -0
- package/dist/report/classify-error.d.ts +7 -0
- package/dist/report/classify-error.d.ts.map +1 -0
- package/dist/report/code-frame.d.ts +16 -0
- package/dist/report/code-frame.d.ts.map +1 -0
- package/dist/report/console.d.ts +7 -0
- package/dist/report/console.d.ts.map +1 -0
- package/dist/report/failure-bundle.d.ts +66 -0
- package/dist/report/failure-bundle.d.ts.map +1 -0
- package/dist/report/failure-diagnostics.d.ts +11 -0
- package/dist/report/failure-diagnostics.d.ts.map +1 -0
- package/dist/report/github-pr.d.ts +20 -0
- package/dist/report/github-pr.d.ts.map +1 -0
- package/dist/report/html.d.ts +3 -0
- package/dist/report/html.d.ts.map +1 -0
- package/dist/report/index.d.ts +8 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/json.d.ts +3 -0
- package/dist/report/json.d.ts.map +1 -0
- package/dist/report/junit.d.ts +3 -0
- package/dist/report/junit.d.ts.map +1 -0
- package/dist/report/redact.d.ts +29 -0
- package/dist/report/redact.d.ts.map +1 -0
- package/dist/report/selector-guardrails.d.ts +12 -0
- package/dist/report/selector-guardrails.d.ts.map +1 -0
- package/dist/report/types.d.ts +164 -0
- package/dist/report/types.d.ts.map +1 -0
- package/dist/{runner-WOVZWUQR.js → runner-ABGUVOJG.js} +5 -3
- package/dist/{provider-YIPU5K42.js.map → runner-ABGUVOJG.js.map} +0 -0
- package/dist/runtime/appium-server.d.ts +34 -0
- package/dist/runtime/appium-server.d.ts.map +1 -0
- package/dist/runtime/appium.d.ts +5 -0
- package/dist/runtime/appium.d.ts.map +1 -0
- package/dist/runtime/capabilities.d.ts +19 -0
- package/dist/runtime/capabilities.d.ts.map +1 -0
- package/dist/runtime/daemon-manager.d.ts +83 -0
- package/dist/runtime/daemon-manager.d.ts.map +1 -0
- package/dist/runtime/local.d.ts +38 -0
- package/dist/runtime/local.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +21 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/web-server.d.ts +57 -0
- package/dist/runtime/web-server.d.ts.map +1 -0
- package/dist/schemas/config.d.ts +780 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/device.d.ts +12 -0
- package/dist/schemas/device.d.ts.map +1 -0
- package/dist/schemas/element.d.ts +66 -0
- package/dist/schemas/element.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/selector.d.ts +193 -0
- package/dist/schemas/selector.d.ts.map +1 -0
- package/dist/screenshot-compare-V4JQG73R.js +2410 -0
- package/dist/screenshot-compare-V4JQG73R.js.map +1 -0
- package/dist/server-D45AO34E.js +6731 -0
- package/dist/server-D45AO34E.js.map +1 -0
- package/dist/{server-ING5D5ZJ.js → server-KLZBJOMQ.js} +3 -3
- package/dist/{runner-WOVZWUQR.js.map → server-KLZBJOMQ.js.map} +0 -0
- package/dist/session-N6DEYVPM.js +21 -0
- package/dist/{server-ING5D5ZJ.js.map → session-N6DEYVPM.js.map} +0 -0
- package/dist/smart/auto-wait.d.ts +38 -0
- package/dist/smart/auto-wait.d.ts.map +1 -0
- package/dist/smart/channel-resolver.d.ts +90 -0
- package/dist/smart/channel-resolver.d.ts.map +1 -0
- package/dist/smart/coordinator.d.ts +162 -0
- package/dist/smart/coordinator.d.ts.map +1 -0
- package/dist/smart/diagnostics.d.ts +15 -0
- package/dist/smart/diagnostics.d.ts.map +1 -0
- package/dist/smart/element-matcher.d.ts +24 -0
- package/dist/smart/element-matcher.d.ts.map +1 -0
- package/dist/smart/hierarchy-cache.d.ts +16 -0
- package/dist/smart/hierarchy-cache.d.ts.map +1 -0
- package/dist/smart/index.d.ts +4 -0
- package/dist/smart/index.d.ts.map +1 -0
- package/dist/studio/api.d.ts +317 -0
- package/dist/studio/api.d.ts.map +1 -0
- package/dist/studio/context.d.ts +7 -0
- package/dist/studio/context.d.ts.map +1 -0
- package/dist/studio/core/element-tree.d.ts +15 -0
- package/dist/studio/core/element-tree.d.ts.map +1 -0
- package/dist/studio/effect-handler.d.ts +3 -0
- package/dist/studio/effect-handler.d.ts.map +1 -0
- package/dist/studio/procedures.d.ts +4 -0
- package/dist/studio/procedures.d.ts.map +1 -0
- package/dist/studio/recording-session.d.ts +31 -0
- package/dist/studio/recording-session.d.ts.map +1 -0
- package/dist/studio/routers/devices.d.ts +11 -0
- package/dist/studio/routers/devices.d.ts.map +1 -0
- package/dist/studio/routers/inspector.d.ts +104 -0
- package/dist/studio/routers/inspector.d.ts.map +1 -0
- package/dist/studio/routers/recording.d.ts +130 -0
- package/dist/studio/routers/recording.d.ts.map +1 -0
- package/dist/studio/routers/tests.d.ts +93 -0
- package/dist/studio/routers/tests.d.ts.map +1 -0
- package/dist/studio/server.d.ts +12 -0
- package/dist/studio/server.d.ts.map +1 -0
- package/dist/{studio-command-KK7A3KN6.js → studio-command-TNSJGTFA.js} +6 -3
- package/dist/{studio-command-KK7A3KN6.js.map → studio-command-TNSJGTFA.js.map} +1 -1
- package/dist/{test-command-QGIJBRH7.js → test-command-EXPYFDTF.js} +283 -74
- package/dist/test-command-EXPYFDTF.js.map +1 -0
- package/dist/{validator-WO5IL7IY.js → validator-AJNOFBQM.js} +4 -4
- package/dist/{session-5TNWVGQQ.js.map → validator-AJNOFBQM.js.map} +0 -0
- package/native/darwin-arm64/libspana_native.dylib +0 -0
- package/native/darwin-x64/libspana_native.dylib +0 -0
- package/native/linux-arm64/libspana_native.so +0 -0
- package/native/linux-x64/libspana_native.so +0 -0
- package/native/win32-x64/spana_native.dll +0 -0
- package/package.json +15 -18
- package/studio-dist/assets/index-CHLA4F7b.css +2 -0
- package/studio-dist/assets/index-DXGUfzm3.js +23 -0
- package/studio-dist/index.html +2 -2
- package/dist/accessibility-audit-YZOPUY3D.js.map +0 -1
- package/dist/app-RSDPDTKT.js +0 -10
- package/dist/chunk-3IZMPNE7.js.map +0 -1
- package/dist/chunk-4KK4E3N3.js.map +0 -1
- package/dist/chunk-64UZQP7Z.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-FPQAJNE3.js.map +0 -1
- package/dist/chunk-FXBWACUT.js.map +0 -1
- package/dist/chunk-SGZMO456.js.map +0 -1
- package/dist/chunk-WS2TVNMY.js.map +0 -1
- package/dist/chunk-X2TJP7LB.js.map +0 -1
- package/dist/chunk-XA6LWLZQ.js +0 -310
- package/dist/chunk-XA6LWLZQ.js.map +0 -1
- package/dist/chunk-Z6K4QQAR.js.map +0 -1
- package/dist/config-loader-CNGIW2XK.js +0 -9
- package/dist/console-DIYEJSSP.js.map +0 -1
- package/dist/discover-NKDMB4UI.js +0 -15
- package/dist/flow-DddAj1xv.d.ts +0 -1913
- package/dist/json-JMRPUVY2.js +0 -20
- package/dist/json-JMRPUVY2.js.map +0 -1
- package/dist/junit-CGB3LKHD.js.map +0 -1
- package/dist/screenshot-compare-POTXVUTL.js +0 -136
- package/dist/screenshot-compare-POTXVUTL.js.map +0 -1
- package/dist/server-JNQ2PLCC.js +0 -855
- package/dist/server-JNQ2PLCC.js.map +0 -1
- package/dist/session-5TNWVGQQ.js +0 -21
- package/dist/test-command-QGIJBRH7.js.map +0 -1
- package/dist/validator-WO5IL7IY.js.map +0 -1
- package/studio-dist/assets/index-CBFsOh-9.js +0 -193
- package/studio-dist/assets/index-DH_18EyL.css +0 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createAndroidWebViewCdpChannel,
|
|
3
3
|
createCompositeDomChannel,
|
|
4
4
|
createWebKitInspectorChannel
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GDDCZ2PL.js";
|
|
6
6
|
import {
|
|
7
7
|
adbClearApp,
|
|
8
8
|
adbForceStop,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
adbSetWifi,
|
|
19
19
|
adbShell,
|
|
20
20
|
findADB
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XVL4FHXA.js";
|
|
22
22
|
import {
|
|
23
23
|
installedUrlSchemesOnSimulator,
|
|
24
24
|
launchOnSimulator,
|
|
@@ -28,20 +28,20 @@ import {
|
|
|
28
28
|
pfctlSetThrottle,
|
|
29
29
|
resetSimulatorKeychain,
|
|
30
30
|
terminateOnSimulator
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2MA5G2VH.js";
|
|
32
32
|
import {
|
|
33
33
|
getHealthyWarmDaemon,
|
|
34
34
|
registerWarmDaemon
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-FHCOPLYB.js";
|
|
36
36
|
import {
|
|
37
37
|
allocateFreePort,
|
|
38
38
|
allocatePort,
|
|
39
39
|
releasePort
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7Q7TSUNL.js";
|
|
41
41
|
import {
|
|
42
42
|
hasLaunchDeviceState,
|
|
43
43
|
splitGraphemes
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-XQRXQBDQ.js";
|
|
45
45
|
import {
|
|
46
46
|
DriverError,
|
|
47
47
|
buildDomFillScript,
|
|
@@ -51,9 +51,13 @@ import {
|
|
|
51
51
|
buildDomWaitForHiddenScript,
|
|
52
52
|
buildDomWaitForMatchScript,
|
|
53
53
|
buildDomWaitForSelectorScript
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-GAWJL6Q3.js";
|
|
55
|
+
import {
|
|
56
|
+
init_esm_shims
|
|
57
|
+
} from "./chunk-FTXUQMGH.js";
|
|
55
58
|
|
|
56
59
|
// src/drivers/playwright-parser.ts
|
|
60
|
+
init_esm_shims();
|
|
57
61
|
function rawNodeToElement(node) {
|
|
58
62
|
const children = node.children && node.children.length > 0 ? node.children.map(rawNodeToElement) : void 0;
|
|
59
63
|
return {
|
|
@@ -82,11 +86,13 @@ function parseWebHierarchy(json) {
|
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
// src/drivers/raw-driver.ts
|
|
89
|
+
init_esm_shims();
|
|
85
90
|
import { Context, Effect } from "effect";
|
|
86
|
-
var RawDriver = class extends Context.
|
|
91
|
+
var RawDriver = class extends Context.Service()("RawDriver") {
|
|
87
92
|
};
|
|
88
93
|
|
|
89
94
|
// src/drivers/playwright.ts
|
|
95
|
+
init_esm_shims();
|
|
90
96
|
import { spawn } from "child_process";
|
|
91
97
|
import { createHash } from "crypto";
|
|
92
98
|
import { mkdtempSync, rmSync } from "fs";
|
|
@@ -101,6 +107,7 @@ import {
|
|
|
101
107
|
} from "playwright-core";
|
|
102
108
|
|
|
103
109
|
// src/drivers/device-controls.ts
|
|
110
|
+
init_esm_shims();
|
|
104
111
|
import { execFileSync } from "child_process";
|
|
105
112
|
import { Effect as Effect2 } from "effect";
|
|
106
113
|
function deviceEffect(operation, action) {
|
|
@@ -193,6 +200,7 @@ function iosSimulatorControls(udid, command = run) {
|
|
|
193
200
|
}
|
|
194
201
|
|
|
195
202
|
// src/drivers/network-profiles.ts
|
|
203
|
+
init_esm_shims();
|
|
196
204
|
var PROFILES = {
|
|
197
205
|
wifi: {
|
|
198
206
|
offline: false,
|
|
@@ -345,7 +353,8 @@ async function launchPlaywrightBrowser(config = {}) {
|
|
|
345
353
|
return browserLaunchers[browserName].launch({
|
|
346
354
|
headless: config.headless ?? true,
|
|
347
355
|
...config.channel ? { channel: config.channel } : {},
|
|
348
|
-
...config.executablePath ? { executablePath: config.executablePath } : {}
|
|
356
|
+
...config.executablePath ? { executablePath: config.executablePath } : {},
|
|
357
|
+
...config.args && config.args.length > 0 ? { args: config.args } : {}
|
|
349
358
|
});
|
|
350
359
|
}
|
|
351
360
|
var browserLaunchers = {
|
|
@@ -457,6 +466,9 @@ function resolvePlaywrightLocator(root, selector) {
|
|
|
457
466
|
if ("anyOf" in selector) {
|
|
458
467
|
const branches = selector.anyOf.map((branch) => resolvePlaywrightLocator(scope, branch));
|
|
459
468
|
locator = branches.reduce((acc, next) => acc.or(next));
|
|
469
|
+
} else if ("allOf" in selector) {
|
|
470
|
+
const branches = selector.allOf.map((branch) => resolvePlaywrightLocator(scope, branch));
|
|
471
|
+
locator = branches.reduce((acc, next) => acc.and(next));
|
|
460
472
|
} else if ("css" in selector) {
|
|
461
473
|
locator = scope.locator(selector.css);
|
|
462
474
|
} else if ("role" in selector) {
|
|
@@ -466,6 +478,26 @@ function resolvePlaywrightLocator(root, selector) {
|
|
|
466
478
|
...selector.level !== void 0 ? { level: selector.level } : {},
|
|
467
479
|
...selector.includeHidden !== void 0 ? { includeHidden: selector.includeHidden } : {}
|
|
468
480
|
});
|
|
481
|
+
} else if ("label" in selector) {
|
|
482
|
+
locator = scope.getByLabel(
|
|
483
|
+
selector.label,
|
|
484
|
+
selector.exact !== void 0 ? { exact: selector.exact } : void 0
|
|
485
|
+
);
|
|
486
|
+
} else if ("placeholder" in selector) {
|
|
487
|
+
locator = scope.getByPlaceholder(
|
|
488
|
+
selector.placeholder,
|
|
489
|
+
selector.exact !== void 0 ? { exact: selector.exact } : void 0
|
|
490
|
+
);
|
|
491
|
+
} else if ("altText" in selector) {
|
|
492
|
+
locator = scope.getByAltText(
|
|
493
|
+
selector.altText,
|
|
494
|
+
selector.exact !== void 0 ? { exact: selector.exact } : void 0
|
|
495
|
+
);
|
|
496
|
+
} else if ("title" in selector) {
|
|
497
|
+
locator = scope.getByTitle(
|
|
498
|
+
selector.title,
|
|
499
|
+
selector.exact !== void 0 ? { exact: selector.exact } : void 0
|
|
500
|
+
);
|
|
469
501
|
} else if ("testID" in selector) {
|
|
470
502
|
locator = scope.getByTestId(selector.testID);
|
|
471
503
|
} else if ("accessibilityLabel" in selector) {
|
|
@@ -515,7 +547,8 @@ function makePlaywrightDriver(config) {
|
|
|
515
547
|
try: () => browserLaunchers[browserName].launch({
|
|
516
548
|
headless: config.headless ?? true,
|
|
517
549
|
...config.channel ? { channel: config.channel } : {},
|
|
518
|
-
...config.executablePath ? { executablePath: config.executablePath } : {}
|
|
550
|
+
...config.executablePath ? { executablePath: config.executablePath } : {},
|
|
551
|
+
...config.args && config.args.length > 0 ? { args: config.args } : {}
|
|
519
552
|
}),
|
|
520
553
|
catch: (e) => new DriverError({ message: `Failed to launch browser: ${e}` })
|
|
521
554
|
});
|
|
@@ -540,6 +573,22 @@ function makePlaywrightDriver(config) {
|
|
|
540
573
|
let downloadWaiters = [];
|
|
541
574
|
let dialogHandler = null;
|
|
542
575
|
const attachedPages = /* @__PURE__ */ new WeakSet();
|
|
576
|
+
const navigationUrls = [];
|
|
577
|
+
const requestListeners = /* @__PURE__ */ new Set();
|
|
578
|
+
const toBrowserRequestInfo = (request) => ({
|
|
579
|
+
url: request.url(),
|
|
580
|
+
method: request.method(),
|
|
581
|
+
headers: request.headers(),
|
|
582
|
+
resourceType: request.resourceType(),
|
|
583
|
+
postData: () => request.postData(),
|
|
584
|
+
postDataJSON: () => {
|
|
585
|
+
try {
|
|
586
|
+
return request.postDataJSON();
|
|
587
|
+
} catch {
|
|
588
|
+
return null;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
});
|
|
543
592
|
const resetWebDiagnostics = () => {
|
|
544
593
|
consoleLogs = [];
|
|
545
594
|
jsErrors = [];
|
|
@@ -787,6 +836,25 @@ function makePlaywrightDriver(config) {
|
|
|
787
836
|
});
|
|
788
837
|
});
|
|
789
838
|
}
|
|
839
|
+
activePage.on("framenavigated", (frame) => {
|
|
840
|
+
if (frame === activePage.mainFrame()) {
|
|
841
|
+
const u = frame.url();
|
|
842
|
+
if (u) {
|
|
843
|
+
navigationUrls.push(u);
|
|
844
|
+
if (navigationUrls.length > 50) navigationUrls.shift();
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
activePage.on("request", (request) => {
|
|
849
|
+
if (requestListeners.size === 0) return;
|
|
850
|
+
const info = toBrowserRequestInfo(request);
|
|
851
|
+
for (const listener of requestListeners) {
|
|
852
|
+
try {
|
|
853
|
+
listener(info);
|
|
854
|
+
} catch {
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
});
|
|
790
858
|
activePage.on("close", () => {
|
|
791
859
|
debugLog("tabClosed", tabIds.get(activePage) ?? "untracked");
|
|
792
860
|
});
|
|
@@ -820,8 +888,50 @@ function makePlaywrightDriver(config) {
|
|
|
820
888
|
const applyRouteDefinition = async (definition) => {
|
|
821
889
|
const handler = definition.kind === "mock" ? async (route) => {
|
|
822
890
|
await route.fulfill(buildMockResponse(definition.response));
|
|
823
|
-
} : async (route) => {
|
|
891
|
+
} : definition.kind === "block" ? async (route) => {
|
|
824
892
|
await route.abort();
|
|
893
|
+
} : async (route) => {
|
|
894
|
+
let handled = false;
|
|
895
|
+
const reqInfo = toBrowserRequestInfo(route.request());
|
|
896
|
+
const wrapped = {
|
|
897
|
+
request: () => reqInfo,
|
|
898
|
+
continue: async (overrides) => {
|
|
899
|
+
if (handled) return;
|
|
900
|
+
handled = true;
|
|
901
|
+
await route.continue(overrides);
|
|
902
|
+
},
|
|
903
|
+
abort: async (errorCode) => {
|
|
904
|
+
if (handled) return;
|
|
905
|
+
handled = true;
|
|
906
|
+
await route.abort(errorCode);
|
|
907
|
+
},
|
|
908
|
+
fulfill: async (response) => {
|
|
909
|
+
if (handled) return;
|
|
910
|
+
handled = true;
|
|
911
|
+
await route.fulfill(buildMockResponse(response));
|
|
912
|
+
},
|
|
913
|
+
fetch: async (overrides) => {
|
|
914
|
+
const res = await route.fetch(overrides);
|
|
915
|
+
return {
|
|
916
|
+
url: res.url(),
|
|
917
|
+
status: res.status(),
|
|
918
|
+
statusText: res.statusText(),
|
|
919
|
+
headers: res.headers(),
|
|
920
|
+
method: overrides?.method ?? reqInfo.method,
|
|
921
|
+
body: () => res.text(),
|
|
922
|
+
json: () => res.json()
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
try {
|
|
927
|
+
await definition.handler(wrapped);
|
|
928
|
+
} finally {
|
|
929
|
+
if (!handled) {
|
|
930
|
+
handled = true;
|
|
931
|
+
await route.continue().catch(() => {
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
}
|
|
825
935
|
};
|
|
826
936
|
await context.route(definition.matcher, handler);
|
|
827
937
|
appliedRoutes.push({ matcher: definition.matcher, handler });
|
|
@@ -832,13 +942,28 @@ function makePlaywrightDriver(config) {
|
|
|
832
942
|
await applyRouteDefinition(definition);
|
|
833
943
|
}
|
|
834
944
|
};
|
|
945
|
+
const normalizePlaywrightFiles = (input) => {
|
|
946
|
+
if (typeof input === "string") return input;
|
|
947
|
+
const items = Array.isArray(input) ? input : [input];
|
|
948
|
+
if (items.every((item) => typeof item === "string")) {
|
|
949
|
+
return items;
|
|
950
|
+
}
|
|
951
|
+
return items.map(
|
|
952
|
+
(item) => typeof item === "string" ? item : {
|
|
953
|
+
name: item.name,
|
|
954
|
+
mimeType: item.mimeType,
|
|
955
|
+
buffer: Buffer.from(item.buffer)
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
};
|
|
835
959
|
const setInputFiles = async (selector, path) => {
|
|
960
|
+
const pwFiles = normalizePlaywrightFiles(path);
|
|
836
961
|
if (typeof selector === "string") {
|
|
837
962
|
try {
|
|
838
|
-
await page.getByLabel(selector, { exact: true }).setInputFiles(
|
|
963
|
+
await page.getByLabel(selector, { exact: true }).setInputFiles(pwFiles);
|
|
839
964
|
return;
|
|
840
965
|
} catch {
|
|
841
|
-
await page.getByText(selector, { exact: true }).setInputFiles(
|
|
966
|
+
await page.getByText(selector, { exact: true }).setInputFiles(pwFiles);
|
|
842
967
|
return;
|
|
843
968
|
}
|
|
844
969
|
}
|
|
@@ -852,24 +977,24 @@ function makePlaywrightDriver(config) {
|
|
|
852
977
|
);
|
|
853
978
|
if (!hasModifiers) {
|
|
854
979
|
if ("testID" in selector) {
|
|
855
|
-
await page.getByTestId(selector.testID).setInputFiles(
|
|
980
|
+
await page.getByTestId(selector.testID).setInputFiles(pwFiles);
|
|
856
981
|
return;
|
|
857
982
|
}
|
|
858
983
|
if ("accessibilityLabel" in selector) {
|
|
859
|
-
await page.getByLabel(selector.accessibilityLabel, { exact: true }).setInputFiles(
|
|
984
|
+
await page.getByLabel(selector.accessibilityLabel, { exact: true }).setInputFiles(pwFiles);
|
|
860
985
|
return;
|
|
861
986
|
}
|
|
862
987
|
if ("text" in selector) {
|
|
863
988
|
try {
|
|
864
|
-
await page.getByLabel(selector.text, { exact: true }).setInputFiles(
|
|
989
|
+
await page.getByLabel(selector.text, { exact: true }).setInputFiles(pwFiles);
|
|
865
990
|
return;
|
|
866
991
|
} catch {
|
|
867
|
-
await page.getByText(selector.text, { exact: true }).setInputFiles(
|
|
992
|
+
await page.getByText(selector.text, { exact: true }).setInputFiles(pwFiles);
|
|
868
993
|
return;
|
|
869
994
|
}
|
|
870
995
|
}
|
|
871
996
|
}
|
|
872
|
-
await resolvePlaywrightLocator(page, selector).setInputFiles(
|
|
997
|
+
await resolvePlaywrightLocator(page, selector).setInputFiles(pwFiles);
|
|
873
998
|
};
|
|
874
999
|
const applyContextSpeedOptions = async (ctx) => {
|
|
875
1000
|
if (config.instantAnimations && typeof ctx.addInitScript === "function") {
|
|
@@ -928,7 +1053,12 @@ function makePlaywrightDriver(config) {
|
|
|
928
1053
|
const prepareContextSlot = async (storageStatePath) => {
|
|
929
1054
|
const nextCtx = await browser.newContext({
|
|
930
1055
|
acceptDownloads: true,
|
|
931
|
-
...storageStatePath ? { storageState: storageStatePath } : {}
|
|
1056
|
+
...storageStatePath ? { storageState: storageStatePath } : {},
|
|
1057
|
+
...config.viewport ? { viewport: config.viewport } : {},
|
|
1058
|
+
...config.locale ? { locale: config.locale } : {},
|
|
1059
|
+
...config.timezoneId ? { timezoneId: config.timezoneId } : {},
|
|
1060
|
+
...config.colorScheme ? { colorScheme: config.colorScheme } : {},
|
|
1061
|
+
...config.reducedMotion ? { reducedMotion: config.reducedMotion } : {}
|
|
932
1062
|
});
|
|
933
1063
|
await applyContextSpeedOptions(nextCtx);
|
|
934
1064
|
const nextPage = await nextCtx.newPage();
|
|
@@ -977,6 +1107,7 @@ function makePlaywrightDriver(config) {
|
|
|
977
1107
|
const beginFlow = async (flowName) => {
|
|
978
1108
|
currentFlowName = flowName;
|
|
979
1109
|
resetWebDiagnostics();
|
|
1110
|
+
navigationUrls.length = 0;
|
|
980
1111
|
harEntries = [];
|
|
981
1112
|
harPages = /* @__PURE__ */ new Map();
|
|
982
1113
|
tabIds = /* @__PURE__ */ new Map();
|
|
@@ -1021,6 +1152,30 @@ function makePlaywrightDriver(config) {
|
|
|
1021
1152
|
try: () => createContextAndPage(config.storageState),
|
|
1022
1153
|
catch: (e) => new DriverError({ message: `Failed to create page: ${e}` })
|
|
1023
1154
|
});
|
|
1155
|
+
const queryCrossOriginPlaywrightFrames = async (selector) => {
|
|
1156
|
+
if (typeof selector !== "object" || selector === null || !("frame" in selector) || !selector.frame) {
|
|
1157
|
+
return [];
|
|
1158
|
+
}
|
|
1159
|
+
const { frame: frameSel, ...innerRest } = selector;
|
|
1160
|
+
const innerSel = innerRest;
|
|
1161
|
+
const frameCss = selectorToFrameCss(frameSel);
|
|
1162
|
+
const iframeHandle = await page.locator(frameCss).first().elementHandle().catch(() => null);
|
|
1163
|
+
if (!iframeHandle) return [];
|
|
1164
|
+
const [contentFrame, frameBox] = await Promise.all([
|
|
1165
|
+
iframeHandle.contentFrame().catch(() => null),
|
|
1166
|
+
iframeHandle.boundingBox().catch(() => null)
|
|
1167
|
+
]);
|
|
1168
|
+
if (!contentFrame) return [];
|
|
1169
|
+
const matches = await contentFrame.evaluate(buildDomQueryScript(innerSel)).catch(() => []);
|
|
1170
|
+
if (!Array.isArray(matches) || matches.length === 0) return [];
|
|
1171
|
+
const ox = frameBox?.x ?? 0;
|
|
1172
|
+
const oy = frameBox?.y ?? 0;
|
|
1173
|
+
return matches.map((m) => ({
|
|
1174
|
+
...m,
|
|
1175
|
+
inIframe: true,
|
|
1176
|
+
rect: { ...m.rect, x: m.rect.x + ox, y: m.rect.y + oy }
|
|
1177
|
+
}));
|
|
1178
|
+
};
|
|
1024
1179
|
const domChannel = config.enableDomChannel === false ? void 0 : {
|
|
1025
1180
|
kind: "playwright",
|
|
1026
1181
|
isConnected: () => Boolean(page) && (typeof page.isClosed !== "function" || !page.isClosed()),
|
|
@@ -1031,9 +1186,22 @@ function makePlaywrightDriver(config) {
|
|
|
1031
1186
|
evaluate: async (script, ...args) => evaluateOnPage(page, script, args),
|
|
1032
1187
|
query: async (selector) => {
|
|
1033
1188
|
const res = await page.evaluate(buildDomQueryScript(selector));
|
|
1034
|
-
|
|
1189
|
+
if (Array.isArray(res) && res.length > 0) return res;
|
|
1190
|
+
return queryCrossOriginPlaywrightFrames(selector);
|
|
1035
1191
|
},
|
|
1036
1192
|
waitForSelector: async (selector, opts) => {
|
|
1193
|
+
if (typeof selector === "object" && selector !== null && "frame" in selector && selector.frame) {
|
|
1194
|
+
const start = Date.now();
|
|
1195
|
+
const timeoutMs = opts?.timeoutMs ?? 5e3;
|
|
1196
|
+
while (Date.now() - start < timeoutMs) {
|
|
1197
|
+
const res2 = await page.evaluate(buildDomQueryScript(selector));
|
|
1198
|
+
const hits = Array.isArray(res2) && res2.length > 0 ? res2 : await queryCrossOriginPlaywrightFrames(selector);
|
|
1199
|
+
const filtered = hits.filter((m) => m.visible && (!opts?.forAction || m.enabled));
|
|
1200
|
+
if (filtered.length > 0) return filtered;
|
|
1201
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
1202
|
+
}
|
|
1203
|
+
return [];
|
|
1204
|
+
}
|
|
1037
1205
|
const res = await page.evaluate(buildDomWaitForSelectorScript(selector, opts));
|
|
1038
1206
|
return Array.isArray(res) ? res : [];
|
|
1039
1207
|
},
|
|
@@ -1043,11 +1211,36 @@ function makePlaywrightDriver(config) {
|
|
|
1043
1211
|
},
|
|
1044
1212
|
waitForMatch: async (selector, opts) => {
|
|
1045
1213
|
const res = await page.evaluate(buildDomWaitForMatchScript(selector, opts));
|
|
1214
|
+
if (res && typeof res === "object" && res.matched) {
|
|
1215
|
+
return res;
|
|
1216
|
+
}
|
|
1217
|
+
if (typeof selector === "object" && selector !== null && "frame" in selector && selector.frame) {
|
|
1218
|
+
const { frame: frameSel, ...innerRest } = selector;
|
|
1219
|
+
const iframeHandle = await page.locator(selectorToFrameCss(frameSel)).first().elementHandle().catch(() => null);
|
|
1220
|
+
const cf = iframeHandle ? await iframeHandle.contentFrame().catch(() => null) : null;
|
|
1221
|
+
if (cf) {
|
|
1222
|
+
const frameRes = await cf.evaluate(buildDomWaitForMatchScript(innerRest, opts)).catch(() => null);
|
|
1223
|
+
if (frameRes && typeof frameRes === "object") {
|
|
1224
|
+
return frameRes;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1046
1228
|
return res && typeof res === "object" ? res : { matched: false };
|
|
1047
1229
|
},
|
|
1048
1230
|
fillDom: async (selector, value, opts) => {
|
|
1049
1231
|
const res = await page.evaluate(buildDomFillScript(selector, value, opts));
|
|
1050
|
-
|
|
1232
|
+
if (res) return true;
|
|
1233
|
+
if (typeof selector === "object" && selector !== null && "frame" in selector && selector.frame) {
|
|
1234
|
+
const { frame: frameSel, ...innerRest } = selector;
|
|
1235
|
+
const iframeHandle = await page.locator(selectorToFrameCss(frameSel)).first().elementHandle().catch(() => null);
|
|
1236
|
+
const cf = iframeHandle ? await iframeHandle.contentFrame().catch(() => null) : null;
|
|
1237
|
+
if (cf) {
|
|
1238
|
+
return Boolean(
|
|
1239
|
+
await cf.evaluate(buildDomFillScript(innerRest, value, opts)).catch(() => false)
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
return false;
|
|
1051
1244
|
},
|
|
1052
1245
|
scrollIntoView: async (selector) => {
|
|
1053
1246
|
const res = await page.evaluate(buildDomScrollIntoViewScript(selector));
|
|
@@ -1055,7 +1248,18 @@ function makePlaywrightDriver(config) {
|
|
|
1055
1248
|
},
|
|
1056
1249
|
tapDom: async (selector) => {
|
|
1057
1250
|
const res = await page.evaluate(buildDomTapScript(selector));
|
|
1058
|
-
|
|
1251
|
+
if (res) return true;
|
|
1252
|
+
if (typeof selector === "object" && selector !== null && "frame" in selector && selector.frame) {
|
|
1253
|
+
const { frame: frameSel, ...innerRest } = selector;
|
|
1254
|
+
const iframeHandle = await page.locator(selectorToFrameCss(frameSel)).first().elementHandle().catch(() => null);
|
|
1255
|
+
const cf = iframeHandle ? await iframeHandle.contentFrame().catch(() => null) : null;
|
|
1256
|
+
if (cf) {
|
|
1257
|
+
return Boolean(
|
|
1258
|
+
await cf.evaluate(buildDomTapScript(innerRest)).catch(() => false)
|
|
1259
|
+
);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
return false;
|
|
1059
1263
|
}
|
|
1060
1264
|
};
|
|
1061
1265
|
let coveragePage;
|
|
@@ -1160,10 +1364,36 @@ function makePlaywrightDriver(config) {
|
|
|
1160
1364
|
try: () => page.keyboard.insertText(text),
|
|
1161
1365
|
catch: (e) => new DriverError({ message: `Failed to input text: ${e}` })
|
|
1162
1366
|
}),
|
|
1367
|
+
typeText: (text, opts) => Effect3.tryPromise({
|
|
1368
|
+
try: () => page.keyboard.type(text, opts?.delay ? { delay: opts.delay } : void 0),
|
|
1369
|
+
catch: (e) => new DriverError({ message: `Failed to type text: ${e}` })
|
|
1370
|
+
}),
|
|
1163
1371
|
pressKey: (key) => Effect3.tryPromise({
|
|
1164
1372
|
try: () => page.keyboard.press(key),
|
|
1165
1373
|
catch: (e) => new DriverError({ message: `Failed to press key ${key}: ${e}` })
|
|
1166
1374
|
}),
|
|
1375
|
+
keyDown: (key) => Effect3.tryPromise({
|
|
1376
|
+
try: () => page.keyboard.down(key),
|
|
1377
|
+
catch: (e) => new DriverError({ message: `Failed to press keyDown ${key}: ${e}` })
|
|
1378
|
+
}),
|
|
1379
|
+
keyUp: (key) => Effect3.tryPromise({
|
|
1380
|
+
try: () => page.keyboard.up(key),
|
|
1381
|
+
catch: (e) => new DriverError({ message: `Failed to release keyUp ${key}: ${e}` })
|
|
1382
|
+
}),
|
|
1383
|
+
mouseDown: (x, y, opts) => Effect3.tryPromise({
|
|
1384
|
+
try: async () => {
|
|
1385
|
+
await page.mouse.move(x, y);
|
|
1386
|
+
await page.mouse.down({ button: opts?.button ?? "left" });
|
|
1387
|
+
},
|
|
1388
|
+
catch: (e) => new DriverError({ message: `Failed to mouseDown at (${x}, ${y}): ${e}` })
|
|
1389
|
+
}),
|
|
1390
|
+
mouseUp: (x, y, opts) => Effect3.tryPromise({
|
|
1391
|
+
try: async () => {
|
|
1392
|
+
await page.mouse.move(x, y);
|
|
1393
|
+
await page.mouse.up({ button: opts?.button ?? "left" });
|
|
1394
|
+
},
|
|
1395
|
+
catch: (e) => new DriverError({ message: `Failed to mouseUp at (${x}, ${y}): ${e}` })
|
|
1396
|
+
}),
|
|
1167
1397
|
hideKeyboard: () => Effect3.void,
|
|
1168
1398
|
takeScreenshot: () => Effect3.tryPromise({
|
|
1169
1399
|
try: async () => {
|
|
@@ -1172,6 +1402,13 @@ function makePlaywrightDriver(config) {
|
|
|
1172
1402
|
},
|
|
1173
1403
|
catch: (e) => new DriverError({ message: `Failed to take screenshot: ${e}` })
|
|
1174
1404
|
}),
|
|
1405
|
+
takeFullPageScreenshot: () => Effect3.tryPromise({
|
|
1406
|
+
try: async () => {
|
|
1407
|
+
const buffer = await page.screenshot({ fullPage: true });
|
|
1408
|
+
return new Uint8Array(buffer);
|
|
1409
|
+
},
|
|
1410
|
+
catch: (e) => new DriverError({ message: `Failed to take fullPage screenshot: ${e}` })
|
|
1411
|
+
}),
|
|
1175
1412
|
getDeviceInfo: () => Effect3.tryPromise({
|
|
1176
1413
|
try: async () => {
|
|
1177
1414
|
const viewport = page.viewportSize() ?? { width: 1280, height: 720 };
|
|
@@ -1263,6 +1500,14 @@ function makePlaywrightDriver(config) {
|
|
|
1263
1500
|
},
|
|
1264
1501
|
catch: (e) => new DriverError({ message: `Failed to go back: ${e}` })
|
|
1265
1502
|
}),
|
|
1503
|
+
forward: () => Effect3.tryPromise({
|
|
1504
|
+
try: async () => {
|
|
1505
|
+
await page.goForward();
|
|
1506
|
+
updateHarPage(page);
|
|
1507
|
+
debugLog("forward", currentPageUrl(page));
|
|
1508
|
+
},
|
|
1509
|
+
catch: (e) => new DriverError({ message: `Failed to go forward: ${e}` })
|
|
1510
|
+
}),
|
|
1266
1511
|
reload: (reloadOpts) => Effect3.tryPromise({
|
|
1267
1512
|
try: async () => {
|
|
1268
1513
|
const waitUntil = reloadOpts?.waitUntil ?? config.waitUntil;
|
|
@@ -1279,10 +1524,37 @@ function makePlaywrightDriver(config) {
|
|
|
1279
1524
|
catch: (e) => new DriverError({ message: `Failed to hover at (${x}, ${y}): ${e}` })
|
|
1280
1525
|
}),
|
|
1281
1526
|
getUrl: () => Effect3.sync(() => currentPageUrl(page)),
|
|
1527
|
+
getNavigationUrls: () => [...navigationUrls],
|
|
1528
|
+
waitForLoadState: (state = "load", waitOpts) => Effect3.tryPromise({
|
|
1529
|
+
try: () => page.waitForLoadState(state, waitOpts),
|
|
1530
|
+
catch: (e) => new DriverError({ message: `waitForLoadState() failed: ${e}` })
|
|
1531
|
+
}),
|
|
1532
|
+
waitForPopup: (triggerFn, waitOpts) => Effect3.tryPromise({
|
|
1533
|
+
try: async () => {
|
|
1534
|
+
const timeout = waitOpts?.timeout ?? 15e3;
|
|
1535
|
+
const popupPromise = page.waitForEvent("popup", { timeout });
|
|
1536
|
+
await triggerFn();
|
|
1537
|
+
const popup = await popupPromise;
|
|
1538
|
+
attachPageDiagnostics(popup);
|
|
1539
|
+
return getTabId(popup);
|
|
1540
|
+
},
|
|
1541
|
+
catch: (e) => new DriverError({ message: `waitForPopup() failed: ${e}` })
|
|
1542
|
+
}),
|
|
1282
1543
|
evaluate: (script, ...args) => Effect3.tryPromise({
|
|
1283
1544
|
try: () => evaluateOnPage(page, script, args),
|
|
1284
1545
|
catch: (e) => new DriverError({ message: `Evaluate failed: ${e}` })
|
|
1285
1546
|
}),
|
|
1547
|
+
addInitScript: (script, ...args) => Effect3.tryPromise({
|
|
1548
|
+
try: async () => {
|
|
1549
|
+
const source = typeof script === "string" ? script : `(${script.toString()})(${args.map((a) => a === void 0 ? "undefined" : JSON.stringify(a)).join(", ")});`;
|
|
1550
|
+
await context.addInitScript(source);
|
|
1551
|
+
},
|
|
1552
|
+
catch: (e) => new DriverError({ message: `addInitScript() failed: ${e}` })
|
|
1553
|
+
}),
|
|
1554
|
+
exposeFunction: (name, fn) => Effect3.tryPromise({
|
|
1555
|
+
try: () => context.exposeFunction(name, fn),
|
|
1556
|
+
catch: (e) => new DriverError({ message: `exposeFunction() failed: ${e}` })
|
|
1557
|
+
}),
|
|
1286
1558
|
getRawPage: () => page,
|
|
1287
1559
|
getAriaSnapshot: (selector, timeout) => deviceEffect("getAriaSnapshot", () => {
|
|
1288
1560
|
if (typeof selector === "string") {
|
|
@@ -1439,6 +1711,15 @@ function makePlaywrightDriver(config) {
|
|
|
1439
1711
|
},
|
|
1440
1712
|
catch: (e) => new DriverError({ message: `Failed to clear virtual credentials: ${e}` })
|
|
1441
1713
|
}),
|
|
1714
|
+
route: (matcher, handler) => Effect3.tryPromise({
|
|
1715
|
+
try: async () => {
|
|
1716
|
+
const definition = { kind: "handler", matcher, handler };
|
|
1717
|
+
routeDefinitions.push(definition);
|
|
1718
|
+
await applyRouteDefinition(definition);
|
|
1719
|
+
debugLog("route", typeof matcher === "string" ? matcher : matcher.toString());
|
|
1720
|
+
},
|
|
1721
|
+
catch: (e) => new DriverError({ message: `Failed to register route: ${e}` })
|
|
1722
|
+
}),
|
|
1442
1723
|
mockNetwork: (matcher, response) => Effect3.tryPromise({
|
|
1443
1724
|
try: async () => {
|
|
1444
1725
|
buildMockResponse(response);
|
|
@@ -1575,6 +1856,39 @@ function makePlaywrightDriver(config) {
|
|
|
1575
1856
|
},
|
|
1576
1857
|
catch: (e) => new DriverError({ message: `waitForResponse() failed: ${e}` })
|
|
1577
1858
|
}),
|
|
1859
|
+
onRequest: (listener) => {
|
|
1860
|
+
requestListeners.add(listener);
|
|
1861
|
+
return () => {
|
|
1862
|
+
requestListeners.delete(listener);
|
|
1863
|
+
};
|
|
1864
|
+
},
|
|
1865
|
+
waitForRequest: (matcher, waitOpts) => Effect3.tryPromise({
|
|
1866
|
+
try: async () => {
|
|
1867
|
+
const timeout = waitOpts?.timeout ?? 15e3;
|
|
1868
|
+
return await new Promise((resolve2, reject) => {
|
|
1869
|
+
let settled = false;
|
|
1870
|
+
const cleanup = () => {
|
|
1871
|
+
if (settled) return;
|
|
1872
|
+
settled = true;
|
|
1873
|
+
clearTimeout(timer);
|
|
1874
|
+
requestListeners.delete(onReq);
|
|
1875
|
+
};
|
|
1876
|
+
const timer = setTimeout(() => {
|
|
1877
|
+
cleanup();
|
|
1878
|
+
reject(new Error(`Timed out waiting for request after ${timeout}ms`));
|
|
1879
|
+
}, timeout);
|
|
1880
|
+
const onReq = (req) => {
|
|
1881
|
+
const matched = typeof matcher === "function" ? matcher(req) : matcher instanceof RegExp ? matcher.test(req.url) : req.url.includes(matcher);
|
|
1882
|
+
if (matched) {
|
|
1883
|
+
cleanup();
|
|
1884
|
+
resolve2(req);
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
requestListeners.add(onReq);
|
|
1888
|
+
});
|
|
1889
|
+
},
|
|
1890
|
+
catch: (e) => new DriverError({ message: `waitForRequest() failed: ${e}` })
|
|
1891
|
+
}),
|
|
1578
1892
|
createIsolatedContext: (ctxOpts) => Effect3.tryPromise({
|
|
1579
1893
|
try: async () => {
|
|
1580
1894
|
const childDriver = await Effect3.runPromise(
|
|
@@ -1584,7 +1898,9 @@ function makePlaywrightDriver(config) {
|
|
|
1584
1898
|
freshContextPerFlow: false,
|
|
1585
1899
|
warmBrowser: false,
|
|
1586
1900
|
cdpEndpoint: void 0,
|
|
1587
|
-
wsEndpoint: void 0
|
|
1901
|
+
wsEndpoint: void 0,
|
|
1902
|
+
...ctxOpts?.viewport ? { viewport: ctxOpts.viewport } : {},
|
|
1903
|
+
...ctxOpts?.locale ? { locale: ctxOpts.locale } : {}
|
|
1588
1904
|
})
|
|
1589
1905
|
);
|
|
1590
1906
|
if (ctxOpts?.url) {
|
|
@@ -1728,11 +2044,15 @@ function makePlaywrightDriver(config) {
|
|
|
1728
2044
|
uploadFile: (selector, path) => Effect3.tryPromise({
|
|
1729
2045
|
try: async () => {
|
|
1730
2046
|
await setInputFiles(selector, path);
|
|
1731
|
-
|
|
2047
|
+
const label = Array.isArray(path) ? path.map((p) => typeof p === "string" ? p : p.name).join(", ") : typeof path === "string" ? path : path.name;
|
|
2048
|
+
debugLog("uploadFile", label);
|
|
1732
2049
|
},
|
|
1733
|
-
catch: (e) =>
|
|
1734
|
-
|
|
1735
|
-
|
|
2050
|
+
catch: (e) => {
|
|
2051
|
+
const label = Array.isArray(path) ? path.map((p) => typeof p === "string" ? p : p.name).join(", ") : typeof path === "string" ? path : path.name;
|
|
2052
|
+
return new DriverError({
|
|
2053
|
+
message: `Failed to upload file ${label}: ${e}`
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
1736
2056
|
}),
|
|
1737
2057
|
newTab: (url) => Effect3.tryPromise({
|
|
1738
2058
|
try: async () => {
|
|
@@ -1812,9 +2132,11 @@ function makePlaywrightDriver(config) {
|
|
|
1812
2132
|
}
|
|
1813
2133
|
|
|
1814
2134
|
// src/drivers/uiautomator2/driver.ts
|
|
2135
|
+
init_esm_shims();
|
|
1815
2136
|
import { Effect as Effect4 } from "effect";
|
|
1816
2137
|
|
|
1817
2138
|
// src/drivers/uiautomator2/client.ts
|
|
2139
|
+
init_esm_shims();
|
|
1818
2140
|
var UiAutomator2Client = class {
|
|
1819
2141
|
baseUrl;
|
|
1820
2142
|
sessionId = null;
|
|
@@ -2321,7 +2643,7 @@ function createUiAutomator2Driver(host, port, serial, packageName, driverOptions
|
|
|
2321
2643
|
adbForceStop(serial, bundleId);
|
|
2322
2644
|
if (opts?.launchArguments && Object.keys(opts.launchArguments).length > 0) {
|
|
2323
2645
|
const { execFileSync: execFileSync3 } = await import("child_process");
|
|
2324
|
-
const { findADB: findADB2 } = await import("./android-
|
|
2646
|
+
const { findADB: findADB2 } = await import("./android-C2S4B4TH.js");
|
|
2325
2647
|
const adb = findADB2();
|
|
2326
2648
|
if (!adb) throw new Error("adb not found");
|
|
2327
2649
|
const startArgs = [
|
|
@@ -2612,13 +2934,47 @@ function createUiAutomator2Driver(host, port, serial, packageName, driverOptions
|
|
|
2612
2934
|
});
|
|
2613
2935
|
}
|
|
2614
2936
|
|
|
2937
|
+
// src/drivers/uiautomator2/pagesource.ts
|
|
2938
|
+
init_esm_shims();
|
|
2939
|
+
|
|
2615
2940
|
// src/drivers/common/xml-tokenizer.ts
|
|
2941
|
+
init_esm_shims();
|
|
2942
|
+
function decodeXmlEntities(value) {
|
|
2943
|
+
if (!value.includes("&")) return value;
|
|
2944
|
+
return value.replaceAll(
|
|
2945
|
+
/&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g,
|
|
2946
|
+
(match, entity) => {
|
|
2947
|
+
switch (entity) {
|
|
2948
|
+
case "amp":
|
|
2949
|
+
return "&";
|
|
2950
|
+
case "lt":
|
|
2951
|
+
return "<";
|
|
2952
|
+
case "gt":
|
|
2953
|
+
return ">";
|
|
2954
|
+
case "quot":
|
|
2955
|
+
return '"';
|
|
2956
|
+
case "apos":
|
|
2957
|
+
return "'";
|
|
2958
|
+
default:
|
|
2959
|
+
if (entity.startsWith("#x") || entity.startsWith("#X")) {
|
|
2960
|
+
const cp = Number.parseInt(entity.slice(2), 16);
|
|
2961
|
+
return Number.isFinite(cp) ? String.fromCodePoint(cp) : match;
|
|
2962
|
+
}
|
|
2963
|
+
if (entity.startsWith("#")) {
|
|
2964
|
+
const cp = Number.parseInt(entity.slice(1), 10);
|
|
2965
|
+
return Number.isFinite(cp) ? String.fromCodePoint(cp) : match;
|
|
2966
|
+
}
|
|
2967
|
+
return match;
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
);
|
|
2971
|
+
}
|
|
2616
2972
|
function parseAttributes(tagContent) {
|
|
2617
2973
|
const attrs = {};
|
|
2618
2974
|
const re = /([\w-]+)="([^"]*)"/g;
|
|
2619
2975
|
let m;
|
|
2620
2976
|
while ((m = re.exec(tagContent)) !== null) {
|
|
2621
|
-
attrs[m[1]] = m[2];
|
|
2977
|
+
attrs[m[1]] = decodeXmlEntities(m[2]);
|
|
2622
2978
|
}
|
|
2623
2979
|
return attrs;
|
|
2624
2980
|
}
|
|
@@ -2807,9 +3163,11 @@ function parseAndroidHierarchy(xml) {
|
|
|
2807
3163
|
}
|
|
2808
3164
|
|
|
2809
3165
|
// src/drivers/wda/driver.ts
|
|
3166
|
+
init_esm_shims();
|
|
2810
3167
|
import { Effect as Effect5 } from "effect";
|
|
2811
3168
|
|
|
2812
3169
|
// src/drivers/wda/client.ts
|
|
3170
|
+
init_esm_shims();
|
|
2813
3171
|
var WDAClient = class {
|
|
2814
3172
|
baseUrl;
|
|
2815
3173
|
sessionId = null;
|
|
@@ -3369,7 +3727,7 @@ function createWDADriver(host, port, bundleId, simulatorUdid, snapshotMaxDepth =
|
|
|
3369
3727
|
const alive = yield* Effect5.tryPromise({
|
|
3370
3728
|
try: () => client.isSessionAlive(),
|
|
3371
3729
|
catch: () => false
|
|
3372
|
-
}).pipe(Effect5.
|
|
3730
|
+
}).pipe(Effect5.catch(() => Effect5.succeed(false)));
|
|
3373
3731
|
reusedWarmSession = alive;
|
|
3374
3732
|
}
|
|
3375
3733
|
if (!reusedWarmSession) {
|
|
@@ -3811,6 +4169,7 @@ function createWDADriver(host, port, bundleId, simulatorUdid, snapshotMaxDepth =
|
|
|
3811
4169
|
}
|
|
3812
4170
|
|
|
3813
4171
|
// src/drivers/wda/pagesource.ts
|
|
4172
|
+
init_esm_shims();
|
|
3814
4173
|
var CLICKABLE_TYPES = /* @__PURE__ */ new Set([
|
|
3815
4174
|
"XCUIElementTypeButton",
|
|
3816
4175
|
"XCUIElementTypeLink",
|
|
@@ -3893,6 +4252,7 @@ function parseIOSHierarchy(xml) {
|
|
|
3893
4252
|
}
|
|
3894
4253
|
|
|
3895
4254
|
// src/drivers/electron.ts
|
|
4255
|
+
init_esm_shims();
|
|
3896
4256
|
import { Effect as Effect6 } from "effect";
|
|
3897
4257
|
import {
|
|
3898
4258
|
_electron,
|
|
@@ -4207,6 +4567,7 @@ function makeElectronDriver(options) {
|
|
|
4207
4567
|
}
|
|
4208
4568
|
|
|
4209
4569
|
// src/drivers/uiautomator2/installer.ts
|
|
4570
|
+
init_esm_shims();
|
|
4210
4571
|
import { execFileSync as execFileSync2, spawn as spawn2 } from "child_process";
|
|
4211
4572
|
import { existsSync, readdirSync } from "fs";
|
|
4212
4573
|
import { createRequire } from "module";
|
|
@@ -4375,4 +4736,4 @@ export {
|
|
|
4375
4736
|
makeElectronDriver,
|
|
4376
4737
|
setupUiAutomator2
|
|
4377
4738
|
};
|
|
4378
|
-
//# sourceMappingURL=chunk-
|
|
4739
|
+
//# sourceMappingURL=chunk-PPAPRKQU.js.map
|