w3c / webdriver-bidi

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

Clarify event / command ordering #658

Open juliandescottes opened 4 months ago

juliandescottes commented 4 months ago

From https://bugzilla.mozilla.org/show_bug.cgi?id=1876063

It can be difficult to see in which order events and commands are supposed to be received. Especially when the event triggers come from other specifications (html, fetch,...)

It would be helpful to clarify the expectations about event & command orders, maybe in a non-normative bit. For instance for a navigation involving network requests, what can clients expect in term of sequence between the navigate command, the browsingContext events, and the network events. Simpler, for network events, what is the expected sequence in case of redirects, authentications etc...

OrKoN commented 4 months ago

I think it would be useful to write down some no-normative description of the event order so that the client implementors do not need re-read the spec (at the same time, it might become outdated). I would suggest that we also try to capture order of events via WPT as the order of events could be important for a robust client implementation. One example of such a test https://github.com/web-platform-tests/wpt/pull/44587