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.
With Firefox being an open source project, we are grateful to get contributions from people outside of Mozilla.
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
mouseinput 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
Equal(Numpad block) keys have been updated to align with the WebDriver specification.
New: Support for the “browsingContext.traverseHistory” command
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:
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.
- The serialization of
WindowProxyremote objects now also works correctly for out-of-process iframes.
- Fixed a bug in all supported network events where the
contextid consistently reported the top-level browsing context, even when the navigation occurred within an iframe.