w3c / webdriver-bidi

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

webdriver-bidi should have an event for FedCM dialogs #426

Open cbiesinger opened 1 year ago

cbiesinger commented 1 year ago

The FedCM spec defines a number of commands to interact with FedCM dialogs: https://fedidcg.github.io/FedCM/#automation

However, most/all of the getters would be better done instead using an event with webdriver bidi, similar to what the devtools protocol uses: https://chromedevtools.github.io/devtools-protocol/tot/FedCm/#event-dialogShown

So I am filing this to track such an addition.

cbiesinger commented 1 year ago

@bvandersloot-mozilla fyi

foolip commented 1 year ago

@cbiesinger would you prefer to add something to https://fedidcg.github.io/FedCM/#automation, or to define in WebDriver BiDi itself? We don't have any extensions to BiDi in other specs yet, but I think long term that's just as natural as different specs defining their own Web IDL, and not centralizing everything in a single spec.

cbiesinger commented 1 year ago

I think the former would probably be preferable, if webdriver-bidi provides such an extension mechanism?

jgraham commented 1 year ago

The intent is definitely to allow other specs to extend BiDi. At the moment the way extension points will work is somewhat unclear, but possibly you can go ahead without much explicit prose in BiDi to help you; basically you'd need to define a module with some CDDL that describes your commands / events / types and then do something like

Command //= FedCMCommand

to extend the top-level definitions.

Of course we currently lack the tooling to make this work nicely (e.g. by extracting the full CDDL definition from across multiple specs), but that doesn't seem like a blocker.

OrKoN commented 4 months ago

@cbiesinger here are two examples of BiDi extensions https://webbluetoothcg.github.io/web-bluetooth/#bluetooth-module and https://www.w3.org/TR/permissions/#automation-webdriver-bidi

OrKoN commented 4 months ago

The bluetooth one also includes events.