Understand the positioning: WebDriver BiDi is a W3C standard bidirectional protocol designed to bring CDP-like capabilities (event subscriptions, script evaluation, network interception) to all browsers under one API, replacing per-vendor protocols.
Check browser support before committing — as of 2025, Chromium-based browsers and Firefox have meaningful BiDi support, but WebKit/Safari support is still catching up. Verify the feature matrix on the WebDriver BiDi spec repository before relying on a specific command.
Use BiDi when you need a standards-based cross-browser automation protocol and your target browsers support the features you need — particularly for new tooling built to be browser-agnostic.
Prefer CDP directly (via Puppeteer or raw WebSocket) when you need Chromium-specific features not yet in the BiDi spec, or when you need the most complete and stable implementation today.
In Playwright, BiDi is used internally for Firefox; for end users the Playwright API abstracts the protocol — you do not write BiDi commands directly unless building tooling at the driver layer.
Known gotchas
BiDi is still in active development. Commands available in one browser version may not be in another, and the spec itself continues to evolve. Always pin browser versions in CI when relying on specific BiDi features.
WebDriver BiDi uses a different connection model than Classic WebDriver (bidirectional WebSocket vs. HTTP request/response). Existing Selenium infrastructure and proxies designed for Classic WebDriver may not correctly forward BiDi traffic.
The overlap between BiDi and CDP feature sets is incomplete — some advanced CDP features (e.g., low-level memory profiling, certain tracing APIs) have no BiDi equivalent yet, so you may need a hybrid approach for complex tooling.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp