* feat(web): init scripts run before the page's own, configured with web({ initScripts }) or added per test with browser.addInitScript
* refactor(web): one owner for configured init scripts, read beside the browser launch
* feat(web): export WebInitScript
* fix(web): settle the browser launch before a failed init-script read throws; docs examples compile
* fix(web): refuse sparse initScripts, keep an own __proto__ key in the init-script argument
* docs(web): seed Math.random in the init-script examples
* docs(web): trim init-script docs to what users need
* docs(skill): addInitScript takes arg with a function only
* feat(web)!: pin playwright-core and add an install command
@e2e-dev/web depends on playwright-core 1.63.0 instead of peering on
playwright. New e2e-web bin installs browsers for the pinned version:
npx @e2e-dev/web install chromium --with-deps. e2e init no longer adds
playwright.
* test(web): run the e2e-web bin for real, and in CI
* test(web): spawn the built e2e-web bin so Node 22.12 runs it
* feat(web): locale and timezoneId options set the language and time zone every attempt runs in
* docs(web): timezoneId validation is best effort, the browser has the final word
* fix(web): continue skips earlier routes, decisions take or reject Playwright options
continue went through Playwright fallback, so an earlier route answered. It now continues to the network, merging site headers itself; fallback() keeps chaining. continue takes url/method/headers/postData (url via resolveUrl), fulfill takes path/contentType; unknown options are INVALID_ARGUMENT. waitForResponse timeout bounds the match only; setCookies passes the resolved url.
* fix(web): route header overrides follow the web({ headers }) grammar
* refactor(web): route options reuse rejectUnknownOptions
* test(web): route url fake follows the http(s) navigation allowlist
* fix(web): fulfill keeps a content-type header over the json or path type
* fix(security): allow only http(s) navigation, refuse wrapped schemes on device links
view-source:file:// passed the file:/data:/javascript: denylist and loaded local files via app.open, browser.goto, and the navigate verb. resolveNavigationUrl now admits http: and https: only; mobile links also refuse view-source:, blob:, filesystem:.
* fix(security): admit exact about:blank, sync rule text in AGENTS.md and SECURITY.md
* fix(web): refuse about:blank cookie URL, qualify scheme rule text
* fix(web): read each locate match in the task that finds it
Locate queried matches, then read them in a later protocol call. A page
that replaces a match every frame detached it in between whenever a frame
passed, so on a starved runner every retry read a detached match and
the locate livelocked until the action timeout (LOCATOR_NOT_FOUND, node
became stale). The pinned label/display-value path had the widest gap.
A new e2e-read selector engine, appended to the projected locator, reads
each match inside the query and records the read on the element under a
per-locate token; locate takes the reads back from the returned elements
(or from the pinned handles). The detached-read plumbing is gone.
* fix(web): refuse a capture selector the locate read cannot follow
* test(e2e): starve the runner with Atomics.wait, not a spinning core
* fix(expect): matcher options are honored or rejected, never silently ignored
* refactor(web): reuse core rejectUnknownOptions, presence toHaveAttribute reads third arg
- e2e/engine exports rejectUnknownOptions; web drops its timeout-only copy
- toHaveAttribute(name, undefined, options) validates and times out on options
- waitForURL waitUntil refusal tested and noted in migration table
* docs(engine): rejectUnknownOptions takes code, options must be plain object
* fix(expect): toHaveAttribute refuses a null value or options; tests use the @e2e-dev scope
* fix(expect): use the browser fixture name after the web rename
* feat!: browser fixture, getByRole name arg, toMatchSchema, top-level hooks, separate credential namespace
API review feedback before launch:
- web fixture renamed browser (Web -> Browser, WebExpectation ->
BrowserExpectation); requires: ['browser']; destructuring web hints the
new name. web() factory and other Web* types unchanged.
- getByRole(role, name, options?) beside the object form; MCP locate
writes the short form.
- expect(value).toMatchSchema(standardSchema): sync, returns the typed
output; poll resolves to it, soft returns undefined after a kept failure.
- describe, beforeEach, afterEach, beforeAll, afterAll exported from e2e;
web and mobile export typed beforeEach/afterEach.
- credentials and secrets are separate namespaces: a password handle is
<name>.password, secrets.get() never returns it. Committed recordings
migrated offline (old key hash verified, then recomputed).
- runtime test.skip keeps Playwright semantics; docs say it throws.
* docs(web): browser acts on one active tab; cookies, routes, dialogs cover the whole browser
* fix(secrets): judge a fill's purpose by the config, not the handle; no old-name hints
A config-time secrets.get() handle reads its purpose from the run's
registry again, and authorizeSecretFill checks the registered purpose, so a
handle claiming generic-secret cannot put a password into a plain field.
Drop the web fixture migration hint. Changesets name the on-screen marker
change for replay entries.
* docs(skill): browser fixture, getByRole name arg, toMatchSchema, top-level hooks, credential namespace on the rewritten skill
* fix(expect): negated toMatchSchema returns nothing, as its type says
* fix(expect,docs): soft double negation stays soft, null ~standard is INVALID_ARGUMENT, Playwright samples keep Playwright's getByRole
Also documents SoftExpectCall, SoftValueExpectation, and NegatedPollExpectation
on the expect reference, requires: ['browser'] in the skill's options table,
and tightens the poll and secret-purpose tests.
* docs(babysit): triage pattern for scripted renames that rewrite another library's code
* docs: engine options take a secrets entry, web package hook exports, vault example imports
* refactor(secrets)!: credentials hold their password, allSecrets feeds fills; engines export describe and every hook; BrowserRoute, BrowserResponse
From the maintainability review:
- ResolvedConfig.secrets is the config.secrets entries only; a credential
carries its password; allSecrets is the one map fills, the ledger, and
redaction read. The per-consumer purpose filters and the .password
suffix parsing are gone, and e2e mcp builds handles from config.
- The config load and a running test name the credential a missing
secrets.get() most likely meant.
- @e2e-dev/web and @e2e-dev/mobile export describe and all four hooks
beside test, so a test file registers from one import.
- WebRoute and WebResponse are BrowserRoute and BrowserResponse.
- getByRole normalizes its arguments once; isTextMatch is the one
string-or-RegExp check; poll reuses ValueMatcherName.
* revert(web): keep WebRoute and WebResponse; Browser names the fixture, Web the network and option types
* feat!: the app is declared on its target; engines only drive it
The app under test moves from the engine's options to `targets: [{ engine,
app }]`: `url`, `bundleId`, `appPath`, `identity`, `environment`,
`launchArguments`, `permissions`, `command`, and `readyUrl`. `web()` and
`mobile()` refuse every moved option in one `INVALID_CONFIG` naming the
target block; `defineEngine({ app })` is gone and engines check what their
platform needs in `validateApp`. `requires: ['browser' | 'native-app']` is
derived from the target's app. Replay cache and session keys are byte for
byte what they were, pinned by target-identity.test.ts.
Dependency services are not part of this version: `services` anywhere, and
`web({ services })`, fail saying so. `app.command` on port 0 without a
command, and `reuseExisting` on a free port, are refused. An `e2e mcp`
open cancelled or disconnected mid-start stops what it started, and a hung
shared start is abandoned once no session waits on it.
* fix: review follow-ups: cancelled opens, abandoned starts, null targets, stale docs
* refactor: drop the moved-option messages; old app keys are unknown keys
* test: give the replaced-nodes suite a budget that survives a loaded runner
* test: size the replaced-nodes hook budget to its seven tests
* fix(web): names read generated content and drop icon-font glyphs
The tree named <button><i class="fa fa-sign-in"> Login</i></button> "Login"
while getByRole read the ::before glyph and found nothing. Names now read
::before/::after content as accname, Chrome, and Playwright do; private-use
glyphs are dropped from the reported name, and a role query's string name
tolerates them in the browser's name.
* fix(web,kernel): waitForDownload works on a Kernel browser
A remote browser saves downloads to its own disk, so Playwright's saveAs
over CDP always failed with 'canceled'. BrowserProvider gains an optional
downloads { dir, read }: the engine points the context's downloads at dir
on the browser's machine and reads the finished file back. kernel()
implements it with the browser filesystem API. Without it, the failure
names the provider.
* fix(web): forward worker-side lease progress to the reporter
Attempt-scope and replacement leases were acquired with a discarded log,
so Kernel's live-view line never showed. Use the worker's init log.
* fix(web,kernel): sweep leases a dead worker left open
A worker killed mid-attempt in kernel({ scope: 'attempt' }) leaked its
browser until Kernel's timeout. BrowserProvider gains an optional sweep,
called once per target in finish after the held leases are released;
kernel() deletes every active browser tagged with the run and target.
* fix(web,e2e): name persistent-context limits early
app.clearState() in attempt scope said 'engine web does not implement it';
the engine now refuses it naming the mode. A session consumed on a target
without a state capability fails selection with COLLECTION_ERROR instead
of failing session.save() after the setup test logged in.
* fix(kernel): trim Kernel error messages; docs: attempt scope rules out userAgent
The SDK keeps the newline Kernel ends an error body with, splitting the
run's error line. Trim every SDK failure's message.
* fix(web): absolute downloads.dir; crosscheck spaces glyphs as the tree does
Also guards the provider-downloads test cleanup and notes in the changeset
that a role query by a glyph-only control's title finds nothing.
* test(skill): fail a skill or docs paragraph that passes the removed --artifacts
* fix(config): name the replacement for a removed createAgent import
* fix(config): keep the code of a config error raised while the config evaluates
* fix(secrets): refuse a secrets.get() reference where a string is needed
* fix(config): reject unknown keys in engine, command, test, and query options
* fix(config): refuse a tests entry naming a directory, name the ! entry excluding a positional
* refactor(config): derive option key lists from their types
* fix(config): one shared unknown-key check; drop undefined env values
Setup and describe option keys typed from their interfaces; a directory tests entry is INVALID_GLOB like a trailing slash.
* fix(collect): name the excluding ! entry when exclusions left nothing, and in on-disk casing
* fix(config): address review - exclusion hint for bare names, array env, qualified hints
* test(select): use a missing tmp root, not /root, which CI cannot stat
* fix(mobile): accept videoTouches, added on main by #671, in the mobile() key list
* fix(mobile): reject unknown permission names and states in mobile() and device.openApp
Names and states are checked against DevicePermission and PermissionState
through satisfies-typed key lists. INVALID_CONFIG at load, INVALID_ARGUMENT
from device.openApp, before any device command. rejectUnknownKeys takes an
optional code for the test-time case.
* fix(eas): reject unknown easSimulators() options with INVALID_CONFIG
Its options are its own, mapped onto EAS's create input, not a passed-through
SDK body, so a typo such as buildID was dropped silently. Its two other option
refusals are INVALID_CONFIG too. e2e is now a peer, for e2e/engine.
* fix(mobile): require a plain object for permissions; clarify eas and permission notes
A Map passed the object check with no own keys, and the preset applied none
of it.
* feat(config)!: remove specVersion from the config
The runner version is the format version. A config that still sets
specVersion fails INVALID_CONFIG telling the author to remove it. The
report's run.specVersion and the replay cache key keep their hard-coded
copies.
* feat(collect): "!" exclusions in the tests globs
An entry starting with "!" removes files an including glob matched,
in any order. Discovery never reads a directory an exclusion takes
whole, unless an including glob could reach a dot name beneath it.
A list of only exclusions is INVALID_CONFIG.
* refactor!: CacheStore and web({ screencast }) renames
TraceCacheStore is CacheStore, and the docs, skill, and CLI call the
cache the replay cache. web({ video: { size, quality } }) is
web({ screencast }) with WebScreencastOptions; web({ video }) fails
INVALID_CONFIG naming screencast.
* feat(secrets): secrets.get() in engine options, resolved per attempt
At config evaluation, before any run exists, secrets.get(name) returns
a reference by name. An engine declares the handles its options hold
in defineEngine({ secrets }); the config load fails INVALID_CONFIG for
a name no secret or credential has. The engine reads the value through
EngineAttemptContext.resolveSecret, which runs a provider fresh and
registers the value in the session and process ledgers before it
returns, without tainting the viewport. e2e/engine exports isSecret.
web({ basicAuth: { password } }) takes a Secret and declares it. Docs
show process.loadEnvFile('.env') in the config.
* feat(run)!: trace and video share recording modes; artifacts holds only store
One RecordingMode ('off' | 'on' | 'retain-on-failure' | 'on-first-retry' |
'on-all-retries') for trace and video, set on the config, a target, the CLI
(--trace [mode], --video [mode]) and a test, one precedence rule: config,
target, CLI, test. Trace defaults to on locally, on-first-retry in CI, with
a plan-time notice when a retry mode meets retries: 0. Serial members cannot
set trace.
Capability rule: a mode from the config root or a flag applies to targets
whose engine can record it, one notice naming the rest; a mode set on a
target or a test is required and fails with UNSUPPORTED_ARTIFACT.
artifacts.kinds (both forms) and artifacts.trace are removed and fail
INVALID_CONFIG naming the trace mode they meant. Failure screenshot and
screen text are always captured when the engine can. MCP sessions keep the
target's trace mode and trace only under 'on'.
* feat(run)!: output directory for every run result; ArtifactStore.putLink
output (default .e2e) and --output <dir> on run and explore hold report.json,
junit.xml, summary.md, ai-trace.json, artifacts/, sessions/ and the e2e mcp
session files; --last-failed reads <output>/report.json. The reportSibling
derivation from the artifacts dir is gone. --artifacts stays as a hidden
flag that fails with the --output it maps to.
A run clears <output>/artifacts at start. cache.dir stays independent. An
output that is the project root or outside it, is or sits in cache.dir,
would hold cache.dir under artifacts/, sessions/ or videos/, or holds a
tests glob root fails INVALID_CONFIG with the reason.
ArtifactStore gains optional putLink(link) for provider-hosted video links;
its ref lands beside the url. A passed retain-on-failure attempt's link is
never handed over, and a failing putLink never fails the run.
bench-ab and the mobile workflow move to --output.
* test(secrets): a hold's registry is probed by an unknown name, now that get() defers without one
* test(web): the download trigger's measured wait tolerates a timer firing early
* fix(secrets): rewrite the trace of an attempt whose engine holds a secret
A Playwright trace records the context options, basic-auth password in
plaintext, but a trace was rewritten only after a fill. resolveSecret now
marks the session so its trace goes through the redactor, screencast
frames kept since the value never reached the screen. The fake engine
writes a real trace archive, and the basic-auth fixture escapes its echo
and refuses a malformed header.
* fix(web): race the basic-auth secret with the attempt's signal
A provider still resolving after the launch timeout set the session after
the runner ended the attempt, so the retry failed with an attempt already
running. Resolution now runs first, raced with the signal.
* fix(mcp): a session notes a configured trace its engine cannot record
* test: a shadow-free fake trace archive and an ungarbled exclusion title
* docs: output paths, replay cache wording, and review corrections
--last-failed, --ai-trace, and the json reporter name <output> paths;
the skill says output never moves cache/ or the app's log; the
INVALID_GLOB row states the check the code makes; serial members list
only; the engine vocabulary names Secret and isSecret; the basic-auth
example uses a provider; the last trace cache wording is replay cache.
* chore(changeset): leave released notes alone; pending notes match the renames
Released CHANGELOG entries keep TraceCacheStore, the name they shipped
with; cache-store-rename.md announces the rename. The pending video and
provider recording changesets name on-all-retries and web({ screencast }).
* chore(bench): refuse a forwarded --output the harness would not clean up
* fix(secrets): a rewritten trace drops its screencast frames, engine-held secrets included
* feat(run)!: video modes on the config, targets, the CLI, and tests, with step captions
video: off | on | retain-on-failure | on-first-retry at the config root, per
target, --video [mode], and per test or describe, innermost winning.
artifacts.kinds: ['video'] and artifacts.video are removed. Kept recordings
get WebVTT step captions; a video can be a link to a hosted recording. The
engine contract's VideoSegment is a file or a link, and e2e/engine exports
the provider recording seam.
* feat(web): a browser provider records the attempts it serves, and the screencast takes a size and quality
BrowserProvider.record starts the service's own recording of the browser in
place of the page screencast. The session drives one AttemptVideo, the
screencast or the provider's. web({ video: { size, quality } }) tunes the
screencast.
* feat(mobile): a device provider records the attempts it serves
DeviceProvider.record starts the service's own recording of the leased
device in place of agent-device's. The worker learns its slot's lease id,
so record gets the lease as it traveled.
* feat(integrations): Kernel replays record the attempts that record video
* fix(run): captions never fail a video, provider values are normalized, and one list of modes
- Step captions create their directory and are best-effort.
- A provider's recording is checked at start in both engines and its URL
and start time are stored in the shapes the report schema admits; the
list reporter bounds a hosted URL.
- --video no longer hides an invalid target mode.
- A describe inside a serial group cannot set video.
- A mobile provider may keep its own leaseId field on a lease.
* fix(mobile): keep the lease type narrowed when checking its declared fields
* fix(run): MCP recordings get their step captions, a step spanning a restart is captioned in both recordings, and video.size refuses unknown keys
* fix: address review on the video API
- One stop in flight per provider recording, shared by a retry; mobile
dispose stops it, and a cancelled operation never starts one.
- Kernel retries a failed download without stopping the replay twice.
- Links from any engine are held to an http(s) URL with a host; a file a
provider names must be a regular file; media types are trimmed.
- web({ video }) takes a plain object only; the markdown page labels a
hosted artifact by its kind.
- Tests: fixture byte totals, captions linked by id, temp directories
removed, signals asserted, empty sizes, non-object options.
- Docs: engine support qualified, the explore row, the standalone preflight,
caption status text, a checked stop in the provider example.
* fix(run): a bad engine video link costs no other recording, captions path per recording in debugging guide
* test: fake engine video links doc matches segment order
* fix(mcp): session recordings follow video modes and list a provider's link
* test(web): provider test's fake page reports its viewport
* refactor(run): drop step captions from the video API, tracked in #636
* fix(web): a late provider start never replaces a newer recording, abandon keeps a failed stop's handle, video.size must be a plain object; provider recording errors and hosted URLs bounded
* fix(web): a response body the browser could not read rejects text() and json()
`web.waitForResponse` swallowed a failed body read into an empty buffer.
A server answering 200 with `Content-Length: 1000`, a fragment, and a
connection reset resolved with status 200 and `text()` of `''`, so a test
asserting an empty body passed and a test after the transport failure
could not see one. The read now keeps its outcome: `url`, `status`, and
`headers` stay readable, `text()` and `json()` reject with `ACTION_FAILED`
naming the browser's reason (`net::ERR_CONTENT_LENGTH_MISMATCH`), and a
genuinely empty 200 or 204 body still reads as `''`.
* fix(web): document redirect and aborted body rejections
* fix(web): locators resolve inside closed shadow roots the reader observes
The observation has pierced closed roots for a while, so a failure printed
nodes no query could reach. An e2e-roots selector engine hands Playwright's
own role, text, label and test-id engines every closed root the page
attached, so each element matches once; a page without closed roots pays
nothing. The six query kinds declare their candidates in one table.
read-node.ts is 153 lines: the closed-root scripts live in closed-shadow.ts,
the in-page reader in in-page/read-semantics.ts. The shadow-dom-form twin
lands with it, and the agentic scenario loses a gap that was already stale.
* fix(web): labels referenced by id and focus resolve inside shadow roots
Two reader reads stopped at the document. referencedNamesOf resolved an
aria-labelledby id through ownerDocument.getElementById, which never sees a
shadow tree ids, so a control inside a root had no label for the exact
getByLabel check and the observed tree listed it unnamed; the id now resolves
in the control own tree via getRootNode(). focused compared
document.activeElement, which is retargeted to the outermost host; the reader
now follows each root activeElement, through open roots and the recorded
closed ones, to the element that holds focus.
Covered on /closed-form (aria-labelledby inputs in the closed root and the
open root below it, exact and loose label queries, focus by tap with an
unfocused sibling) and in the reader names test with a same-id decoy in the
light DOM.