Skip to content
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

Add BiDi support #1411

Closed
gdonati78 opened this issue Mar 8, 2024 · 6 comments
Closed

Add BiDi support #1411

gdonati78 opened this issue Mar 8, 2024 · 6 comments
Labels

Comments

@gdonati78
Copy link

In Selenium 4 there are constantly new features added that are based on the BiDirectional protocol. I'm specifically interested in e.g. the console log, but also the mutation observation

As far as I understand it also uses WebSocket like the existing CDP (something was added in #1063).

@vania-pooh
Copy link
Member

@gdonati78 WebDriver BiDi is not an approved standard (like W3C WebDriver is), it's only a draft. Console log and mutation observation should be already available using CDP. I'm not even sure that Selenium client does not rely on CDP internally for BiDi functionality.

@gdonati78
Copy link
Author

If I understand it correctly, the Selenium client seems indeed to rely on the CDP for mutation observation, but the console log functionality we are interested into is using W3C compliant BiDi, see links above or directly https://www.selenium.dev/documentation/webdriver/bidirectional/
While the specification is in works, the browser vendors are parallely implementing the [WebDriver BiDirectional Protocol](https://w3c.github.io/webdriver-bidi/). Refer [web-platform-tests dashboard](https://wpt.fyi/results/webdriver/tests/bidi?label=experimental&label=master&aligned&view=subtest) to see how far along the browser vendors are. Selenium is trying to keep up with the browser vendors and has started implementing W3C BiDi APIs. The goal is to ensure APIs are W3C compliant and uniform among the different language bindings.

@vania-pooh
Copy link
Member

@gdonati78 spec is in too early stage in our opinion. So far as Selenoid is backwards compatible, we don't want to reimplement things (and thus break backwards compatibility) if one day Selenium guys decide to change things slightly.

@gdonati78
Copy link
Author

It makes sense, thanks for the prompt answer @vania-pooh

@bischoffdev
Copy link

For now, in Chrome, as I remember, BiDi is implemented using CDP internally. The goal of BiDi is to not rely on CDP at all in the future from Selenium side to have one common way of bidirectional communication. So even though CDP might be used, from Selenium we should already be able to use BiDi.

While the specification is in works, the browser vendors are parallely implementing the WebDriver BiDirectional Protocol. Refer web-platform-tests dashboard to see how far along the browser vendors are. Selenium is trying to keep up with the browser vendors and has started implementing W3C BiDi APIs. The goal is to ensure APIs are W3C compliant and uniform among the different language bindings.

However, as @vania-pooh and @gdonati78 stated correctly, it is not accepted standard yet.

An editor's draft is a document allowing the Group to iterate internally on its content for consideration. Editor's Drafts are works in progress inside a W3C Group and are not required to have the consensus of the Group participants. These drafts have not received formal review and are not endorsed W3C. These drafts MUST NOT be cited as W3C standards and may or may not become W3C standards.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 12, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants