@unotest/web 0.9.1 → 0.10.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/skills/write-e2e-test/SKILL.md +115 -38
- package/.claude/skills/write-e2e-test-ground/SKILL.md +784 -0
- package/CHANGELOG.md +175 -0
- package/dist/config/schema.d.ts +29 -10
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +5 -2
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +19 -3
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/inspection/page-inject.d.ts +11 -35
- package/dist/inspection/page-inject.js +173 -1032
- package/dist/{interfaces-dbZG10RS.d.ts → interfaces-BxviHxnr.d.ts} +42 -3
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.js +1 -1
- package/dist/runner/init/chrome-probe.js +1 -1
- 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.js +1 -1
- package/dist/runner/serve-fixture.js +1 -1
- package/dist/runner/web-runner-adapter.js +1 -1
- package/guides/agent-integration.md +103 -2
- package/guides/dsl-reference.md +139 -13
- package/package.json +18 -9
- package/src/mcp/prompts/agent-test-author.md +59 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,181 @@ 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.10.0] - 2026-08-06
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- 7ed750c: API-setup primitives for pure-`_helpers/` test setup (multi-host RAG
|
|
13
|
+
smoke flows and similar):
|
|
14
|
+
|
|
15
|
+
- `apiCall(method, path, body?, headers?, options?)` gains
|
|
16
|
+
`{base: 'API_BASE_X'}` — the NAME of a `unotest/.env` variable holding
|
|
17
|
+
an http(s) base URL. Default behavior (path against
|
|
18
|
+
`sandbox.apiBaseUrl`) is unchanged; URLs still never appear in
|
|
19
|
+
scenarios.
|
|
20
|
+
- `apiCall` multipart upload: a body of the exact shape
|
|
21
|
+
`{file, field?, fields?}` posts `multipart/form-data` via
|
|
22
|
+
`fetch`+`FormData`. The path is relative and confined to
|
|
23
|
+
`sandbox.uploadDir` (new optional config field; defaults to the
|
|
24
|
+
project root) — absolute paths and `../` escapes throw, and a manual
|
|
25
|
+
`Content-Type` header with a multipart body is rejected.
|
|
26
|
+
- DSL validator now allows `break` inside loop bodies
|
|
27
|
+
(`break-outside-loop` error elsewhere) and index access on data
|
|
28
|
+
variables (`docs[0].objectsCount`); indexing a Locator is rejected as
|
|
29
|
+
`locator-index-access`, and `while` / `do…while` / `continue` /
|
|
30
|
+
`arr[i] = v` stay unsupported. Parser and executor already supported
|
|
31
|
+
these forms; only validation changed.
|
|
32
|
+
|
|
33
|
+
- b5b9710: Assert steps ground as whole units. `Intent.prefer` gains `"unit"`: the
|
|
34
|
+
grounder returns the semantic unit itself (heading / record / text) and
|
|
35
|
+
suppresses the record→control hop — the profile for read-only targets.
|
|
36
|
+
Web assert actions (`assert_text/visible/hidden/value/count`) declare
|
|
37
|
+
`intentTarget: "unit"` on their plugins, and the intent resolver
|
|
38
|
+
materializes a DOM ref for unit resolutions via the new
|
|
39
|
+
`materializeRefScript(nodeId)` (grounder-client dom-walker): one lazy
|
|
40
|
+
attribute write on the unit's own element, reused by later captures.
|
|
41
|
+
Previously an assert intent like "the page heading" was rejected with a
|
|
42
|
+
RECORD error and forced a `find_element` detour. Control-target errors
|
|
43
|
+
now name the unit kind correctly (heading / record / text block) and
|
|
44
|
+
point at assert steps for check-not-click intents.
|
|
45
|
+
|
|
46
|
+
Materialized record containers now resolve to a stable locator. A record
|
|
47
|
+
row / card / tree-item (`<li>`, `<tr>`, `<article>`) carries no accessible
|
|
48
|
+
name of its own — its text lives in children — so `RefResolver` gains a
|
|
49
|
+
container strategy: `getByRole(role).filter({hasText})`, keyed off the
|
|
50
|
+
container's short descendant text (capped so a whole table is never
|
|
51
|
+
captured) and verified for uniqueness + ref identity. Fixes `assert_visible`
|
|
52
|
+
on a grounded tree item failing with `no stable identifier`.
|
|
53
|
+
|
|
54
|
+
- c7b7b50: `assertValue` on a checkbox / radio / switch now asserts its **checked
|
|
55
|
+
state** instead of the DOM `value`. Their value is the submitted payload
|
|
56
|
+
(`"on"` by default) and is identical whether the box is ticked or not, so
|
|
57
|
+
the old behaviour made a correct test fail on DOM trivia (live agent run:
|
|
58
|
+
`assertValue(checkbox, "true")` → `expected "true", got "on"`).
|
|
59
|
+
|
|
60
|
+
Pass `'true'` / `'false'`; any other expectation on a checkable element is
|
|
61
|
+
rejected with a usage error naming the rule. Text inputs, textareas and
|
|
62
|
+
selects are unchanged. Applies to the `assert_value` MCP action too.
|
|
63
|
+
|
|
64
|
+
**Migration:** a test asserting the literal payload —
|
|
65
|
+
`assertValue(checkbox, 'on')` — now fails with that usage error. Assert
|
|
66
|
+
the state (`'true'`) instead; to read the raw attribute use
|
|
67
|
+
`getAttribute(loc, 'value')`.
|
|
68
|
+
|
|
69
|
+
The `WebDriver` page contract gains `checkedState(loc)` (`boolean | null`,
|
|
70
|
+
null for non-checkable elements) — relevant to custom driver
|
|
71
|
+
implementations.
|
|
72
|
+
|
|
73
|
+
`assert_value` also grounds intent locators as a **control** now
|
|
74
|
+
(`intentTarget: "control"`). Under the previous `"unit"` profile an
|
|
75
|
+
intent like "selection checkbox of the Pending row" resolved to the ROW,
|
|
76
|
+
materialized a ref on the `<tr>`, and failed with `Node is not an
|
|
77
|
+
<input>`. The read-only asserts (`assert_text` / `assert_visible` /
|
|
78
|
+
`assert_hidden` / `assert_count`) keep the unit profile.
|
|
79
|
+
|
|
80
|
+
- 7ed750c: Chat-feed-friendly wait primitives (ai-support plan, tasks 5–6):
|
|
81
|
+
|
|
82
|
+
- `waitForText` now waits for ≥1 VISIBLE occurrence instead of failing
|
|
83
|
+
strict mode on duplicated text; `{first: true}` becomes a no-op.
|
|
84
|
+
New `{exact: true}` option and regex matchers
|
|
85
|
+
(`waitForText(/\bhi\b/)`) fix substring-inside-a-word false matches.
|
|
86
|
+
- New `waitForCount(loc, n, {timeout, exact})` DSL primitive and
|
|
87
|
+
`wait_for_count` explore action: polls until the locator matches at
|
|
88
|
+
least `n` elements (exactly `n` with `{exact: true}`) — the "wait for
|
|
89
|
+
reply №N" pattern without index locators; counts as a verification
|
|
90
|
+
step for autoRun / NO_VERIFICATION.
|
|
91
|
+
|
|
92
|
+
- 65eb77c: Shared injected DOM helpers: one `createDomHelpers()` factory (visibility, ARIA roles, W3C accname, state flags, ref minting) now backs the grounder-client DOM walker and the web snapshot/find algorithms, composed into the page by `composeInjectedScript` — replaces four hand-maintained copies of the same in-page logic.
|
|
93
|
+
|
|
94
|
+
**Breaking (`@unotest/grounder-client`):** `captureRawTree` takes the helpers object as its first parameter, so passing it straight to `page.evaluate(captureRawTree)` no longer works (evaluate arguments are JSON-serialized and cannot carry the helpers). Migration: inject the serialized script instead — `page.evaluate(domWalkerScript())` — which composes the helpers automatically. New exports: `createDomHelpers`, `composeInjectedScript`, `InjectedDomHelpers`, `DomHelperOptions`, `InjectedScriptOptions`.
|
|
95
|
+
|
|
96
|
+
`@unotest/web` behavior deltas from unifying on the walker's ARIA mapping: `get_aria_snapshot` now maps `dl` to `list` (`dt`/`dd` stay name-only) and `tbody`/`thead`/`tfoot` to `rowgroup`, and never names structural containers from their text content; `find_element` matches against the full W3C accname (label-for lookup, composed multi-child names) instead of a reduced approximation.
|
|
97
|
+
|
|
98
|
+
- 0d31a8e: Recorded assertions and one-call test authoring in exploration mode. Six new recordable actions — `assert_text`, `assert_visible`, `assert_hidden`, `assert_value`, `assert_count`, `assert_url` — available in `explore_step`, `explore_steps` and `explore_record`; they execute live through the same poll-until-timeout cores as the runtime `assertText(...)` family (extracted to `dsl/assert-core.ts`), so a recorded assert has already passed against the real page and the generated DSL carries the matching assert lines. Assert steps count as verification for the `NO_VERIFICATION` save gate. New `autoRun: true` flag on `explore_steps` (requires `explorationId`): when every step succeeds, a verification step is recorded, the draft has no blocking warnings (`FRAGILE_LOCATOR` is informational — it passes and rides along in the reply; `DYNAMIC_TEXT` / `NO_DSL_PRIMITIVE` block, mirroring save's policy) and the target file is new, the same call stops the session, saves `unotest/e2e/<scenarioName>.js`, resets the browser context and runs the test with `run_test` semantics (`autoRun.run.next.outcome`); any gate failure degrades to `autoRun.status: "skipped"` + reason with the session left active. The green happy-path shrinks to `new_context` → `explore_start` → `explore_steps {…, autoRun: true}`. `UNOTEST_TOOLSET=core` unchanged — asserts are actions, not tools.
|
|
99
|
+
- 2b2c957: Two MCP round-trips removed from every authoring flow.
|
|
100
|
+
|
|
101
|
+
`explore_step` / `explore_steps` now reply with `url` whenever the step
|
|
102
|
+
CHANGED the page address — the same cure `groundedTo` gave intents, applied to
|
|
103
|
+
navigation: after a batch the agent reads where it ended up instead of spending
|
|
104
|
+
a call on `get_active_context` / `get_url`. Unchanged addresses print nothing,
|
|
105
|
+
so a batch of ten clicks on one page adds no lines.
|
|
106
|
+
|
|
107
|
+
`explore_start` opens the browser context itself when none is open, so the
|
|
108
|
+
`new_context` prologue is gone from the happy path. `new_context` keeps its
|
|
109
|
+
role as the explicit RESET (between the recording and the first run, and inside
|
|
110
|
+
`autoRun`); an existing or attached collaborative context is never re-created.
|
|
111
|
+
|
|
112
|
+
- 9f80b38: Steps whose locator was an intent now report `groundedTo` — the element
|
|
113
|
+
line the grounder resolved it to (`checkbox "Select row R-00147" (in row
|
|
114
|
+
"Row R-00147: … Pending …")`), per locator argument. Present on
|
|
115
|
+
`explore_step`, every step of an `explore_steps` batch, and
|
|
116
|
+
`explore_record`.
|
|
117
|
+
|
|
118
|
+
Until now a step's reply said only `executed / recorded / success`, so an
|
|
119
|
+
agent could not tell WHICH element a positional intent hit without a
|
|
120
|
+
separate `ground_element` probe — grounding the same intent twice. A live
|
|
121
|
+
run spent 4 extra calls and doubled grounder time doing exactly that. The
|
|
122
|
+
skill and the tool descriptions now point at `groundedTo` instead.
|
|
123
|
+
|
|
124
|
+
- 7ed750c: New `screenshot(name?, {fullPage?})` DSL command — on-demand PNG capture
|
|
125
|
+
of the active page into `unotest/.runs/<runId>/screenshot/<NNN>-<name>.png`
|
|
126
|
+
(returns the project-relative path). Evidence tool for green runs: fixes
|
|
127
|
+
what the page actually looked like at a chosen point. Each capture is
|
|
128
|
+
also mirrored as a `screenshot` RunArtifact event, so the viewer's event
|
|
129
|
+
stream links to it. In runtimes with no artifact dir (exploration) the
|
|
130
|
+
call logs a warning and returns `null` instead of failing the run.
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- 30c491b: The `write-e2e-test-ground` skill now records batch-first: when the task brief already spells out the step sequence, Phase 2 sends it as one `explore_steps` call (goto included, intent locators ground at execution time) instead of one `explore_step` per action, with a repair recipe for mid-batch failures. A/B across four eval tasks showed equal-or-better scores with fewer calls, lower cost, and 9–38% less agent time. The snapshot-mode skill is unchanged — its ref discipline requires a snapshot before locator steps, so pre-discovery batching does not apply.
|
|
135
|
+
- 574841f: Dedup pass across the tree (jscpd 0 clones, ratchet threshold 0). New public export in `@unotest/grounder-client`: `intEnvInRange(env, name, def, min, max)` — the `UNOTEST_GROUNDER_*` integer-env parser shared by the consumer side and the grounder server. Everything else is internal refactoring with no behavior change: protocol gains a shared fs-safe-name validator behind `validateCollectionName` / `validateSegmentName` and a shared env-file assignment iterator; core's `RuntimeInspection` becomes a `Pick` of `RuntimeStateFile`; dsl's `ExecutionWalker` threads one `WalkCtx` object instead of an eight-argument clump and AST nodes use constructor parameter properties; web deduplicates the MCP tool scaffolds, action plugins, DSL contracts, perception LRU caches, and semantic-dom grouping passes.
|
|
136
|
+
- 080ea5a: Grounder infra resilience. The MCP server now runs a cheap grounder
|
|
137
|
+
reachability ping at startup when `UNOTEST_GROUNDER_MODE` is `local` or
|
|
138
|
+
`remote` (`/api/tags` for local ollama, `/health` for a remote grounding
|
|
139
|
+
server) — non-blocking, warning-only. Network-level failures on the
|
|
140
|
+
intent / `ground_element` path are wrapped into a typed
|
|
141
|
+
`GrounderUnreachableError` citing the backend URL, a mode-specific fix
|
|
142
|
+
hint and the boot-time health verdict, instead of surfacing undici's raw
|
|
143
|
+
`fetch failed`. The ground-mode skill now spells out the exact fallback
|
|
144
|
+
recipe: a single `{kind:"intent"}` step, the `ref` from `find_element`,
|
|
145
|
+
or the ready-made `locator` object from `ground_element` — hand-assembled
|
|
146
|
+
`getByRole`/`css` locators are rejected in recording mode.
|
|
147
|
+
- Updated dependencies [7324966]
|
|
148
|
+
- Updated dependencies [7ed750c]
|
|
149
|
+
- Updated dependencies [b5b9710]
|
|
150
|
+
- Updated dependencies [574841f]
|
|
151
|
+
- Updated dependencies [65eb77c]
|
|
152
|
+
- Updated dependencies [f106cf8]
|
|
153
|
+
- Updated dependencies [856f087]
|
|
154
|
+
- Updated dependencies [78f850f]
|
|
155
|
+
- Updated dependencies [1bd55ba]
|
|
156
|
+
- Updated dependencies [337a31c]
|
|
157
|
+
- @unotest/grounder-client@0.10.0
|
|
158
|
+
- @unotest/dsl@0.10.0
|
|
159
|
+
- @unotest/protocol@0.10.0
|
|
160
|
+
- @unotest/core@0.10.0
|
|
161
|
+
- @unotest/viewer@0.10.0
|
|
162
|
+
|
|
163
|
+
## [0.9.2] - 2026-06-16
|
|
164
|
+
|
|
165
|
+
### Added
|
|
166
|
+
|
|
167
|
+
- **Run snapshot export.** A finished run can be exported as a portable
|
|
168
|
+
`*.unotest.zip` bundle (events + captured artifacts) for a teammate to open in
|
|
169
|
+
their own viewer. The runner now records `console` / `network` capture flags in
|
|
170
|
+
the run manifest so a re-rendered snapshot shows "capture was off" rather than an
|
|
171
|
+
empty console, and `unotest/.snapshots/` is added to the generated `.gitignore`.
|
|
172
|
+
|
|
173
|
+
### Fixed
|
|
174
|
+
|
|
175
|
+
- **Locator picker survives navigation and reaches into shadow DOM.** A navigation
|
|
176
|
+
that tore down the JS context mid-drain now surfaces as a typed
|
|
177
|
+
`ExecutionContextDestroyedError`, so the picker overlay reports not-alive and
|
|
178
|
+
self-heals (re-stamp refs + re-inject) instead of logging a dead end. Hit-testing
|
|
179
|
+
descends through open shadow roots and ref-lookup climbs back out across shadow
|
|
180
|
+
boundaries, keeping the picked element and its stamped ref symmetric with the
|
|
181
|
+
snapshot capture.
|
|
182
|
+
|
|
8
183
|
## [0.9.1] - 2026-06-14
|
|
9
184
|
|
|
10
185
|
### Added
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -121,16 +121,23 @@ declare const SandboxConfigSchema: z.ZodObject<{
|
|
|
121
121
|
database: z.ZodOptional<z.ZodString>;
|
|
122
122
|
/** Base URL for `apiCall(method, path, body?, headers?)`. The path
|
|
123
123
|
* passed to `apiCall` MUST be relative (starts with `/`); absolute
|
|
124
|
-
* URLs are rejected at runtime.
|
|
124
|
+
* URLs are rejected at runtime. Additional bases come from env
|
|
125
|
+
* variables via `apiCall(..., {base: "API_BASE_X"})`. */
|
|
125
126
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
127
|
+
/** Root for `apiCall` multipart `{file}` fixtures. Relative upload
|
|
128
|
+
* paths resolve against it and may not escape it. Defaults to the
|
|
129
|
+
* project root (the runner's cwd). */
|
|
130
|
+
uploadDir: z.ZodOptional<z.ZodString>;
|
|
126
131
|
}, "strip", z.ZodTypeAny, {
|
|
127
132
|
shellCwd?: string | undefined;
|
|
128
133
|
database?: string | undefined;
|
|
129
134
|
apiBaseUrl?: string | undefined;
|
|
135
|
+
uploadDir?: string | undefined;
|
|
130
136
|
}, {
|
|
131
137
|
shellCwd?: string | undefined;
|
|
132
138
|
database?: string | undefined;
|
|
133
139
|
apiBaseUrl?: string | undefined;
|
|
140
|
+
uploadDir?: string | undefined;
|
|
134
141
|
}>;
|
|
135
142
|
type SandboxConfig = z.infer<typeof SandboxConfigSchema>;
|
|
136
143
|
declare const WebServerConfigSchema: z.ZodObject<{
|
|
@@ -150,13 +157,13 @@ declare const WebServerConfigSchema: z.ZodObject<{
|
|
|
150
157
|
/** How long to wait for the URL to come up after spawning. */
|
|
151
158
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
152
159
|
}, "strip", z.ZodTypeAny, {
|
|
153
|
-
command: string;
|
|
154
160
|
url: string;
|
|
161
|
+
command: string;
|
|
155
162
|
reuseExistingServer: boolean;
|
|
156
163
|
timeoutMs: number;
|
|
157
164
|
}, {
|
|
158
|
-
command: string;
|
|
159
165
|
url: string;
|
|
166
|
+
command: string;
|
|
160
167
|
reuseExistingServer?: boolean | undefined;
|
|
161
168
|
timeoutMs?: number | undefined;
|
|
162
169
|
}>;
|
|
@@ -184,13 +191,13 @@ declare const UnotestConfigSchema: z.ZodObject<{
|
|
|
184
191
|
/** How long to wait for the URL to come up after spawning. */
|
|
185
192
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
186
193
|
}, "strip", z.ZodTypeAny, {
|
|
187
|
-
command: string;
|
|
188
194
|
url: string;
|
|
195
|
+
command: string;
|
|
189
196
|
reuseExistingServer: boolean;
|
|
190
197
|
timeoutMs: number;
|
|
191
198
|
}, {
|
|
192
|
-
command: string;
|
|
193
199
|
url: string;
|
|
200
|
+
command: string;
|
|
194
201
|
reuseExistingServer?: boolean | undefined;
|
|
195
202
|
timeoutMs?: number | undefined;
|
|
196
203
|
}>>;
|
|
@@ -281,8 +288,11 @@ declare const UnotestConfigSchema: z.ZodObject<{
|
|
|
281
288
|
defaultTimeoutMs: z.ZodNumber;
|
|
282
289
|
/** Default timeout for navigation (goto / reload / waitForUrl) AND
|
|
283
290
|
* for click/doubleClick's post-action navigation wait. Real web
|
|
284
|
-
* pages routinely take 5–10s to fire `load
|
|
285
|
-
*
|
|
291
|
+
* pages routinely take 5–10s to fire `load`, and heavy legacy sites
|
|
292
|
+
* (bricklink-class) blow through 15s on a cold load — two live-run
|
|
293
|
+
* failures 2026-07-16 were correct waits that just ran out of budget.
|
|
294
|
+
* 30000ms trades slower failure on a misclick for not flaking on
|
|
295
|
+
* slow-but-correct navigation.
|
|
286
296
|
* Override via `UNOTEST_DEFAULT_NAVIGATION_TIMEOUT_MS`. */
|
|
287
297
|
defaultNavigationTimeoutMs: z.ZodNumber;
|
|
288
298
|
linter: z.ZodObject<{
|
|
@@ -310,16 +320,23 @@ declare const UnotestConfigSchema: z.ZodObject<{
|
|
|
310
320
|
database: z.ZodOptional<z.ZodString>;
|
|
311
321
|
/** Base URL for `apiCall(method, path, body?, headers?)`. The path
|
|
312
322
|
* passed to `apiCall` MUST be relative (starts with `/`); absolute
|
|
313
|
-
* URLs are rejected at runtime.
|
|
323
|
+
* URLs are rejected at runtime. Additional bases come from env
|
|
324
|
+
* variables via `apiCall(..., {base: "API_BASE_X"})`. */
|
|
314
325
|
apiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
326
|
+
/** Root for `apiCall` multipart `{file}` fixtures. Relative upload
|
|
327
|
+
* paths resolve against it and may not escape it. Defaults to the
|
|
328
|
+
* project root (the runner's cwd). */
|
|
329
|
+
uploadDir: z.ZodOptional<z.ZodString>;
|
|
315
330
|
}, "strip", z.ZodTypeAny, {
|
|
316
331
|
shellCwd?: string | undefined;
|
|
317
332
|
database?: string | undefined;
|
|
318
333
|
apiBaseUrl?: string | undefined;
|
|
334
|
+
uploadDir?: string | undefined;
|
|
319
335
|
}, {
|
|
320
336
|
shellCwd?: string | undefined;
|
|
321
337
|
database?: string | undefined;
|
|
322
338
|
apiBaseUrl?: string | undefined;
|
|
339
|
+
uploadDir?: string | undefined;
|
|
323
340
|
}>;
|
|
324
341
|
}, "strip", z.ZodTypeAny, {
|
|
325
342
|
browsers: ("chromium" | "firefox" | "webkit")[];
|
|
@@ -360,11 +377,12 @@ declare const UnotestConfigSchema: z.ZodObject<{
|
|
|
360
377
|
shellCwd?: string | undefined;
|
|
361
378
|
database?: string | undefined;
|
|
362
379
|
apiBaseUrl?: string | undefined;
|
|
380
|
+
uploadDir?: string | undefined;
|
|
363
381
|
};
|
|
364
382
|
baseUrl?: string | undefined;
|
|
365
383
|
webServer?: {
|
|
366
|
-
command: string;
|
|
367
384
|
url: string;
|
|
385
|
+
command: string;
|
|
368
386
|
reuseExistingServer: boolean;
|
|
369
387
|
timeoutMs: number;
|
|
370
388
|
} | undefined;
|
|
@@ -409,11 +427,12 @@ declare const UnotestConfigSchema: z.ZodObject<{
|
|
|
409
427
|
shellCwd?: string | undefined;
|
|
410
428
|
database?: string | undefined;
|
|
411
429
|
apiBaseUrl?: string | undefined;
|
|
430
|
+
uploadDir?: string | undefined;
|
|
412
431
|
};
|
|
413
432
|
baseUrl?: string | undefined;
|
|
414
433
|
webServer?: {
|
|
415
|
-
command: string;
|
|
416
434
|
url: string;
|
|
435
|
+
command: string;
|
|
417
436
|
reuseExistingServer?: boolean | undefined;
|
|
418
437
|
timeoutMs?: number | undefined;
|
|
419
438
|
} | undefined;
|
package/dist/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x2e344b=_0x8977;(function(_0x274a7d,_0xfc8b9d){var _0x244ac2={_0x4ac5bb:0xdd,_0x4ff88e:0xe4,_0x286156:0xe0,_0x4f3327:0xe8,_0x58371b:0xe1},_0x41182f=_0x8977,_0x5b93a8=_0x274a7d();while(!![]){try{var _0x1d56a7=-parseInt(_0x41182f(0xdf))/0x1*(-parseInt(_0x41182f(_0x244ac2._0x4ac5bb))/0x2)+-parseInt(_0x41182f(_0x244ac2._0x4ff88e))/0x3*(-parseInt(_0x41182f(0xc7))/0x4)+parseInt(_0x41182f(0xea))/0x5+parseInt(_0x41182f(_0x244ac2._0x286156))/0x6+-parseInt(_0x41182f(0xcc))/0x7+parseInt(_0x41182f(_0x244ac2._0x4f3327))/0x8*(parseInt(_0x41182f(0xfc))/0x9)+-parseInt(_0x41182f(_0x244ac2._0x58371b))/0xa;if(_0x1d56a7===_0xfc8b9d)break;else _0x5b93a8['push'](_0x5b93a8['shift']());}catch(_0x35c23d){_0x5b93a8['push'](_0x5b93a8['shift']());}}}(_0x19a6,0x37d44));import{z}from'zod';var BrowserSchema=z[_0x2e344b(0xfa)]([_0x2e344b(0xe3),_0x2e344b(0xcf),_0x2e344b(0xf9)]),BrowserChannelSchema=z[_0x2e344b(0xf3)]([z['literal'](_0x2e344b(0xca)),z[_0x2e344b(0xc6)](_0x2e344b(0xc9)),z[_0x2e344b(0xc6)](_0x2e344b(0xf5)),z[_0x2e344b(0xe9)]()])[_0x2e344b(0xec)](),ViewportSchema=z[_0x2e344b(0xd7)]({'width':z['number']()[_0x2e344b(0xee)]()[_0x2e344b(0xcb)](),'height':z[_0x2e344b(0xd1)]()[_0x2e344b(0xee)]()[_0x2e344b(0xcb)]()}),RetryReasonSchema=z[_0x2e344b(0xfa)](['transient',_0x2e344b(0xd6),_0x2e344b(0xef)]),RetryConfigSchema=z[_0x2e344b(0xd7)]({'count':z[_0x2e344b(0xd1)]()[_0x2e344b(0xee)]()[_0x2e344b(0x103)](0x0)['max'](0xa),'on':z[_0x2e344b(0xed)](RetryReasonSchema)}),FailureBundleConfigSchema=z[_0x2e344b(0xd7)]({'tier1':z[_0x2e344b(0xc6)](!![])[_0x2e344b(0xc5)](!![]),'tier2':z[_0x2e344b(0xdc)](),'tier3':z[_0x2e344b(0xd7)]({'network':z[_0x2e344b(0xdc)](),'video':z[_0x2e344b(0xdc)]()}),'retention':z['object']({'runs':z[_0x2e344b(0xd1)]()['int']()[_0x2e344b(0xcb)](),'days':z['number']()[_0x2e344b(0xee)]()['positive']()}),'storageDir':z[_0x2e344b(0x104)]()[_0x2e344b(0x103)](0x1)}),DialogPolicySchema=z[_0x2e344b(0xfa)]([_0x2e344b(0xd0),_0x2e344b(0xf1),_0x2e344b(0xde)]),LinterRuleIdSchema=z[_0x2e344b(0xfa)]([_0x2e344b(0xd5),'lint:xpath',_0x2e344b(0xf6),_0x2e344b(0xff),_0x2e344b(0xeb),_0x2e344b(0xfd),_0x2e344b(0xfb),_0x2e344b(0xe5),_0x2e344b(0xd4),_0x2e344b(0xf2),_0x2e344b(0xd2),_0x2e344b(0xe2),_0x2e344b(0xd3),'validator:meta-shape',_0x2e344b(0xc8),_0x2e344b(0xf0),_0x2e344b(0x100),_0x2e344b(0x101),_0x2e344b(0x102),_0x2e344b(0xcd),'validator:string-concat',_0x2e344b(0xc4),_0x2e344b(0xf7),'validator:wrapped-format']),LinterSeveritySchema=z[_0x2e344b(0xfa)]([_0x2e344b(0xe6),'warn','error']),LinterConfigSchema=z[_0x2e344b(0xd7)]({'enabled':z[_0x2e344b(0xdc)](),'rules':z[_0x2e344b(0xf4)](LinterRuleIdSchema,LinterSeveritySchema)}),McpConfigSchema=z[_0x2e344b(0xd7)]({'transport':z[_0x2e344b(0xc6)](_0x2e344b(0xce))}),SandboxConfigSchema=z[_0x2e344b(0xd7)]({'shellCwd':z[_0x2e344b(0x104)]()[_0x2e344b(0xec)](),'database':z['string']()['optional'](),'apiBaseUrl':z[_0x2e344b(0x104)]()[_0x2e344b(0xda)]()[_0x2e344b(0xec)](),'uploadDir':z['string']()[_0x2e344b(0xec)]()}),WebServerConfigSchema=z[_0x2e344b(0xd7)]({'command':z[_0x2e344b(0x104)]()[_0x2e344b(0x103)](0x1),'url':z[_0x2e344b(0x104)]()['url'](),'reuseExistingServer':z[_0x2e344b(0xdc)]()[_0x2e344b(0xc5)](!![]),'timeoutMs':z[_0x2e344b(0xd1)]()[_0x2e344b(0xee)]()[_0x2e344b(0xcb)]()[_0x2e344b(0xc5)](0xea60)}),UnotestConfigSchema=z['object']({'baseUrl':z[_0x2e344b(0x104)]()['url']()[_0x2e344b(0xec)](),'webServer':WebServerConfigSchema[_0x2e344b(0xec)](),'browsers':z[_0x2e344b(0xed)](BrowserSchema)[_0x2e344b(0x103)](0x1),'channel':BrowserChannelSchema,'viewport':ViewportSchema,'retry':RetryConfigSchema,'failureBundle':FailureBundleConfigSchema,'dialogPolicy':DialogPolicySchema,'storageState':z[_0x2e344b(0x104)]()[_0x2e344b(0xec)](),'testDir':z[_0x2e344b(0x104)]()['min'](0x1),'helpersDir':z['string']()[_0x2e344b(0x103)](0x1),'defaultTimeoutMs':z[_0x2e344b(0xd1)]()[_0x2e344b(0xee)]()['positive'](),'defaultNavigationTimeoutMs':z['number']()[_0x2e344b(0xee)]()[_0x2e344b(0xcb)](),'linter':LinterConfigSchema,'mcp':McpConfigSchema,'sandbox':SandboxConfigSchema}),DEFAULT_CONFIG={'browsers':['chromium'],'viewport':{'width':0x500,'height':0x2d0},'retry':{'count':0x0,'on':[_0x2e344b(0xdb)]},'failureBundle':{'tier1':!![],'tier2':!![],'tier3':{'network':![],'video':![]},'retention':{'runs':0x14,'days':0x7},'storageDir':_0x2e344b(0xd9)},'dialogPolicy':'accept','testDir':_0x2e344b(0xe7),'helpersDir':_0x2e344b(0xf8),'defaultTimeoutMs':0xbb8,'defaultNavigationTimeoutMs':0x7530,'linter':{'enabled':!![],'rules':{'lint:deep-css':_0x2e344b(0xd8),'lint:xpath':'warn','lint:obfuscated-class':_0x2e344b(0xd8),'lint:pause-explicit':'warn','lint:disambig-by-index':_0x2e344b(0xe6),'lint:evaluate-discouraged':_0x2e344b(0xd8),'lint:scenario-in-root':_0x2e344b(0xfe),'lint:mustache-in-dsl':_0x2e344b(0xfe),'validator:unknown-function':_0x2e344b(0xfe)}},'mcp':{'transport':_0x2e344b(0xce)},'sandbox':{}};function _0x8977(_0x3a774f,_0x1b39aa){_0x3a774f=_0x3a774f-0xc4;var _0x19a653=_0x19a6();var _0x89776=_0x19a653[_0x3a774f];if(_0x8977['fRpWih']===undefined){var _0x38d7ef=function(_0x26bdbc){var _0x3caffa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0xda4aa0='',_0x563661='';for(var _0x305f13=0x0,_0x3d29c0,_0x481c1e,_0x19b0ec=0x0;_0x481c1e=_0x26bdbc['charAt'](_0x19b0ec++);~_0x481c1e&&(_0x3d29c0=_0x305f13%0x4?_0x3d29c0*0x40+_0x481c1e:_0x481c1e,_0x305f13++%0x4)?_0xda4aa0+=String['fromCharCode'](0xff&_0x3d29c0>>(-0x2*_0x305f13&0x6)):0x0){_0x481c1e=_0x3caffa['indexOf'](_0x481c1e);}for(var _0x4792b1=0x0,_0x49dbb6=_0xda4aa0['length'];_0x4792b1<_0x49dbb6;_0x4792b1++){_0x563661+='%'+('00'+_0xda4aa0['charCodeAt'](_0x4792b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x563661);};_0x8977['wyEdtR']=_0x38d7ef,_0x8977['cHKdQs']={},_0x8977['fRpWih']=!![];}var _0x1354e5=_0x19a653[0x0],_0x16a4bb=_0x3a774f+_0x1354e5,_0x9c7c53=_0x8977['cHKdQs'][_0x16a4bb];return!_0x9c7c53?(_0x89776=_0x8977['wyEdtR'](_0x89776),_0x8977['cHKdQs'][_0x16a4bb]=_0x89776):_0x89776=_0x9c7c53,_0x89776;}export{BrowserChannelSchema,BrowserSchema,DEFAULT_CONFIG,DialogPolicySchema,FailureBundleConfigSchema,LinterConfigSchema,LinterRuleIdSchema,LinterSeveritySchema,McpConfigSchema,RetryConfigSchema,RetryReasonSchema,SandboxConfigSchema,UnotestConfigSchema,ViewportSchema,WebServerConfigSchema};function _0x19a6(){var _0x1434f7=['DMfSAwrHDg9YoMXPC3qTyxjN','Dw5VDgvZDc9LmMuVx2HLBhbLCNm','D2vIA2L0','zw51Bq','BgLUDdPZy2vUyxjPBY1PBI1YB290','mtG3nduYCKHJsuHS','BgLUDdPLDMfSDwf0zs1KAxnJB3vYywDLza','zxjYB3i','BgLUDdPWyxvZzs1LEhbSAwnPDa','DMfSAwrHDg9YoMLMlxnOyxbL','DMfSAwrHDg9YoNzHCI1ZAgfWzq','DMfSAwrHDg9YoNvUC3vWCg9YDgvKlxn0yxrLBwvUDa','BwLU','C3rYAw5N','DMfSAwrHDg9YoNnLBwfUDgLJlwXVC3m','zgvMyxvSDa','BgL0zxjHBa','mJyYmdrzrev4q0K','DMfSAwrHDg9YoMz1BMn0Aw9UlxnOyxbL','BxnLzgDL','y2HYB21L','Cg9ZAxrPDMu','mtq3nZa0mLfMrgnerW','DMfSAwrHDg9YoNvUC3vWCg9YDgvKlwv4ChjLC3nPB24','C3rKAw8','zMLYzwzVEa','ywnJzxb0','BNvTyMvY','DMfSAwrHDg9YoMfYzY1RAw5K','DMfSAwrHDg9YoNn0zxaTC2HHCgu','DMfSAwrHDg9YoNvUA25VD24TzNvUy3rPB24','BgLUDdPKzwvWlwnZCW','BMv0D29YAW','B2jQzwn0','D2fYBG','lNvUB3rLC3qVzMfPBhvYzxm','DxjS','DhjHBNnPzw50','yM9VBgvHBG','mLPiC0XWDq','BwfUDwfS','mZy5ntm1tgPYrKfu','mtqWntu0offSrgvtBG','nti5mdiZmgLwwwnRDG','DMfSAwrHDg9YoNn0zxaTy292zxjHz2u','y2HYB21PDw0','m1LeDg1LzG','BgLUDdPTDxn0ywnOzs1PBI1KC2W','B2zM','Dw5VDgvZDc9LmMu','odHXD3bdzNq','BNvSBa','nJq2mJy1seL0CvP3','BgLUDdPKAxnHBwjPzY1IEs1PBMrLEa','B3b0Aw9UywW','yxjYyxK','Aw50','y3jHC2G','DMfSAwrHDg9YoMzVCI1ZAgfWzq','zgLZBwLZCW','DMfSAwrHDg9YoMfYAxr5','Dw5PB24','CMvJB3jK','y2HYB21LlwjLDge','BgLUDdPVyMz1C2nHDgvKlwnSyxnZ'];_0x19a6=function(){return _0x1434f7;};return _0x19a6();}
|
package/dist/driver/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementHint, N as NetworkEntry, 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, 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-
|
|
1
|
+
import { E as ElementHint, N as NetworkEntry, W as WebDriver, L as LaunchOptions, C as ContextOptions, D as DriverContext } from '../interfaces-BxviHxnr.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-BxviHxnr.js';
|
|
3
3
|
import '@unotest/protocol';
|
|
4
4
|
import '../config/schema.js';
|
|
5
5
|
import 'zod';
|
|
@@ -27,6 +27,9 @@ interface FakeBehavior {
|
|
|
27
27
|
inputValueByDefault?: string;
|
|
28
28
|
/** Default isVisible() response. Default: true. */
|
|
29
29
|
isVisibleByDefault?: boolean;
|
|
30
|
+
/** Default checkedState() response — null = "not a checkable element",
|
|
31
|
+
* the shape a plain <input type=text> reports. Default: null. */
|
|
32
|
+
checkedStateByDefault?: boolean | null;
|
|
30
33
|
/** Default URL after newContext. Default: 'about:blank'. */
|
|
31
34
|
initialUrl?: string;
|
|
32
35
|
/** If set, every action throws this error on next call (then clears). */
|
package/dist/driver/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x14f0(){const _0x4ee0b1=['C2v0qwn0AxzLugfNzq','mJGYmtaZmLzYDgzmBG','y29UDgv4Dhm','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','ChvZAa','y3r4','D2fPDezVCG','C2nYzwvUC2HVDa','ywn0AxzLugfNzq','BgvUz3rO','zhjPDMvY','Bg9JywXtDg9YywDLu3rHDgu','zxHPDezYyw1L','zw50zxjgCMfTzq','mtC1nZyYmNDjwuzPDa','Bgf1BMnO','D2fPDezVCLrLEhq','Aw5WDxrwywX1zq','D2fPDezVCK5HDMLNyxrPB24','zhjHz0fUzerYB3a','CMvM','zgvMAw5LuhjVCgvYDhK','Bg9JywXtDg9YywDL','y29UBMvJDfnOyxjLza','y29VA2LLu3rHDgu','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','B25bzNrLCKnSAwnR','yxr0CMLIDxrLC0j5rgvMyxvSDa','rhjPDMvYrxjYB3i','z290BW','rMfRzvbHz2u','y2fSBhm','y29VA2LLCW','BMfTzq','z29cywnR','z2v0q29VA2LL','zgvSzxrL','yxr0ywnOrxHPC3rPBMC','Ag92zxi','nJuWndGYAfHjCwj5','y29UDgv4Da','Dw5JAgvJAW','zNjLzxPL','CMvJB3jK','CMvSB2fK','pgrPDJ48l2rPDJ4','Aw5WDxrwywX1zuj5rgvMyxvSDa','y3jLyxrLuMvJB3jKzxi','Dgv4DenVBNrLBNrcEurLzMf1Bhq','y3vYCMvUDfvYBa','Cg9WDxbpBKnSAwnR','mtaWnte1mNbJv1vwvq','ChjLC3m','C3rLChm','lNbHz2uW','ywrK','mZK1ntK4u0Lxsw5z','yMvOyxzPB3i','y2XVC2u','DgL0Bgu','CMvJB3jKzxi','C2f2zvn0B3jHz2vtDgf0zq','A2LUza','zxjYB3jpBK5LEhrby3rPB24','zNjHBwvtDgfJAW','zwXLBwvUDeHPBNrcEvjLzG','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','Aw5PDgLHBfvYBa','BMv3ugfNzuXPC3rLBMvYCW','CgfNzuXPC3q','zMfRzsb0AxrSzq','zMLSBa','C2nYB2XSsw50B1zPzxC','Bgf1BMnOzwq','Dgv4DenVBNrLBNq','zNjHBwvezxb0Aa','ywn0AxzLswr4','z29gB3j3yxjK','y2fSBhngB3i','odiWmtyXm0Hdu01itW','z2v0tg9JywXtDg9YywDL','y29UC29SzuvUDhjPzxm','ntG3nZi2nfr2tNLMEq','zg91yMXLq2XPy2S','zxzHBhvHDgvpBKXVy2f0B3i','Cg9W','lNbHz2u','DxbSB2fKrMLSzq','iJ48l2rPDJ4','C2vSzwn0t3b0Aw9U','BMv3q29UDgv4Da','C2v0q29VA2LL','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','AxnwAxnPyMXL','Aw5ZCgvJDevSzw1LBNq','y291BNq','nwvqD1Hsyq','Bwf5yMvuAhjVDW','zxzHBhvHDgu','Bwv0Ag9K','z2v0qxr0CMLIDxrL','zw1PDezHA2vqB3b1Ca','rMfRzvDLyKrYAxzLCG','C2nVCgu','C2v0tg9JywXtDg9YywDL','y2XPCgjVyxjKugfZDgu','vw5VDgvZDevYCM9Y','BMv0D29YA0vUDhjPzxm','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','y2HLy2S','y2XPy2S','D2fPDezVCLvYBa','ywjVDxq6yMXHBMS','y2fWDhvYzvn0ywnRvhjHy2u','tg9JyxrVCKvYCM9Y','zNvUy3rPB24','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','owTjBvjTuG','B3v0zxjiDg1SqNLszwy','B25ozxDqywDL','zMfRzs1WBMC'];_0x14f0=function(){return _0x4ee0b1;};return _0x14f0();}const _0x1d0aa9=_0x1047;(function(_0x317790,_0x2f16cc){const _0x25bb38={_0x53ecf7:0x112,_0x214b2b:0x106,_0x5860ee:0x131,_0x435b61:0x117,_0x2ae589:0xe0,_0x48ece8:0xdb},_0x4b437e=_0x1047,_0x19c9dd=_0x317790();while(!![]){try{const _0x5465c4=parseInt(_0x4b437e(_0x25bb38._0x53ecf7))/0x1+parseInt(_0x4b437e(_0x25bb38._0x214b2b))/0x2+-parseInt(_0x4b437e(0xed))/0x3+parseInt(_0x4b437e(_0x25bb38._0x5860ee))/0x4+parseInt(_0x4b437e(0xc6))/0x5*(parseInt(_0x4b437e(_0x25bb38._0x435b61))/0x6)+-parseInt(_0x4b437e(0x12e))/0x7+parseInt(_0x4b437e(_0x25bb38._0x2ae589))/0x8*(-parseInt(_0x4b437e(_0x25bb38._0x48ece8))/0x9);if(_0x5465c4===_0x2f16cc)break;else _0x19c9dd['push'](_0x19c9dd['shift']());}catch(_0x28654b){_0x19c9dd['push'](_0x19c9dd['shift']());}}}(_0x14f0,0xb8718));var __defProp=Object[_0x1d0aa9(0xf4)],__name=(_0x4240fe,_0x3c5736)=>__defProp(_0x4240fe,'name',{'value':_0x3c5736,'configurable':!![]}),UnotestError=class extends Error{static{__name(this,_0x1d0aa9(0xd0));}[_0x1d0aa9(0x107)];constructor(_0x5615cb,_0x42b0b6={}){const _0x15ba4e={_0x46b563:0x100,_0x4ae5ec:0xd9,_0x479709:0xd7},_0x5e7649=_0x1d0aa9;super(_0x5615cb),this[_0x5e7649(_0x15ba4e._0x46b563)]=new.target.name,this[_0x5e7649(0x107)]=Object[_0x5e7649(0x109)]({..._0x42b0b6}),typeof Error[_0x5e7649(0xd7)]===_0x5e7649(_0x15ba4e._0x4ae5ec)&&Error[_0x5e7649(_0x15ba4e._0x479709)](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,_0x1d0aa9(0xfb));}},LocatorError=class extends UnotestError{static{__name(this,_0x1d0aa9(0xd8));}};function createRecorder(){const _0x3af3ea={_0x406429:0xe3,_0x40bd9f:0xfe},_0x201897=_0x1d0aa9,_0x1122e6=[];let _0x5abeac=0x0;return{'push':__name(_0x6c0e32=>_0x1122e6[_0x201897(0xe3)]({..._0x6c0e32,'seq':_0x5abeac++}),_0x201897(_0x3af3ea._0x406429)),'calls':__name(()=>_0x1122e6,_0x201897(_0x3af3ea._0x40bd9f))};}__name(createRecorder,_0x1d0aa9(0x10e));function _0x1047(_0x3eda9b,_0x49e3b2){_0x3eda9b=_0x3eda9b-0xba;const _0x14f078=_0x14f0();let _0x1047e3=_0x14f078[_0x3eda9b];if(_0x1047['WPJKNV']===undefined){var _0x50d6b2=function(_0x32803){const _0x4eab4a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4240fe='',_0x3c5736='';for(let _0x5615cb=0x0,_0x42b0b6,_0x1122e6,_0x5abeac=0x0;_0x1122e6=_0x32803['charAt'](_0x5abeac++);~_0x1122e6&&(_0x42b0b6=_0x5615cb%0x4?_0x42b0b6*0x40+_0x1122e6:_0x1122e6,_0x5615cb++%0x4)?_0x4240fe+=String['fromCharCode'](0xff&_0x42b0b6>>(-0x2*_0x5615cb&0x6)):0x0){_0x1122e6=_0x4eab4a['indexOf'](_0x1122e6);}for(let _0x6c0e32=0x0,_0x28a346=_0x4240fe['length'];_0x6c0e32<_0x28a346;_0x6c0e32++){_0x3c5736+='%'+('00'+_0x4240fe['charCodeAt'](_0x6c0e32)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c5736);};_0x1047['LJuGPi']=_0x50d6b2,_0x1047['qdFYDS']={},_0x1047['WPJKNV']=!![];}const _0x21659f=_0x14f078[0x0],_0x529aca=_0x3eda9b+_0x21659f,_0x47cd85=_0x1047['qdFYDS'][_0x529aca];return!_0x47cd85?(_0x1047e3=_0x1047['LJuGPi'](_0x1047e3),_0x1047['qdFYDS'][_0x529aca]=_0x1047e3):_0x1047e3=_0x47cd85,_0x1047e3;}var FakePage=class{constructor(_0x28a346,_0x539ce6,_0x54bccf,_0x216771){const _0x503381={_0x56dbae:0x11b,_0xe58738:0x118},_0x1138fc=_0x1d0aa9;this[_0x1138fc(_0x503381._0x56dbae)]=_0x28a346,this[_0x1138fc(_0x503381._0xe58738)]=_0x539ce6,this['scope']=_0x54bccf,this['currentUrl']=_0x216771;}[_0x1d0aa9(0x11b)];[_0x1d0aa9(0x118)];['scope'];static{__name(this,_0x1d0aa9(0xfd));}[_0x1d0aa9(0x110)];[_0x1d0aa9(0xf9)];[_0x1d0aa9(0x10a)](_0x5a7fe5,_0x26f6df){const _0x22e896={_0x52db22:0xe3},_0x1022d0=_0x1d0aa9;this[_0x1022d0(0x11b)][_0x1022d0(_0x22e896._0x52db22)]({'scope':this[_0x1022d0(0xcd)],'method':_0x5a7fe5,'args':_0x26f6df});}[_0x1d0aa9(0xc7)](){const _0x55bd52={_0x2c5c61:0x11e},_0x45115a=_0x1d0aa9;if(this[_0x45115a(0x118)][_0x45115a(_0x55bd52._0x2c5c61)]){const _0x3d65a8=this['behavior']['errorOnNextAction'];this[_0x45115a(0x118)]['errorOnNextAction']=void 0x0;throw _0x3d65a8;}}['url'](){const _0x72bf18=_0x1d0aa9;return this[_0x72bf18(0x110)];}async[_0x1d0aa9(0x11a)](){const _0x2ec9da={_0x2a4022:0x10a},_0x39038a=_0x1d0aa9;return this[_0x39038a(_0x2ec9da._0x2a4022)]('title',[]),_0x39038a(0x125);}async[_0x1d0aa9(0xd4)](_0x23155b,_0x35fb7c){const _0x5de501={_0x4bc877:0xd4,_0x51aeb3:0xc7,_0x2ff727:0xf9},_0x5ebd60=_0x1d0aa9;this[_0x5ebd60(0x10a)](_0x5ebd60(_0x5de501._0x4bc877),[_0x23155b,_0x35fb7c]),this[_0x5ebd60(_0x5de501._0x51aeb3)](),this[_0x5ebd60(_0x5de501._0x2ff727)]?.();}async[_0x1d0aa9(0x132)](_0x4301aa,_0x2914ce){const _0x51b07e={_0x6ac584:0xc7},_0x31aa1a=_0x1d0aa9;this['record'](_0x31aa1a(0x132),[_0x4301aa,_0x2914ce]),this[_0x31aa1a(_0x51b07e._0x6ac584)]();}async[_0x1d0aa9(0x126)](_0x4d0894,_0x24f8f4,_0x43d8b7){const _0x286fc0={_0x19a3fb:0x10a},_0x4d6a64=_0x1d0aa9;this[_0x4d6a64(_0x286fc0._0x19a3fb)]('fill',[_0x4d0894,_0x24f8f4,_0x43d8b7]),this[_0x4d6a64(0xc7)]();}async[_0x1d0aa9(0x113)](_0x54dc10,_0x288dba,_0x26fbbf){const _0x58cfc6={_0x4a0923:0x10a,_0xdcd5ea:0x113,_0x36ce50:0xc7},_0x288c2e=_0x1d0aa9;this[_0x288c2e(_0x58cfc6._0x4a0923)](_0x288c2e(_0x58cfc6._0xdcd5ea),[_0x54dc10,_0x288dba,_0x26fbbf]),this[_0x288c2e(_0x58cfc6._0x36ce50)]();}async[_0x1d0aa9(0xd3)](_0x543481,_0x294462){const _0xd197b7={_0x326014:0xd3},_0x510d92=_0x1d0aa9;this[_0x510d92(0x10a)](_0x510d92(_0xd197b7._0x326014),[_0x543481,_0x294462]),this[_0x510d92(0xc7)]();}async[_0x1d0aa9(0x108)](_0x4fed37,_0x420874){const _0x13f3f1=_0x1d0aa9;this[_0x13f3f1(0x10a)](_0x13f3f1(0x108),[_0x4fed37,_0x420874]),this[_0x13f3f1(0xc7)]();}async[_0x1d0aa9(0xbf)](_0x45a2e0,_0x48fdb8,_0xd43bb){const _0x12f20a=_0x1d0aa9;this[_0x12f20a(0x10a)](_0x12f20a(0xbf),[_0x45a2e0,_0x48fdb8,_0xd43bb]),this[_0x12f20a(0xc7)]();}async[_0x1d0aa9(0x105)](_0x49e285,_0x212827){const _0x4598b8={_0x1531c1:0xc7},_0x5475ce=_0x1d0aa9;this['record'](_0x5475ce(0x105),[_0x49e285,_0x212827]),this[_0x5475ce(_0x4598b8._0x1531c1)]();}async['scrollIntoView'](_0x1ea50f){const _0x186fa1={_0x35b5c3:0x10a,_0xc8f0de:0x127,_0x135395:0xc7},_0x2a5595=_0x1d0aa9;this[_0x2a5595(_0x186fa1._0x35b5c3)](_0x2a5595(_0x186fa1._0xc8f0de),[_0x1ea50f]),this[_0x2a5595(_0x186fa1._0x135395)]();}async[_0x1d0aa9(0xf2)](_0x45c48a,_0x2415f7,_0x595f00){const _0x4d68e9={_0x1f7c0d:0x10a,_0x58a011:0xf2,_0x2991af:0xc7},_0x16b330=_0x1d0aa9;this[_0x16b330(_0x4d68e9._0x1f7c0d)](_0x16b330(_0x4d68e9._0x58a011),[_0x45c48a,_0x2415f7,_0x595f00]),this[_0x16b330(_0x4d68e9._0x2991af)]();}async[_0x1d0aa9(0xbd)](_0x2ba560,_0x1b5631){const _0x13de31={_0x1391ad:0x10a},_0x38b481=_0x1d0aa9;this[_0x38b481(_0x13de31._0x1391ad)]('uploadFile',[_0x2ba560,_0x1b5631]),this[_0x38b481(0xc7)]();}async[_0x1d0aa9(0xcf)](_0x3f1bc4,_0x18d281){const _0x384ac5=_0x1d0aa9;this['record'](_0x384ac5(0xcf),[_0x3f1bc4,_0x18d281]),this['maybeThrow']();}async[_0x1d0aa9(0xc5)](_0x78489e){const _0x2afaf9={_0x42ca9e:0xc5,_0x1ec13a:0x118},_0x2d73c5=_0x1d0aa9;return this[_0x2d73c5(0x10a)](_0x2d73c5(_0x2afaf9._0x42ca9e),[_0x78489e]),this[_0x2d73c5(_0x2afaf9._0x1ec13a)]['countByDefault']??0x1;}async[_0x1d0aa9(0x129)](_0x5ac0a4){const _0x2bc81c={_0x455196:0x10a,_0x197370:0x118,_0x543f6e:0x10f},_0x1a62f5=_0x1d0aa9;return this[_0x1a62f5(_0x2bc81c._0x455196)](_0x1a62f5(0x129),[_0x5ac0a4]),this[_0x1a62f5(_0x2bc81c._0x197370)][_0x1a62f5(_0x2bc81c._0x543f6e)]??'';}async[_0x1d0aa9(0xf0)](_0x3cff97){const _0x1c5d26={_0x1473d1:0xf0,_0x3c1bbc:0x118,_0x2f8f99:0x10d},_0x3d60a1=_0x1d0aa9;return this[_0x3d60a1(0x10a)](_0x3d60a1(_0x1c5d26._0x1473d1),[_0x3cff97]),this[_0x3d60a1(_0x1c5d26._0x3c1bbc)][_0x3d60a1(_0x1c5d26._0x2f8f99)]??'';}async['isVisible'](_0x515047){const _0x2d6b9a={_0x1a7986:0x118},_0x35f726=_0x1d0aa9;return this[_0x35f726(0x10a)](_0x35f726(0xc3),[_0x515047]),this[_0x35f726(_0x2d6b9a._0x1a7986)]['isVisibleByDefault']??!![];}async[_0x1d0aa9(0xca)](_0x199fe5,_0x434056){const _0xdd20c3={_0x2b6213:0x118},_0x28a250=_0x1d0aa9;return this['record']('getAttribute',[_0x199fe5,_0x434056]),this[_0x28a250(_0xdd20c3._0x2b6213)][_0x28a250(0xfa)]?.[_0x434056]??null;}async[_0x1d0aa9(0xe5)](_0x393aca,_0x34804b){const _0x530c94={_0x7ef7bc:0x10a,_0x332a4f:0xe5},_0x14faa7=_0x1d0aa9;this[_0x14faa7(_0x530c94._0x7ef7bc)](_0x14faa7(_0x530c94._0x332a4f),[_0x393aca,_0x34804b]);}async[_0x1d0aa9(0xd5)](_0x78d918,_0x13bdc5){const _0x63cf4d={_0xddcfd6:0x10a},_0x3299e3=_0x1d0aa9;this[_0x3299e3(_0x63cf4d._0xddcfd6)](_0x3299e3(0xd5),[_0x78d918,_0x13bdc5]);}async[_0x1d0aa9(0xef)](_0x3a5860,_0x1bbdfb){const _0x25b8b3={_0x57948c:0x10a,_0x2d4801:0xef},_0x242bed=_0x1d0aa9;this[_0x242bed(_0x25b8b3._0x57948c)](_0x242bed(_0x25b8b3._0x2d4801),[_0x3a5860,_0x1bbdfb]);}async[_0x1d0aa9(0xf1)](_0x54bf8b){const _0x2215e5=_0x1d0aa9;this[_0x2215e5(0x10a)](_0x2215e5(0xf1),[_0x54bf8b]);}async[_0x1d0aa9(0xfc)](_0x5a0ddb,_0x1ffe43){this['record']('goto',[_0x5a0ddb,_0x1ffe43]),this['currentUrl']=_0x5a0ddb;}async[_0x1d0aa9(0x10b)](_0x4acfbe){const _0x5d0cc7={_0x4d41e5:0x10a},_0x3a7990=_0x1d0aa9;this[_0x3a7990(_0x5d0cc7._0x4d41e5)](_0x3a7990(0x10b),[_0x4acfbe]);}async[_0x1d0aa9(0x101)](_0x16c919){const _0x56167e={_0x46b403:0x10a},_0x339ebb=_0x1d0aa9;this[_0x339ebb(_0x56167e._0x46b403)](_0x339ebb(0x101),[_0x16c919]);}async[_0x1d0aa9(0x12c)](_0x3a5f67){const _0x47a83d={_0x4f469a:0x10a},_0x5ef295=_0x1d0aa9;this[_0x5ef295(_0x47a83d._0x4f469a)](_0x5ef295(0x12c),[_0x3a5f67]);}async[_0x1d0aa9(0xc8)](_0x3cf1c8){const _0xc828dc=_0x1d0aa9;return this['record'](_0xc828dc(0xc8),[_0x3cf1c8]),void 0x0;}async[_0x1d0aa9(0xba)](_0x346cf1,_0x7fba47){const _0x4228cb={_0x4ecd52:0x10a},_0x28d7e4=_0x1d0aa9;return this[_0x28d7e4(_0x4228cb._0x4ecd52)](_0x28d7e4(0xba),[_0x346cf1,_0x7fba47]),void 0x0;}async[_0x1d0aa9(0xc4)](_0x2ebd8a){const _0x526d75={_0x56e10d:0x10a,_0x139448:0xf3,_0x1ae1c9:0xf3},_0x403112=_0x1d0aa9;this[_0x403112(_0x526d75._0x56e10d)](_0x403112(0xc4),[_0x2ebd8a]);if(_0x2ebd8a[_0x403112(0x114)][_0x403112(0xe8)]!==0x1||_0x2ebd8a[_0x403112(0x114)][0x0][_0x403112(0x11d)]!==_0x403112(_0x526d75._0x139448))return null;const _0x259079=_0x2ebd8a[_0x403112(0x114)][0x0][_0x403112(_0x526d75._0x1ae1c9)],_0x1f3712=this[_0x403112(0x118)][_0x403112(0x120)]?.[_0x259079];return _0x1f3712??null;}async[_0x1d0aa9(0xe6)](_0x210646){const _0x3404ac={_0x30b08d:0x10a},_0x11e912=_0x1d0aa9;return this[_0x11e912(_0x3404ac._0x30b08d)](_0x11e912(0xe6),[_0x210646]),Buffer['from'](_0x11e912(0xde));}async['outerHTML'](_0x4a51ed){const _0x1be2a1={_0x34396f:0x10a,_0x2491e3:0x114,_0x329a95:0x11d,_0x52334e:0xdc,_0x2df43:0xd2,_0x132368:0xbe,_0x39df08:0x10c},_0x30cfce=_0x1d0aa9;this[_0x30cfce(_0x1be2a1._0x34396f)]('outerHTML',[_0x4a51ed]);if(_0x4a51ed[_0x30cfce(_0x1be2a1._0x2491e3)][_0x30cfce(0xe8)]===0x1&&_0x4a51ed['steps'][0x0][_0x30cfce(_0x1be2a1._0x329a95)]===_0x30cfce(0xf3)){const _0x45d9c8=_0x4a51ed['steps'][0x0]['ref'];return this['behavior'][_0x30cfce(_0x1be2a1._0x52334e)]?.[_0x45d9c8]??_0x30cfce(_0x1be2a1._0x2df43)+_0x45d9c8+_0x30cfce(_0x1be2a1._0x132368);}return _0x30cfce(_0x1be2a1._0x39df08);}},FakeContext=class{constructor(_0x38270b,_0x3ff44a,_0x2ad7da){const _0x4cbd28={_0x33f222:0x11b,_0x1e0c07:0xcd,_0x3465b0:0x115,_0x278bd2:0x111,_0x4c9d44:0xf5,_0x326c02:0xf7,_0x453db8:0xff},_0x33eb23={_0x132b26:0xcb,_0x4957c0:0x111},_0x6d347e=_0x1d0aa9;this[_0x6d347e(_0x4cbd28._0x33f222)]=_0x38270b,this[_0x6d347e(0x118)]=_0x3ff44a,this[_0x6d347e(_0x4cbd28._0x1e0c07)]=_0x2ad7da;const _0x29bd67=new FakePage(_0x38270b,_0x3ff44a,_0x2ad7da+_0x6d347e(_0x4cbd28._0x3465b0),_0x3ff44a[_0x6d347e(0x122)]??_0x6d347e(0xd6));_0x3ff44a[_0x6d347e(_0x4cbd28._0x278bd2)]&&(_0x29bd67[_0x6d347e(0xf9)]=()=>{const _0x7caafa=_0x6d347e;this[_0x7caafa(_0x33eb23._0x132b26)](_0x3ff44a[_0x7caafa(_0x33eb23._0x4957c0)]);}),this['pageList']=[_0x29bd67],this['localStorageState']={..._0x3ff44a[_0x6d347e(_0x4cbd28._0x4c9d44)]??{}},this[_0x6d347e(_0x4cbd28._0x326c02)]={..._0x3ff44a[_0x6d347e(_0x4cbd28._0x453db8)]??{}};}[_0x1d0aa9(0x11b)];[_0x1d0aa9(0x118)];[_0x1d0aa9(0xcd)];static{__name(this,'FakeContext');}[_0x1d0aa9(0x124)];['activeIdx']=0x0;[_0x1d0aa9(0x11f)]=[];[_0x1d0aa9(0xea)];[_0x1d0aa9(0xf7)];[_0x1d0aa9(0x123)]=new Set();['record'](_0xd33ef1,_0x585f29){const _0x1151c8={_0x484a90:0xe3},_0x32db9f=_0x1d0aa9;this['recorder'][_0x32db9f(_0x1151c8._0x484a90)]({'scope':this[_0x32db9f(0xcd)],'method':_0xd33ef1,'args':_0x585f29});}['pages'](){const _0x3713ea=_0x1d0aa9;return this[_0x3713ea(0x124)];}[_0x1d0aa9(0xe7)](){const _0x412067={_0x449a64:0x124,_0x23791c:0xe2},_0x12e4a8=_0x1d0aa9,_0x37d24c=this[_0x12e4a8(_0x412067._0x449a64)][this[_0x12e4a8(0x12b)]];if(!_0x37d24c)throw new DriverError(_0x12e4a8(_0x412067._0x23791c),{'activeIdx':this[_0x12e4a8(0x12b)]});return _0x37d24c;}[_0x1d0aa9(0x130)](){const _0x2d2a73=_0x1d0aa9;return this[_0x2d2a73(0x118)][_0x2d2a73(0x130)]??[];}[_0x1d0aa9(0xd1)](){const _0x17ea65={_0x3be4a5:0xd1},_0x2d708f=_0x1d0aa9;return this[_0x2d708f(0x118)][_0x2d708f(_0x17ea65._0x3be4a5)]??[];}async['setActivePage'](_0x34726c){const _0x1e8c19={_0x4fc34c:0xdf,_0x2deb30:0x124,_0x4d9219:0x11f},_0x2cb177=_0x1d0aa9;this[_0x2cb177(0x10a)](_0x2cb177(_0x1e8c19._0x4fc34c),[_0x34726c]);if(_0x34726c<0x0||_0x34726c>=this['pageList']['length'])throw new DriverError('page\x20index\x20out\x20of\x20range',{'index':_0x34726c,'available':this[_0x2cb177(_0x1e8c19._0x2deb30)][_0x2cb177(0xe8)]});this['activeIdx']=_0x34726c,this[_0x2cb177(_0x1e8c19._0x4d9219)]['length']=0x0;}[_0x1d0aa9(0xdd)](_0x3f41fc){const _0x168fdf={_0x591562:0x123},_0x148a76={_0x41c4ad:0x103},_0x2f5963=_0x1d0aa9;return this[_0x2f5963(_0x168fdf._0x591562)][_0x2f5963(0x116)](_0x3f41fc),()=>{const _0x58563a=_0x2f5963;this['newPageListeners'][_0x58563a(_0x148a76._0x41c4ad)](_0x3f41fc);};}['emitFakePopup'](_0x15e02f){const _0x5382b9={_0x481563:0xcd,_0x205090:0x124},_0x40928c=_0x1d0aa9,_0x4e665a=this[_0x40928c(_0x5382b9._0x481563)]+_0x40928c(0xbc)+this[_0x40928c(_0x5382b9._0x205090)][_0x40928c(0xe8)],_0xf410d2=new FakePage(this[_0x40928c(0x11b)],this[_0x40928c(0x118)],_0x4e665a,_0x15e02f);this['pageList'][_0x40928c(0xe3)](_0xf410d2);const _0x225e26=this[_0x40928c(0x124)][_0x40928c(0xe8)]-0x1;for(const _0x12e05b of this['newPageListeners']){try{_0x12e05b({'index':_0x225e26,'url':_0x15e02f});}catch{}}return _0x225e26;}async[_0x1d0aa9(0xec)](_0x15abfe){const _0x70e1a={_0x33da1c:0xec,_0x29c408:0x121,_0x3d3a26:0x11f},_0x4580da=_0x1d0aa9;this[_0x4580da(0x10a)](_0x4580da(_0x70e1a._0x33da1c),[_0x15abfe]);if(!_0x15abfe['steps']['length'])throw new LocatorError(_0x4580da(_0x70e1a._0x29c408),{'locator':_0x15abfe});this[_0x4580da(_0x70e1a._0x3d3a26)][_0x4580da(0xe3)](_0x15abfe);}async[_0x1d0aa9(0xeb)](){const _0x55fd16={_0x3be186:0x10a,_0x133e47:0xeb,_0x5e613d:0xe8},_0x37e85f=_0x1d0aa9;this[_0x37e85f(_0x55fd16._0x3be186)](_0x37e85f(_0x55fd16._0x133e47),[]);if(this[_0x37e85f(0x11f)][_0x37e85f(_0x55fd16._0x5e613d)]===0x0)throw new DriverError(_0x37e85f(0xf8),{});this['frameStack'][_0x37e85f(0xbb)]();}async['setLocalStorage'](_0x127ed0,_0x23a475){const _0x2610c3={_0x532a3a:0xea},_0x3a4aeb=_0x1d0aa9;this['record'](_0x3a4aeb(0xce),[_0x127ed0,_0x23a475]),this[_0x3a4aeb(_0x2610c3._0x532a3a)][_0x127ed0]=_0x23a475;}async[_0x1d0aa9(0x12f)](_0xa16d9d){const _0x564743=_0x1d0aa9;return this[_0x564743(0x10a)](_0x564743(0x12f),[_0xa16d9d]),this[_0x564743(0xea)][_0xa16d9d]??null;}async[_0x1d0aa9(0xc1)](_0x37b0d6,_0x34de4f,_0x39c412){const _0x23457c=_0x1d0aa9;this[_0x23457c(0x10a)](_0x23457c(0xc1),[_0x37b0d6,_0x34de4f,_0x39c412]),this[_0x23457c(0xf7)][_0x37b0d6]=_0x34de4f;}async[_0x1d0aa9(0x102)](_0x5a4b6f){const _0x43d871={_0x55232c:0x102},_0x50e89d=_0x1d0aa9;return this['record'](_0x50e89d(_0x43d871._0x55232c),[_0x5a4b6f]),this[_0x50e89d(0xf7)][_0x5a4b6f]??null;}async[_0x1d0aa9(0x11c)](_0x4d0b70){const _0x2c6f0e={_0x317e0d:0x10a},_0x4bd6ff=_0x1d0aa9;this[_0x4bd6ff(_0x2c6f0e._0x317e0d)]('saveStorageState',[_0x4d0b70]);}async[_0x1d0aa9(0xc8)](_0x3851eb){const _0x3f9322={_0x5460b5:0x10a},_0x227b8c=_0x1d0aa9;return this[_0x227b8c(_0x3f9322._0x5460b5)](_0x227b8c(0xc8),[_0x3851eb]),void 0x0;}async[_0x1d0aa9(0x119)](){const _0x239d1f={_0x324808:0x10a},_0x4c5317=_0x1d0aa9;this[_0x4c5317(_0x239d1f._0x324808)]('close',[]);}[_0x1d0aa9(0x12a)](){const _0x3ce36c=_0x1d0aa9;return this[_0x3ce36c(0x11f)]['length'];}},FakeWebDriver=class{constructor(_0x58ab08={}){const _0x4e5fd2={_0x33d229:0x11b},_0x1a404e=_0x1d0aa9;this[_0x1a404e(0x118)]=_0x58ab08,this[_0x1a404e(_0x4e5fd2._0x33d229)]=createRecorder();}['behavior'];static{__name(this,_0x1d0aa9(0xcc));}[_0x1d0aa9(0x128)]=![];[_0x1d0aa9(0x11b)];['contexts']=[];async[_0x1d0aa9(0xee)](_0x457e37){const _0x1f37b9={_0x4ed4f2:0x11b,_0x1ce1b6:0xe9,_0xce25a1:0x128},_0x572fae=_0x1d0aa9;this[_0x572fae(_0x1f37b9._0x4ed4f2)]['push']({'scope':_0x572fae(_0x1f37b9._0x1ce1b6),'method':_0x572fae(0xee),'args':[_0x457e37]}),this[_0x572fae(_0x1f37b9._0xce25a1)]=!![];}async['newContext'](_0x154f5){const _0x2f125a={_0x249542:0xc0,_0x5b4d9b:0x128,_0x526b1c:0xc2,_0x2c9e58:0x118,_0x1999d2:0xe4,_0xfaeed9:0xe1,_0x4c1b79:0xe8},_0x383990=_0x1d0aa9;this['recorder'][_0x383990(0xe3)]({'scope':'driver','method':_0x383990(_0x2f125a._0x249542),'args':[_0x154f5]});if(!this[_0x383990(_0x2f125a._0x5b4d9b)])throw new DriverError(_0x383990(_0x2f125a._0x526b1c),{});const _0xaafddb=new FakeContext(this['recorder'],this[_0x383990(_0x2f125a._0x2c9e58)],_0x383990(_0x2f125a._0x1999d2)+this[_0x383990(_0x2f125a._0xfaeed9)][_0x383990(_0x2f125a._0x4c1b79)]);return this['contexts']['push'](_0xaafddb),_0xaafddb;}async[_0x1d0aa9(0x119)](){const _0x8409ef={_0xda8021:0x11b,_0x452544:0xe3,_0x50abb6:0x128},_0x2fb5b7=_0x1d0aa9;this[_0x2fb5b7(_0x8409ef._0xda8021)][_0x2fb5b7(_0x8409ef._0x452544)]({'scope':'driver','method':_0x2fb5b7(0x119),'args':[]}),this[_0x2fb5b7(_0x8409ef._0x50abb6)]=![];}['wsEndpoint'](){return void 0x0;}async[_0x1d0aa9(0xf6)](){throw new DriverError('connectShared\x20not\x20supported\x20by\x20FakeWebDriver',{});}[_0x1d0aa9(0x104)](){const _0x3541a1={_0x37c070:0xda},_0x55aa73=_0x1d0aa9;throw new DriverError(_0x55aa73(_0x3541a1._0x37c070),{});}['calls'](){const _0x1cd7cd={_0x180e95:0x11b},_0x2b7035=_0x1d0aa9;return this[_0x2b7035(_0x1cd7cd._0x180e95)][_0x2b7035(0xfe)]();}[_0x1d0aa9(0x12d)](_0x2a6550){const _0x3ad365={_0x2f14ed:0x11b},_0xa1228f=_0x1d0aa9;return this[_0xa1228f(_0x3ad365._0x2f14ed)][_0xa1228f(0xfe)]()['filter'](_0x682d3a=>_0x682d3a[_0xa1228f(0xc9)]===_0x2a6550);}};export{FakeWebDriver};
|
|
1
|
+
const _0x442b96=_0x1ca0;function _0x1ca0(_0x4c67ac,_0xf4652e){_0x4c67ac=_0x4c67ac-0x9a;const _0x4293ca=_0x4293();let _0x1ca095=_0x4293ca[_0x4c67ac];if(_0x1ca0['oaAEoG']===undefined){var _0x2b836e=function(_0x15d77b){const _0x38ab5d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x548e83='',_0x3c0340='';for(let _0x3950d8=0x0,_0xbbaf3c,_0x52dacf,_0x16f176=0x0;_0x52dacf=_0x15d77b['charAt'](_0x16f176++);~_0x52dacf&&(_0xbbaf3c=_0x3950d8%0x4?_0xbbaf3c*0x40+_0x52dacf:_0x52dacf,_0x3950d8++%0x4)?_0x548e83+=String['fromCharCode'](0xff&_0xbbaf3c>>(-0x2*_0x3950d8&0x6)):0x0){_0x52dacf=_0x38ab5d['indexOf'](_0x52dacf);}for(let _0x3d9fc2=0x0,_0x41df41=_0x548e83['length'];_0x3d9fc2<_0x41df41;_0x3d9fc2++){_0x3c0340+='%'+('00'+_0x548e83['charCodeAt'](_0x3d9fc2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c0340);};_0x1ca0['cUKaDl']=_0x2b836e,_0x1ca0['YJBGVf']={},_0x1ca0['oaAEoG']=!![];}const _0x572062=_0x4293ca[0x0],_0x5af799=_0x4c67ac+_0x572062,_0x49e0e2=_0x1ca0['YJBGVf'][_0x5af799];return!_0x49e0e2?(_0x1ca095=_0x1ca0['cUKaDl'](_0x1ca095),_0x1ca0['YJBGVf'][_0x5af799]=_0x1ca095):_0x1ca095=_0x49e0e2,_0x1ca095;}(function(_0x4cac83,_0x3a3398){const _0x1f8176={_0x276f79:0xb5,_0x35bb1b:0xe2,_0x2888b3:0xa7},_0x476a80=_0x1ca0,_0x136243=_0x4cac83();while(!![]){try{const _0x469d31=-parseInt(_0x476a80(0xab))/0x1*(-parseInt(_0x476a80(_0x1f8176._0x276f79))/0x2)+parseInt(_0x476a80(0x100))/0x3+parseInt(_0x476a80(0xe4))/0x4*(parseInt(_0x476a80(_0x1f8176._0x35bb1b))/0x5)+-parseInt(_0x476a80(_0x1f8176._0x2888b3))/0x6+parseInt(_0x476a80(0xe1))/0x7+parseInt(_0x476a80(0xcb))/0x8*(-parseInt(_0x476a80(0x9b))/0x9)+parseInt(_0x476a80(0xf9))/0xa;if(_0x469d31===_0x3a3398)break;else _0x136243['push'](_0x136243['shift']());}catch(_0x98c45){_0x136243['push'](_0x136243['shift']());}}}(_0x4293,0xbad03));var __defProp=Object[_0x442b96(0xff)],__name=(_0x548e83,_0x3c0340)=>__defProp(_0x548e83,'name',{'value':_0x3c0340,'configurable':!![]});function subscribe(_0x3950d8,_0xbbaf3c){return _0x3950d8['add'](_0xbbaf3c),()=>{_0x3950d8['delete'](_0xbbaf3c);};}__name(subscribe,_0x442b96(0xf5));var UnotestError=class extends Error{static{__name(this,'UnotestError');}[_0x442b96(0xb3)];constructor(_0x52dacf,_0x16f176={}){const _0x4ff5f4={_0x1fb49f:0xb3,_0x383792:0xb0},_0xc9b417=_0x442b96;super(_0x52dacf),this[_0xc9b417(0x10e)]=new.target.name,this[_0xc9b417(_0x4ff5f4._0x1fb49f)]=Object['freeze']({..._0x16f176}),typeof Error[_0xc9b417(_0x4ff5f4._0x383792)]===_0xc9b417(0xec)&&Error[_0xc9b417(_0x4ff5f4._0x383792)](this,new.target);}},DriverError=class extends UnotestError{static{__name(this,'DriverError');}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}};function _0x4293(){const _0x193b16=['ywn0AxzLswr4','zw1PDezHA2vqB3b1Ca','zMLSDgvY','Cg9WDxbpBKnSAwnR','oteYnZq0meLbqKHpBW','C2nYzwvUC2HVDa','Bg9JywXtDg9YywDLu3rHDgu','zg91yMXLq2XPy2S','ntKWmdu2yLbyrxfA','BMv3q29UDgv4Da','CMvJB3jK','zxzHBhvHDgvpBKXVy2f0B3i','y3vYCMvUDfvYBa','y2fWDhvYzvn0ywnRvhjHy2u','y2fSBhm','zxjYB3jpBK5LEhrby3rPB24','y29UDgv4Da','Dgv4DenVBNrLBNrcEurLzMf1Bhq','nhjIu2zPsq','BgvUz3rO','C2v0qwn0AxzLugfNzq','y29UBMvJDfnOyxjLza','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','CMvM','Bgf1BMnOzwq','ywn0AxzLugfNzq','y29VA2LLCW','Aw5ZCgvJDevSzw1LBNq','y2XVC2u','zNjVBq','BMv3ugfNzuXPC3rLBMvYCW','z29cywnR','CgfNzxm','ChjLC3m','DgL0Bgu','CMvJB3jKzxi','D2fPDezVCG','ChvZAa','z29gB3j3yxjK','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','mtiWEgXVywXJ','Dgv4DenVBNrLBNq','zhjPDMvY','y291BNrcEurLzMf1Bhq','Bgf1BMnO','Aw5WDxrwywX1zq','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','A2LUza','y3r4','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','DxjS','Cg9W','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','lNbHz2u','y2XPy2S','z290BW','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','Ag92zxi','z2v0tg9JywXtDg9YywDL','Dw5JAgvJAW','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','C2v0tg9JywXtDg9YywDL','mtC3mtiZogHsD01JBG','mtGZndCZnvL3wfLXAq','C2v0q29VA2LL','mtjUzvvtBe4','BMv0D29YA0vUDhjPzxm','Aw5PDgLHBfvYBa','B3v0zxjive1m','C2nYB2XSsw50B1zPzxC','zxHPDezYyw1L','DxbSB2fKrMLSzq','D2fPDezVCK5HDMLNyxrPB24','zNvUy3rPB24','rMfRzvDLyKrYAxzLCG','y2HLy2TLzfn0yxrL','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','pgrPDJ48l2rPDJ4','C3rLChm','y29UC29SzuvUDhjPzxm','zwXLBwvUDeHPBNrcEvjLzG','y2fSBhngB3i','C3vIC2nYAwjL','C2vSzwn0t3b0Aw9U','z2v0q29VA2LL','rMfRzvbHz2u','mJu4mtGZmezQEKDMsa','C2nVCgu','D2fPDezVCLvYBa','Bwf5yMvuAhjVDW','CgfNzuXPC3q','zNjHBwvezxb0Aa','zgvMAw5LuhjVCgvYDhK','mJK5ntqXnKTNA1nvEq','y2HLy2TLzfn0yxrLqNLezwzHDwX0','zNjHBwvtDgfJAW','z2v0qxr0CMLIDxrL','y2HLy2S','y29UDgv4Dhm','zxzHBhvHDgu','B25ozxDqywDL','zw50zxjgCMfTzq','y291BNq','zMLSBa','AxnwAxnPyMXL','D2fPDezVCLrLEhq','CMvSB2fK','BMfTzq','B25bzNrLCKnSAwnR','otaYnti5venOuxvl','y2XPCgjVyxjKugfZDgu','C3bSAwnL','y29VA2LLu3rHDgu','Bwv0Ag9K','zhjHz0fUzerYB3a','yMvOyxzPB3i','ywjVDxq6yMXHBMS'];_0x4293=function(){return _0x193b16;};return _0x4293();}function createRecorder(){const _0x42bbbc={_0x157d95:0xc8,_0x58ae6d:0xb1},_0x4dfcc6=_0x442b96,_0x3d9fc2=[];let _0x41df41=0x0;return{'push':__name(_0x2b2ccf=>_0x3d9fc2[_0x4dfcc6(0xc8)]({..._0x2b2ccf,'seq':_0x41df41++}),_0x4dfcc6(_0x42bbbc._0x157d95)),'calls':__name(()=>_0x3d9fc2,_0x4dfcc6(_0x42bbbc._0x58ae6d))};}__name(createRecorder,'createRecorder');var FakePage=class{constructor(_0x337133,_0x5959ee,_0x11e08c,_0x6b17d8){const _0x4c0424=_0x442b96;this[_0x4c0424(0xc6)]=_0x337133,this['behavior']=_0x5959ee,this['scope']=_0x11e08c,this[_0x4c0424(0xaf)]=_0x6b17d8;}[_0x442b96(0xc6)];[_0x442b96(0xa1)];['scope'];static{__name(this,_0x442b96(0xf8));}['currentUrl'];[_0x442b96(0x9a)];[_0x442b96(0xad)](_0x2ccb05,_0x16fb64){this['recorder']['push']({'scope':this['scope'],'method':_0x2ccb05,'args':_0x16fb64});}[_0x442b96(0xfc)](){const _0x4757bf={_0x3a5537:0xa1,_0x1751ad:0xb2},_0x5636ac=_0x442b96;if(this['behavior'][_0x5636ac(0xb2)]){const _0x15606b=this[_0x5636ac(_0x4757bf._0x3a5537)]['errorOnNextAction'];this[_0x5636ac(0xa1)][_0x5636ac(_0x4757bf._0x1751ad)]=void 0x0;throw _0x15606b;}}[_0x442b96(0xd5)](){return this['currentUrl'];}async['title'](){const _0x2c6740={_0x4104e3:0xc5},_0x55ee46=_0x442b96;return this['record'](_0x55ee46(_0x2c6740._0x4104e3),[]),'fake\x20title';}async[_0x442b96(0xd9)](_0x982d91,_0x595535){const _0x223ca6={_0x12e34a:0xad},_0x12fcc2=_0x442b96;this[_0x12fcc2(_0x223ca6._0x12e34a)](_0x12fcc2(0xd9),[_0x982d91,_0x595535]),this[_0x12fcc2(0xfc)](),this['onAfterClick']?.();}async[_0x442b96(0xaa)](_0x3a7bc3,_0x11988c){const _0x137570=_0x442b96;this[_0x137570(0xad)]('doubleClick',[_0x3a7bc3,_0x11988c]),this['maybeThrow']();}async[_0x442b96(0x10a)](_0xd0dfef,_0x5733c1,_0x1adfce){const _0x127b6a=_0x442b96;this[_0x127b6a(0xad)](_0x127b6a(0x10a),[_0xd0dfef,_0x5733c1,_0x1adfce]),this[_0x127b6a(0xfc)]();}async[_0x442b96(0xc4)](_0x437bac,_0x455b8b,_0x37caf0){const _0x5d5cc6={_0x7597c8:0xc4,_0xd7413e:0xfc},_0x1f9a92=_0x442b96;this[_0x1f9a92(0xad)](_0x1f9a92(_0x5d5cc6._0x7597c8),[_0x437bac,_0x455b8b,_0x37caf0]),this[_0x1f9a92(_0x5d5cc6._0xd7413e)]();}async[_0x442b96(0x104)](_0x4cdd8c,_0x527f6c){const _0x2fd57f={_0x49635e:0x104},_0x63ad2c=_0x442b96;this[_0x63ad2c(0xad)](_0x63ad2c(_0x2fd57f._0x49635e),[_0x4cdd8c,_0x527f6c]),this['maybeThrow']();}async['uncheck'](_0x27b900,_0x3b3f73){const _0x1a416={_0x143eeb:0xde},_0x2f0bd0=_0x442b96;this['record'](_0x2f0bd0(_0x1a416._0x143eeb),[_0x27b900,_0x3b3f73]),this[_0x2f0bd0(0xfc)]();}async[_0x442b96(0xf6)](_0x1da901,_0x20b266,_0x5c322c){const _0x4dd22b=_0x442b96;this['record'](_0x4dd22b(0xf6),[_0x1da901,_0x20b266,_0x5c322c]),this['maybeThrow']();}async['hover'](_0x4982cc,_0x574e61){const _0x2513b3={_0x34c26a:0xdc},_0x450c8d=_0x442b96;this[_0x450c8d(0xad)](_0x450c8d(_0x2513b3._0x34c26a),[_0x4982cc,_0x574e61]),this[_0x450c8d(0xfc)]();}async[_0x442b96(0xe8)](_0x654da6){const _0x3ccca9={_0x10e92a:0xad},_0x5e69a8=_0x442b96;this[_0x5e69a8(_0x3ccca9._0x10e92a)](_0x5e69a8(0xe8),[_0x654da6]),this['maybeThrow']();}async['dragAndDrop'](_0x5a0b0d,_0x7f58c1,_0x24c545){const _0x1778d7={_0x4eef09:0xad},_0x41179a=_0x442b96;this[_0x41179a(_0x1778d7._0x4eef09)](_0x41179a(0xa0),[_0x5a0b0d,_0x7f58c1,_0x24c545]),this[_0x41179a(0xfc)]();}async['uploadFile'](_0x41da81,_0x32669d){const _0x441ce7={_0x4a7528:0xad,_0x45a8f7:0xea,_0x1441f1:0xfc},_0x5eb79c=_0x442b96;this[_0x5eb79c(_0x441ce7._0x4a7528)](_0x5eb79c(_0x441ce7._0x45a8f7),[_0x41da81,_0x32669d]),this[_0x5eb79c(_0x441ce7._0x1441f1)]();}async[_0x442b96(0x9c)](_0x275c4d,_0x35434e){const _0x36df49={_0x32fb5c:0xad},_0x47557e=_0x442b96;this[_0x47557e(_0x36df49._0x32fb5c)](_0x47557e(0x9c),[_0x275c4d,_0x35434e]),this[_0x47557e(0xfc)]();}async[_0x442b96(0x109)](_0x2f6a47){const _0x4103fd={_0x7a13e8:0xce},_0x38107f=_0x442b96;return this[_0x38107f(0xad)]('count',[_0x2f6a47]),this[_0x38107f(0xa1)][_0x38107f(_0x4103fd._0x7a13e8)]??0x1;}async[_0x442b96(0xcc)](_0x2ed2){const _0x5be3ce={_0x4c4551:0xad,_0x536b36:0xcc,_0x13cdae:0xa1,_0x1670d1:0xb4},_0x1f5fab=_0x442b96;return this[_0x1f5fab(_0x5be3ce._0x4c4551)](_0x1f5fab(_0x5be3ce._0x536b36),[_0x2ed2]),this[_0x1f5fab(_0x5be3ce._0x13cdae)][_0x1f5fab(_0x5be3ce._0x1670d1)]??'';}async[_0x442b96(0xd0)](_0x5669dd){const _0x4fd2d9={_0x1a1711:0xa1},_0x1b174a=_0x442b96;return this['record'](_0x1b174a(0xd0),[_0x5669dd]),this[_0x1b174a(_0x4fd2d9._0x1a1711)]['inputValueByDefault']??'';}async[_0x442b96(0xee)](_0x2fb0db){const _0x360cf2={_0x3c44cc:0xee},_0xf6e2db=_0x442b96;return this[_0xf6e2db(0xad)](_0xf6e2db(_0x360cf2._0x3c44cc),[_0x2fb0db]),this['behavior'][_0xf6e2db(0x101)]??null;}async['isVisible'](_0x27009d){const _0x25f355=_0x442b96;return this['record'](_0x25f355(0x10b),[_0x27009d]),this['behavior']['isVisibleByDefault']??!![];}async[_0x442b96(0x103)](_0x17fe83,_0x49e651){const _0x3fe916={_0x319aa9:0xa1},_0x426b34=_0x442b96;return this['record'](_0x426b34(0x103),[_0x17fe83,_0x49e651]),this[_0x426b34(_0x3fe916._0x319aa9)]['attributesByDefault']?.[_0x49e651]??null;}async[_0x442b96(0xc7)](_0x3cd8e2,_0x49a353){const _0x4676f7=_0x442b96;this[_0x4676f7(0xad)]('waitFor',[_0x3cd8e2,_0x49a353]);}async[_0x442b96(0xfb)](_0x4a5f77,_0x5a23bb){const _0x5ac838={_0x4d2117:0xfb},_0x3e6397=_0x442b96;this['record'](_0x3e6397(_0x5ac838._0x4d2117),[_0x4a5f77,_0x5a23bb]);}async[_0x442b96(0x10c)](_0x35b9f7,_0x4e2ba6){const _0x5dd6eb={_0x532f69:0x10c},_0x1173b9=_0x442b96;this[_0x1173b9(0xad)](_0x1173b9(_0x5dd6eb._0x532f69),[_0x35b9f7,_0x4e2ba6]);}async[_0x442b96(0xeb)](_0x224e30){const _0x5b0227=_0x442b96;this[_0x5b0227(0xad)](_0x5b0227(0xeb),[_0x224e30]);}async[_0x442b96(0xda)](_0x369079,_0x106896){this['record']('goto',[_0x369079,_0x106896]),this['currentUrl']=_0x369079;}async['reload'](_0x5488d4){const _0x4d94b6={_0x537847:0xad},_0x528d50=_0x442b96;this[_0x528d50(_0x4d94b6._0x537847)](_0x528d50(0x10d),[_0x5488d4]);}async[_0x442b96(0xc2)](_0x4f6dc1){const _0x3fb08b={_0x139dc6:0xc2},_0xc46f5f=_0x442b96;this[_0xc46f5f(0xad)](_0xc46f5f(_0x3fb08b._0x139dc6),[_0x4f6dc1]);}async['goForward'](_0x523861){const _0x495e43={_0x18fec4:0xc9},_0x313078=_0x442b96;this[_0x313078(0xad)](_0x313078(_0x495e43._0x18fec4),[_0x523861]);}async[_0x442b96(0x106)](_0x3daaf7){const _0x806ecb={_0x599e89:0xad},_0x253501=_0x442b96;return this[_0x253501(_0x806ecb._0x599e89)]('evaluate',[_0x3daaf7]),void 0x0;}async[_0x442b96(0xae)](_0x3d223e,_0x4eb7e9){const _0x52dcd2=_0x442b96;return this[_0x52dcd2(0xad)](_0x52dcd2(0xae),[_0x3d223e,_0x4eb7e9]),void 0x0;}async[_0x442b96(0xbe)](_0x3d8321){const _0x6f89f6={_0x29a8a3:0xbe,_0x2ac812:0xf1,_0x2f64fb:0xba,_0x3b76dd:0xf3},_0x3273ee=_0x442b96;this[_0x3273ee(0xad)](_0x3273ee(_0x6f89f6._0x29a8a3),[_0x3d8321]);if(_0x3d8321[_0x3273ee(0xf1)][_0x3273ee(0xb6)]!==0x1||_0x3d8321[_0x3273ee(_0x6f89f6._0x2ac812)][0x0][_0x3273ee(0xd2)]!==_0x3273ee(_0x6f89f6._0x2f64fb))return null;const _0x193d59=_0x3d8321[_0x3273ee(0xf1)][0x0][_0x3273ee(0xba)],_0x3ecf5f=this['behavior'][_0x3273ee(_0x6f89f6._0x3b76dd)]?.[_0x193d59];return _0x3ecf5f??null;}async[_0x442b96(0xa8)](_0x38d712){const _0x22b570={_0x490888:0xad,_0x509d43:0xc0},_0x57a71d=_0x442b96;return this[_0x57a71d(_0x22b570._0x490888)]('screenshot',[_0x38d712]),Buffer[_0x57a71d(_0x22b570._0x509d43)]('fake-png');}async['outerHTML'](_0x1d2a39){const _0x39abd8={_0x30353f:0xe7,_0x4a3196:0xf1,_0xf6647:0xb6,_0x454dd7:0xd2,_0x436af9:0xf1,_0x1d1f3c:0xd4,_0x4891f3:0xf0},_0x532fbd=_0x442b96;this[_0x532fbd(0xad)](_0x532fbd(_0x39abd8._0x30353f),[_0x1d2a39]);if(_0x1d2a39[_0x532fbd(_0x39abd8._0x4a3196)][_0x532fbd(_0x39abd8._0xf6647)]===0x1&&_0x1d2a39[_0x532fbd(_0x39abd8._0x4a3196)][0x0][_0x532fbd(_0x39abd8._0x454dd7)]==='ref'){const _0x18a26a=_0x1d2a39[_0x532fbd(_0x39abd8._0x436af9)][0x0][_0x532fbd(0xba)];return this['behavior']['outerHtmlByRef']?.[_0x18a26a]??_0x532fbd(_0x39abd8._0x1d1f3c)+_0x18a26a+'\x22></div>';}return _0x532fbd(_0x39abd8._0x4891f3);}},FakeContext=class{constructor(_0x2969b8,_0x199975,_0xb5316a){const _0x4d69e0={_0xb91334:0xfa,_0x2c0aa7:0x9e,_0x4a62a5:0xbd},_0x2377e2={_0xbb6b99:0xa4,_0x4f7a17:0xa6},_0x46717e=_0x442b96;this['recorder']=_0x2969b8,this['behavior']=_0x199975,this[_0x46717e(_0x4d69e0._0xb91334)]=_0xb5316a;const _0x3ba0a6=new FakePage(_0x2969b8,_0x199975,_0xb5316a+'.page0',_0x199975[_0x46717e(0xe6)]??_0x46717e(0xa2));_0x199975[_0x46717e(0xa6)]&&(_0x3ba0a6['onAfterClick']=()=>{const _0x3dda51=_0x46717e;this[_0x3dda51(_0x2377e2._0xbb6b99)](_0x199975[_0x3dda51(_0x2377e2._0x4f7a17)]);}),this['pageList']=[_0x3ba0a6],this[_0x46717e(0xa9)]={..._0x199975['localStorage']??{}},this[_0x46717e(_0x4d69e0._0x2c0aa7)]={..._0x199975[_0x46717e(_0x4d69e0._0x4a62a5)]??{}};}[_0x442b96(0xc6)];[_0x442b96(0xa1)];[_0x442b96(0xfa)];static{__name(this,'FakeContext');}[_0x442b96(0xfd)];[_0x442b96(0xa3)]=0x0;[_0x442b96(0x102)]=[];['localStorageState'];[_0x442b96(0x9e)];['newPageListeners']=new Set();[_0x442b96(0xad)](_0x289687,_0x30a23f){const _0xa6f363={_0x3e50c7:0xc8},_0x5a8303=_0x442b96;this[_0x5a8303(0xc6)][_0x5a8303(_0xa6f363._0x3e50c7)]({'scope':this[_0x5a8303(0xfa)],'method':_0x289687,'args':_0x30a23f});}[_0x442b96(0xc3)](){const _0x2adea5={_0x39a73c:0xfd},_0x4f9727=_0x442b96;return this[_0x4f9727(_0x2adea5._0x39a73c)];}[_0x442b96(0xbc)](){const _0x54df14={_0x25abd1:0xfd},_0x3bb225=_0x442b96,_0x2cdaae=this[_0x3bb225(_0x54df14._0x25abd1)][this['activeIdx']];if(!_0x2cdaae)throw new DriverError(_0x3bb225(0xb9),{'activeIdx':this[_0x3bb225(0xa3)]});return _0x2cdaae;}[_0x442b96(0xf2)](){return this['behavior']['consoleEntries']??[];}['networkEntries'](){const _0x4264aa={_0x2954e4:0xe5},_0x2fbe57=_0x442b96;return this[_0x2fbe57(0xa1)][_0x2fbe57(_0x4264aa._0x2954e4)]??[];}async['setActivePage'](_0x49d6bf){const _0x127f54={_0x4418e7:0xfd},_0x264e09=_0x442b96;this['record'](_0x264e09(0xb7),[_0x49d6bf]);if(_0x49d6bf<0x0||_0x49d6bf>=this[_0x264e09(_0x127f54._0x4418e7)][_0x264e09(0xb6)])throw new DriverError(_0x264e09(0xca),{'index':_0x49d6bf,'available':this['pageList']['length']});this[_0x264e09(0xa3)]=_0x49d6bf,this[_0x264e09(0x102)][_0x264e09(0xb6)]=0x0;}[_0x442b96(0x107)](_0x19e550){const _0x49dce1={_0x3c8dce:0xc1},_0x4d4e28=_0x442b96;return subscribe(this[_0x4d4e28(_0x49dce1._0x3c8dce)],_0x19e550);}[_0x442b96(0xa4)](_0x203f2a){const _0x5e5020={_0xe3e221:0xfa,_0x11662a:0xfd,_0x369247:0xc6,_0x206c88:0xa1},_0x1ce683=_0x442b96,_0x3be129=this[_0x1ce683(_0x5e5020._0xe3e221)]+_0x1ce683(0xd8)+this[_0x1ce683(_0x5e5020._0x11662a)]['length'],_0x3db6b6=new FakePage(this[_0x1ce683(_0x5e5020._0x369247)],this[_0x1ce683(_0x5e5020._0x206c88)],_0x3be129,_0x203f2a);this[_0x1ce683(0xfd)][_0x1ce683(0xc8)](_0x3db6b6);const _0x542868=this[_0x1ce683(0xfd)][_0x1ce683(0xb6)]-0x1;for(const _0x56dff4 of this['newPageListeners']){try{_0x56dff4({'index':_0x542868,'url':_0x203f2a});}catch{}}return _0x542868;}['closeFakePage'](_0x3f1eb0){const _0x4ea336={_0x4ea873:0xfd,_0x562ec3:0xfd},_0x7b73b9=_0x442b96;if(_0x3f1eb0<0x0||_0x3f1eb0>=this[_0x7b73b9(0xfd)][_0x7b73b9(0xb6)])throw new DriverError(_0x7b73b9(0xca),{'index':_0x3f1eb0,'available':this[_0x7b73b9(_0x4ea336._0x4ea873)][_0x7b73b9(0xb6)]});this[_0x7b73b9(_0x4ea336._0x562ec3)][_0x7b73b9(0x9d)](_0x3f1eb0,0x1);}async[_0x442b96(0x108)](_0xf5c29a){const _0x5eefcd={_0x444db4:0xad,_0x39c238:0x108,_0x53aa06:0xf1,_0x2e8f1c:0xb6,_0x3cbaec:0x102},_0x67f5fe=_0x442b96;this[_0x67f5fe(_0x5eefcd._0x444db4)](_0x67f5fe(_0x5eefcd._0x39c238),[_0xf5c29a]);if(!_0xf5c29a[_0x67f5fe(_0x5eefcd._0x53aa06)][_0x67f5fe(_0x5eefcd._0x2e8f1c)])throw new LocatorError(_0x67f5fe(0xd7),{'locator':_0xf5c29a});this[_0x67f5fe(_0x5eefcd._0x3cbaec)]['push'](_0xf5c29a);}async['exitFrame'](){const _0x420652={_0x3e0903:0xe9,_0x19f2a8:0x102},_0xa047c8=_0x442b96;this[_0xa047c8(0xad)](_0xa047c8(_0x420652._0x3e0903),[]);if(this[_0xa047c8(_0x420652._0x19f2a8)]['length']===0x0)throw new DriverError(_0xa047c8(0xd1),{});this['frameStack'][_0xa047c8(0xd6)]();}async['setLocalStorage'](_0x327218,_0x6c2f51){const _0xd1e745={_0x4466b5:0xa9},_0x1b7c19=_0x442b96;this[_0x1b7c19(0xad)](_0x1b7c19(0xe0),[_0x327218,_0x6c2f51]),this[_0x1b7c19(_0xd1e745._0x4466b5)][_0x327218]=_0x6c2f51;}async[_0x442b96(0xdd)](_0x2bd207){const _0x3e468a={_0xb652ac:0xdd},_0x380c30=_0x442b96;return this[_0x380c30(0xad)](_0x380c30(_0x3e468a._0xb652ac),[_0x2bd207]),this[_0x380c30(0xa9)][_0x2bd207]??null;}async[_0x442b96(0xe3)](_0x167f70,_0x310cba,_0x554419){const _0x3bde5f=_0x442b96;this[_0x3bde5f(0xad)](_0x3bde5f(0xe3),[_0x167f70,_0x310cba,_0x554419]),this[_0x3bde5f(0x9e)][_0x167f70]=_0x310cba;}async[_0x442b96(0xf7)](_0x317f53){const _0x3fb3c9=_0x442b96;return this[_0x3fb3c9(0xad)]('getCookie',[_0x317f53]),this[_0x3fb3c9(0x9e)][_0x317f53]??null;}async['saveStorageState'](_0x384034){this['record']('saveStorageState',[_0x384034]);}async[_0x442b96(0x106)](_0x52e2fa){const _0x6bb0c5={_0x36e143:0xad},_0x42e5cf=_0x442b96;return this[_0x42e5cf(_0x6bb0c5._0x36e143)](_0x42e5cf(0x106),[_0x52e2fa]),void 0x0;}async[_0x442b96(0xbf)](){const _0x1ae1ca=_0x442b96;this[_0x1ae1ca(0xad)]('close',[]);}[_0x442b96(0xfe)](){const _0x48c408={_0x5a0338:0x102,_0x1059f0:0xb6},_0x1eaaf8=_0x442b96;return this[_0x1eaaf8(_0x48c408._0x5a0338)][_0x1eaaf8(_0x48c408._0x1059f0)];}},FakeWebDriver=class{constructor(_0x3ec4ed={}){const _0x2a83e4={_0x242ce2:0xc6},_0x342a77=_0x442b96;this['behavior']=_0x3ec4ed,this[_0x342a77(_0x2a83e4._0x242ce2)]=createRecorder();}['behavior'];static{__name(this,_0x442b96(0xed));}['launched']=![];['recorder'];[_0x442b96(0x105)]=[];async['launch'](_0x3a3af9){const _0x27e4cb={_0x33877c:0xc6,_0x2bb819:0xcf},_0x3ca96a=_0x442b96;this[_0x3ca96a(_0x27e4cb._0x33877c)][_0x3ca96a(0xc8)]({'scope':_0x3ca96a(0xcd),'method':_0x3ca96a(_0x27e4cb._0x2bb819),'args':[_0x3a3af9]}),this['launched']=!![];}async[_0x442b96(0xac)](_0x56a71a){const _0x33e6fb={_0x27a9bb:0xc8,_0x5543b8:0xc6,_0x300189:0xa1,_0x24d1a4:0xd3,_0x5c5b69:0x105,_0x448ad9:0xb6},_0x338192=_0x442b96;this[_0x338192(0xc6)][_0x338192(_0x33e6fb._0x27a9bb)]({'scope':'driver','method':'newContext','args':[_0x56a71a]});if(!this[_0x338192(0xbb)])throw new DriverError(_0x338192(0xdf),{});const _0x40f3a9=new FakeContext(this[_0x338192(_0x33e6fb._0x5543b8)],this[_0x338192(_0x33e6fb._0x300189)],_0x338192(_0x33e6fb._0x24d1a4)+this[_0x338192(_0x33e6fb._0x5c5b69)][_0x338192(_0x33e6fb._0x448ad9)]);return this['contexts']['push'](_0x40f3a9),_0x40f3a9;}async[_0x442b96(0xbf)](){const _0x12deb7={_0x29a58d:0xbb},_0x5cac2e=_0x442b96;this[_0x5cac2e(0xc6)]['push']({'scope':'driver','method':_0x5cac2e(0xbf),'args':[]}),this[_0x5cac2e(_0x12deb7._0x29a58d)]=![];}['wsEndpoint'](){return void 0x0;}async[_0x442b96(0xb8)](){const _0x114b6f=_0x442b96;throw new DriverError(_0x114b6f(0xdb),{});}['attachExisting'](){const _0x1fe38d=_0x442b96;throw new DriverError(_0x1fe38d(0xef),{});}[_0x442b96(0xb1)](){const _0x1b7742=_0x442b96;return this[_0x1b7742(0xc6)]['calls']();}[_0x442b96(0xf4)](_0x1474bf){const _0x2a3a2d={_0x12a23d:0xa5},_0x2bce50=_0x442b96;return this[_0x2bce50(0xc6)]['calls']()[_0x2bce50(_0x2a3a2d._0x12a23d)](_0x4f65b7=>_0x4f65b7[_0x2bce50(0x9f)]===_0x1474bf);}};export{FakeWebDriver};
|
package/dist/dsl/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as LocatorValue, W as WebDriver, D as DriverContext, d as DriverPage } from '../interfaces-
|
|
2
|
-
export { j as LocatorStep, k as appendStep, l as describeLocator, m as isLocatorValue, r as rootedAt } from '../interfaces-
|
|
1
|
+
import { i as LocatorValue, W as WebDriver, D as DriverContext, d as DriverPage } from '../interfaces-BxviHxnr.js';
|
|
2
|
+
export { j as LocatorStep, k as appendStep, l as describeLocator, m as isLocatorValue, r as rootedAt } from '../interfaces-BxviHxnr.js';
|
|
3
3
|
import { Matcher, RegexLiteral } from '@unotest/protocol';
|
|
4
4
|
import { ExecutionWalker, ExecutionEvent, RunResult, RunOptions } from '@unotest/dsl/executor';
|
|
5
5
|
export { ExecutionError, ExecutionEvent, RunOptions, RunResult } from '@unotest/dsl/executor';
|
|
@@ -46,6 +46,7 @@ declare function filter(loc: LocatorValue, options: {
|
|
|
46
46
|
declare function first(loc: LocatorValue): LocatorValue;
|
|
47
47
|
declare function last(loc: LocatorValue): LocatorValue;
|
|
48
48
|
declare function nth(loc: LocatorValue, index: number): LocatorValue;
|
|
49
|
+
declare function randomNth(loc: LocatorValue): LocatorValue;
|
|
49
50
|
declare function contentFrame(loc: LocatorValue): LocatorValue;
|
|
50
51
|
declare function chainGetByRole(loc: LocatorValue, role: string, options?: {
|
|
51
52
|
name?: Matcher;
|
|
@@ -83,6 +84,12 @@ interface Logger {
|
|
|
83
84
|
child(prefix: string): Logger;
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
interface ScreenshotSink {
|
|
88
|
+
/** Persist one PNG capture. Returns the project-relative path the
|
|
89
|
+
* artifact landed at. */
|
|
90
|
+
save(name: string, png: Buffer): Promise<string>;
|
|
91
|
+
}
|
|
92
|
+
|
|
86
93
|
type DslPrimitive = string | number | boolean | null;
|
|
87
94
|
type DslObject = {
|
|
88
95
|
readonly [key: string]: DslValue;
|
|
@@ -107,6 +114,10 @@ interface TestRuntimeDeps {
|
|
|
107
114
|
readonly baseUrl?: string;
|
|
108
115
|
/** Injectable clock — defaults to Date.now. Tests pass a fake. */
|
|
109
116
|
readonly nowFn?: () => number;
|
|
117
|
+
/** Sink for on-demand `screenshot()` captures. Wired by the CLI runner
|
|
118
|
+
* to the run dir; absent in ad-hoc / explore runtimes (the DSL
|
|
119
|
+
* function then logs and skips). */
|
|
120
|
+
readonly screenshots?: ScreenshotSink;
|
|
110
121
|
}
|
|
111
122
|
declare class TestRuntime {
|
|
112
123
|
readonly runId: string;
|
|
@@ -115,6 +126,7 @@ declare class TestRuntime {
|
|
|
115
126
|
readonly logger: Logger;
|
|
116
127
|
readonly sandbox: SandboxConfig;
|
|
117
128
|
readonly baseUrl?: string;
|
|
129
|
+
readonly screenshots?: ScreenshotSink;
|
|
118
130
|
private readonly variables;
|
|
119
131
|
private readonly nowFn;
|
|
120
132
|
private readonly scope;
|
|
@@ -254,6 +266,10 @@ declare class TestRuntimeManager {
|
|
|
254
266
|
* attach its overlay to the page held open during a debug pause.
|
|
255
267
|
* Returns null when the runtime is gone or has no page yet. */
|
|
256
268
|
currentPage(id: string): DriverPage | null;
|
|
269
|
+
/** Every open page of the runtime's context (debug picker arms its overlay
|
|
270
|
+
* on all of them at once, Playwright-codegen style). Empty when the runtime
|
|
271
|
+
* is gone or has no context yet. */
|
|
272
|
+
pages(id: string): readonly DriverPage[];
|
|
257
273
|
/** The runtime's driver context (for capture artifacts — console/network).
|
|
258
274
|
* Null when the runtime isn't registered. */
|
|
259
275
|
currentContext(id: string): DriverContext | null;
|
|
@@ -266,4 +282,4 @@ declare class TestRuntimeManager {
|
|
|
266
282
|
/** Build a fully-populated FunctionRegistry. */
|
|
267
283
|
declare function buildDefaultRegistry(): FunctionRegistry;
|
|
268
284
|
|
|
269
|
-
export { AstExecutor, type DslArg, type DslArray, type DslFunction, type DslObject, type DslValue, FunctionRegistry, LocatorValue, TestRuntime, TestRuntimeManager, buildDefaultRegistry, chainGetByAltText, chainGetByLabel, chainGetByPlaceholder, chainGetByRole, chainGetByTestId, chainGetByText, chainGetByTitle, contentFrame, filter, first, getByAltText, getByLabel, getByPlaceholder, getByRole, getByTestId, getByText, getByTitle, last, locator, nth, re };
|
|
285
|
+
export { AstExecutor, type DslArg, type DslArray, type DslFunction, type DslObject, type DslValue, FunctionRegistry, LocatorValue, TestRuntime, TestRuntimeManager, buildDefaultRegistry, chainGetByAltText, chainGetByLabel, chainGetByPlaceholder, chainGetByRole, chainGetByTestId, chainGetByText, chainGetByTitle, contentFrame, filter, first, getByAltText, getByLabel, getByPlaceholder, getByRole, getByTestId, getByText, getByTitle, last, locator, nth, randomNth, re };
|