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 148 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 148, a WebDriver bug was fixed by a contributor:
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!
General
- Fixed a race condition during initialization of required browser features when opening a new window, preventing issues when navigating immediately to another URL.
- Fixed an interoperability issue between Marionette and WebDriver BiDi where the BiDi
clientWindowID was incorrectly used as a window handle in Marionette.
WebDriver BiDi
- Added initial support for interacting with the browser’s chrome scope (the Firefox window itself). The
browsingContext.getTreecommand now accepts the vendor specificmoz:scopeparameter and returns chrome contexts when set tochromeand Firefox was started with the--remote-allow-system-accessargument. These contexts can be used withscript.evaluateandscript.callFunctionto execute privileged JavaScript with access to Gecko APIs. Other commands do not yet support chrome contexts, but support will be added incrementally as needed. - Updated the
emulation.setGeolocationOverrideandemulation.setScreenOrientationOverridecommands to implement the new reset behavior: contexts are reset only when thecontextsparameter is provided, and user contexts only when theuserContextsparameter is specified. - Fixed a race condition in
browsingContext.createwhere opening a new tab in the foreground could return before the document became visible. - Fixed an issue that occurred when a navigation redirected to an error page.
- Fixed an issue in
network.getDatathat caused aRangeErrorwhen decoding chunked response bodies due to a size mismatch. - Fixed an issue where the
browsingContext.userPromptOpenedandbrowsingContext.userPromptClosedevents incorrectly reported the top-level context ID instead of the iframe’s context ID. - Improved the performance of WebDriver BiDi commands by approximately 100 ms when the selected context is no longer available during the command execution.
Leave a Reply