Does WebDriver BiDi event synchronization conflict with legacy W3C command execution?
26K reputation · 11 Jul 2024, 08:46 UTC
State Synchronization in Hybrid WebDriver Implementations
Selenium is transitioning from the unidirectional W3C WebDriver protocol to the bidirectional WebDriver BiDi protocol. While BiDi reduces polling overhead by utilizing an event-driven stream for browser communication, many environments still rely on the standard W3C command execution flow for primary test actions.
There is uncertainty regarding how the browser maintains a consistent state when a BiDi event stream is active simultaneously with legacy synchronous commands. Specifically, it is unclear if events emitted via the BiDi stream are guaranteed to be sequenced accurately relative to the completion of a W3C command.
- Does the BiDi event stream maintain strict chronological synchronization with the legacy command execution flow?
- Which mechanism ensures that a state change triggered by a W3C command is reflected in the BiDi event stream before the next command is issued?