-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add a proposed roadmap for Bidi adoption and Classic deprecation #2215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
website_and_docs/content/blog/2025/bidi-roadmp.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| title: "Roadmap for adopting WebDriver Bidi" | ||
| linkTitle: "Proposed roadmap for adopting WebDriver Bidi and deprecating WebDriver Classic" | ||
| date: 2025年03月11日 | ||
| tags: ["selenium"] | ||
| categories: [] | ||
| author: Diego Molina [@diemol](https://www.diemol.com) | ||
| description: > | ||
| A roadmap for how and when Selenium will adopt WebDriver Bidi and deprecate WebDriver Classic. | ||
| --- | ||
|
|
||
| Roadmap | ||
|
|
||
| In order to automate browsers, Selenium builds upon open standards | ||
| developed by the W3C. The first of these is [W3C | ||
| WebDriver](https://w3c.github.io/webdriver/), which was derived from | ||
| the original wire protocol used by Selenium 2, and this has been | ||
| powering our tests for many years. It works by using a | ||
| "request/response" model: the Selenium APIs send a command, the | ||
| browser executes that, and sends back a response which we process, | ||
| before we send another command. At any one time, there's only one | ||
| command being executed. | ||
|
|
||
| However, the Web evolves, and so does the WebDriver standard. The next | ||
| evolution of the W3C standard for browser automation is called | ||
| [WebDriver Bidi](https://w3c.github.io/webdriver-bidi/). This is a | ||
| more sophisticated protocol, leaning heavily on the lessons learned | ||
| from the [Chrome DevTools | ||
| Protocol](https://chromedevtools.github.io/devtools-protocol/) (CDP), | ||
| and the key difference is that rather than following a | ||
| "request/response" model, Bidi now uses an event-based model. While | ||
| this allows the Selenium APIs to ask the browser to execute actions, | ||
| the browser can now send information back at any time to our | ||
| APIs. This allows a more dynamic style of testing than we've been able | ||
| to achieve with the original WebDriver protocol. | ||
|
|
||
| One goal of Bidi is that it should be possible to use it for | ||
| everything that the original spec (now commonly referred to as | ||
| "WebDriver Classic" or just "Classic") could do. It seems natural that | ||
| if this is the case, we should consider phasing out the Classic | ||
| protocol and only relying on Bidi, just as we phased out support for | ||
| the original "[JSON Wire | ||
| Protocol](https://www.selenium.dev/documentation/legacy/json_wire_protocol/)". Just | ||
| as with that transition, we will do this carefully so that our users | ||
| (you\!) shouldn't notice the change. | ||
|
|
||
| How will we go about this? While this plan can still change, the approach we are taking is: | ||
|
|
||
| 1. Focus our development time on Bidi. | ||
| 2. Use Bidi to add extra features, such as network interception and capturing JS logs. | ||
| 3. Start to use Bidi in preference to Classic where possible (for example, for navigating to new URLs, or for finding elements) | ||
| 4. Once the Bidi spec becomes a [Candidate Recommendation](https://www.w3.org/standards/types/#x4-2-candidate-recommendation), cease development of the Classic implementation and mark it deprecated. | ||
| 5. Once the Bidi spec becomes a Recommendation, start phasing out Classic support. This will mean that in the next major Selenium release (that is, Selenium 5), only the Java bindings will retain optional legacy Classic support. | ||
|
|
||
|
|
||
| The developers of the Selenium project have already started the first | ||
| two steps, and we shall soon start on the third. | ||
|
|
||
| The Bidi spec is now moving forwards quite rapidly, and the first | ||
| public working draft has been published. There are multiple | ||
| implementations of the spec already available, and while it’s being | ||
| adopted by Selenium, it’s also being used by other tools such as | ||
| Puppeteer, Cypress, and even Playwright. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.