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 119 release cycle.
With Firefox being an open source project, we are grateful to get contributions from people outside of Mozilla:
- Nagendra refactored certain helper methods in our tab manager module to make use of the new
In Firefox 119, several bugs were simultaneously fixed for WebDriver BiDi and Marionette:
- When performing a “pointerDown” action with the middle or right mouse button pressed, the “mousedown” event as emitted by the related HTML element had the value of the “buttons” property swapped.
- When performing a “scroll” action of input type “wheel” with an origin set to “pointer” an “invalid argument” error was inappropriately raised, whereas per the current WebDriver specification this combination is not supported.
New: “browsingContext.reload” command
browsingContext.reload command, it is now possible to reload the page that is currently displayed within a given browsing context. Note that there is no limitation anymore (as in WebDriver classic) to a top-level browsing context, so even individual frames can now be reloaded. A limitation at the moment is that Firefox will reload the page only from the cache. The support for the
ignoreCache argument we be added at a later time.
New: “browsingContext.userPromptClosed” event
Back in Firefox 118 we added the
browsingContext.userPromptOpened event, which is emitted whenever a user prompt of type “alert”, “confirm” or “prompt” is opened. With the Firefox 119 release, the
browsingContext.userPromptClosed event is now available as well, and is emitted when such a user prompt is closed. The event’s payload contains the
context where the dialog is displayed, the accept or dismiss state, and as well the user-entered text in case of a user prompt of type “prompt”.
This event will also support
"beforeunload" type dialogs in the future, but they are not handled at the moment.
New: “browsingContext.navigationStarted” event
browsingContext.navigationStarted is a new event, which gets emitted when a new navigation is started by Firefox. A navigation can be requested by using the
browsingContext.navigate or the new
context where the navigation takes place, a unique
navigation id, the
URL that Firefox navigates to, and the timestamp.
New: “script.realmCreated” and “script.realmDestroyed” events
script.callFunction with the
sandbox argument, a new Realm can be created. To get all the existing Realms for a page, you can still use the
script.getRealms command. The payload for the
script.realmCreated event will contain the realm information of the created Realm, which includes Realm’s identifier, the browsing context, the Realm’s type and if relevant the name of the Sandbox. The payload for
script.realmDestroyed only contains the Realm’s identifier.
browsingContext.userPromptOpenedevent was accidentally sent when a HTTP Authentication dialog was opened.
- Some events like
browsingContext.domContentLoadedthat are related to browser activities around the time when a browsing context gets closed could have been sent out inappropriately with a browsing context set to “
null“. We’ve fixed that so these unwanted events are no longer emitted.
Marionette (WebDriver classic)
- The list of possible error codes when trying to install a WebExtension by using the
Addon:Installcommand has been updated to match the latest error codes of Firefox.