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 133 release cycle.
Contributions
Firefox – including our WebDriver implementation – is developed as an open source project, and everyone is welcome to contribute. If you ever wanted to contribute to an open source project used by millions of users, or are interested in some experience in software development, jump in.
We are always grateful to receive external contributions, here are the ones which made it in Firefox 133:
- Liam (ldebeasi) added an internal helper to make it easier to call commands from the parent process to content processes
- Dan (temidayoazeez032) updated the error thrown by the
browsingContext.print
command for invalid dimensions
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.
WebDriver BiDi
Support for url
argument of network.continueRequest
We just added support for the "url"
argument of the network.continueRequest
. This parameter, which should be a string representing a URL, allows a request blocked in the beforeRequestSent
phase to be transparently redirected to another URL. The content page will not be aware of the redirect, and will consider the response as if it came from the originally targeted URL.
In terms of BiDi network events, note that this transparent redirect will also not lead to additional network.beforeRequestSent
events. The redirect
count for this request/response will not be increased by this command either. It can be useful if clients want to redirect a specific call to a test API, without having to update the implementation of the website/webapplication.
-> {
"method": "network.continueRequest",
"params": {
"request": "12",
"url": "https://bugzilla.allizom.org/show_bug.cgi?id=1234567"
},
"id": 2
}
<- { "type": "success", "id": 2, "result": {} }
As with other network interception features, using this command and this parameter relies on the fact that the client is monitoring network events and has setup appropriate intercepts in order to catch specific requests. For more details, you can check out the Firefox WebDriver 124 newsletter where we introduced network interception.
Bug fixes
- Updated
browsingContext.print
to throw anInvalidArgumentError
when used with incorrect dimensions. - Fixed
script.evaluate
andscript.callFunction
to allow the use ofdocument.open
in sandbox realms. - Fixed a bug where the
browsingContext.load
event might contain the wrong navigation ID if a same-document navigation occurred during the main navigation. - Fixed an edge case where commands could fail with an
UnknownError
due to navigation.
Marionette
Bug fixes
- Updated Marionette to better handle window positioning on Linux with Wayland.
- Fixed a bug that could leave an empty
style
attribute on an element when trying to click or clear it. - Updated the error message sent for
UnexpectedAlertOpen
errors to include the text of the corresponding alert.
Leave a Reply