feat(web)!: WebDriver BiDi driver replaces Playwright

OK
8h ago
+22521-14947

Summary

  • @e2e-dev/web drives Chromium and Firefox over WebDriver BiDi. Playwright is removed: no playwright-core dependency, no WebKit, no surfaceOf.
  • Own BiDi client over Node's WebSocket. Firefox speaks BiDi natively; Chromium runs the chromium-bidi mapper 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), core launch (#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 dragTo on an HTML5 draggable dropped nothing silently (now UNSUPPORTED_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)

TotalPW chromiumBiDi chromiumPW firefoxBiDi firefox
sum of p50s, every scenario (ms)1534981 (-36%)26232116 (-19%)
cold launch + new page + 6 agent steps (ms)334274 (-18%)7681279 (+66%)
testbed wall clock, median of 3 (ms)1752516895 (-4%)2110220980 (-1%)
node + browser CPU, warm loop (s)51.720.3 (-61%)77.733.7 (-57%)
peak RSS, node + browser (MB)14051542 (+10%)23512644 (+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 in benchmark.yml.
  • Testbed through the built CLI on Chromium, and on Firefox without the Playwright-tagged tests: all pass.
  • e2e 4718 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/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.