w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
353 stars 39 forks source link

Interop of identifiers with original WebDriver spec #59

Open shs96c opened 3 years ago

shs96c commented 3 years ago

There are a few key places where we need to ensure smooth interop with the existing WebDriver spec. Notably, with the following:

The Session ID is required to allow the session to be established in the first place.

Being able to share window handles allows one to use WebDriver to discover top-level browsing contexts and use those in with WebDriver Bidi. One can also see it being helpful when returning data from Bidi to use with the original WebDriver spec.

The programming model we're seeing surface in Selenium is to use the original WebDriver protocol most of the time, but then augment that with calls to CDP (and therefore to WebDriver Bidi at a later date) As such, being able to reference an element consistently in both protocols is an extremely useful feature.

jgraham commented 3 years ago

FWIW I think this is all covered by the existing spec text or in-flight proposals. I'm happy to leave this issue open until we've landed all the relevant parts, but note e.g. https://w3c.github.io/webdriver-bidi/#data_types-browsing_context already imposes requirements here and #57 will do the same for element identifiers.

whimboo commented 1 year ago

Btw https://github.com/w3c/webdriver-bidi/pull/180 covers sharing element references.