feat(web)!: WebDriver BiDi driver replaces Playwright
OK
8h ago+22521+22521+01234567890123456789012345678901234567890123456789-14947-14947-01234567890123456789012345678901234567890123456789
Summary
@e2e-dev/webdrives Chromium and Firefox over WebDriver BiDi. Playwright is removed: noplaywright-coredependency, no WebKit, nosurfaceOf.- Own BiDi client over Node's
WebSocket. Firefox speaks BiDi natively; Chromium runs thechromium-bidimapper in a child process. No chromedriver or geckodriver. - Browsers are pinned builds (Chrome for Testing 157.0.8103.38, Firefox 159.0.1), installed with
npx @e2e-dev/web install, each checked against a pinned SHA-256. - Ports from main since the last rebase:
credentialOrigins(#1393), CDP handshake headers (#1634),readStyle(#1633), tabs (#1710), corelaunch(#1737), check through a covering label (#1595), screenshot retry after navigation (#1614). - Tests never skip a browser: each Firefox or Chromium limit is a test of what the browser does. Two bugs those skips hid are fixed: Firefox element screenshots were a pixel off after a scroll, and Firefox
dragToon an HTML5draggabledropped nothing silently (nowUNSUPPORTED_CAPABILITY, bug 1515879). - New
web (windows)CI job: launch, keyboard, and tabs on both browsers.
What breaks is in .changeset/web-bidi-only.md. Limits are in docs/reference/web.mdx.
Benchmark totals (before the rebase; 20 warm / 10 cold iterations, M5 Pro, headless)
| Total | PW chromium | BiDi chromium | PW firefox | BiDi firefox |
|---|---|---|---|---|
| sum of p50s, every scenario (ms) | 1534 | 981 (-36%) | 2623 | 2116 (-19%) |
| cold launch + new page + 6 agent steps (ms) | 334 | 274 (-18%) | 768 | 1279 (+66%) |
| testbed wall clock, median of 3 (ms) | 17525 | 16895 (-4%) | 21102 | 20980 (-1%) |
| node + browser CPU, warm loop (s) | 51.7 | 20.3 (-61%) | 77.7 | 33.7 (-57%) |
| peak RSS, node + browser (MB) | 1405 | 1542 (+10%) | 2351 | 2644 (+12%) |
Firefox cold launch is slower: the Remote Agent holds session.new until startup finishes (925 ms vs 314 ms), once per worker.
Issue
Spike, no issue.
Verified
Ran it locally: yes
@e2e-dev/web: 1483 tests on Chromium and Firefox, 0 failures. One env-gated skip: the crosscheck benchmark scenarios, which run inbenchmark.yml.- Testbed through the built CLI on Chromium, and on Firefox without the Playwright-tagged tests: all pass.
e2e4718 and core tests pass. Build, typecheck, oxlint, fallow, docs, plugin, MCP, peer-range, and changeset checks are clean.
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it. - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.