92 Commits
Author SHA1 Message Date
gagarinyuryandClaude Opus 5.5 5889a0a1b7 docs(reference): list waitForURL's timeout override and the tab actions in ActionName (#2496)
browser.waitForURL takes { timeout } (browser.ts accepts it and the
waitForURL section shows it), but the override list left it out and said
no other member takes one. ActionName is RecordedAction's names without
tool, which include switchTab and closeTab; onAction reports them.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:03:10 +00:00
Oskar Kwaśniewski f67aebcbbc docs: restructure navigation, merge pages, trim reference (#2448)
* docs: restructure navigation, merge pages, trim reference

Reorders the sidebar and gives groups icons, folds five thin pages into their neighbours with redirects, rewrites core concepts, coding agents and debugging shorter, adds reference pages for the desktop and Electron engines, rewrites every page description for search, and removes implementation detail and JSDoc from the reference pages.

* docs: fix review findings in guides, reference and translations

Corrects claims a review checked against source, and stops translated pages linking to anchors their page does not have yet.
2026-11-28 14:44:56 +01:00
Lenin MookiahandLenin Mookiah 32822769ea docs(reference): add the members three type blocks leave out (#2381)
TestAPI gets slow, setTimeout, and step, WebOptions gets chromiumSandbox, and EngineAppCheckInfo gets fileApp, each with its JSDoc from the source.

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-27 18:20:42 +00:00
d44c527f1c fix(web): match browser-encoded URL glob literals (ENG-1558) (#2379)
* fix(web): match browser-encoded URL glob literals (ENG-1558)

* fix(web): match punctuation in its URL component (ENG-1558)

* fix(web): preserve literal URL authority in globs (ENG-1558)

* docs(web): clarify URL glob punctuation matching (ENG-1558)

* fix(web): make URL glob apostrophe encoding explicit

* fix(web): match escaped URL glob braces in their path encoding (ENG-1558)

The URL parser writes a path `{` and `}` as `%7B` and `%7D`, and the
matcher compares that serialized URL, so `**/a\{b*` never matched an
http path. Escaped braces now follow the path rule the other encoded
punctuation uses; query and fragment braces stay raw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(skill): limit URL glob punctuation matching to paths, queries, and fragments (ENG-1558)

The sentence read as covering every URL component, but a username next
to a wildcard host keeps its raw spelling. The reference already says
where each character matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(web): name every API the shared URL pattern rows check (ENG-1558)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: michal-e2e <357875193+michal-e2e@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 16:32:34 +00:00
Oskar Kwaśniewski c3109278ee docs: make guides easier to read and cut robotic phrasing (#2310) 2026-11-26 15:23:53 +01:00
Oskar Kwaśniewski a118c36ea5 feat(web): add browser.name and browser.version (ENG-1242) (#2251)
* feat(web): add browser.name and browser.version (ENG-1242)

name is the engine the driver reports, version the running browser's own, for launched, attached and hosted browsers.

* test(web): cover browser identity after a CDP reconnect

Docs say an attached browser is always chromium, whatever it is.

* fix(web): scope browser identity to the fixture's own attempt

A browser fixture kept past its attempt answered name and version from the next attempt's browser. It is INVALID_STATE now.

The testbed identity tests no longer read the page's user agent, so they hold on Lightpanda and with a userAgent override. Docs: name and version take no timeout, userAgentData needs a secure context.

* fix(web): read browser identity in a serial group

Members of a serial group share one session but each has its own attempt id, so the attempt id check threw on every read of browser.name and browser.version there. The fixture is now tied to the session it was made in.

* fix(web): refuse browser identity on a fixture made after its attempt

A core session makes its fixtures on first access. One first read after its session closed took the next session for its own and reported that browser. The reader now also checks the fixture's own signal.

The reconnect test keeps one fixture across the reconnect and checks the replacement browser is the one asked. Docs: userAgentData needs a secure context, which a file: page is too.
2026-11-26 13:46:59 +00:00
Krzysztof Moch ed57c2bd98 feat(web): add browser.clock to control time in the page (ENG-1289) (#2256)
* feat(web): add browser.clock to control time in the page (ENG-1289)

* fix(web): keep a refused pauseAt out of the clock log, and replay failed clock calls
2026-11-26 10:00:16 +00:00
Krzysztof Moch a9bea74b31 feat(web): waitForResponse takes a predicate, add waitForRequest (ENG-1217) (#2254)
* feat(web): waitForResponse takes a predicate, add waitForRequest (ENG-1217)

browser.waitForResponse now accepts a predicate, and browser.waitForRequest
waits for a request by URL pattern, { method, url }, or predicate, as
Playwright's page.waitForResponse and page.waitForRequest do. The browser
fixture runs beside the test over the in-process Playwright surface, so the
predicate goes straight to Playwright's waiter; no engine protocol change.

A predicate's throw reaches the test untranslated through a stand-in error,
the wait passes its signal to Playwright, and body reads inside a predicate
are bounded by the wait rather than the action budget.

* fix(web): end a predicate's body reads when its wait settles

Review follow-up: a predicate still reading the body of a response the
wait passed over now stops with CANCELLED, instead of holding the read and
its abort listener until the attempt ends. Docs: a compiling predicate
example, the error codes a predicate's throw keeps, and waitForRequest in
the skill's pattern list.

* docs(web): rewrite the waitForResponse and waitForRequest docs

Start each wait in Promise.all in the examples, say a predicate returns
boolean | Promise<boolean>, spell out the body-read budgets, drop the
predicate rows from the Throws tables, and list the property-not-method
difference and toBeOK in the Playwright guide.

* fix(web): read a passed-over response's body after its wait ends

Only a read still in flight when the wait settles is cancelled; a read
that starts later, on any response the predicate saw, gets the action
budget, as Playwright lets you read any response the page still has.

* fix(web): keep a read the predicate left pending on the response its wait returns

A body read a predicate starts and does not await was cancelled with the
wait even when that response matched. Now only reads on passed-over
responses end with the wait; the matched response's goes on under the
action budget.

From review: correct when WebRequest.headers holds the browser's cookie
headers, the postDataJSON() mapping, and when PageResponse reads its body;
prove waitForRequest resolves before any response, and make the timeout
ports fail on main.

* test(testbed): accept either timeout message in the wait timeout ports

A 1ms wait ends at the step bound or at Playwright's own timeout,
whichever fires first; both name a timeout, and main's errors name
neither.
2026-11-26 09:55:17 +00:00
Oskar Kwaśniewski a47a95604b feat(web): filter browser.cookies() by URL (ENG-1502) (#2250)
* feat(web): filter browser.cookies() by URL (ENG-1502)

* docs(web): cover cookies(urls) in the interface block and the skill
2026-11-25 16:13:30 +01:00
Oskar Kwaśniewski 860f9e5c18 feat(web): add browser.setNetwork to take the browser offline (ENG-1088) (#2245)
Covers every tab and the page's service workers for the rest of the attempt, through restart, clearState and CDP reconnect. A navigation that fails while the test holds the browser offline is ACTION_FAILED.
2026-11-25 11:54:47 +00:00
Oskar Kwaśniewski 42207c79ec fix(run): cancel engine calls of a body abandoned at its timeout (ENG-1497) (#2243)
* fix(run): cancel engine calls of a body abandoned at its timeout

A body or afterAll hook that resumed after its timeout read the budget of
the last teardown phase, which never aborted, so its engine calls acted on
the next test's page. The budget now ends with the attempt.

Also: surfaceOf names a handle that never started, and the docs for
locator.locator and web recordings match the behavior.

* fix(run): cancel calls of work a phase left running, by caller

Budget hands an ended phase to code whose poll scope closed: closes
the own-teardown window and the worker-fixture path. Timeout keeps an
unfiltered clock. Pixel-point actions report CANCELLED. Standalone
ends its budget after teardown. surface started set before init throws.
2026-11-25 12:20:09 +01:00
ParbezandKrzysztof Moch 9081e144de feat(app): grant every permission with app.permissions: 'all' (#1918)
* feat(app): grant every permission with app.permissions: 'all'

A mobile() target sends one agent-device 'permission all grant' before each
fresh launch, and device.openApp takes 'all' for one launch. A web() target
grants every permission its browser grants. A map of names is unchanged.

* fix(mobile): grant each permission for 'all' on iOS, and test it on the benchmark app

The iOS simulator ignores the all service simctl privacy grant all records,
so the microphone still prompted. 'all' now grants every DevicePermission but
notifications, which the simulator refuses to set, one by one; Android keeps
agent-device's single all grant. A benchmark test asks for the microphone
after permissions: 'all' and fails on a system dialog.

* docs(app): name the iOS notifications gap and the Android-only Appium capability

* fix(mobile): skip an iOS service the runtime refuses under permissions 'all', and show 'all' in the reference types

List the iOS services 'all' grants explicitly, so a future Android-only
permission name never reaches simctl. Mirror the 'all' type in the config,
engine and mobile references (en, ja, zh), and keep the changeset and
reference to what users see.

* docs(app): describe permissions 'all' in the ja and zh config reference, and name the iOS runtime skip

Mirror the OpenAppOptions.permissions JSDoc in the mobile reference, and
say in the changeset and LaunchPermissions that iOS skips a permission its
runtime does not support.

* fix(app): require core and e2e 0.24.1 in web and mobile for permissions 'all'

core 0.24.0 refuses permissions: 'all' at config load, so a web or mobile
release that documents it needs the core release that accepts it.

* refactor(mobile): grant permissions 'all' on iOS in one agent-device all

agent-device 0.21.40 expands an iOS all grant to each privacy service
itself and skips one the runtime refuses, notifications included, so the
engine sends one all on both platforms. iOS now grants location always.

* docs(mobile): say Android 'all' grants runtime permissions, and fails for an app that declares none

* docs(mobile): name the Android no-permissions caveat in the Maestro row, and point presetPermissions at LaunchPermissions

* docs(mobile): put the Android no-permissions caveat next to the Android clause in the Maestro row

* fix(app): require core and e2e 0.25.0 in web and mobile, the release that ships permissions all

The pending release versions core and e2e to 0.25.0, so 0.24.1 is never published.

* fix(app): engines opt in to permissions 'all' with grantsAllPermissions, and web skips names an older browser does not know

- EngineAppInfo.permissions stays a map of names; 'all' reaches an engine
  that declares grantsAllPermissions as allPermissions. Config load refuses
  'all' for any other engine, so one released before 'all' never reads the
  string as a map.
- For 'all', web leaves out a permission type the browser refuses as unknown
  (Chrome 134 over CDP refuses localNetworkAccess) and grants the rest; a
  named grant still fails.

* docs(changeset): engines receive allPermissions: true, not the string 'all'

* docs(web): say which refused permission types 'all' can skip

* docs(mobile): drop the caveat that an Android app declaring no permissions fails with 'all'

agent-device 0.21.42, which main now pins, leaves such an app unchanged under permission all (callstack/agent-device#4796), so the launch goes ahead.

* fix(app): stop the 'all' config error at what the engine does not take

desktop() refuses a named permissions map too, so telling its target to name
each permission sent the user to a second error.

* docs(web): name the three permissions an older Chrome may skip under 'all'

* test(web): start an attempt under 'all' on a browser that refuses one name

* test(mobile): check the app as config load hands it under 'all'

* test(protocol): carry allPermissions into prepare, and compare grantsAllPermissions in the manifest

* docs(core): say launch() takes permissions 'all', linking the config reference

* docs(mobile): drop SYSTEM_ALERT_WINDOW from permissions 'all' docs

agent-device 0.21.42 sends declared permissions other than notifications and photos through pm grant, which skips SYSTEM_ALERT_WINDOW as not changeable.

---------

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
2026-11-25 09:14:13 +00:00
Oskar Kwaśniewski 57115739ff feat(test)!: remove the requires option, platforms scopes a test (#2223)
* feat(test)!: remove the requires option, platforms scopes a test

* refactor(runner): drop setup-skip code the requires removal left dead
2026-11-24 19:40:34 +01:00
Oskar Kwaśniewski 1501cf1143 feat(core): open a file on disk as the app with a file: app.url (#2147)
* feat(core): open a file on disk as the app with a file: app.url

* fix(core): gate file apps on an engine capability

Review fixes: the engine declares fileApps and is told fileApp by core's one reading of the URL (file:8443/report stays https), a model gets no pixels of a file app, a screen outside the directory reaches no trace or failure evidence, and the report carries no origin for a file.

* fix(core): send and keep no screenshot of a file app

agent.assert with vision judges from the tree, vision: 'only' is POLICY_DENIED before a model call, and neither agent.assert nor a failure keeps a screenshot. Adds the non-boolean fileApps to the manifest's invalid fixture.
2026-11-24 19:08:31 +01:00
Krzysztof MochandAsheesh Kumar e36bdd28a3 feat(web)!: read Playwright URL globs in waitForURL, route, and waitForResponse (ENG-1215, ENG-1287) (#2217)
* feat(web): read Playwright URL globs in waitForURL, route, and waitForResponse

Squashed from #1895 (feat/wait-for-url-glob at 3c3a1d5af) onto main.

* fix(web): keep a URL glob's fragment and brace errors through resolution

A glob's '#' was hidden in a placeholder, so '/account#tab*/../orders'
resolved to '/orders' and matched the wrong page. The fragment is now held
behind its '#', like the query behind its '?'.

A bad '{' was checked only after resolution, where '..' could drop the
segment holding it: route('/{bad/../orders') registered a route on
'/orders'. The glob as written is checked first, which also makes '/{bad'
INVALID_ARGUMENT rather than APP_URL_REQUIRED on a target with no app URL.

waitForURL's Throws table lists APP_URL_REQUIRED, like route's.

* chore(changeset): mark the route pattern grammar change as breaking

* test(testbed): port Playwright's URL glob cases now that globs match

wait-for-url.e2e.ts takes Playwright's '**/grid.html' globs again instead of
the exact paths it was rewritten to, and route.e2e.ts ports 'should not
support ? in glob pattern', which it skipped while '?' matched one character.

* fix(web): read a URL glob's first segment as a scheme only without ? or #

'x*?next=http://x.test/a' was swapped for a scheme placeholder, so the glob
resolved to the URL in its query and matched nothing. Resolution now uses the
test baseFor already used. The changeset also names what changes for
waitForURL: '' matches any URL, and {, }, and \ are glob syntax.

---------

Co-authored-by: Asheesh Kumar <asheeshkumarklg712@gmail.com>
2026-11-24 18:47:51 +01:00
Oskar Kwaśniewski 48aa58baa7 fix(web): fail doctor when the browser's Linux libraries are missing (#2145)
* fix(web): fail doctor when the browser's Linux libraries are missing

e2e doctor reported a run could start in a bare Linux sandbox while the installed browser could not load its shared libraries. The browser check now runs ldd on the installed executable and the libraries beside it, fails with the unresolved names and the --with-deps install, and a launch that fails for the same reason says the same.

* test(web): cover the library check's wiring to the launched build

* fix(web): keep the launch reason and stop the library probe on abort

Review follow-ups on the Linux library check:
- search the browser's own directory through $ORIGIN, so a cache path with a colon no longer splits LD_LIBRARY_PATH
- print the launch's own error after the library advice
- hand the init signal to the ldd runs, and kill ldd with the loader it started (its process group) on abort or timeout
- cover the launch failure path, real ldd output, the kill and the search path; unresolvedLibraries is module-private
- browserCheck tests stub the probe, so they pass on a Linux host with missing libraries
2026-11-24 17:22:23 +00:00
7838198caf feat(test)!: add a request fixture that returns the shared WebResponse (#2149)
* feat(test): add a request fixture for HTTP calls, with toBeOK()

Each call is a resource step bounded by actionTimeout and the running
budget, and the request is aborted when either runs out. Paths resolve
against the app URL. The browser's cookies are not sent yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(request): cover refusals, network failure, scope, and updated fixture lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): refuse URL credentials, bad headers, and unsendable methods inside the step

A refused call now rejects its promise and records a failed step without
a label, so nothing it was given reaches the report. The docs send only
the app's session cookie.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(request): per-call timeout, keep the label of a refused call, and quote no URL

Docs: a leading slash starts at the origin, request runs on the runner's
network, the web engine's headers and basicAuth stay in the browser, the
session cookie example matches parent domains. e2e init's no-engine
example uses request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(request): return the shared WebResponse from core, and move toBeOK out

WebResponse moves from @e2e-dev/web to @e2e-dev/core, which web
re-exports, so request, waitForResponse, and route.fetch() return one
shape. toBeOK() becomes its own pull request. A Secret in json is
POLICY_DENIED, header values go through Node's validators, a timeout is
at most what a timer holds, and a malformed absolute URL is POLICY_DENIED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): refuse unknown options, name every network cause, and sync the API testing examples

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): refuse headers fetch sets itself, quote no scheme, and assert the redacted label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): bound step labels, classify fetch's own refusals, and refuse sec-fetch-mode

The step recorder cuts a label to report-v1's 8,192 characters after
redaction, which also fixes a long app.open() path. A request Node's
fetch refuses to send is INVALID_ARGUMENT, not a network failure. The
docs say fetch resends once on 421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): refuse the host header fetch drops, and cover every shorthand

Tests for put, patch, delete and head, a cookie header, a string body's
content type, timeout 0, and the worker-scoped fixture named request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(request): a secret across the label cut, a non-string header value, and the label length before the schema

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): a body that is not JSON fails without quoting it

V8's JSON.parse error quotes the start of the text, which can be part of
a secret the ledger redacts only whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): cut step labels in report.json by code points, and refuse content-length

The recorder keeps a label whole, so a guest session's step reaches its
owner uncut and the owner redacts a value it alone knows; report.json
cuts it to report-v1's 8,192 code points. fetch sets content-length
itself, so a caller's value is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): refuse the headers fetch cannot send by name

Node's fetch refuses expect, keep-alive, transfer-encoding, and upgrade, and
sends connection only as close or keep-alive. The fixture read undici's error
codes to report those as INVALID_ARGUMENT, which Bun's fetch never produces.
Refusing them by name before the call gives the same error on both runtimes,
so the error-code fallback goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(request): add redirect option, refuse accept-encoding with range, and clean up test fixtures

---------

Co-authored-by: michal-e2e <357875193+michal-e2e@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 17:14:38 +00:00
Oskar Kwaśniewski 13b56e98b0 feat(web): add the deviceScaleFactor option to web() (#2135)
* feat(web): add the deviceScaleFactor option to web()

* test(web): pin the deviceScaleFactor type

* docs(web): say what deviceScaleFactor leaves unchanged

Review fixes: the model's image is resized, so 'one image pixel per CSS pixel' was wrong; name the persistent-context refusal in the JSDoc; move the migration row out of Planned; test that the factor survives a reset and a restore.
2026-11-24 11:48:59 +01:00
Kunal Roy ChoudhuryandKunal Roy Choudhury 4378e24771 fix(web): validate browser.setCookies cookies before the browser sees them (#2159)
* fix(web): validate browser.setCookies cookies before the browser sees them

* fix(web): refuse a cookie domain that is not a bare host, and holes in the array

reuse rejectUnknownKeys for unknown keys so a typo like samesite names sameSite

* ci: rerun after runner timeout

* fix(web): refuse a cookie expires outside the seconds Playwright takes

* fix(web): refuse a cookie domain with an empty label

* refactor(web): drop the href check the rewrite check already covers

---------

Co-authored-by: Kunal Roy Choudhury <71250874+krockxz@users.noreply.github.com>
2026-11-24 07:41:15 +00:00
Oskar Kwaśniewski a556e9e02f fix(web): same browser.webmcp.callTool() result in every browser (#2136)
* fix(web): same browser.webmcp.callTool() result in every browser

* test(web): cover both WebMCP result paths without a browser
2026-11-23 18:48:45 +00:00
fd488ca022 feat(web): add browser.webmcp.tools() and browser.webmcp.callTool() (#1899)
* feat(web): add browser.webmcp.tools() and browser.webmcp.callTool()

Lists and calls the tools a page registers through WebMCP from test code.
web({ webmcp: true }) launches Chromium with WebMCP on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(web): support webmcp on Firefox

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): address review of browser.webmcp and add the translated docs

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): ask the page for WebMCP and report a tool that navigates as possibly committed

browser.webmcp asked Playwright whether WebMCP was on, which only checks the
launch options of a browser Playwright started. On a browser the engine
attaches to, or a page outside a secure context, tools() resolved [] and
callTool failed with ACTION_FAILED. Both now ask the page for
document.modelContext / navigator.modelContext and fail with
UNSUPPORTED_CAPABILITY when it is absent.

A tool that navigates the page failed as ENGINE_FAILURE, and on Chromium the
pending navigation interrupted the next goto. That call, and one the deadline
cuts off, is now ACTION_MAY_HAVE_COMMITTED, thrown once the new document has
loaded.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): report a tool call as possibly committed only once it reached the page

A deadline that ran out while browser.webmcp.callTool was still checking the
page for WebMCP was reported as ACTION_MAY_HAVE_COMMITTED, though the tool
had not been called. It is OPERATION_TIMEOUT now.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): do not call a WebMCP tool after its deadline has passed

browser.webmcp.callTool checks the page for WebMCP before it calls the
tool. On a busy page that check could resolve after the deadline had
already failed the call with OPERATION_TIMEOUT, and the tool was then
called anyway, with nobody waiting for it. The call now stops there.

The test read the title before the late call landed, so it passed either
way. It now waits for the page to be free first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): classify a missing WebMCP tool first, keep callTool's result JSON, and close review gaps

- A missing-tool error is recognized by how Playwright's message starts,
  before the text is read for a browser diagnostic. A missing tool named
  "WebMCP is not enabled" was UNSUPPORTED_CAPABILITY, and one named
  "execution context was destroyed" was ACTION_MAY_HAVE_COMMITTED.
- callTool validates what the tool resolved with. Chromium turns a result
  into JSON itself; Firefox hands over a Date, a BigInt or NaN as it is,
  which now fails with INVALID_ARGUMENT naming the tool that ran.
- web({ webmcp: true }) on Chromium repeats the features Playwright
  enables, since Chromium keeps only the last --enable-features switch.
- The missing-tool test no longer depends on an earlier test registering
  a fifth tool.
- The type test compares exact types; `satisfies` passed for `any`.
- `webmcp` is in the setup skill's options table and the package README,
  and UNSUPPORTED_CAPABILITY in the errors reference names browser.webmcp.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(web): read WebMCP tool failures in the page, drop undefined results

- browser.webmcp moves to webmcp.ts and asks the page's modelContext from
  one in-page function instead of Playwright's page.webmcp, so a tool that
  throws is ACTION_FAILED whatever its message says
- a result property left undefined is dropped and an undefined array item
  is null, the same in Chromium and Firefox
- stricter type test from review

* fix(web): take only a JSON object as WebMCP tool input

- a number, string, or array input is INVALID_ARGUMENT before the page is
  asked; the browsers refused it without running the tool
- a tool that throws a value with no text form still reads as its failure
- a test pins the Chromium features copied from Playwright
- docs: Chromium parses a string result that holds JSON

* refactor(web): name launch preferences in the engine's own words

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-23 16:44:53 +00:00
Kunal Roy ChoudhuryandKunal Roy Choudhury 851127396c fix(web): refuse an unknown browser name or a malformed viewport in web() (#2037)
* fix(web): refuse an unknown browser name or a malformed viewport in web()

* docs(skills): note the browser and viewport config errors

* refactor(web): resolve the browser option in one place and sync the plugin copy

---------

Co-authored-by: Kunal Roy Choudhury <71250874+krockxz@users.noreply.github.com>
2026-11-22 02:29:32 +00:00
jaidev 003c18a4ee feat(web): match route and waitForResponse by method (#1924)
`browser.route`, `browser.unroute`, and `browser.waitForResponse` accept a `{ method, url }` RouteMatcher. The method is case-insensitive, `url` keeps the string or RegExp grammar, and a route narrowed to another method steps aside for older routes and the network. `unroute` removes routes registered with the same pattern, method included.
2026-11-21 14:45:01 +00:00
VarshithandOskar Kwaśniewski a06b931b8d fix(web): launch Chromium with its sandbox on where it can start (#1621)
* fix(web): launch Chromium with its sandbox on by default

The web engine launched Chromium without chromiumSandbox, so Playwright added --no-sandbox to every browser process. The agent can follow the app to another origin, so a renderer exploit on a page it reaches ran unsandboxed as the user running e2e run, with the checkout, .env, and model keys in reach.

Chromium now launches with chromiumSandbox: true unless the config opts out with web({ chromiumSandbox: false }) or the run environment sets E2E_CHROMIUM_SANDBOX=0, for hosts where the sandbox cannot start (root, containers, Ubuntu 23.10+ with the AppArmor user-namespace restriction). Firefox and WebKit never receive the option. The flag resolves from the option, then the run's environment, then on; the process environment never decides a launch, per the EngineInitInfo.env contract. CI opts out explicitly because the ubuntu-2404 runners restrict unprivileged user namespaces.

Docs updated next to the no-origin-allowlist note (docs/reference/web.mdx, docs/security.mdx, SECURITY.md, skills/e2e/references/setup.md) with a .changeset entry. The smol VM's --no-sandbox is unchanged: the VM is the boundary there.

Verified: pnpm check green; web unit 354/354; web integration 379 passed with 3 known load flakes that pass in isolation; testbed CLI 6/6 fail with "Chromium sandboxing failed!" by default and 6/6 pass with the opt-out on this host.

Fixes #1613

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(web): qualify chromiumSandbox coverage as local-launch-only

Cubic review on the sandbox-default PR found three doc overstatements: SECURITY.md presented the sandbox as universal while connect() and browser providers bypass launch, the skill reference omitted that E2E_CHROMIUM_SANDBOX=0 only applies when the option is omitted, and the reference page implied any container cannot run the sandbox. All three are corrected in the SECURITY note, the reference page, the option JSDoc, and both skill copies.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* fix(web): friendly Chromium sandbox failure and unified sandbox resolution

A sandboxed launch on a host whose sandbox cannot start failed with Playwright's raw error and its full call log, which only hints at the option. acquireBrowser now catches that one failure on a local launch and throws an ENGINE_FAILURE naming both opt-outs, E2E_CHROMIUM_SANDBOX=0 and web({ chromiumSandbox: false }), with no call log and no cause chain to leak it back.

The sandbox flag resolves in one place now: resolveChromiumSandbox(configured, env) in browser-connection.ts replaces the split readChromiumSandboxFlag plus surface resolver, and the surface keeps a single field that init resolves. BrowserConnection.acquire takes an options object, so a relaunch retries with the same options. The option JSDoc shrinks to two lines pointing at the security docs.

Tests follow the restructure: the cdp-attach edits are gone (the flag never applied to attach), screenshot-caret and stalled-frame run sandboxed by default, resolved from the ambient environment so the CI opt-out still reaches a direct launch, and the workflow comments shrink to one line. New tests pin the trim and lowercase handling, the opt-out surviving a failed relaunch, and the friendly error text.

Verified: web unit 358/358 with the opt-out; a real launch on this host fails with the friendly error by default and passes with E2E_CHROMIUM_SANDBOX=0.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(web): minor bump for the sandbox default, CI opt-out, one home for the why

The sandbox default breaks Docker and Linux CI hosts, and the changeset said nothing about it: it is now a minor bump, opened as a maintainer-called release, telling users to set E2E_CHROMIUM_SANDBOX=0.

The CI docs name the opt-out where CI users find it: the GitHub Actions web workflow and the visual-testing screenshots workflow both set E2E_CHROMIUM_SANDBOX=0 on ubuntu-latest, matching this repo's own CI, with a note pointing at the security docs. The other CI pages run mobile targets only, so there is nothing to add there.

The why now lives in docs/security.mdx alone: the reference page, SECURITY.md, the option JSDoc, and the skill reference link to it instead of repeating it.

Verified: changeset-bumps, the docs check chain (anchors, MDX, examples, package managers, logos), and the skill tests all pass.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(web): qualify the Chromium sandbox opt-out as ubuntu-latest only

The visual-testing guide said Linux runners generally block the user
namespaces Chromium needs. The limitation is specific to the
ubuntu-latest runners used here, so name them and tell readers to leave
the sandbox on where it starts.

* fix(web): address review follow-ups on the Chromium sandbox default

Move the sandbox launch error out of the surface and into
BrowserConnection.launchLocal, where the browser name and the resolved
sandbox flag are already known, and drop the untested verb guard. The
error now names the environment opt-out only when the option did not set
the value, since an explicit option wins over the variable. The surface
keeps the option as a readonly field and resolves it into a private
field defaulting to true, the same pattern as headed, so startAttempt
without init no longer needs the fallback. The skill GitHub Actions
recipe runs ubuntu-latest with E2E_CHROMIUM_SANDBOX 0, the web reference
points at the new ENGINE_FAILURE instead of Playwright error text, and
the resolve helper loses its dead branches.

Web unit suite: 362/363 pass; the one failure is artifact-path, which
fails identically on the base head because a real Chromium cannot start
sandboxed in this container.

* fix(web): address re-review follow-ups on the Chromium sandbox default

Resolve the sandbox into one { enabled, fromOption } object and pass it through acquire into launchLocal, which now takes the options object instead of five positional args, so the launch and its error cannot disagree about which opt-out set the value. Add the waiter-joins-a-pending-relaunch case, where the re-acquire runs once and a flip cannot cancel out, and assert retryable is false on the friendly error. Document E2E_CHROMIUM_SANDBOX in the environment reference, point the dead [Security](/security) links at https://e2e.com/docs/security, and fix the changeset wording, since the error no longer always names both opt-outs. The acquire JSDoc now states the actual guarantee: a launch takes the value its own call passes.

Web unit suite: 364/364 pass with E2E_CHROMIUM_SANDBOX=0 (artifact-path fails without it, identically on the base head, because a real Chromium cannot start sandboxed in this container). Web typecheck clean, oxlint clean. The new waiter test fails against a flip mutant injected on the re-acquire and passes without it.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(web): mark E2E_CHROMIUM_SANDBOX as a value in the env reference

The entry was marked flag, but on this page 0 and false mean unset for flags, while 0 opts out of sandboxing here. Mark it value so readers do not apply the wrong flag semantics.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(ci): restore the timings-history section lost in the rebase

The rebase conflict resolution in docs/ci/github-actions.mdx kept only the tail of the new Cache the timings history section, dropping its heading, intro, and example, which broke the docs anchor check (docs/ci.mdx links to #cache-the-timings-history). Restored in full; the sandbox opt-out paragraph follows it unchanged.

Verified: the docs check chain passes locally (anchors, examples, package managers, logos, MDX).

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(security): soften sandbox containment wording

The security page stated a renderer exploit stays contained by the
sandbox, which reads as a guarantee. Say the sandbox helps contain it
and note it does not prevent sandbox escapes or Chromium
vulnerabilities, matching the review feedback on the Chromium sandbox
default.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(security): wrap the sandbox containment sentence at 80 columns

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* fix(web): import EngineError from @e2e-dev/core/engine

browser-connection imported EngineError from e2e/engine, so loading the
web engine without the e2e package failed with ERR_MODULE_NOT_FOUND.
That broke the core-only install smoke check, which loads each engine
main entry without e2e installed. Import from @e2e-dev/core/engine
instead, like every other file in the web engine.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* docs(security): re-wrap sandbox paragraph and soften changeset wording

Re-wrap the sandbox containment paragraph in docs/security.mdx at 80
columns so vulnerabilities; no longer sits on a line of its own, and
soften the changeset to match: the sandbox helps contain a renderer
exploit but does not prevent sandbox escapes. The changeset keeps only
the user-facing part: what changed and the two opt-outs.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

* fix(web): default the Chromium sandbox by platform, drop the env opt-out

On for macOS and Windows, opt-in on Linux where root, most containers
and Ubuntu 23.10+ cannot start it. The option alone decides, so CI,
the test env forwarding and the docs recipes need no opt-out.

* test(web): drop the relaunch cases the waiter test already covers

---------

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-20 11:25:39 +00:00
Oskar Kwaśniewski 8eb3cc27ea fix(web,mobile): name engine handle types for inferred configs (#1976) 2026-11-19 18:09:30 +02:00
Krzysztof MochandOskar Kwaśniewski 847a09e6db feat(test)!: set fixtures up on demand, once per worker, and in beforeAll (#1891)
* feat(test): set fixtures up once per worker and pass them to beforeAll

test.extend() takes [fn, { scope: 'worker' }]: one instance per worker and
target, torn down when the worker ends. Suite hooks receive worker fixtures.
Engines can declare isolation: 'worker'; @e2e-dev/mobile does, so its device,
app, and screen reach beforeAll, afterAll, and worker fixtures.

Refs ENG-1297

* feat(e2e)!: set up fixtures on demand

A test now sets up only the test.extend() fixtures its body and its
beforeEach and afterEach hooks name in their first parameter, the fixtures
those name, and the auto ones. A suite hook sets up the worker fixtures it
names and the auto worker fixtures. Names are read from the function's
source, as Playwright and Vitest read them.

- [fn, { auto: true }] and [fn, { scope: 'worker', auto: true }] run a
  fixture nothing names.
- A fixture can name the fixtures declared beside it in the same extend()
  call. Fixtures run in declaration order, each after the ones it names.
- The attempt is resolved as one unit before the session launches: a
  fixture only an afterEach names is set up before the first beforeEach.
  An afterEach that names a fixture whose setup failed is skipped.
- Fixture rules fail as COLLECTION_ERROR with the file and line of the
  code: a parameter that is not destructured or takes a rest property, and
  a cycle, when the file is collected; a name the target lacks, a test
  fixture named by a suite hook or a worker fixture, and a fixture named
  like an engine's, at selection, for the pairs that run on that target.
- On an engine with isolation: 'worker', a suite hook or a worker fixture
  teardown that names no engine-backed fixture opens no engine attempt.

BREAKING CHANGE: a fixture nothing names no longer runs unless it is
declared with auto: true, and a test body, hook, or fixture function that
takes the whole fixture object (async (fixtures) => {}) no longer loads.

Refs ENG-1297

* refactor(core): declare core fixtures in one table

The five core fixtures (agent, app, screen, platform, session) are one
table in @e2e-dev/core: name, scope, and factory. createFixtures builds
the built-ins object through one loop over that table and the engine's
factories, every fixture a lazy accessor behind the same gate as before.

The runner's fixture pool, test.extend() validation, and launch read the
names and scopes from the table, so the name lists and the per-name scope
checks are gone. A launch session exposes the core fixtures that do not
belong to a test: app, screen, platform.

No behaviour change. app and screen were built with the attempt and are
now built on first read, like agent and the engine's fixtures.

Refs ENG-1297

* feat(e2e): extend a built-in fixture through test.extend

A test.extend() fixture named like one the test already has extends it,
by Playwright's rule: inside its function its own name is the fixture it
extends (the built-in, or an earlier fixture of that name), and tests,
hooks, and other fixtures that name it receive what it hands to use().

  base.extend({ device: async ({ device }, use) => {
    await device.setPermission('camera', 'deny');
    await use(device);
  } })

- A plain function takes the scope the extended fixture has on the
  target: device is a worker fixture on mobile, so its override runs once
  per worker and reaches beforeAll; app is a test fixture on web and a
  worker fixture on mobile. A declared scope that differs is a
  COLLECTION_ERROR naming both.
- A worker-scoped override receives what a worker fixture receives for
  that built-in, the forwarder to the attempt that is running.
- On a target without the built-in nothing fails until code that runs
  there names it; then the target has no such fixture.
- Only user code sees the override: the attempt's own built-ins, which the
  runner and the worker fixtures' forwarders read, are untouched.
- Types: the override keeps the extended fixture's type and scope, through
  an extend() overload that takes overrides without type arguments.

A fixture named like a core fixture, an engine's, or an earlier one of the
chain was refused before.

Refs ENG-1297

* docs(fixtures): name built-in fixtures and give their scope per engine

The docs now use one term, built-in fixtures, for agent, app, screen,
platform, session, and the ones an engine contributes (browser, device),
where pages said core fixtures, contributed fixtures, or engine fixtures.

The test reference gets one table with each built-in fixture's scope on
web and on mobile, and says what the scope decides: a test fixture reaches
test bodies, beforeEach, and afterEach; a worker fixture also reaches
beforeAll, afterAll, and worker fixtures. The hooks, worker fixtures, and
override sections link to it, as do the fixtures guide and the engine
pages. The Japanese and Chinese pages carry the table and the same terms.

Refs ENG-1297

* docs(ja): translate the fixture scope and on-demand changes

* docs(zh): translate the fixture scope and on-demand changes

* fix(e2e): let a worker fixture name an extended app or screen

A fixture that extends `app` or `screen` was taken for a test fixture when
its test.extend() call was checked, before any target is known. A worker
fixture declared after it that names `app` then failed at import on every
target, though the same fixture is accepted without the override and the
plan resolves both to worker scope on an engine whose state outlives a
test.

The scope of a plain function is now unresolved until a target is known,
whatever it extends, as it already was for an engine's own fixtures.

Refs ENG-1297

* fix(e2e): fail a suite hook that left an engine step running

On an engine whose state outlives a test, a beforeAll or afterAll hook, or
a worker fixture's teardown, can start a device step and not await it. The
hook's attempt then closed under the step, and its failure arrived later
as a stray rejection charged to whichever test ran then.

The suite attempt now does what a test attempt does once its body settled:
the step is failed at its call and cancelled, its outcome is awaited within
the cleanup budget, and the hook fails with STEP_NOT_AWAITED (HOOK_FAILED
for a suite hook).

The suite attempt keeps no step records, and StepRecorder dropped the
record of the step it had just opened before marking it running, so there
was nothing to abandon: a step now counts as running before the retained
window is trimmed.

Refs ENG-1297

* refactor(e2e): keep the fixtures a function names beside it

Registration parsed each test body, hook, and fixture function for the
fixtures it names, dropped the result, and left it in a WeakMap that the
planner and the pool read back with placeholder subjects. A cache miss
there would have named the wrong code and no line.

The parse result is now data: `names` on the registered test, the hook,
and the fixture definition. The planner and the pool read it, the WeakMap
and the per-function wrappers are gone, and one describeUser() gives an
error its subject. The explore test, registered by hand, parses its body
where it builds the record.

Unit tests state the names instead of generating source text for them.

Refs ENG-1297

* refactor(core): resolve built-in fixtures in one place

The core table declared the core fixtures, but what a target's built-in
fixtures are was still assembled around it: core names plus engine names in
three files, the 'engine' scope resolved in e2e through a cast into the
table, `platform` hard-coded as the one fixture that needs no attempt, and
two structural copies of the target.

core now exports builtInFixtures(target): names, scope(name),
needsAttempt(name), attemptless(name), and the unknown-fixture message,
over one BuiltInTarget. `platform` declares in the table that the target
alone decides it. launch, the planner, and the pool read from it.

DECLARED_BUILT_INS is the same view before a target is known: a scope the
engine decides is 'unresolved'. The planner takes either one, so its
no-target mode and the `target === undefined` branches through scopeOf and
read are gone. The scope of a fixture that extends `app` before a target
is known is 'unresolved' by construction.

Refs ENG-1297

* refactor(e2e): hand each function the fixtures it names

Every test body, hook, and fixture function must destructure its first
parameter, so what it reads is known before it runs. bindFixtures still
built a Proxy-gated bag for arbitrary property reads: one value in three
stores, the gate run twice (once over a faked plan), a third derivation of
scope, and an own-name shadow that re-derived what the planner had resolved.
No test code could reach the gate's throwing branches; only unit tests did,
by reading the bag directly.

The plan now records, per function, what each name it reads resolved to: a
chain fixture or a built-in. The pool hands each function a plain object
with exactly those names, the value a chain fixture handed over, or a
built-in read off the attempt when the function destructures it, so
built-ins stay lazy. An override that names itself receives the fixture it
extends because that is what its own name resolved to.

- bound.call(user) replaces user.fn(bound.fixtures); ready(user) asks
  whether every chain fixture it names was provided.
- attemptlessBuiltIns is a function from a name to a value that throws the
  reason for a built-in that needs an attempt.
- The planner runs once: it records what each fixture names, and the order
  is one declaration-order walk over that record. A second validating pass
  only reordered.

Behaviour: a bound or native function, whose parameters cannot be read, is
a COLLECTION_ERROR; it used to parse as naming nothing and still got lazy
built-ins. The docs no longer promise hooks and the body one shared object.

Refs ENG-1297

* refactor(e2e): move the suite attempt out of TargetExecutor

dispose, openSuiteHooks, and openSuiteAttempt were 177 lines of a second
attempt lifecycle inside TargetExecutor, written as closures in one method.

run/suite-attempt.ts now owns it: a SuiteAttempt class with open, acquire,
within, and close, over a SuiteAttemptHost interface the executor satisfies
(the way serial.ts borrows it through SerialHost), plus the worker
fixtures' teardown pass. It is the realm's SuiteHookSession itself, so the
executor keeps a context object and two call sites.

The three branches that built an attemptless reader with a "not available
to the <label>" error are one NoAttempt value ('isolated', 'unnamed',
'interrupted', or the launch failure) and one mapper to the message.

execute.ts: 1244 lines to 1052.

Refs ENG-1297

* refactor(e2e): share the attempt's fixture sequence

A run's attempt and an `e2e mcp` session's test each planned the test's
fixtures, bound them, entered the worker pool, set them up, ran the
beforeEach hooks and the body, filtered the afterEach hooks that can still
run, and labelled the teardowns. This PR widened that copy, and
standalone-test.ts asked the realm for the same hooks four times.

planAttemptFixtures(target, test, hooks) plans before any session exists
and returns open(), which binds the plan to the attempt: enter(), run()
for setup, hooks, and body, and cleanup() for the labelled afterEach hooks
and teardowns. Both call sites keep their own phases, budgets, and error
handling around it.

execute.ts: 1052 lines to 1031, its size on main.

Refs ENG-1297

* refactor(e2e): open the suite-hook pass without a lazy thunk

withSuiteHooks handed its work a thunk that opened the pass on first use.
Opening one does no I/O: the suite attempt launches nothing until a hook
that names an engine fixture runs. The pass is now opened up front and
closed in finally, and the `opened` slot and the `hooks()` call form go.

Refs ENG-1297

* refactor(e2e): ask the registry which hooks apply to a test

The selection-time fixture check rebuilt the scope chain of a test and
filtered the file's hooks by it, which the realm already did its own way.
registry.ts now exports scopeChain(test) and hooksFor(registration, test),
and both use them.

Refs ENG-1297

* refactor(core): move the fixture types into types/fixtures.ts

types.ts grew from 1679 to 1798 lines in this PR. The fixture scope, the
worker fixtures, and what test.extend() takes (definitions and overrides)
are one coherent group that nothing else in the file defines against, so
they move to types/fixtures.ts and types.ts re-exports them. The public
surface is the same.

types.ts: 1798 lines to 1715.

Refs ENG-1297

* refactor(core): drop the redundant override branch in FixtureDefinitions

A fixture that extends one the base already has was typed three ways: a
conditional branch inside the `Extra` map of FixtureDefinitions, the
`& FixtureOverrides` intersection, and the extend(overrides) overload.

Compiling the type tests without each in turn: the intersection types an
override written beside new fixtures with type arguments, and the overload
types an override-only call without them; both fail the tests when
removed. The conditional branch does not: with it gone the tests pass, and
a base name in `Extra` is `never` again, as it was before overrides. It is
removed, and the reference's copy of the declaration follows.

Refs ENG-1297

* refactor(e2e): split fixture errors from the parser, share hookLog

fixture-names.ts parses a parameter list, and also held FixtureUseError and
declarationSite, which format an error. They move to fixture-errors.ts.
Its identifier pattern held two raw zero-width characters; they are
written as escapes now.

hookLog and LOG_MODULE were pasted into three integration tests; they are
one helper in tests/helpers/hook-log.ts.

Refs ENG-1297

* docs(e2e): name the scope rule in the selection check's summary

The summary of assertFixtureUse still listed a chain fixture named like an
engine's as an error. Such a fixture extends the built-in now; the rule
left is a declared scope that differs from the extended fixture's.

Refs ENG-1297

* refactor(e2e): take execute.ts under 1000 lines

Two more pieces that are not the attempt's own sequence leave the file.

- Holding steps for `e2e run --step`: reading the screen a hold starts on
  and wiring AttemptHolds to the runner's hook move to step-hold.ts, beside
  the holds they configure (holdAttemptSteps, readHeldScreen).
- The result of a finished test or setup unit is a pure function of the
  pair, the verdict, the attempts, and a beforeAll failure: unitResult in
  units.ts, beside pairResult.

execute.ts: 1031 lines to 956. It was 1031 on main and 1226 at the review.

Refs ENG-1297

* test(e2e): match the not-awaited message without a step label

Main's #1880 names an unlabeled step by its api alone ("gadget.hang
finished"), where the message used to quote an empty label. The suite-hook
test's pattern required a label between the two, so it failed on the merge
with main.

* feat(e2e): an override inherits auto from the fixture it extends

A fixture that extends another and does not state `auto` now has the
extended fixture's, the way it has its scope: an override of an auto
fixture is set up for every test, and one of a built-in fixture on demand.
An `auto` that differs from the extended fixture's is a COLLECTION_ERROR
naming both, worded like the scope mismatch. This matches Playwright.

It also fixes which fixtures the plan starts from. An auto fixture was a
root by its own flag, so with an auto base and its override in one chain
the base was set up and the override skipped, while the name resolved to
the override; an override that replaced the base without naming it still
left the base running. An auto fixture is now a root only where its name
stands for it: the base runs once through the override's own name, or not
at all when the override replaces it.

Refs ENG-1297

* fix(core): name the hook or fixture that left a step running

STEP_NOT_AWAITED said "the test body returned before ..." for a step a
beforeAll, afterAll or beforeEach hook, a fixture's setup or a worker
fixture's teardown left running. The recorder now keeps the owner each
step was started under, and the runner says which code runs: the pool
for fixtures, hooks and the body, the suite attempt for suite hooks, and
a hosted session for itself.

---------

Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-18 13:09:51 +00:00
Donough Liu 29a0261775 feat(moli): add managed local browser provider (#1843)
Manage local Moli CDP browsers through the web engine's BrowserProvider API.
Each worker gets an available loopback port, layout and resource loading,
startup cancellation, and process cleanup when its lease ends.

Wire the testbed, documentation, consumer skill, build and test commands,
and a patch changeset for @e2e-dev/moli.

Keep process-group shutdown active after an executable wrapper exits,
and surface process-inspection failures in the provider tests.

Verified locally:
- pnpm check
- 16 Moli provider unit tests
- Testbed on two workers: 16 passed, 1 expected skip; both browsers released
- Empty and whitespace CDP URLs use managed browsers; padded URLs attach
  without stopping the existing server
- MCP login, secret fill, assertions, and screenshot
- Packed packages installed, typechecked, and run in an isolated project
2026-11-17 07:03:27 +00:00
Donny/강동윤andClaude Opus 5.5 0cd14a0dfa perf(core): read a wait again at 20 and 50 ms, then every 100 ms from its start (#1834)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:29:29 +02:00
Nguyễn Văn Hiếu b56e8ed525 docs(web): clarify media emulation tab scope (#1772) 2026-11-14 10:23:18 +00:00
Brendan Irvine-BroqueandOskar Kwaśniewski 352b774b33 feat(browser-run): add Cloudflare hosted browsers (#1634)
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-13 08:46:31 +00:00
Donny/강동윤andClaude Opus 5.5 0920ef5f94 feat(web): tabs in the browser fixture, with switch_tab and close_tab agent verbs (#1710)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:00:57 +00:00
Krzysztof Moch 046bd08f4a fix(web)!: scope headers and basicAuth to the app's origin (#1393) 2026-11-12 08:49:48 +00:00
Xiangxuan Qu d1b0ff61c2 feat(e2e): add screen.doubleTapAt for viewport gestures (#1331)
* feat(web): add coordinate double-click to browser mouse

* test: handle Unicode checkout paths in hosted-session fixtures

* test(web): simplify double-click regressions after review

* feat(e2e): add screen.doubleTapAt for viewport gestures
2026-11-11 13:49:51 +01:00
Kacper Kapuściak df0795ae52 docs: name the authentication and session reuse guide (#1594) 2026-11-06 13:33:22 +00:00
Kacper Kapuściak f185ca8ba2 docs: retire sidebar page icons (#1582)
* docs: retire sidebar page icons

The docs sidebar no longer shows icons. Drop icon: from every page's frontmatter, delete the grey silhouettes in docs/images/icons/, and make check-docs-logos fail on any frontmatter icon instead of requiring one on vendor pages. Card logos stay required. The authoring-docs skill trades its Page icons section for a short Vendor logos one.

* docs: require a migrate overview card for each migration guide

* docs: match only top-level icon keys in check-docs-logos
2026-11-05 18:23:59 +00:00
Oskar Kwaśniewski 9267248c4c fix(web): browser.evaluate survives clobbered page globals (#1553) 2026-11-05 11:23:38 +01:00
Oskar Kwaśniewski 4e7e8b8412 fix(web): classify aborted navigations and capture screenshots across navigations (#1550) 2026-11-05 09:51:53 +01:00
Oskar Kwaśniewski d2953bb9bb feat(e2e): timeout 0 means no step deadline; settle by-design Playwright gaps (#1554) 2026-11-05 09:40:25 +01:00
Oskar Kwaśniewski 0c0469605a chore: replace e2e.tester.army with e2e.com (#1572) 2026-11-05 09:23:45 +01:00
4c44e44957 perf(web): make element handles for observed nodes when an action needs one (#1571)
* perf(agent): hash screenshots natively instead of byte by byte

pixelDigest looped over every byte of a screenshot in script (FNV-1a),
about 8 ms of event loop per megabyte, on every settle poll and screen
update that carries pixels. SHA-256 through node:crypto takes about
0.4 ms for the same megabyte and cannot read two screens as one on a
32-bit collision. The digest is only compared in memory, never stored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* perf(web): make element handles for observed nodes when an action needs one

An observation created an ElementHandle for every listed node (up to
3000) and released them all when the next observation replaced it: one
CDP round trip each way per node, and about 100 ms of synchronous
event-loop time in RefRegistry.dispose at 3000 nodes. The reader already
returns its elements in one in-page array, so keep that array behind a
single handle (ElementList) and make a node's handle the first time an
action reaches for it. A ref still names the element the walk read; only
iframe boundary elements are fetched during capture, for contentFrame.

RefRegistry.lookup becomes async; dispatchLocatorAction takes an async
lookup for the second side of a drag. Disposing a generation releases
each list once. This is the "lazy element handles per observation"
follow-on #107 left out.

Observe on a 3000-node page: 360 ms -> 78 ms median (400 nodes:
57 -> 14 ms). A tap after a fresh observe is unchanged within noise.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(web): start no action when its ref resolves after the operation ended

An observed ref's element handle is now made on first use, so the lookup
can outlast the operation's deadline. Check the operation's signal after
the lookup, for the target and for the second side of a drag, so a handle
that arrives late dispatches nothing. Key the scripted handles in the
element-list tests by index so a lookup that read the wrong position fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(web): describe list-backed observation refs in JSDoc

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-11-05 07:46:35 +00:00
Oskar Kwaśniewski 40826e4705 fix(web): binary bodies, header deletes, and multiple set-cookie in route handlers (#1548) 2026-11-04 20:01:39 +01:00
Oskar Kwaśniewski 94e6e76548 feat(agent)!: keep model screenshots after a secret fill (#1437) 2026-10-28 19:11:24 -07:00
555e226dc5 feat(web): inspect upstream responses from route handlers (#1044)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-28 17:32:28 -07:00
5879bfc6ba feat(web): clear selected cookies without resetting app storage (#1046)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-28 17:32:17 -07:00
7f4475cef9 feat(web): collect multiple downloads from one trigger (#1048)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-28 13:35:01 -07:00
Krzysztof Moch 3a841bb99e feat(web): grant browser permissions from a web target's app.permissions (#1429) 2026-10-28 13:33:46 -07:00
491199e589 feat(web): clear all browser fixture routes (#1041)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-10-19 15:57:16 +02:00
f7c76720bf feat(web): expose native dialog kinds to handlers (#1050)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-17 15:40:10 +02:00
Kacper Kapuściak c304924e53 docs(reference): rewrite the API reference in the Next.js shape (#1197)
* docs(reference): rewrite the API reference in the Next.js shape

Every reference page now opens with a lede and a minimal example, groups its
API under ## sections that start with a summary table linking to one ###
entry per member, and keeps the TypeScript declarations under ## Types.

* docs(reference): fix claims the review caught

Narrow the security summary rows to their sections, generate the screenshot
file name in the engine example instead of building it from the label, and
correct defaults, exit codes, and examples on config, cli, screen, web,
mobile, test, runner, and engine.

* docs(reference): address review findings

Scope error classes to runner errors, guard a zero-slot prepare in the engine
example, keep the cli #help-and-version anchor, and correct poll cancellation,
same-run screenshots, openLink schemes, type_secret, longPress durations,
runner signals and close failures, empty usernames, and the feedback exit
code. Make the reporter and extract examples self-contained.

* docs(reference): trim the summary tables to the minimum

Each group's summary table keeps the linked name and one or two short
columns (type, default, or a few-word description). Examples and details
live in the entries; facts that only a table cell held moved into its entry.
The expect overview is headed Reference instead of Entry points, and the
security rules table names what each section covers instead of restating
its claims.

* docs(reference): open every page's API under one Reference heading

Each page's first section after the lede is now ## Reference. A page with
one group lists its entries at ### right under it; a page with several keeps
each group as a ### with its summary table and its entries at ####.
Explanatory sections (behavior, budgets, setup, types) follow it. Linked
sub-parts that moved to ##### keep their anchors through explicit ids.

* docs(skills): describe the reference page shape in authoring-docs

Reference pages open their API under ## Reference, keep summary tables to
the name and one or two short columns, and nest entries at ### or ####
because Mintlify drops anchors below ####. ship-pr points reference edits
at these rules instead of the guide shortening pass.

* docs(reference): address cubic review on tables and skill

Keep readonly in the mobile device type, show the keyboard and mouse
object shapes, say a locator assertion times out as ASSERTION_FAILED, and
give reference pages a narrower shortening pass in authoring-docs.

* docs(reference): tighten the reference pages

Merge facts said twice into one place, move each declaration's JSDoc to a
single home, link timeout defaults, key grammar, and secure-field rules to
the pages that own them, and split long sentences. No fact is cut.

* docs(reference): address cubic review of the tightening pass

Qualify the GitHub token for fork pull requests, provider recording URLs,
duplicate device entries, MODEL_UNAVAILABLE timing, the APP_UNREACHABLE log
quote, UNKNOWN_TOOL versus UNSUPPORTED_CAPABILITY, node-less agent tools,
which model receives screenshots, passing assert evidence, and config-path
hosts; fix three garbled sentences.

* docs(reference): say device, not simulator, for worker isolation
2026-10-16 14:41:30 +00:00
Piotr Pasztor de7afd6cf3 fix(web): reject connect without a cdpEndpoint resolver at config load (#1164) 2026-10-15 20:33:25 +02:00