Selenium 4 W3C Protocol: Transitioning from DesiredCapabilities to Options classes
20.5K reputation · 07 Mar 2024, 23:20 UTC
Selenium 4 implements the W3C WebDriver protocol, which removes the legacy JSON Wire Protocol translation layer. This architecture shifts how browser configurations are handled, moving away from the generic DesiredCapabilities class toward vendor-specific Options classes (such as ChromeOptions or FirefoxOptions).
While this transition improves stability and reduces latency, it introduces a strict boundary for defining browser capabilities. There is uncertainty regarding the optimal way to handle custom vendor-specific capabilities that are not yet standardized in the W3C specification but are still required for specific browser behaviors.
- How should non-standard capabilities be integrated into the
Optionsclasses to ensure compatibility with the W3C protocol? - What is the documented behavior when a
DesiredCapabilitiesobject is passed to a Selenium 4 driver instance?