Intent to Prototype: WebDriver-BiDi

108 views
Skip to first unread message

James Graham

unread,
Jun 3, 2021, 6:06:51 AM6/3/21
to dev-pl...@mozilla.org
Summary: WebDriver-BiDi defines a WebSockets-based, bidirectional,
protocol for external tools to interact with and control a web browser.
The initial target use case is automated testing of web applications.
The specification is a work in progress, but we intend to begin
prototyping immediately in order to support the development of a modern,
standards-based, web application testing ecosystem.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1690255

Standard: https://w3c.github.io/webdriver-bidi/

Platform coverage: All

Preference: `remote.active-protocols`. Values are `1` (BiDi only), `2`
(CDP only) and `3` (CDP and BiDi). Default is `3` in Firefox Nightly and
`2` on release branches. Enabling the server for these protocols also
requires launching Firefox with the `--remote-debugging-port` command
line argument.

web-platform-tests: There is no existing testsuite, but we will create
and use web-platform-tests whenever possible during development. These
will live in testing/web-platform/tests/webdriver/tests/bidi

Discussion: https://chat.mozilla.org/#/room/#interop:mozilla.org

Details:

WebDriver [1] is the current W3C standard for automated testing, used by
popular clients such as Selenium. However WebDriver's HTTP-based
command/response protocol doesn't match the highly asynchronous nature
of modern browser engines. As a result, many modern test tools such as
Puppeteer, PlayWright, and Cypress have moved toward using proprietary
bidirectional protocols in order to offer deeper integration with the
browser and additional functionality that doesn't fit into the WebDriver
model.

The most common choice for these tools is to use Chrome's Devtools
Protocol (CDP). Even primarily WebDriver-based tools such as Selenium
are now offering additional functionality for Chromium-based browsers
using CDP. This provides an incentive for authors to invest in
Chrome-only testing, and represents a significant web compatibility risk.

WebDriver-BiDi is being developed by the Browser Tools and Testing
Working Group [2] at W3C to provide a cross-browser protocol for browser
automation that meets the requirements of web application testing tools.
By working with both browser vendors and client authors, we hope it will
be possible to smoothly transition the automation and testing ecosystem
back onto a standards footing.

We currently have a partial implementation of CDP in Firefox aimed at
supporting Puppeteer. Once this is no longer actively used by major
testing tools we intend to remove it from the browser.

Although the specification is still in an early state, we want to start
implementing it in Firefox Nightly in order to ship a preview version as
soon as possible. This will enable us to validate the design choices,
and in particular check it's possible to transition existing tools
towards the standard. Further details about the implementation plans can
be found in the design document [3].

[1] https://w3c.github.io/webdriver
[2] https://www.w3.org/testing/browser/
[3]
https://docs.google.com/document/d/1Of3ZhWIAwYXPezuG_hMpmTK7Nv1a9_E_VsnBWtD2nD8/
Reply all
Reply to author
Forward
0 new messages