WebDriver is a remote control interface that enables introspection and control of user agents. As such it can help developers to verify that their websites are working and performing well with all major browsers. The protocol is standardized by the W3C and consists of two separate specifications: WebDriver classic (HTTP) and the new WebDriver BiDi (Bi-Directional).
This newsletter gives an overview of the work we’ve done as part of the Firefox 126 release cycle.
Contributions
With Firefox being an open source project, we are grateful to get contributions from people outside of Mozilla:
- Gravyant improved the error message for the
session.new
command when no capabilities are specified.
WebDriver code is written in JavaScript, Python, and Rust so any web developer can contribute! Read how to setup the work environment and check the list of mentored issues for Marionette.
WebDriver BiDi
New: Support for the “contexts” argument for the “network.addIntercept” command
Since the introduction of the network.addIntercept
command in Firefox 124, users could only apply network interceptions globally, affecting all open web pages across various tabs and windows. This necessitated the setup of specific filters to limit the impact to tabs requiring interception. However, this approach adversely affected performance, particularly when client code didn’t run locally, leading to increased data transmission over the network.
To address these issues and simplify the use of network interception for specific tabs, we’ve added the context
s argument in the network.addIntercept
command. This enhancement facilitates the targeting of specific top-level browsing contexts, enabling the restriction of network request interception to individual tabs even with the same web page open in multiple tabs.
Bug fixes
- Both the commands
session.subscribe
andsession.unsubscribe
now raise aninvalid argument
error when the value of the argumentsevents
orcontexts
are empty arrays. - Updated the implementation of the
storage.getCookies
command to align with the Gecko default cookie behavior. This allows the removal of the user value for the preferencenetwork.cookie.cookieBehavior
, which was only expected to be set for our experimental CDP implementation. - Removed the
ownership
andsandbox
arguments for thebrowsingContext.locateNodes
command because they are no longer necessary.
Leave a Reply