@unotest/web 0.6.1 → 0.9.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/.claude/hooks/log-agent.sh +24 -0
- package/.claude/skills/{write-e2e-test.md → write-e2e-test/SKILL.md} +32 -29
- package/CHANGELOG.md +49 -1
- package/README.md +12 -12
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +7 -2
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +15 -3
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.d.ts +18 -0
- package/dist/dsl/web-dsl-language-service.js +1 -0
- package/dist/inspection/page-inject.d.ts +45 -1
- package/dist/inspection/page-inject.js +253 -4
- package/dist/{interfaces-iTfjd1zT.d.ts → interfaces-dbZG10RS.d.ts} +40 -1
- package/dist/{linter-DzAzJpab.d.ts → linter-CM2CpIyW.d.ts} +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +8 -2
- package/dist/runner/cli.js +1 -1
- package/dist/runner/init/chrome-probe.d.ts +15 -0
- package/dist/runner/init/chrome-probe.js +1 -0
- package/dist/runner/init.js +1 -1
- package/dist/runner/install-chromium.js +1 -1
- package/dist/runner/prepare-fix.js +1 -1
- package/dist/runner/scaffold-workspace.d.ts +24 -0
- package/dist/runner/scaffold-workspace.js +1 -0
- package/dist/runner/serve-fixture.js +1 -1
- package/dist/runner/web-runner-adapter.d.ts +1 -1
- package/dist/runner/web-runner-adapter.js +1 -1
- package/guides/dsl-reference.md +7 -7
- package/package.json +21 -4
- package/src/mcp/prompts/agent-test-author.md +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# @unotest/web — agent-action trace hook.
|
|
3
|
+
#
|
|
4
|
+
# Appends each Claude Code hook event (delivered as JSON on stdin) to a
|
|
5
|
+
# JSONL file so a debug session captures EVERYTHING the agent did: every
|
|
6
|
+
# tool call (name + input + output), prompts, session lifecycle, and which
|
|
7
|
+
# files it read (e.g. the write-e2e-test skill). Layer above UNOTEST_DEBUG's
|
|
8
|
+
# app-under-test artifacts — this one sees the agent's host-side actions
|
|
9
|
+
# that the MCP server never observes.
|
|
10
|
+
#
|
|
11
|
+
# Opt-in: no-op unless UNOTEST_DEBUG is set. Never blocks the agent — always
|
|
12
|
+
# exits 0 (only exit 2 would block). Reasoning/thinking is NOT capturable by
|
|
13
|
+
# hooks; this records tool I/O + prompts + lifecycle only.
|
|
14
|
+
#
|
|
15
|
+
# Arg $1: absolute path to the JSONL log file.
|
|
16
|
+
|
|
17
|
+
[ "$UNOTEST_DEBUG" = "1" ] || [ "$UNOTEST_DEBUG" = "full" ] || [ "$UNOTEST_DEBUG" = "summary" ] || exit 0
|
|
18
|
+
|
|
19
|
+
out="$1"
|
|
20
|
+
[ -n "$out" ] || exit 0
|
|
21
|
+
mkdir -p "$(dirname "$out")" 2>/dev/null
|
|
22
|
+
cat >> "$out"
|
|
23
|
+
printf '\n' >> "$out"
|
|
24
|
+
exit 0
|
|
@@ -83,30 +83,33 @@ For each page state you traverse:
|
|
|
83
83
|
1. **Discover** — `get_page_snapshot { }`. Default outline format:
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
-
|
|
86
|
+
regions:
|
|
87
87
|
navigation:
|
|
88
88
|
- link "Sets 21,414 items" [e3]
|
|
89
89
|
- link "Themes" [e4]
|
|
90
90
|
main:
|
|
91
91
|
- heading "Browse the catalog" [e5]
|
|
92
92
|
- button "Sign in" [e6]
|
|
93
|
-
|
|
94
|
-
bottom:
|
|
93
|
+
contentinfo (below):
|
|
95
94
|
- link "Help" [e21]
|
|
96
95
|
_meta:
|
|
96
|
+
totalActions: 7 totalRegions: 3
|
|
97
|
+
regions: 2 in, 0 above, 1 below, 0 partial
|
|
97
98
|
viewport: 1280x720
|
|
98
|
-
|
|
99
|
+
mode: outline
|
|
99
100
|
```
|
|
100
101
|
|
|
101
|
-
Line grammar: `-
|
|
102
|
-
is what you'll pass back — refs are **wire-only**, never
|
|
103
|
-
the saved test.
|
|
104
|
-
|
|
102
|
+
Line grammar: `- {role} {"name"} {#testId} {[clickable]} {[state]} [eN]`.
|
|
103
|
+
The `[eN]` ref is what you'll pass back — refs are **wire-only**, never
|
|
104
|
+
typed into the saved test. Top-level keys are landmark `regions`
|
|
105
|
+
(navigation / main / contentinfo / form / region / …) in reading order.
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
A region wholly or partly past the viewport carries an inline tag after
|
|
108
|
+
its heading — `(above)` / `(below)` / `(partial)`; a fully-in-view region
|
|
109
|
+
has none. There is NO separate off-screen block. To reach an action in a
|
|
110
|
+
`(below)` region, scroll first (`explore_step { action: "scroll_into_view",
|
|
111
|
+
locator: {kind:"locator", steps:[{kind:"ref", ref:"e21"}]} }`), then
|
|
112
|
+
re-snapshot.
|
|
110
113
|
|
|
111
114
|
2. **Act + record — pass the `[eN]` ref locator.**
|
|
112
115
|
|
|
@@ -149,8 +152,8 @@ For each page state you traverse:
|
|
|
149
152
|
repeatedly, stop and ask the user.
|
|
150
153
|
|
|
151
154
|
When recording, `description` and `section` are **required**.
|
|
152
|
-
Adjacent same-section entries
|
|
153
|
-
|
|
155
|
+
Adjacent same-section entries are wrapped in one `step("...", () => { … })`
|
|
156
|
+
block in the generated test, so the `section` must read
|
|
154
157
|
like a line in a human test PLAN — the user-facing GOAL of the block
|
|
155
158
|
("Sign in", "Open first car card", "Apply status filter"), **never** a
|
|
156
159
|
generic mechanic ("Navigation", "Actions", "Click", "Load data"). Use the
|
|
@@ -360,25 +363,25 @@ built-in DSL functions.
|
|
|
360
363
|
composite multi-step helpers.
|
|
361
364
|
|
|
362
365
|
**Saved test structure.** Every step in a `test_*` entry must sit inside a
|
|
363
|
-
|
|
366
|
+
`step("description", () => { … })` block (linter enforces). The title is the
|
|
364
367
|
plain-English intent of the group; when a step later breaks you read it
|
|
365
368
|
back to repair the group. The recorder groups by phase automatically; when
|
|
366
369
|
you hand-edit, keep each chunk inside its own block:
|
|
367
370
|
|
|
368
371
|
```js
|
|
369
372
|
function test_dashboard_loads_with_widgets() {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
373
|
+
step("Seed a fresh demo user", () => {
|
|
374
|
+
wipe_e2e_users();
|
|
375
|
+
seed_user('demo@example.com', 'secret');
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
step("Sign in as the demo user", () => {
|
|
379
|
+
signin_as('demo@example.com', 'secret');
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
step("Dashboard shows the Today widget", () => {
|
|
383
|
+
assertVisible(getByRole('region', {name: 'Today'}));
|
|
384
|
+
});
|
|
382
385
|
}
|
|
383
386
|
```
|
|
384
387
|
|
|
@@ -498,7 +501,7 @@ Every locator must resolve to exactly one element. When you see
|
|
|
498
501
|
names, or `xpath=…`.** Stop and ask the user whether the app should
|
|
499
502
|
expose a `data-testid` or accessible name.
|
|
500
503
|
- **Don't omit `section` / `description` when recording.** They shape
|
|
501
|
-
the generated test into readable
|
|
504
|
+
the generated test into readable `step(...)` blocks — and they're
|
|
502
505
|
required.
|
|
503
506
|
- **Don't consider the task done without `next.outcome === "completed"`.**
|
|
504
507
|
"I recorded the flow, generated the file, looks right" is not done.
|
|
@@ -517,7 +520,7 @@ npx @unotest/web lint
|
|
|
517
520
|
The linter runs two passes:
|
|
518
521
|
|
|
519
522
|
1. **Validator** (`validator:unknown-function`, `validator:dsl`) —
|
|
520
|
-
`error` severity
|
|
523
|
+
`error` severity (fails `npx @unotest/web lint`). Catches unknown function
|
|
521
524
|
names (`css`, typos), wrong arg kinds, malformed `for`/`if`
|
|
522
525
|
shapes. **If you see `validator:unknown-function`, you invented
|
|
523
526
|
a function name** — re-read the DSL cheat-sheet above and use the
|
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,55 @@ All notable changes to `@unotest/web` are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.9.0] - 2026-06-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Opt-in capture artifacts for the viewer inspector.** `UNOTEST_NETWORK=1`
|
|
13
|
+
records each request/response to the run's `network.json`; `UNOTEST_CONSOLE=1`
|
|
14
|
+
records the browser console to `console.json`. Written per run (any outcome),
|
|
15
|
+
redacted of secrets. Off by default — zero overhead.
|
|
16
|
+
- **`runtime.json` for every run.** The runtime-state writer (vars / scope /
|
|
17
|
+
call stack) now runs for plain headless runs too, not just `--debug`, so the
|
|
18
|
+
viewer's Vars inspector is populated on any run.
|
|
19
|
+
- **Friendly relative-`goto` error.** `goto('/path')` with no `baseUrl`
|
|
20
|
+
configured now throws a typed `NavigationError` that names the URL and the fix,
|
|
21
|
+
instead of Playwright's "Cannot navigate to invalid URL". When `baseUrl` is
|
|
22
|
+
set, Playwright resolves the relative path as before.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **MCP collaboration is discoverable.** `get_active_context` now reports an
|
|
27
|
+
attachable live debug session (`attachable` + a hint); the no-active-context
|
|
28
|
+
error points at `attach_debug_session`; the server `instructions` mention
|
|
29
|
+
joining a human's live session. `findShareableRun` is shared between
|
|
30
|
+
`attach_debug_session` and `get_active_context`.
|
|
31
|
+
- **`init` defaults.** Generated `unotest/.env` sets `APP_BASE_URL` to the
|
|
32
|
+
unotest playground and the example scenarios use relative `goto('/...')`;
|
|
33
|
+
`API_BASE_URL` and `PROJECT_ROOT` are dropped; `UNOTEST_NETWORK` /
|
|
34
|
+
`UNOTEST_CONSOLE` are added under Runner config.
|
|
35
|
+
|
|
36
|
+
## [0.6.2] - 2026-06-05
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **MCP server `instructions`.** The server now ships start-of-session
|
|
41
|
+
`instructions` (injected by the MCP host into the agent's context the
|
|
42
|
+
moment the server is approved), pointing the agent at the
|
|
43
|
+
`write-e2e-test` skill and the canonical MCP tools before it
|
|
44
|
+
free-researches the repo.
|
|
45
|
+
- **`init` writes/merges Claude Code config.** `init` now copies the
|
|
46
|
+
`write-e2e-test` skill as a real skill **directory**
|
|
47
|
+
(`.claude/skills/write-e2e-test/SKILL.md`, so `/write-e2e-test` and
|
|
48
|
+
auto-invoke work) plus an agent-trace hook (`.claude/hooks/log-agent.sh`,
|
|
49
|
+
a no-op unless `UNOTEST_DEBUG` is set), and merges managed blocks into
|
|
50
|
+
the consumer's `CLAUDE.md` and `.claude/settings.json` (pre-approve MCP
|
|
51
|
+
tools, register the trace hook) without clobbering user content.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- CLI help uses `examples/01-smoke` as the `e2e` example (runnable example
|
|
56
|
+
scenarios live under `unotest/e2e/examples/`).
|
|
9
57
|
|
|
10
58
|
### Added
|
|
11
59
|
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ npx @unotest/web e2e # list / usage
|
|
|
64
64
|
|
|
65
65
|
- **Scenario tree** — scenarios, collections, helpers, and run history.
|
|
66
66
|
- **Run from the UI** — results stream live over WebSocket as steps execute.
|
|
67
|
-
- **Block view** — each
|
|
67
|
+
- **Block view** — each `step(...)` group folds into a section with
|
|
68
68
|
per-step status; a failure pins an error card to the offending line.
|
|
69
69
|
- **Step debugger** — set gutter breakpoints, run paused, inspect the live
|
|
70
70
|
DOM at each stop.
|
|
@@ -75,20 +75,20 @@ npx @unotest/web e2e # list / usage
|
|
|
75
75
|
### Writing by hand (optional)
|
|
76
76
|
|
|
77
77
|
Scenarios are plain `.js`. Every executable step sits inside a
|
|
78
|
-
|
|
79
|
-
back to repair a step when a selector drifts:
|
|
78
|
+
`step("what this does", () => { … })` block — plain-English intent the agent
|
|
79
|
+
reads back to repair a step when a selector drifts:
|
|
80
80
|
|
|
81
81
|
```js
|
|
82
82
|
function test_login() {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
step("Log in as the demo user", () => {
|
|
84
|
+
goto('https://app.example.com');
|
|
85
|
+
fill(getByLabel('Email'), 'demo@example.com');
|
|
86
|
+
click(getByRole('button', { name: 'Continue' }));
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
step("Dashboard is shown after login", () => {
|
|
90
|
+
assertText(getByRole('heading'), 'Dashboard');
|
|
91
|
+
});
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
94
|
|
package/dist/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x2f4e9c=_0x5088;function _0x5088(_0x35ba0f,_0x4f1556){_0x35ba0f=_0x35ba0f-0x16f;var _0x5f0c45=_0x5f0c();var _0x5088d1=_0x5f0c45[_0x35ba0f];if(_0x5088['NVKkTr']===undefined){var _0x16a1af=function(_0x451af3){var _0x5b4805='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5b9d04='',_0x2f88a3='';for(var _0x2a8880=0x0,_0x47feb8,_0x17d054,_0xf51d57=0x0;_0x17d054=_0x451af3['charAt'](_0xf51d57++);~_0x17d054&&(_0x47feb8=_0x2a8880%0x4?_0x47feb8*0x40+_0x17d054:_0x17d054,_0x2a8880++%0x4)?_0x5b9d04+=String['fromCharCode'](0xff&_0x47feb8>>(-0x2*_0x2a8880&0x6)):0x0){_0x17d054=_0x5b4805['indexOf'](_0x17d054);}for(var _0x541710=0x0,_0x483552=_0x5b9d04['length'];_0x541710<_0x483552;_0x541710++){_0x2f88a3+='%'+('00'+_0x5b9d04['charCodeAt'](_0x541710)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f88a3);};_0x5088['FAqgnd']=_0x16a1af,_0x5088['wLKUZH']={},_0x5088['NVKkTr']=!![];}var _0x3990bf=_0x5f0c45[0x0],_0xd91f61=_0x35ba0f+_0x3990bf,_0x242047=_0x5088['wLKUZH'][_0xd91f61];return!_0x242047?(_0x5088d1=_0x5088['FAqgnd'](_0x5088d1),_0x5088['wLKUZH'][_0xd91f61]=_0x5088d1):_0x5088d1=_0x242047,_0x5088d1;}(function(_0x3cce67,_0x192c32){var _0x1e21ad={_0x2d54de:0x19d,_0x7f5c28:0x18f,_0x24a64e:0x191,_0x3b1c32:0x189,_0x1cd0d0:0x170,_0x3f11e4:0x17d,_0x1737a5:0x198},_0x44a598=_0x5088,_0x4ef498=_0x3cce67();while(!![]){try{var _0x21ddfd=parseInt(_0x44a598(_0x1e21ad._0x2d54de))/0x1*(-parseInt(_0x44a598(0x18b))/0x2)+parseInt(_0x44a598(_0x1e21ad._0x7f5c28))/0x3*(-parseInt(_0x44a598(_0x1e21ad._0x24a64e))/0x4)+parseInt(_0x44a598(_0x1e21ad._0x3b1c32))/0x5+-parseInt(_0x44a598(0x184))/0x6*(parseInt(_0x44a598(0x180))/0x7)+-parseInt(_0x44a598(_0x1e21ad._0x1cd0d0))/0x8+parseInt(_0x44a598(0x188))/0x9+-parseInt(_0x44a598(_0x1e21ad._0x3f11e4))/0xa*(-parseInt(_0x44a598(_0x1e21ad._0x1737a5))/0xb);if(_0x21ddfd===_0x192c32)break;else _0x4ef498['push'](_0x4ef498['shift']());}catch(_0x4efa28){_0x4ef498['push'](_0x4ef498['shift']());}}}(_0x5f0c,0xeb7d9));import{z}from'zod';function _0x5f0c(){var _0x49077b=['BgLUDdPZy2vUyxjPBY1PBI1YB290','mta0nZC0mdbxCfHszhO','BNvTyMvY','BNvSBa','C3rYAw5N','Cg9ZAxrPDMu','zw51Bq','yxjYyxK','B2jQzwn0','BgLUDdP4Cgf0Aa','zxjYB3i','lNvUB3rLC3qVzMfPBhvYzxm','ywnJzxb0','zMLYzwzVEa','mtmZmtCWvMH4rfDe','BxnLzgDL','CMvJB3jK','mteYnJK5m0rszvHAuW','Aw50','zgLZBwLZCW','DxjS','mZztA3rfyNC','D2vIA2L0','DMfSAwrHDg9YoMrZBa','BgLUDdPKzwvWlwnZCW','mtmYntu2mtrrv2zcEwW','ndKXnZmZmfDKy296yq','Bwf4','nde3nfjdzuDMBa','y2HYB21L','BwfUDwfS','zgvMyxvSDa','nMjNv2TREa','y2HYB21PDw0','nde3mtC2DenLrgPw','y3jHC2G','Dw5PB24','BgLUDdPLDMfSDwf0zs1KAxnJB3vYywDLza','DMfSAwrHDg9YoNvUA25VD24TzNvUy3rPB24','BgLUDdPKAxnHBwjPzY1IEs1PBMrLEa','BgLUDdPTDxn0ywnOzs1PBI1KC2W','odi1tLndwK1n','B2zM','D2fYBG','DhjHBNnPzw50','BMv0D29YAW','m1nYDxnfAa','C3rKAw8','BgL0zxjHBa','BwLU','B3b0Aw9UywW','yM9VBgvHBG','BgLUDdPVyMz1C2nHDgvKlwnSyxnZ','Dw5VDgvZDc9LmMuVx2HLBhbLCNm'];_0x5f0c=function(){return _0x49077b;};return _0x5f0c();}var BrowserSchema=z[_0x2f4e9c(0x175)]([_0x2f4e9c(0x190),_0x2f4e9c(0x17c),_0x2f4e9c(0x185)]),BrowserChannelSchema=z[_0x2f4e9c(0x193)]([z[_0x2f4e9c(0x19f)](_0x2f4e9c(0x18c)),z[_0x2f4e9c(0x19f)](_0x2f4e9c(0x17e)),z[_0x2f4e9c(0x19f)]('chrome-beta'),z[_0x2f4e9c(0x172)]()])[_0x2f4e9c(0x1a1)](),ViewportSchema=z[_0x2f4e9c(0x177)]({'width':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()[_0x2f4e9c(0x174)](),'height':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()[_0x2f4e9c(0x174)]()}),RetryReasonSchema=z[_0x2f4e9c(0x175)]([_0x2f4e9c(0x19b),_0x2f4e9c(0x19c),_0x2f4e9c(0x192)]),RetryConfigSchema=z[_0x2f4e9c(0x177)]({'count':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()['min'](0x0)[_0x2f4e9c(0x18a)](0xa),'on':z[_0x2f4e9c(0x176)](RetryReasonSchema)}),FailureBundleConfigSchema=z['object']({'tier1':z[_0x2f4e9c(0x19f)](!![])[_0x2f4e9c(0x18e)](!![]),'tier2':z['boolean'](),'tier3':z[_0x2f4e9c(0x177)]({'network':z[_0x2f4e9c(0x1a2)](),'video':z['boolean']()}),'retention':z[_0x2f4e9c(0x177)]({'runs':z['number']()[_0x2f4e9c(0x181)]()[_0x2f4e9c(0x174)](),'days':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()['positive']()}),'storageDir':z[_0x2f4e9c(0x173)]()[_0x2f4e9c(0x1a0)](0x1)}),DialogPolicySchema=z['enum']([_0x2f4e9c(0x17b),_0x2f4e9c(0x182),_0x2f4e9c(0x18d)]),LinterRuleIdSchema=z['enum']([_0x2f4e9c(0x187),_0x2f4e9c(0x178),_0x2f4e9c(0x1a3),'lint:pause-explicit',_0x2f4e9c(0x196),_0x2f4e9c(0x194),_0x2f4e9c(0x16f),_0x2f4e9c(0x197),_0x2f4e9c(0x195),_0x2f4e9c(0x186)]),LinterSeveritySchema=z[_0x2f4e9c(0x175)](['off',_0x2f4e9c(0x19a),_0x2f4e9c(0x179)]),LinterConfigSchema=z[_0x2f4e9c(0x177)]({'enabled':z[_0x2f4e9c(0x1a2)](),'rules':z[_0x2f4e9c(0x17f)](LinterRuleIdSchema,LinterSeveritySchema)}),McpConfigSchema=z[_0x2f4e9c(0x177)]({'transport':z[_0x2f4e9c(0x19f)](_0x2f4e9c(0x19e))}),SandboxConfigSchema=z[_0x2f4e9c(0x177)]({'shellCwd':z[_0x2f4e9c(0x173)]()['optional'](),'database':z[_0x2f4e9c(0x173)]()[_0x2f4e9c(0x1a1)](),'apiBaseUrl':z[_0x2f4e9c(0x173)]()[_0x2f4e9c(0x183)]()[_0x2f4e9c(0x1a1)]()}),UnotestConfigSchema=z[_0x2f4e9c(0x177)]({'baseUrl':z[_0x2f4e9c(0x173)]()[_0x2f4e9c(0x183)]()[_0x2f4e9c(0x1a1)](),'browsers':z['array'](BrowserSchema)[_0x2f4e9c(0x1a0)](0x1),'channel':BrowserChannelSchema,'viewport':ViewportSchema,'retry':RetryConfigSchema,'failureBundle':FailureBundleConfigSchema,'dialogPolicy':DialogPolicySchema,'storageState':z['string']()[_0x2f4e9c(0x1a1)](),'testDir':z['string']()['min'](0x1),'helpersDir':z[_0x2f4e9c(0x173)]()[_0x2f4e9c(0x1a0)](0x1),'defaultTimeoutMs':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()[_0x2f4e9c(0x174)](),'defaultNavigationTimeoutMs':z[_0x2f4e9c(0x171)]()[_0x2f4e9c(0x181)]()[_0x2f4e9c(0x174)](),'linter':LinterConfigSchema,'mcp':McpConfigSchema,'sandbox':SandboxConfigSchema}),DEFAULT_CONFIG={'browsers':['chromium'],'viewport':{'width':0x500,'height':0x2d0},'retry':{'count':0x0,'on':[_0x2f4e9c(0x19b)]},'failureBundle':{'tier1':!![],'tier2':!![],'tier3':{'network':![],'video':![]},'retention':{'runs':0x14,'days':0x7},'storageDir':_0x2f4e9c(0x17a)},'dialogPolicy':_0x2f4e9c(0x17b),'testDir':'unotest/e2e','helpersDir':_0x2f4e9c(0x1a4),'defaultTimeoutMs':0xbb8,'defaultNavigationTimeoutMs':0x3a98,'linter':{'enabled':!![],'rules':{'lint:deep-css':_0x2f4e9c(0x19a),'lint:xpath':'warn','lint:obfuscated-class':'warn','lint:pause-explicit':_0x2f4e9c(0x19a),'lint:disambig-by-index':_0x2f4e9c(0x199),'lint:evaluate-discouraged':_0x2f4e9c(0x19a),'lint:scenario-in-root':_0x2f4e9c(0x179),'lint:mustache-in-dsl':_0x2f4e9c(0x179),'validator:unknown-function':_0x2f4e9c(0x179),'validator:dsl':_0x2f4e9c(0x179)}},'mcp':{'transport':'stdio'},'sandbox':{}};export{BrowserChannelSchema,BrowserSchema,DEFAULT_CONFIG,DialogPolicySchema,FailureBundleConfigSchema,LinterConfigSchema,LinterRuleIdSchema,LinterSeveritySchema,McpConfigSchema,RetryConfigSchema,RetryReasonSchema,SandboxConfigSchema,UnotestConfigSchema,ViewportSchema};
|
package/dist/driver/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementHint, W as WebDriver, L as LaunchOptions, C as ContextOptions, D as DriverContext } from '../interfaces-
|
|
2
|
-
export { A as ActionTimeout, a as CheckOptions, b as ClickOptions, c as CookieOptions, d as DriverPage, F as FillOptions, G as GotoOptions, H as HoverOptions,
|
|
1
|
+
import { E as ElementHint, N as NetworkEntry, W as WebDriver, L as LaunchOptions, C as ContextOptions, D as DriverContext } from '../interfaces-dbZG10RS.js';
|
|
2
|
+
export { A as ActionTimeout, a as CheckOptions, b as ClickOptions, c as CookieOptions, d as DriverPage, F as FillOptions, G as GotoOptions, H as HoverOptions, e as NavigationOptions, P as PressOptions, R as ReloadOptions, S as ScreenshotOptions, f as SelectOptions, V as Viewport, g as WaitOptions, h as WaitState } from '../interfaces-dbZG10RS.js';
|
|
3
3
|
import '@unotest/protocol';
|
|
4
4
|
import '../config/schema.js';
|
|
5
5
|
import 'zod';
|
|
@@ -50,6 +50,8 @@ interface FakeBehavior {
|
|
|
50
50
|
text: string;
|
|
51
51
|
timestamp: string;
|
|
52
52
|
}>;
|
|
53
|
+
/** Seed network entries that networkEntries() returns. */
|
|
54
|
+
networkEntries?: ReadonlyArray<NetworkEntry>;
|
|
53
55
|
/** When set, every `click(loc)` opens a popup at this URL by calling
|
|
54
56
|
* the owning context's `emitFakePopup`. Used by popup-watcher
|
|
55
57
|
* integration tests so the FakeContext's `click` becomes a tab
|
|
@@ -65,6 +67,9 @@ declare class FakeWebDriver implements WebDriver {
|
|
|
65
67
|
launch(opts: LaunchOptions): Promise<void>;
|
|
66
68
|
newContext(opts?: ContextOptions): Promise<DriverContext>;
|
|
67
69
|
close(): Promise<void>;
|
|
70
|
+
wsEndpoint(): string | undefined;
|
|
71
|
+
connectShared(): Promise<void>;
|
|
72
|
+
attachExisting(): DriverContext;
|
|
68
73
|
/** Test helper — full recorded call log. */
|
|
69
74
|
calls(): ReadonlyArray<RecordedCall>;
|
|
70
75
|
/** Test helper — calls matching a method name. */
|
package/dist/driver/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2eed64=_0x18ee;(function(_0x5b3255,_0x56dfc5){const _0x1ccee0={_0x240e98:0x1fa,_0x116e42:0x1cb,_0x2cba7e:0x1ff},_0x45ac81=_0x18ee,_0xe6dcf9=_0x5b3255();while(!![]){try{const _0x386b9c=parseInt(_0x45ac81(0x196))/0x1*(parseInt(_0x45ac81(_0x1ccee0._0x240e98))/0x2)+-parseInt(_0x45ac81(0x19c))/0x3+parseInt(_0x45ac81(_0x1ccee0._0x116e42))/0x4+parseInt(_0x45ac81(0x1c4))/0x5+parseInt(_0x45ac81(_0x1ccee0._0x2cba7e))/0x6+-parseInt(_0x45ac81(0x1b0))/0x7*(parseInt(_0x45ac81(0x1d3))/0x8)+parseInt(_0x45ac81(0x1f7))/0x9;if(_0x386b9c===_0x56dfc5)break;else _0xe6dcf9['push'](_0xe6dcf9['shift']());}catch(_0x4a41bc){_0xe6dcf9['push'](_0xe6dcf9['shift']());}}}(_0x3754,0x93004));var __defProp=Object[_0x2eed64(0x1c3)],__name=(_0x23f8b6,_0x1ffdae)=>__defProp(_0x23f8b6,_0x2eed64(0x1cf),{'value':_0x1ffdae,'configurable':!![]}),UnotestError=class extends Error{static{__name(this,_0x2eed64(0x1bf));}[_0x2eed64(0x1ed)];constructor(_0x2dace3,_0x33aaf1={}){const _0x48cad7={_0xf45d35:0x1ed,_0x573007:0x1d0},_0x556ae8=_0x2eed64;super(_0x2dace3),this['name']=new.target.name,this[_0x556ae8(_0x48cad7._0xf45d35)]=Object['freeze']({..._0x33aaf1}),typeof Error[_0x556ae8(0x1d0)]===_0x556ae8(0x1c8)&&Error[_0x556ae8(_0x48cad7._0x573007)](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,_0x2eed64(0x1f6));}},LocatorError=class extends UnotestError{static{__name(this,_0x2eed64(0x1d7));}};function createRecorder(){const _0x1ac643=_0x2eed64,_0x53e48c=[];let _0x5a0c91=0x0;return{'push':__name(_0x5b402b=>_0x53e48c[_0x1ac643(0x1c5)]({..._0x5b402b,'seq':_0x5a0c91++}),_0x1ac643(0x1c5)),'calls':__name(()=>_0x53e48c,_0x1ac643(0x1f8))};}__name(createRecorder,_0x2eed64(0x1da));var FakePage=class{constructor(_0x52dd21,_0xb77468,_0x186cb0,_0x4e08d1){const _0x55c018={_0x4438da:0x1d2,_0xa47849:0x1b4},_0x105c47=_0x2eed64;this[_0x105c47(_0x55c018._0x4438da)]=_0x52dd21,this[_0x105c47(_0x55c018._0xa47849)]=_0xb77468,this[_0x105c47(0x1be)]=_0x186cb0,this[_0x105c47(0x1e3)]=_0x4e08d1;}['recorder'];[_0x2eed64(0x1b4)];[_0x2eed64(0x1be)];static{__name(this,_0x2eed64(0x1f0));}[_0x2eed64(0x1e3)];[_0x2eed64(0x1cc)];['record'](_0x25ec55,_0xb654fb){const _0x4235ff={_0x3636a7:0x1d2,_0x449d04:0x1be},_0x19aa96=_0x2eed64;this[_0x19aa96(_0x4235ff._0x3636a7)][_0x19aa96(0x1c5)]({'scope':this[_0x19aa96(_0x4235ff._0x449d04)],'method':_0x25ec55,'args':_0xb654fb});}[_0x2eed64(0x1dd)](){const _0x324718={_0x575b4c:0x1b4,_0x59826a:0x1fe},_0x491c6c=_0x2eed64;if(this[_0x491c6c(0x1b4)][_0x491c6c(0x1fe)]){const _0xabbd62=this[_0x491c6c(_0x324718._0x575b4c)]['errorOnNextAction'];this[_0x491c6c(0x1b4)][_0x491c6c(_0x324718._0x59826a)]=void 0x0;throw _0xabbd62;}}['url'](){const _0x471e80={_0xf45e8e:0x1e3},_0x122d8a=_0x2eed64;return this[_0x122d8a(_0x471e80._0xf45e8e)];}async[_0x2eed64(0x1e2)](){const _0x19cfb4=_0x2eed64;return this[_0x19cfb4(0x1b1)](_0x19cfb4(0x1e2),[]),_0x19cfb4(0x1ee);}async[_0x2eed64(0x1ac)](_0x3f2068,_0x2bad7a){const _0x2e1344={_0x3cdf64:0x1ac,_0x45ddfb:0x1dd},_0x2cc7ec=_0x2eed64;this['record'](_0x2cc7ec(_0x2e1344._0x3cdf64),[_0x3f2068,_0x2bad7a]),this[_0x2cc7ec(_0x2e1344._0x45ddfb)](),this['onAfterClick']?.();}async[_0x2eed64(0x1a5)](_0xeb5a30,_0x38e245){const _0x4e93c0={_0x469a4a:0x1b1},_0x35d1be=_0x2eed64;this[_0x35d1be(_0x4e93c0._0x469a4a)](_0x35d1be(0x1a5),[_0xeb5a30,_0x38e245]),this[_0x35d1be(0x1dd)]();}async[_0x2eed64(0x1f4)](_0x45cdf5,_0x37c8b9,_0x52134e){const _0xfbb852={_0x49de33:0x1b1},_0x1d49be=_0x2eed64;this[_0x1d49be(_0xfbb852._0x49de33)]('fill',[_0x45cdf5,_0x37c8b9,_0x52134e]),this[_0x1d49be(0x1dd)]();}async[_0x2eed64(0x1c1)](_0xedfe4e,_0xd078ed,_0x1ec8c8){const _0x49a853={_0x197e73:0x1c1,_0xd7442a:0x1dd},_0x22af1e=_0x2eed64;this[_0x22af1e(0x1b1)](_0x22af1e(_0x49a853._0x197e73),[_0xedfe4e,_0xd078ed,_0x1ec8c8]),this[_0x22af1e(_0x49a853._0xd7442a)]();}async[_0x2eed64(0x203)](_0xca1d3a,_0x47dbc2){const _0xe51bb4=_0x2eed64;this['record'](_0xe51bb4(0x203),[_0xca1d3a,_0x47dbc2]),this[_0xe51bb4(0x1dd)]();}async[_0x2eed64(0x1fb)](_0x54c409,_0x4fbf29){const _0x148b7a={_0x58241c:0x1b1},_0x2225f0=_0x2eed64;this[_0x2225f0(_0x148b7a._0x58241c)](_0x2225f0(0x1fb),[_0x54c409,_0x4fbf29]),this[_0x2225f0(0x1dd)]();}async[_0x2eed64(0x1a2)](_0x2adaba,_0x329870,_0x103860){const _0x4b6898={_0x325cc7:0x1b1},_0x47cce0=_0x2eed64;this[_0x47cce0(_0x4b6898._0x325cc7)](_0x47cce0(0x1a2),[_0x2adaba,_0x329870,_0x103860]),this['maybeThrow']();}async[_0x2eed64(0x1aa)](_0xc49de3,_0x1de54c){const _0x391eee={_0x453fec:0x1dd},_0x483ef0=_0x2eed64;this['record'](_0x483ef0(0x1aa),[_0xc49de3,_0x1de54c]),this[_0x483ef0(_0x391eee._0x453fec)]();}async[_0x2eed64(0x1e0)](_0x2397af){const _0x4b5233={_0x1f4ff4:0x1b1,_0x2d8d9c:0x1e0,_0x4c2279:0x1dd},_0x5337c5=_0x2eed64;this[_0x5337c5(_0x4b5233._0x1f4ff4)](_0x5337c5(_0x4b5233._0x2d8d9c),[_0x2397af]),this[_0x5337c5(_0x4b5233._0x4c2279)]();}async[_0x2eed64(0x1b9)](_0x3c5792,_0x3ef54d,_0xf974f1){const _0x534c1e=_0x2eed64;this[_0x534c1e(0x1b1)](_0x534c1e(0x1b9),[_0x3c5792,_0x3ef54d,_0xf974f1]),this['maybeThrow']();}async[_0x2eed64(0x1e6)](_0x35a978,_0x4fbf7a){const _0x579829={_0x21995b:0x1b1,_0x496863:0x1dd},_0x5c4ad8=_0x2eed64;this[_0x5c4ad8(_0x579829._0x21995b)](_0x5c4ad8(0x1e6),[_0x35a978,_0x4fbf7a]),this[_0x5c4ad8(_0x579829._0x496863)]();}async[_0x2eed64(0x1b6)](_0x1b83dd,_0x41e209){const _0x283f17=_0x2eed64;this[_0x283f17(0x1b1)](_0x283f17(0x1b6),[_0x1b83dd,_0x41e209]),this[_0x283f17(0x1dd)]();}async[_0x2eed64(0x1b7)](_0x416def){const _0x3ff1f7={_0x501985:0x1a9},_0x12085d=_0x2eed64;return this[_0x12085d(0x1b1)](_0x12085d(0x1b7),[_0x416def]),this['behavior'][_0x12085d(_0x3ff1f7._0x501985)]??0x1;}async[_0x2eed64(0x1a4)](_0x282028){const _0x319cfa={_0x16d843:0x1b1,_0x38b262:0x1a4},_0x346189=_0x2eed64;return this[_0x346189(_0x319cfa._0x16d843)](_0x346189(_0x319cfa._0x38b262),[_0x282028]),this['behavior'][_0x346189(0x1fd)]??'';}async[_0x2eed64(0x1a0)](_0x3e18a8){const _0x46e93f=_0x2eed64;return this[_0x46e93f(0x1b1)]('inputValue',[_0x3e18a8]),this['behavior'][_0x46e93f(0x1ce)]??'';}async[_0x2eed64(0x1bd)](_0xc2a572){const _0x2cdd39={_0x2403de:0x1bd,_0x760302:0x1b4},_0x575919=_0x2eed64;return this[_0x575919(0x1b1)](_0x575919(_0x2cdd39._0x2403de),[_0xc2a572]),this[_0x575919(_0x2cdd39._0x760302)][_0x575919(0x19d)]??!![];}async[_0x2eed64(0x1ae)](_0x4afd4f,_0x4da106){const _0x214de9={_0x1d1b63:0x1b1,_0x4ffa1a:0x1b4,_0x199be6:0x1d5},_0x43d293=_0x2eed64;return this[_0x43d293(_0x214de9._0x1d1b63)](_0x43d293(0x1ae),[_0x4afd4f,_0x4da106]),this[_0x43d293(_0x214de9._0x4ffa1a)][_0x43d293(_0x214de9._0x199be6)]?.[_0x4da106]??null;}async['waitFor'](_0x33a02c,_0x110af1){const _0x13ce51={_0x530aa6:0x1b1},_0x553b4b=_0x2eed64;this[_0x553b4b(_0x13ce51._0x530aa6)]('waitFor',[_0x33a02c,_0x110af1]);}async[_0x2eed64(0x1c6)](_0x6335ef,_0x26af11){const _0x48220a={_0x5898cc:0x1c6},_0xc7e608=_0x2eed64;this['record'](_0xc7e608(_0x48220a._0x5898cc),[_0x6335ef,_0x26af11]);}async[_0x2eed64(0x1d6)](_0x27107a,_0x538521){const _0x5732ea={_0x3ac9ce:0x1b1,_0x1d6129:0x1d6},_0x2ee788=_0x2eed64;this[_0x2ee788(_0x5732ea._0x3ac9ce)](_0x2ee788(_0x5732ea._0x1d6129),[_0x27107a,_0x538521]);}async['waitForNavigation'](_0x596dd0){const _0x55987f=_0x2eed64;this[_0x55987f(0x1b1)]('waitForNavigation',[_0x596dd0]);}async[_0x2eed64(0x1fc)](_0xe7c42,_0x3faab6){const _0xea1046={_0x3c7a6f:0x1b1,_0x312865:0x1fc,_0x8411af:0x1e3},_0xdc75c7=_0x2eed64;this[_0xdc75c7(_0xea1046._0x3c7a6f)](_0xdc75c7(_0xea1046._0x312865),[_0xe7c42,_0x3faab6]),this[_0xdc75c7(_0xea1046._0x8411af)]=_0xe7c42;}async['reload'](_0x20d82b){const _0x4bf358={_0x3235e9:0x1d1},_0x15e356=_0x2eed64;this[_0x15e356(0x1b1)](_0x15e356(_0x4bf358._0x3235e9),[_0x20d82b]);}async['goBack'](_0x583338){const _0x38ab26={_0x14bd6d:0x1c2},_0x3bdee9=_0x2eed64;this[_0x3bdee9(0x1b1)](_0x3bdee9(_0x38ab26._0x14bd6d),[_0x583338]);}async[_0x2eed64(0x1f3)](_0x4dbdf4){const _0x51f836=_0x2eed64;this[_0x51f836(0x1b1)](_0x51f836(0x1f3),[_0x4dbdf4]);}async[_0x2eed64(0x19e)](_0x18fcf3){const _0x2e2895={_0x5de076:0x1b1},_0x498c39=_0x2eed64;return this[_0x498c39(_0x2e2895._0x5de076)]('evaluate',[_0x18fcf3]),void 0x0;}async[_0x2eed64(0x1de)](_0x44e76d,_0x5dc25b){const _0x447bb8={_0x1770d8:0x1b1,_0x3a687b:0x1de},_0x338439=_0x2eed64;return this[_0x338439(_0x447bb8._0x1770d8)](_0x338439(_0x447bb8._0x3a687b),[_0x44e76d,_0x5dc25b]),void 0x0;}async[_0x2eed64(0x1af)](_0x23e942){const _0x47a724={_0x200e8a:0x1b1},_0x6ca4c2=_0x2eed64;this[_0x6ca4c2(_0x47a724._0x200e8a)]('inspectElement',[_0x23e942]);if(_0x23e942[_0x6ca4c2(0x1ab)]['length']!==0x1||_0x23e942[_0x6ca4c2(0x1ab)][0x0][_0x6ca4c2(0x1ef)]!==_0x6ca4c2(0x1c9))return null;const _0x1bf399=_0x23e942[_0x6ca4c2(0x1ab)][0x0][_0x6ca4c2(0x1c9)],_0x4258ca=this['behavior']['elementHintByRef']?.[_0x1bf399];return _0x4258ca??null;}async['screenshot'](_0x37b648){const _0x2b6a6f={_0x1cc942:0x1a3},_0x256184=_0x2eed64;return this[_0x256184(0x1b1)](_0x256184(_0x2b6a6f._0x1cc942),[_0x37b648]),Buffer[_0x256184(0x204)](_0x256184(0x1a6));}async[_0x2eed64(0x201)](_0xb0f099){const _0x3536af={_0x49407a:0x1b1,_0x43f46e:0x1b8,_0xfaba8e:0x1c9,_0x121919:0x1b4,_0x2e652b:0x1b5},_0x289cfb=_0x2eed64;this[_0x289cfb(_0x3536af._0x49407a)](_0x289cfb(0x201),[_0xb0f099]);if(_0xb0f099['steps'][_0x289cfb(_0x3536af._0x43f46e)]===0x1&&_0xb0f099[_0x289cfb(0x1ab)][0x0]['kind']==='ref'){const _0x5caa25=_0xb0f099['steps'][0x0][_0x289cfb(_0x3536af._0xfaba8e)];return this[_0x289cfb(_0x3536af._0x121919)][_0x289cfb(0x1ea)]?.[_0x5caa25]??_0x289cfb(_0x3536af._0x2e652b)+_0x5caa25+'\x22></div>';}return _0x289cfb(0x198);}},FakeContext=class{constructor(_0x441068,_0x496233,_0x172c9f){const _0x3d32bd={_0x148a1a:0x1d2,_0x3def5e:0x1b4,_0x27a39f:0x1e8,_0x5b5038:0x1cc,_0xbdb71c:0x200},_0x52aad9=_0x2eed64;this[_0x52aad9(_0x3d32bd._0x148a1a)]=_0x441068,this[_0x52aad9(_0x3d32bd._0x3def5e)]=_0x496233,this['scope']=_0x172c9f;const _0x51d05d=new FakePage(_0x441068,_0x496233,_0x172c9f+_0x52aad9(_0x3d32bd._0x27a39f),_0x496233['initialUrl']??'about:blank');_0x496233[_0x52aad9(0x1cd)]&&(_0x51d05d[_0x52aad9(_0x3d32bd._0x5b5038)]=()=>{const _0x27ef7d=_0x52aad9;this[_0x27ef7d(0x1a7)](_0x496233[_0x27ef7d(0x1cd)]);}),this['pageList']=[_0x51d05d],this[_0x52aad9(0x1e7)]={..._0x496233[_0x52aad9(0x1e4)]??{}},this['cookieState']={..._0x496233[_0x52aad9(_0x3d32bd._0xbdb71c)]??{}};}[_0x2eed64(0x1d2)];[_0x2eed64(0x1b4)];[_0x2eed64(0x1be)];static{__name(this,_0x2eed64(0x1a1));}[_0x2eed64(0x1ad)];[_0x2eed64(0x1d9)]=0x0;[_0x2eed64(0x1e1)]=[];[_0x2eed64(0x1e7)];[_0x2eed64(0x197)];['newPageListeners']=new Set();[_0x2eed64(0x1b1)](_0x2b907c,_0x5735ca){const _0x2c99d8=_0x2eed64;this['recorder'][_0x2c99d8(0x1c5)]({'scope':this[_0x2c99d8(0x1be)],'method':_0x2b907c,'args':_0x5735ca});}['pages'](){const _0x1570ef={_0x20ad14:0x1ad},_0x15de23=_0x2eed64;return this[_0x15de23(_0x1570ef._0x20ad14)];}[_0x2eed64(0x1c0)](){const _0x1e6246={_0x34c839:0x1ad,_0x3a0fd8:0x1d4},_0x18cea3=_0x2eed64,_0x15e30a=this[_0x18cea3(_0x1e6246._0x34c839)][this['activeIdx']];if(!_0x15e30a)throw new DriverError(_0x18cea3(_0x1e6246._0x3a0fd8),{'activeIdx':this[_0x18cea3(0x1d9)]});return _0x15e30a;}[_0x2eed64(0x1ca)](){const _0x26d6d5=_0x2eed64;return this[_0x26d6d5(0x1b4)][_0x26d6d5(0x1ca)]??[];}async['setActivePage'](_0x1e9d36){const _0x587160={_0x5ade3b:0x1b1,_0x2dd0cc:0x1b8},_0x2de1d3=_0x2eed64;this[_0x2de1d3(_0x587160._0x5ade3b)](_0x2de1d3(0x1df),[_0x1e9d36]);if(_0x1e9d36<0x0||_0x1e9d36>=this[_0x2de1d3(0x1ad)][_0x2de1d3(0x1b8)])throw new DriverError(_0x2de1d3(0x19f),{'index':_0x1e9d36,'available':this['pageList'][_0x2de1d3(_0x587160._0x2dd0cc)]});this['activeIdx']=_0x1e9d36,this['frameStack'][_0x2de1d3(0x1b8)]=0x0;}[_0x2eed64(0x1d8)](_0x949823){const _0x1646ee={_0x270eef:0x1e5},_0x3c3007={_0x5942b9:0x1e5},_0x56da42=_0x2eed64;return this[_0x56da42(_0x1646ee._0x270eef)]['add'](_0x949823),()=>{const _0x579cc8=_0x56da42;this[_0x579cc8(_0x3c3007._0x5942b9)][_0x579cc8(0x1c7)](_0x949823);};}[_0x2eed64(0x1a7)](_0x35f3cd){const _0x15aae6={_0x16f2bd:0x1be,_0x1e747d:0x1b4,_0x258757:0x1ad,_0xcbc02b:0x1c5,_0x186298:0x1e5},_0x100acd=_0x2eed64,_0x3b71fe=this[_0x100acd(_0x15aae6._0x16f2bd)]+'.page'+this[_0x100acd(0x1ad)][_0x100acd(0x1b8)],_0x22a3b6=new FakePage(this['recorder'],this[_0x100acd(_0x15aae6._0x1e747d)],_0x3b71fe,_0x35f3cd);this[_0x100acd(_0x15aae6._0x258757)][_0x100acd(_0x15aae6._0xcbc02b)](_0x22a3b6);const _0x2fd48e=this['pageList']['length']-0x1;for(const _0x308039 of this[_0x100acd(_0x15aae6._0x186298)]){try{_0x308039({'index':_0x2fd48e,'url':_0x35f3cd});}catch{}}return _0x2fd48e;}async[_0x2eed64(0x1eb)](_0x50bbd3){const _0xc9ac8a={_0x1d6eaa:0x1b1,_0x5590e3:0x1b8,_0x202cc5:0x1e1},_0x571f94=_0x2eed64;this[_0x571f94(_0xc9ac8a._0x1d6eaa)](_0x571f94(0x1eb),[_0x50bbd3]);if(!_0x50bbd3['steps'][_0x571f94(_0xc9ac8a._0x5590e3)])throw new LocatorError(_0x571f94(0x1b2),{'locator':_0x50bbd3});this[_0x571f94(_0xc9ac8a._0x202cc5)][_0x571f94(0x1c5)](_0x50bbd3);}async[_0x2eed64(0x1b3)](){const _0x4ef4a8={_0x28874b:0x1b1},_0x221bc5=_0x2eed64;this[_0x221bc5(_0x4ef4a8._0x28874b)]('exitFrame',[]);if(this[_0x221bc5(0x1e1)][_0x221bc5(0x1b8)]===0x0)throw new DriverError('exitFrame\x20called\x20with\x20no\x20frame\x20on\x20the\x20stack',{});this[_0x221bc5(0x1e1)][_0x221bc5(0x19b)]();}async[_0x2eed64(0x1ec)](_0x4a8202,_0x44e005){const _0x50f892={_0x2e7f63:0x1ec,_0x319dc4:0x1e7},_0x5e661a=_0x2eed64;this[_0x5e661a(0x1b1)](_0x5e661a(_0x50f892._0x2e7f63),[_0x4a8202,_0x44e005]),this[_0x5e661a(_0x50f892._0x319dc4)][_0x4a8202]=_0x44e005;}async[_0x2eed64(0x1db)](_0x320609){const _0x4e402c={_0x267af2:0x1b1},_0x173213=_0x2eed64;return this[_0x173213(_0x4e402c._0x267af2)](_0x173213(0x1db),[_0x320609]),this[_0x173213(0x1e7)][_0x320609]??null;}async[_0x2eed64(0x202)](_0x28dc64,_0x3d1479,_0xeff1c7){const _0xf5cfe9={_0x75341:0x197},_0x2e9460=_0x2eed64;this[_0x2e9460(0x1b1)](_0x2e9460(0x202),[_0x28dc64,_0x3d1479,_0xeff1c7]),this[_0x2e9460(_0xf5cfe9._0x75341)][_0x28dc64]=_0x3d1479;}async[_0x2eed64(0x1f1)](_0x1eb81a){const _0x1a1038={_0x3df70f:0x1b1,_0x44915f:0x1f1},_0xa436fc=_0x2eed64;return this[_0xa436fc(_0x1a1038._0x3df70f)](_0xa436fc(_0x1a1038._0x44915f),[_0x1eb81a]),this[_0xa436fc(0x197)][_0x1eb81a]??null;}async[_0x2eed64(0x1a8)](_0x29c4e0){const _0x55515d=_0x2eed64;this[_0x55515d(0x1b1)](_0x55515d(0x1a8),[_0x29c4e0]);}async[_0x2eed64(0x19e)](_0x4a3974){return this['record']('evaluate',[_0x4a3974]),void 0x0;}async[_0x2eed64(0x1bc)](){const _0x38bc79=_0x2eed64;this['record'](_0x38bc79(0x1bc),[]);}['frameDepth'](){const _0x161e71={_0x478a00:0x1e1,_0x30092b:0x1b8},_0x4574e0=_0x2eed64;return this[_0x4574e0(_0x161e71._0x478a00)][_0x4574e0(_0x161e71._0x30092b)];}},FakeWebDriver=class{constructor(_0x34a109={}){const _0x44fd1d=_0x2eed64;this[_0x44fd1d(0x1b4)]=_0x34a109,this[_0x44fd1d(0x1d2)]=createRecorder();}['behavior'];static{__name(this,_0x2eed64(0x1e9));}['launched']=![];[_0x2eed64(0x1d2)];[_0x2eed64(0x1f5)]=[];async[_0x2eed64(0x1f9)](_0x272ced){const _0xe7a6bb={_0x156268:0x1f9,_0x46ca7e:0x1bb},_0x336fae=_0x2eed64;this['recorder'][_0x336fae(0x1c5)]({'scope':_0x336fae(0x1ba),'method':_0x336fae(_0xe7a6bb._0x156268),'args':[_0x272ced]}),this[_0x336fae(_0xe7a6bb._0x46ca7e)]=!![];}async[_0x2eed64(0x1dc)](_0x56181f){const _0x1f69bc={_0x316116:0x1dc,_0xfa0841:0x1d2,_0x411465:0x1f5,_0x43e272:0x1b8,_0xa5a325:0x1c5},_0x1a62be=_0x2eed64;this[_0x1a62be(0x1d2)]['push']({'scope':'driver','method':_0x1a62be(_0x1f69bc._0x316116),'args':[_0x56181f]});if(!this[_0x1a62be(0x1bb)])throw new DriverError(_0x1a62be(0x199),{});const _0x1fa0e9=new FakeContext(this[_0x1a62be(_0x1f69bc._0xfa0841)],this[_0x1a62be(0x1b4)],_0x1a62be(0x1f2)+this[_0x1a62be(_0x1f69bc._0x411465)][_0x1a62be(_0x1f69bc._0x43e272)]);return this[_0x1a62be(0x1f5)][_0x1a62be(_0x1f69bc._0xa5a325)](_0x1fa0e9),_0x1fa0e9;}async[_0x2eed64(0x1bc)](){const _0x7522c6={_0x4e82d4:0x1ba},_0x2b3039=_0x2eed64;this[_0x2b3039(0x1d2)][_0x2b3039(0x1c5)]({'scope':_0x2b3039(_0x7522c6._0x4e82d4),'method':_0x2b3039(0x1bc),'args':[]}),this['launched']=![];}['calls'](){const _0x33cb56=_0x2eed64;return this[_0x33cb56(0x1d2)][_0x33cb56(0x1f8)]();}['callsFor'](_0x55dcb6){const _0x2ad710={_0x44da37:0x1f8},_0x42c575=_0x2eed64;return this['recorder'][_0x42c575(_0x2ad710._0x44da37)]()['filter'](_0x5f011e=>_0x5f011e[_0x42c575(0x19a)]===_0x55dcb6);}};function _0x18ee(_0x257039,_0x60aaae){_0x257039=_0x257039-0x196;const _0x3754f3=_0x3754();let _0x18eeb7=_0x3754f3[_0x257039];if(_0x18ee['KLoMIe']===undefined){var _0x507139=function(_0x37d0bf){const _0x64530c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x23f8b6='',_0x1ffdae='';for(let _0x2dace3=0x0,_0x33aaf1,_0x53e48c,_0x5a0c91=0x0;_0x53e48c=_0x37d0bf['charAt'](_0x5a0c91++);~_0x53e48c&&(_0x33aaf1=_0x2dace3%0x4?_0x33aaf1*0x40+_0x53e48c:_0x53e48c,_0x2dace3++%0x4)?_0x23f8b6+=String['fromCharCode'](0xff&_0x33aaf1>>(-0x2*_0x2dace3&0x6)):0x0){_0x53e48c=_0x64530c['indexOf'](_0x53e48c);}for(let _0x5b402b=0x0,_0x52dd21=_0x23f8b6['length'];_0x5b402b<_0x52dd21;_0x5b402b++){_0x1ffdae+='%'+('00'+_0x23f8b6['charCodeAt'](_0x5b402b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ffdae);};_0x18ee['FemZbU']=_0x507139,_0x18ee['hTckdN']={},_0x18ee['KLoMIe']=!![];}const _0x161151=_0x3754f3[0x0],_0xafded5=_0x257039+_0x161151,_0x4dfb74=_0x18ee['hTckdN'][_0xafded5];return!_0x4dfb74?(_0x18eeb7=_0x18ee['FemZbU'](_0x18eeb7),_0x18ee['hTckdN'][_0xafded5]=_0x18eeb7):_0x18eeb7=_0x4dfb74,_0x18eeb7;}function _0x3754(){const _0x5c9158=['y29VA2LLCW','B3v0zxjive1m','C2v0q29VA2LL','y2HLy2S','zNjVBq','mJiYnJqXwKfZDujy','y29VA2LLu3rHDgu','pgrPDJ48l2rPDJ4','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','Bwv0Ag9K','Cg9W','mZu2ntmYnKLbDuLssa','AxnwAxnPyMXLqNLezwzHDwX0','zxzHBhvHDgu','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','Aw5WDxrwywX1zq','rMfRzunVBNrLEhq','C2vSzwn0t3b0Aw9U','C2nYzwvUC2HVDa','Dgv4DenVBNrLBNq','zg91yMXLq2XPy2S','zMfRzs1WBMC','zw1PDezHA2vqB3b1Ca','C2f2zvn0B3jHz2vtDgf0zq','y291BNrcEurLzMf1Bhq','Ag92zxi','C3rLChm','y2XPy2S','CgfNzuXPC3q','z2v0qxr0CMLIDxrL','Aw5ZCgvJDevSzw1LBNq','mZvMuLLwrMO','CMvJB3jK','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','zxHPDezYyw1L','yMvOyxzPB3i','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','y2XPCgjVyxjKugfZDgu','y291BNq','BgvUz3rO','zhjHz0fUzerYB3a','zhjPDMvY','Bgf1BMnOzwq','y2XVC2u','AxnwAxnPyMXL','C2nVCgu','vw5VDgvZDevYCM9Y','ywn0AxzLugfNzq','ChjLC3m','z29cywnR','zgvMAw5LuhjVCgvYDhK','mJq5ndq3mhfru0PKzq','ChvZAa','D2fPDezVCLvYBa','zgvSzxrL','zNvUy3rPB24','CMvM','y29UC29SzuvUDhjPzxm','mJeYmdqWngfNAu14CW','B25bzNrLCKnSAwnR','Cg9WDxbpBKnSAwnR','Aw5WDxrwywX1zuj5rgvMyxvSDa','BMfTzq','y2fWDhvYzvn0ywnRvhjHy2u','CMvSB2fK','CMvJB3jKzxi','ndK5nZG0AuzjqMDw','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','yxr0CMLIDxrLC0j5rgvMyxvSDa','D2fPDezVCLrLEhq','tg9JyxrVCKvYCM9Y','B25ozxDqywDL','ywn0AxzLswr4','y3jLyxrLuMvJB3jKzxi','z2v0tg9JywXtDg9YywDL','BMv3q29UDgv4Da','Bwf5yMvuAhjVDW','zxzHBhvHDgvpBKXVy2f0B3i','C2v0qwn0AxzLugfNzq','C2nYB2XSsw50B1zPzxC','zNjHBwvtDgfJAW','DgL0Bgu','y3vYCMvUDfvYBa','Bg9JywXtDg9YywDL','BMv3ugfNzuXPC3rLBMvYCW','DxbSB2fKrMLSzq','Bg9JywXtDg9YywDLu3rHDgu','lNbHz2uW','rMfRzvDLyKrYAxzLCG','B3v0zxjiDg1SqNLszwy','zw50zxjgCMfTzq','C2v0tg9JywXtDg9YywDL','y29UDgv4Da','zMfRzsb0AxrSzq','A2LUza','rMfRzvbHz2u','z2v0q29VA2LL','y3r4','z29gB3j3yxjK','zMLSBa','y29UDgv4Dhm','rhjPDMvYrxjYB3i','mtC5ody4nKzsy21ztW','y2fSBhm','Bgf1BMnO','nhnNrgfyAa','Dw5JAgvJAW','z290BW','Dgv4DenVBNrLBNrcEurLzMf1Bhq','zxjYB3jpBK5LEhrby3rPB24','mJu3mJC1mLDZreXdua'];_0x3754=function(){return _0x5c9158;};return _0x3754();}export{FakeWebDriver};
|
|
1
|
+
const _0x296b36=_0x5f64;(function(_0x1acf4e,_0x1dbb8d){const _0x429dc7={_0x40bd21:0x1b4,_0x43c267:0x1bf,_0x502089:0x1a3,_0x4648b1:0x1a2,_0x52b286:0x1cb,_0x5aab0b:0x1aa},_0x5f2dfa=_0x5f64,_0x1f5773=_0x1acf4e();while(!![]){try{const _0x33f5e3=parseInt(_0x5f2dfa(0x19e))/0x1*(-parseInt(_0x5f2dfa(_0x429dc7._0x40bd21))/0x2)+-parseInt(_0x5f2dfa(_0x429dc7._0x43c267))/0x3*(parseInt(_0x5f2dfa(_0x429dc7._0x502089))/0x4)+parseInt(_0x5f2dfa(0x179))/0x5*(parseInt(_0x5f2dfa(_0x429dc7._0x4648b1))/0x6)+parseInt(_0x5f2dfa(0x1c7))/0x7*(parseInt(_0x5f2dfa(0x1c1))/0x8)+parseInt(_0x5f2dfa(_0x429dc7._0x52b286))/0x9+-parseInt(_0x5f2dfa(0x1e0))/0xa*(-parseInt(_0x5f2dfa(0x1ab))/0xb)+parseInt(_0x5f2dfa(_0x429dc7._0x5aab0b))/0xc;if(_0x33f5e3===_0x1dbb8d)break;else _0x1f5773['push'](_0x1f5773['shift']());}catch(_0x4574e7){_0x1f5773['push'](_0x1f5773['shift']());}}}(_0x1962,0xea106));function _0x1962(){const _0x1c9380=['ywn0AxzLswr4','y2fSBhngB3i','D2fPDezVCLrLEhq','CMvJB3jKzxi','m0nQwKj3qW','y29VA2LLCW','mZKYofzbtuPXDW','DgL0Bgu','y2XVC2u','Aw5ZCgvJDevSzw1LBNq','zMLSBa','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','mJG4nfLRu0f0Ca','zhjPDMvY','zNjHBwvezxb0Aa','y3r4','ndCXntK2ngzLwLvuBG','Bg9JywXtDg9YywDLu3rHDgu','pgrPDJ48l2rPDJ4','zMfRzs1WBMC','y291BNq','CMvSB2fK','y29UC29SzuvUDhjPzxm','DxbSB2fKrMLSzq','D2fPDezVCG','Bwv0Ag9K','AxnwAxnPyMXL','BMv0D29YA0vUDhjPzxm','z2v0tg9JywXtDg9YywDL','rMfRzunVBNrLEhq','C2f2zvn0B3jHz2vtDgf0zq','yMvOyxzPB3i','Cg9WDxbpBKnSAwnR','Cg9W','lNbHz2uW','zxzHBhvHDgu','zg91yMXLq2XPy2S','mtyZmeftC3DmwG','ywrK','C2nYB2XSsw50B1zPzxC','BMfTzq','y3vYCMvUDfvYBa','y2fSBhm','y29UDgv4Da','Aw5PDgLHBfvYBa','yxr0ywnOrxHPC3rPBMC','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','C2v0qwn0AxzLugfNzq','C2v0tg9JywXtDg9YywDL','zxHPDezYyw1L','CMvM','z290BW','Bwf5yMvuAhjVDW','zNjVBq','zhjHz0fUzerYB3a','C2nVCgu','ntiZnteWDez1CMDT','Bgf1BMnOzwq','Bg9JywXtDg9YywDL','CMvJB3jK','zwXLBwvUDeHPBNrcEvjLzG','z2v0q29VA2LL','BMv3q29UDgv4Da','B25bzNrLCKnSAwnR','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','C2v0q29VA2LL','zxzHBhvHDgvpBKXVy2f0B3i','vw5VDgvZDevYCM9Y','B3v0zxjive1m','D3nfBMrWB2LUDa','Dw5JAgvJAW','zgvSzxrL','Aw5WDxrwywX1zq','Bgf1BMnO','y2XPCgjVyxjKugfZDgu','zxjYB3jpBK5LEhrby3rPB24','z29gB3j3yxjK','A2LUza','C3rLChm','iJ48l2rPDJ4','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','ywjVDxq6yMXHBMS','y29VA2LLu3rHDgu','D2fPDezVCK5HDMLNyxrPB24','CgfNzuXPC3q','C2vSzwn0t3b0Aw9U','y2fWDhvYzvn0ywnRvhjHy2u','Dgv4DenVBNrLBNq','DxjS','C2nYzwvUC2HVDa','B25ozxDqywDL','z29cywnR','B3v0zxjiDg1SqNLszwy','mLfWALngtG','Dgv4DenVBNrLBNrcEurLzMf1Bhq','D2fPDezVCLvYBa','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','mJreCgf0yw4','mtq0mtmWofPMCgTMtq','y2XPy2S','ChjLC3m','zNjHBwvtDgfJAW','rhjPDMvYrxjYB3i','AxnwAxnPyMXLqNLezwzHDwX0','zMLSDgvY','mtGWotK2nZj5y3byBum','mJy5mtD4ze14DwK','Ag92zxi','z2v0qxr0CMLIDxrL','ChvZAa','BMv3ugfNzuXPC3rLBMvYCW','zNvUy3rPB24','zMfRzsb0AxrSzq','BgvUz3rO','lNbHz2u','mtCZmZiXmfbwEKL1Da','ywn0AxzLugfNzq','zgvMAw5LuhjVCgvYDhK','yxr0CMLIDxrLC0j5rgvMyxvSDa','y29UDgv4Dhm','CgfNzxm','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP'];_0x1962=function(){return _0x1c9380;};return _0x1962();}var __defProp=Object[_0x296b36(0x1b6)],__name=(_0x100bd0,_0x539b66)=>__defProp(_0x100bd0,_0x296b36(0x1e3),{'value':_0x539b66,'configurable':!![]}),UnotestError=class extends Error{static{__name(this,_0x296b36(0x184));}[_0x296b36(0x1e6)];constructor(_0x201fea,_0xd99b6c={}){const _0x153cac={_0x45f7d5:0x1e6},_0x3083bd=_0x296b36;super(_0x201fea),this['name']=new.target.name,this[_0x3083bd(_0x153cac._0x45f7d5)]=Object['freeze']({..._0xd99b6c}),typeof Error[_0x3083bd(0x197)]===_0x3083bd(0x1b0)&&Error['captureStackTrace'](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,_0x296b36(0x1a7));}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}};function createRecorder(){const _0x4a79d3={_0x901da9:0x1ae,_0x430069:0x1e5},_0x5d68a9=_0x296b36,_0x1e1827=[];let _0xf6002d=0x0;return{'push':__name(_0x3b25b0=>_0x1e1827[_0x5d68a9(0x1ae)]({..._0x3b25b0,'seq':_0xf6002d++}),_0x5d68a9(_0x4a79d3._0x901da9)),'calls':__name(()=>_0x1e1827,_0x5d68a9(_0x4a79d3._0x430069))};}function _0x5f64(_0x510958,_0x4716c0){_0x510958=_0x510958-0x175;const _0x1962fd=_0x1962();let _0x5f6484=_0x1962fd[_0x510958];if(_0x5f64['fvghhS']===undefined){var _0x19966e=function(_0x432983){const _0x5e3af4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x100bd0='',_0x539b66='';for(let _0x201fea=0x0,_0xd99b6c,_0x1e1827,_0xf6002d=0x0;_0x1e1827=_0x432983['charAt'](_0xf6002d++);~_0x1e1827&&(_0xd99b6c=_0x201fea%0x4?_0xd99b6c*0x40+_0x1e1827:_0x1e1827,_0x201fea++%0x4)?_0x100bd0+=String['fromCharCode'](0xff&_0xd99b6c>>(-0x2*_0x201fea&0x6)):0x0){_0x1e1827=_0x5e3af4['indexOf'](_0x1e1827);}for(let _0x3b25b0=0x0,_0x5dfd92=_0x100bd0['length'];_0x3b25b0<_0x5dfd92;_0x3b25b0++){_0x539b66+='%'+('00'+_0x100bd0['charCodeAt'](_0x3b25b0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x539b66);};_0x5f64['IxKrmA']=_0x19966e,_0x5f64['CSvVAV']={},_0x5f64['fvghhS']=!![];}const _0x5c3678=_0x1962fd[0x0],_0x1a31b8=_0x510958+_0x5c3678,_0x5483b0=_0x5f64['CSvVAV'][_0x1a31b8];return!_0x5483b0?(_0x5f6484=_0x5f64['IxKrmA'](_0x5f6484),_0x5f64['CSvVAV'][_0x1a31b8]=_0x5f6484):_0x5f6484=_0x5483b0,_0x5f6484;}__name(createRecorder,'createRecorder');var FakePage=class{constructor(_0x5dfd92,_0xc540e5,_0x5bd9b6,_0x4ef2d2){const _0x84c8b=_0x296b36;this[_0x84c8b(0x1be)]=_0x5dfd92,this['behavior']=_0xc540e5,this[_0x84c8b(0x178)]=_0x5bd9b6,this[_0x84c8b(0x1e4)]=_0x4ef2d2;}[_0x296b36(0x1be)];[_0x296b36(0x1da)];[_0x296b36(0x178)];static{__name(this,'FakePage');}['currentUrl'];[_0x296b36(0x180)];['record'](_0x28f14c,_0x11c42f){const _0x25a7f0={_0x4b65d1:0x1be,_0x3f3045:0x1ae,_0x396219:0x178},_0x1425fe=_0x296b36;this[_0x1425fe(_0x25a7f0._0x4b65d1)][_0x1425fe(_0x25a7f0._0x3f3045)]({'scope':this[_0x1425fe(_0x25a7f0._0x396219)],'method':_0x28f14c,'args':_0x11c42f});}[_0x296b36(0x175)](){const _0x118dbb={_0x4871da:0x18c,_0x4de42c:0x18c},_0x5a0851=_0x296b36;if(this['behavior'][_0x5a0851(_0x118dbb._0x4871da)]){const _0xea31f3=this[_0x5a0851(0x1da)][_0x5a0851(0x18c)];this[_0x5a0851(0x1da)][_0x5a0851(_0x118dbb._0x4de42c)]=void 0x0;throw _0xea31f3;}}[_0x296b36(0x199)](){const _0x362662={_0x3da611:0x1e4},_0x7870ae=_0x296b36;return this[_0x7870ae(_0x362662._0x3da611)];}async[_0x296b36(0x1c2)](){const _0x2837f5={_0x3071dc:0x1b1},_0x18b9a7=_0x296b36;return this[_0x18b9a7(0x17c)](_0x18b9a7(0x1c2),[]),_0x18b9a7(_0x2837f5._0x3071dc);}async[_0x296b36(0x1a4)](_0x568efa,_0x2342f0){const _0xfde242={_0x489ee8:0x17c,_0x298864:0x175},_0x3b618e=_0x296b36;this[_0x3b618e(_0xfde242._0x489ee8)]('click',[_0x568efa,_0x2342f0]),this[_0x3b618e(_0xfde242._0x298864)](),this[_0x3b618e(0x180)]?.();}async[_0x296b36(0x1df)](_0x69c3b,_0x533caa){this['record']('doubleClick',[_0x69c3b,_0x533caa]),this['maybeThrow']();}async[_0x296b36(0x1c5)](_0x504844,_0xd775e7,_0x5ba254){const _0x40a8ea=_0x296b36;this['record'](_0x40a8ea(0x1c5),[_0x504844,_0xd775e7,_0x5ba254]),this[_0x40a8ea(0x175)]();}async['press'](_0x2c3ed1,_0x30ed20,_0x5353bd){const _0x111a76=_0x296b36;this[_0x111a76(0x17c)](_0x111a76(0x1a5),[_0x2c3ed1,_0x30ed20,_0x5353bd]),this['maybeThrow']();}async['check'](_0x525b87,_0x4d7eb6){const _0x3ae924=_0x296b36;this['record']('check',[_0x525b87,_0x4d7eb6]),this[_0x3ae924(0x175)]();}async[_0x296b36(0x187)](_0x20014c,_0x9e8840){const _0x536ac1=_0x296b36;this[_0x536ac1(0x17c)](_0x536ac1(0x187),[_0x20014c,_0x9e8840]),this['maybeThrow']();}async['selectOption'](_0x51dc2e,_0x24c528,_0x4659cd){const _0x3f0818={_0x2e65fd:0x196},_0x55cfcc=_0x296b36;this[_0x55cfcc(0x17c)](_0x55cfcc(_0x3f0818._0x2e65fd),[_0x51dc2e,_0x24c528,_0x4659cd]),this[_0x55cfcc(0x175)]();}async[_0x296b36(0x1ac)](_0x2d604c,_0x3562e5){const _0x4aaaf9={_0x520562:0x17c,_0x52e862:0x1ac},_0x5ad5e7=_0x296b36;this[_0x5ad5e7(_0x4aaaf9._0x520562)](_0x5ad5e7(_0x4aaaf9._0x52e862),[_0x2d604c,_0x3562e5]),this['maybeThrow']();}async[_0x296b36(0x1e2)](_0x46b31b){const _0x29ae1f={_0x588760:0x1e2,_0x4da923:0x175},_0x2d1c5f=_0x296b36;this['record'](_0x2d1c5f(_0x29ae1f._0x588760),[_0x46b31b]),this[_0x2d1c5f(_0x29ae1f._0x4da923)]();}async[_0x296b36(0x177)](_0x1c08e1,_0xdd2ed2,_0x34aaaa){const _0x472dc8=_0x296b36;this['record']('dragAndDrop',[_0x1c08e1,_0xdd2ed2,_0x34aaaa]),this[_0x472dc8(0x175)]();}async[_0x296b36(0x1d2)](_0x1e6e05,_0x20e4ea){const _0x4695f6=_0x296b36;this[_0x4695f6(0x17c)](_0x4695f6(0x1d2),[_0x1e6e05,_0x20e4ea]),this[_0x4695f6(0x175)]();}async[_0x296b36(0x18b)](_0x3a5090,_0xb228eb){const _0x2156f0={_0x3be53b:0x17c},_0x464b95=_0x296b36;this[_0x464b95(_0x2156f0._0x3be53b)]('clipboardPaste',[_0x3a5090,_0xb228eb]),this['maybeThrow']();}async[_0x296b36(0x1cf)](_0x520a71){const _0x3f75e4={_0x20a857:0x1cf},_0x61c2ee=_0x296b36;return this[_0x61c2ee(0x17c)](_0x61c2ee(_0x3f75e4._0x20a857),[_0x520a71]),this[_0x61c2ee(0x1da)]['countByDefault']??0x1;}async[_0x296b36(0x198)](_0x4f1e0e){const _0x209b1f={_0x546a1e:0x17c},_0x1e1630=_0x296b36;return this[_0x1e1630(_0x209b1f._0x546a1e)](_0x1e1630(0x198),[_0x4f1e0e]),this[_0x1e1630(0x1da)][_0x1e1630(0x19f)]??'';}async[_0x296b36(0x189)](_0x5f0556){const _0x83daa7={_0x220816:0x189},_0x48837e=_0x296b36;return this[_0x48837e(0x17c)](_0x48837e(_0x83daa7._0x220816),[_0x5f0556]),this[_0x48837e(0x1da)]['inputValueByDefault']??'';}async[_0x296b36(0x1d5)](_0x170409){const _0x342ecd={_0x12dee5:0x1a8},_0x686a1c=_0x296b36;return this[_0x686a1c(0x17c)]('isVisible',[_0x170409]),this['behavior'][_0x686a1c(_0x342ecd._0x12dee5)]??!![];}async[_0x296b36(0x1ad)](_0x46c2ff,_0x419d99){const _0x53e140={_0x8b585d:0x1ad},_0x4d8d6a=_0x296b36;return this['record'](_0x4d8d6a(_0x53e140._0x8b585d),[_0x46c2ff,_0x419d99]),this['behavior'][_0x4d8d6a(0x1b7)]?.[_0x419d99]??null;}async['waitFor'](_0x4d57c3,_0x465eba){const _0x42565a=_0x296b36;this[_0x42565a(0x17c)](_0x42565a(0x1d3),[_0x4d57c3,_0x465eba]);}async[_0x296b36(0x1a0)](_0x17a56e,_0x1fdb1d){const _0x40042a={_0x1d2d0b:0x1a0},_0x505a9d=_0x296b36;this[_0x505a9d(0x17c)](_0x505a9d(_0x40042a._0x1d2d0b),[_0x17a56e,_0x1fdb1d]);}async[_0x296b36(0x1bd)](_0x417253,_0x4895d6){const _0x36f643=_0x296b36;this[_0x36f643(0x17c)](_0x36f643(0x1bd),[_0x417253,_0x4895d6]);}async[_0x296b36(0x194)](_0x265f32){const _0x166b94={_0x339d8c:0x17c,_0x5d92a9:0x194},_0x4c5e34=_0x296b36;this[_0x4c5e34(_0x166b94._0x339d8c)](_0x4c5e34(_0x166b94._0x5d92a9),[_0x265f32]);}async[_0x296b36(0x1ef)](_0x234efd,_0x2e2032){const _0x17bb70={_0xf3f622:0x1e4},_0x249e99=_0x296b36;this[_0x249e99(0x17c)]('goto',[_0x234efd,_0x2e2032]),this[_0x249e99(_0x17bb70._0xf3f622)]=_0x234efd;}async[_0x296b36(0x1d0)](_0x261dc2){const _0x4b4af0={_0x261f4a:0x1d0},_0xd75d65=_0x296b36;this[_0xd75d65(0x17c)](_0xd75d65(_0x4b4af0._0x261f4a),[_0x261dc2]);}async['goBack'](_0x13c9e1){const _0x227cf={_0x4aef97:0x17c,_0x40422d:0x19c},_0xc91637=_0x296b36;this[_0xc91637(_0x227cf._0x4aef97)](_0xc91637(_0x227cf._0x40422d),[_0x13c9e1]);}async[_0x296b36(0x18d)](_0x4b99be){const _0x5716d6=_0x296b36;this[_0x5716d6(0x17c)](_0x5716d6(0x18d),[_0x4b99be]);}async[_0x296b36(0x1de)](_0x3601ef){const _0x5c6dcc={_0x67dbd3:0x1de},_0x50f6a3=_0x296b36;return this['record'](_0x50f6a3(_0x5c6dcc._0x67dbd3),[_0x3601ef]),void 0x0;}async[_0x296b36(0x183)](_0x1432c4,_0x933df1){const _0x64e510={_0x137d10:0x17c},_0x1507f3=_0x296b36;return this[_0x1507f3(_0x64e510._0x137d10)](_0x1507f3(0x183),[_0x1432c4,_0x933df1]),void 0x0;}async[_0x296b36(0x1c4)](_0x44dfed){const _0x479838={_0x4c1a42:0x17c},_0x361d00=_0x296b36;this[_0x361d00(_0x479838._0x4c1a42)]('inspectElement',[_0x44dfed]);if(_0x44dfed['steps'][_0x361d00(0x1b2)]!==0x1||_0x44dfed['steps'][0x0]['kind']!==_0x361d00(0x1ee))return null;const _0xc99efe=_0x44dfed[_0x361d00(0x18f)][0x0]['ref'],_0x12d4ce=this[_0x361d00(0x1da)][_0x361d00(0x17d)]?.[_0xc99efe];return _0x12d4ce??null;}async[_0x296b36(0x19a)](_0x250a65){const _0xa5b0d7={_0x2e9505:0x19a,_0x5f1dea:0x1ce},_0x2a4e66=_0x296b36;return this['record'](_0x2a4e66(_0xa5b0d7._0x2e9505),[_0x250a65]),Buffer[_0x2a4e66(0x176)](_0x2a4e66(_0xa5b0d7._0x5f1dea));}async[_0x296b36(0x185)](_0x2b19ef){const _0x13a361={_0xa02dc9:0x18e,_0x100be7:0x1ee,_0x25a25c:0x19d,_0x335ec6:0x1a1,_0x11d2ba:0x1cd},_0x51417a=_0x296b36;this[_0x51417a(0x17c)](_0x51417a(0x185),[_0x2b19ef]);if(_0x2b19ef[_0x51417a(0x18f)][_0x51417a(0x1b2)]===0x1&&_0x2b19ef['steps'][0x0][_0x51417a(_0x13a361._0xa02dc9)]==='ref'){const _0x1faaa5=_0x2b19ef['steps'][0x0][_0x51417a(_0x13a361._0x100be7)];return this[_0x51417a(0x1da)][_0x51417a(_0x13a361._0x25a25c)]?.[_0x1faaa5]??_0x51417a(_0x13a361._0x335ec6)+_0x1faaa5+_0x51417a(0x190);}return _0x51417a(_0x13a361._0x11d2ba);}},FakeContext=class{constructor(_0x596efe,_0x460b56,_0xb2bcaa){const _0x33e95b={_0xe3b909:0x1be,_0x2b8a29:0x1dd,_0x1d36b3:0x180,_0x3158e6:0x193},_0x5a2aba=_0x296b36;this[_0x5a2aba(_0x33e95b._0xe3b909)]=_0x596efe,this[_0x5a2aba(0x1da)]=_0x460b56,this[_0x5a2aba(0x178)]=_0xb2bcaa;const _0x5bbc2b=new FakePage(_0x596efe,_0x460b56,_0xb2bcaa+_0x5a2aba(_0x33e95b._0x2b8a29),_0x460b56[_0x5a2aba(0x1e7)]??_0x5a2aba(0x192));_0x460b56['popupOnClick']&&(_0x5bbc2b[_0x5a2aba(_0x33e95b._0x1d36b3)]=()=>{const _0x2dba7b=_0x5a2aba;this['emitFakePopup'](_0x460b56[_0x2dba7b(0x1db)]);}),this[_0x5a2aba(0x195)]=[_0x5bbc2b],this['localStorageState']={..._0x460b56[_0x5a2aba(0x17b)]??{}},this[_0x5a2aba(_0x33e95b._0x3158e6)]={..._0x460b56[_0x5a2aba(0x1c0)]??{}};}[_0x296b36(0x1be)];[_0x296b36(0x1da)];[_0x296b36(0x178)];static{__name(this,_0x296b36(0x1d8));}[_0x296b36(0x195)];[_0x296b36(0x1bb)]=0x0;[_0x296b36(0x1a6)]=[];['localStorageState'];[_0x296b36(0x193)];[_0x296b36(0x1af)]=new Set();[_0x296b36(0x17c)](_0x121ef5,_0x4f9530){const _0x38ae7f={_0x47f092:0x1be,_0x504274:0x1ae,_0x43990d:0x178},_0x3b036a=_0x296b36;this[_0x3b036a(_0x38ae7f._0x47f092)][_0x3b036a(_0x38ae7f._0x504274)]({'scope':this[_0x3b036a(_0x38ae7f._0x43990d)],'method':_0x121ef5,'args':_0x4f9530});}[_0x296b36(0x1b9)](){const _0x31b768={_0x45bf90:0x195},_0x854c43=_0x296b36;return this[_0x854c43(_0x31b768._0x45bf90)];}[_0x296b36(0x1b5)](){const _0x3a144c={_0x48ad9c:0x1bb},_0xaba19a=_0x296b36,_0x3defbe=this[_0xaba19a(0x195)][this[_0xaba19a(_0x3a144c._0x48ad9c)]];if(!_0x3defbe)throw new DriverError(_0xaba19a(0x1e9),{'activeIdx':this['activeIdx']});return _0x3defbe;}[_0x296b36(0x1d1)](){const _0x5cb641={_0x11725c:0x1da},_0x5af691=_0x296b36;return this[_0x5af691(_0x5cb641._0x11725c)]['consoleEntries']??[];}[_0x296b36(0x1d6)](){const _0xdd7713={_0x3980a0:0x1d6},_0x5dbd2a=_0x296b36;return this[_0x5dbd2a(0x1da)][_0x5dbd2a(_0xdd7713._0x3980a0)]??[];}async[_0x296b36(0x1eb)](_0x1174e0){const _0x589e17={_0x5dfc8d:0x1eb,_0x592cb2:0x195,_0x531c40:0x1b2},_0x1d2645=_0x296b36;this[_0x1d2645(0x17c)](_0x1d2645(_0x589e17._0x5dfc8d),[_0x1174e0]);if(_0x1174e0<0x0||_0x1174e0>=this[_0x1d2645(_0x589e17._0x592cb2)][_0x1d2645(0x1b2)])throw new DriverError(_0x1d2645(0x1c6),{'index':_0x1174e0,'available':this[_0x1d2645(_0x589e17._0x592cb2)][_0x1d2645(0x1b2)]});this[_0x1d2645(0x1bb)]=_0x1174e0,this[_0x1d2645(0x1a6)][_0x1d2645(_0x589e17._0x531c40)]=0x0;}[_0x296b36(0x19b)](_0x17b6e6){const _0x54a300={_0xb71e22:0x1af,_0x5c1a39:0x1e1},_0x64d341={_0x526a32:0x188},_0x2038d9=_0x296b36;return this[_0x2038d9(_0x54a300._0xb71e22)][_0x2038d9(_0x54a300._0x5c1a39)](_0x17b6e6),()=>{const _0xf5414f=_0x2038d9;this['newPageListeners'][_0xf5414f(_0x64d341._0x526a32)](_0x17b6e6);};}['emitFakePopup'](_0x57d7aa){const _0x2d2b35={_0x5830dd:0x1b2,_0x46ad67:0x195,_0x39d5f5:0x195},_0x33b49a=_0x296b36,_0x342457=this['scope']+_0x33b49a(0x1b3)+this['pageList'][_0x33b49a(_0x2d2b35._0x5830dd)],_0x55984f=new FakePage(this['recorder'],this[_0x33b49a(0x1da)],_0x342457,_0x57d7aa);this[_0x33b49a(_0x2d2b35._0x46ad67)]['push'](_0x55984f);const _0x22f01c=this[_0x33b49a(_0x2d2b35._0x39d5f5)]['length']-0x1;for(const _0x55433c of this['newPageListeners']){try{_0x55433c({'index':_0x22f01c,'url':_0x57d7aa});}catch{}}return _0x22f01c;}async['enterFrame'](_0x540d0d){const _0x540a7e={_0x2d741a:0x18f},_0x236a28=_0x296b36;this[_0x236a28(0x17c)]('enterFrame',[_0x540d0d]);if(!_0x540d0d[_0x236a28(_0x540a7e._0x2d741a)][_0x236a28(0x1b2)])throw new LocatorError(_0x236a28(0x1ea),{'locator':_0x540d0d});this[_0x236a28(0x1a6)]['push'](_0x540d0d);}async[_0x296b36(0x1ed)](){const _0x5028d8={_0x32d1a3:0x1a6,_0x41528f:0x1dc},_0x24b79a=_0x296b36;this['record'](_0x24b79a(0x1ed),[]);if(this[_0x24b79a(0x1a6)][_0x24b79a(0x1b2)]===0x0)throw new DriverError(_0x24b79a(0x181),{});this[_0x24b79a(_0x5028d8._0x32d1a3)][_0x24b79a(_0x5028d8._0x41528f)]();}async[_0x296b36(0x1ec)](_0x46cff9,_0x32fa7f){const _0x1c64f8=_0x296b36;this['record']('setLocalStorage',[_0x46cff9,_0x32fa7f]),this[_0x1c64f8(0x1cc)][_0x46cff9]=_0x32fa7f;}async['getLocalStorage'](_0x29108d){const _0x5cb508={_0x58c12d:0x1d7,_0x230543:0x1cc},_0x44b3ea=_0x296b36;return this['record'](_0x44b3ea(_0x5cb508._0x58c12d),[_0x29108d]),this[_0x44b3ea(_0x5cb508._0x230543)][_0x29108d]??null;}async[_0x296b36(0x182)](_0x4b2941,_0x4705d0,_0x57ad57){const _0x1220a6=_0x296b36;this[_0x1220a6(0x17c)]('setCookie',[_0x4b2941,_0x4705d0,_0x57ad57]),this[_0x1220a6(0x193)][_0x4b2941]=_0x4705d0;}async[_0x296b36(0x17e)](_0x1e30dd){const _0x2258c1=_0x296b36;return this[_0x2258c1(0x17c)](_0x2258c1(0x17e),[_0x1e30dd]),this['cookieState'][_0x1e30dd]??null;}async[_0x296b36(0x1d9)](_0x302e58){const _0x1a6c3d={_0x5d5cf7:0x17c},_0x2bdd07=_0x296b36;this[_0x2bdd07(_0x1a6c3d._0x5d5cf7)](_0x2bdd07(0x1d9),[_0x302e58]);}async[_0x296b36(0x1de)](_0x5804b1){const _0x54319f={_0x3cf509:0x17c,_0x16bdac:0x1de},_0x40504b=_0x296b36;return this[_0x40504b(_0x54319f._0x3cf509)](_0x40504b(_0x54319f._0x16bdac),[_0x5804b1]),void 0x0;}async[_0x296b36(0x1c3)](){const _0x16a2a2={_0x1c041e:0x17c},_0x2f6356=_0x296b36;this[_0x2f6356(_0x16a2a2._0x1c041e)](_0x2f6356(0x1c3),[]);}[_0x296b36(0x1c9)](){return this['frameStack']['length'];}},FakeWebDriver=class{constructor(_0x43bffb={}){const _0x4fc00d=_0x296b36;this['behavior']=_0x43bffb,this[_0x4fc00d(0x1be)]=createRecorder();}[_0x296b36(0x1da)];static{__name(this,'FakeWebDriver');}['launched']=![];[_0x296b36(0x1be)];['contexts']=[];async[_0x296b36(0x18a)](_0xf1bb92){const _0x5d92ca={_0x2e0b32:0x1ae,_0x2b6e4e:0x1c8},_0x4378ca=_0x296b36;this[_0x4378ca(0x1be)][_0x4378ca(_0x5d92ca._0x2e0b32)]({'scope':_0x4378ca(_0x5d92ca._0x2b6e4e),'method':_0x4378ca(0x18a),'args':[_0xf1bb92]}),this[_0x4378ca(0x17a)]=!![];}async[_0x296b36(0x17f)](_0x29b9bb){const _0x1797b5={_0x4cea79:0x1be,_0x3fd0c2:0x1c8,_0x60ae0d:0x1ba,_0x46b381:0x1da,_0x235707:0x1ca},_0x490369=_0x296b36;this[_0x490369(_0x1797b5._0x4cea79)][_0x490369(0x1ae)]({'scope':_0x490369(_0x1797b5._0x3fd0c2),'method':'newContext','args':[_0x29b9bb]});if(!this[_0x490369(0x17a)])throw new DriverError(_0x490369(_0x1797b5._0x60ae0d),{});const _0x3beb02=new FakeContext(this[_0x490369(0x1be)],this[_0x490369(_0x1797b5._0x46b381)],_0x490369(_0x1797b5._0x235707)+this[_0x490369(0x1b8)][_0x490369(0x1b2)]);return this[_0x490369(0x1b8)]['push'](_0x3beb02),_0x3beb02;}async[_0x296b36(0x1c3)](){const _0xcf2792={_0xe3ffd4:0x1be,_0xfaa763:0x1ae},_0x470f06=_0x296b36;this[_0x470f06(_0xcf2792._0xe3ffd4)][_0x470f06(_0xcf2792._0xfaa763)]({'scope':'driver','method':_0x470f06(0x1c3),'args':[]}),this[_0x470f06(0x17a)]=![];}[_0x296b36(0x186)](){return void 0x0;}async['connectShared'](){const _0x5cc900={_0x7e6102:0x191},_0x153802=_0x296b36;throw new DriverError(_0x153802(_0x5cc900._0x7e6102),{});}[_0x296b36(0x1e8)](){throw new DriverError('attachExisting\x20not\x20supported\x20by\x20FakeWebDriver',{});}[_0x296b36(0x1e5)](){const _0x2b8c09=_0x296b36;return this[_0x2b8c09(0x1be)]['calls']();}[_0x296b36(0x1bc)](_0x93af25){const _0x14e683=_0x296b36;return this['recorder'][_0x14e683(0x1e5)]()[_0x14e683(0x1a9)](_0x52133d=>_0x52133d[_0x14e683(0x1d4)]===_0x93af25);}};export{FakeWebDriver};
|
package/dist/dsl/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { i as LocatorValue, W as WebDriver, D as DriverContext, d as DriverPage } from '../interfaces-dbZG10RS.js';
|
|
2
|
+
export { j as LocatorStep, k as appendStep, l as describeLocator, m as isLocatorValue, r as rootedAt } from '../interfaces-dbZG10RS.js';
|
|
3
3
|
import { Matcher, RegexLiteral } from '@unotest/protocol';
|
|
4
4
|
import { Statement, BlockStatement } from '@unotest/dsl';
|
|
5
5
|
import { SandboxConfig } from '../config/schema.js';
|
|
6
|
-
export { L as LintDiagnostic,
|
|
6
|
+
export { L as LintDiagnostic, b as LintOptions, a as LintSeverity, l as lintAst } from '../linter-CM2CpIyW.js';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
9
9
|
/** Test/codegen convenience: build a RegexLiteral inline. The DSL
|
|
@@ -175,6 +175,10 @@ interface TestRuntimeDeps {
|
|
|
175
175
|
/** External variable store (`unotest/.env` + `.secrets`). Resolves bare
|
|
176
176
|
* UPPER_SNAKE identifiers. Defaults to an empty store when omitted. */
|
|
177
177
|
readonly variables?: VariableStore;
|
|
178
|
+
/** Resolved base URL (`config.baseUrl`, auto-wired from APP_BASE_URL). Used
|
|
179
|
+
* to fail a relative `goto('/path')` with a clear message when no base is
|
|
180
|
+
* configured, instead of an opaque Playwright "invalid URL". */
|
|
181
|
+
readonly baseUrl?: string;
|
|
178
182
|
/** Injectable clock — defaults to Date.now. Tests pass a fake. */
|
|
179
183
|
readonly nowFn?: () => number;
|
|
180
184
|
}
|
|
@@ -184,6 +188,7 @@ declare class TestRuntime {
|
|
|
184
188
|
readonly context: DriverContext;
|
|
185
189
|
readonly logger: Logger;
|
|
186
190
|
readonly sandbox: SandboxConfig;
|
|
191
|
+
readonly baseUrl?: string;
|
|
187
192
|
private readonly variables;
|
|
188
193
|
private readonly nowFn;
|
|
189
194
|
private readonly scope;
|
|
@@ -331,6 +336,13 @@ declare class TestRuntimeManager {
|
|
|
331
336
|
resume(id: string): Promise<ExecutionEvent | RunResult>;
|
|
332
337
|
abort(id: string): Promise<void>;
|
|
333
338
|
inspect(id: string): RuntimeSnapshot;
|
|
339
|
+
/** The live active page of a runtime — used by the locator picker to
|
|
340
|
+
* attach its overlay to the page held open during a debug pause.
|
|
341
|
+
* Returns null when the runtime is gone or has no page yet. */
|
|
342
|
+
currentPage(id: string): DriverPage | null;
|
|
343
|
+
/** The runtime's driver context (for capture artifacts — console/network).
|
|
344
|
+
* Null when the runtime isn't registered. */
|
|
345
|
+
currentContext(id: string): DriverContext | null;
|
|
334
346
|
list(): RuntimeSummary[];
|
|
335
347
|
private armTtl;
|
|
336
348
|
private clearTtl;
|