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 122 release cycle.
Contributions
With Firefox being an open source project, we are grateful to get contributions from people outside of Mozilla.
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.
General
The modifications outlined in this section are applicable to both WebDriver BiDi and Marionette, as both implementations utilize a shared set of common code:
- Fixed a bug that prevented Perform Actions to correctly synthesize double and other multi-click events for the
mouse
input source. Additionally, these events will only be emitted when the actual mouse position has not changed since the last click action. - The definitions for the
Pause
andEqual
(Numpad block) keys have been updated to align with the WebDriver specification.
WebDriver BiDi
New: Support for the “browsingContext.traverseHistory” command
The browsingContext.traverseHistory
command enables clients to navigate pages within a specified browsing context backward and forward in history, similar to a user clicking the back and forward buttons in the browser’s toolbar. The command expects a delta
number argument to specify how many history steps to traverse. For instance to jump forward to the next page, delta
should be set to 1
. To navigate back 3 steps – and therefore skip 2 entries – delta
should be -3
, as in the example below:
{
"id": 68,
"method": "browsingContext.traverseHistory",
"params": {
"context":"4143d9c5-09bd-4491-816c-8c8a50f89ab2",
"delta": -3
}
}
Updates for the browsingContext.setViewport command
In preparation for the addition of emulating the device pixel ratio (DPR) in the browsingContext.setViewport
command, a variant was needed to retain the current viewport size of the specified top-level browsing context. Using null
as a value for the viewport
argument, which is already supported, resets the view port to its original size. Omitting the argument instead ensures that the viewport size remains unchanged.
Bug Fixes
- The serialization of
WindowProxy
remote objects now also works correctly for out-of-process iframes. - Fixed a bug in all supported network events where the
context
id consistently reported the top-level browsing context, even when the navigation occurred within an iframe.
Marionette (WebDriver classic)
Bug Fixes
- Fixed a regression with Get Element Text, where the command was incorrectly returning an empty text when the element was located within a ShadowRoot’s slot.
Leave a Reply