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 146 release cycle.
Contributions
Firefox is an open source project, and we are always happy to receive external code contributions to our WebDriver implementation. We want to give special thanks to everyone who filed issues, bugs and submitted patches.
In Firefox 146 Khalid AlHaddad, who had already contributed to the previous release, submitted two new bug fixes:
- Added a dedicated
switch_to_parent_framemethod to the WebDriver Classic Python client. - Renamed the existing
switch_frame methodtoswitch_to_framefor consistency with the WebDriver specification.
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, or the list of mentored JavaScript bugs for WebDriver BiDi. Join our chatroom if you need any help to get started!
WebDriver BiDi
- Updated the
emulation.setLocaleOverridecommand to override the return value ofnavigator.languageandnavigator.languagesalongside JS APIs. - Updated the
emulation.setLocaleOverrideandemulation.setTimezoneOverridecommands reset behavior to match recent specification changes. When calling this command to reset the override for a specific browsing context, overrides configured for a user context owning this browsing context will still apply. - Added support for the
contextlocator to thebrowsingContext.locateNodescommand, which allows to retrieve the container of non-top-level browsing contexts, such as iframe elements. - Implemented the
network.setExtraHeaderscommand, which can be used to specify request headers which will be automatically added to requests triggered in the provided browsing contexts or user contexts. - Updated all our network data collection commands (
network.addDataCollector,network.getDataandnetwork.disownData) to support therequestdata type, which allows to collect and retrieve request post data. - Improved our implementation for
network.getDatato also support requests using thedata:scheme. - Fixed a bug for
network.getDatawhich was not throwing the expectedno such network dataerror for unsupported requests. - Fixed a bug in our network events where different requests were reusing the same id, mostly impacting data URLs or cached requests.
Marionette
- Fixed a regression in
WebDriver:GetElementTextthat caused text containing accented characters (e.g., “ó”) to be incorrectly capitalized. - Fixed a bug in the
WebFrameJSON deserialization that incorrectly raised ano such windowerror instead ofno such framewhen handling invalid frames. - Added a WebDriver extension to control the Global Privacy Control signal.
Leave a Reply