Intent to Ship: WebDriver-BiDi

106 views
Skip to first unread message

Julian Descottes

unread,
May 3, 2022, 10:45:25 AM5/3/22
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.

We have previously prototyped this, but we have not yet enabled WebDriver-BiDi
beyond the Nightly channel. We plan to ship this feature in Firefox 101 to
support external tools such as Selenium, which plan to start using
WebDriver-BiDi for Firefox.

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

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). Will be set to `3` for all channels (currently
set to `3` in Firefox Nightly and `2` everywhere else).  Enabling the server
for these protocols also requires launching Firefox with the
`--remote-debugging-port` command line argument.

Other browsers: Chrome is currently implementing https://github.com/GoogleChromeLabs/chromium-bidi

web-platform-tests: https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/bidi

Additional gecko-specific web-platform-tests: https://searchfox.org/mozilla-central/source/testing/web-platform/mozilla/tests/webdriver/bidi

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

Details:

WebDriver-BiDi aims to provide a cross-browser protocol for browser automation
that meets the requirements of modern web application testing tools. Compared
to the existing W3C WebDriver specification, it provides bidirectional
communication, making it better fit to test highly asynchronous applications.
It also aims to replace custom and proprietary protocols which are currently
 used by modern test tools such as Puppeteer.

Read more details about WebDriver-BiDi in the initial Intent to Prototype at:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/kASQnIcU9Nc/m/v77WY5siBwAJ

Our current support for WebDriver-BiDi is a partial implementation of the
specification, which includes the following commands:
- session.status
- session.new
- session.subscribe
- session.unsubscribe
- browsingContext.close
- browsingContext.create
- browsingContext.getTree
- browsingContext.navigate

As well as the following events:
- log.entryAdded
- browsingContext.contextCreated

Although we don't implement the full specification yet, the current set of
commands and events matches the requirements from Selenium to start using
WebDriver-BiDi for Firefox instead of our partial CDP implementation.

A security review focused on WebDriver-BiDi was done in April 2022, you can
read more at https://bugzilla.mozilla.org/show_bug.cgi?id=1753997.
You can also follow the project on the wiki page:
https://wiki.mozilla.org/WebDriver/RemoteProtocol/WebDriver_BiDi
Reply all
Reply to author
Forward
0 new messages