, , ,

Firefox WebDriver Newsletter 135

Posted by

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 135 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 135, several contributors managed to land fixes and improvements in our codebase:

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

Improved user interactions simulation

To make user events more realistic and better simulate real user interactions in the browser, we have moved the action sequence processing of the Perform Actions commands in both Marionette and WebDriver BiDi from the content process to the parent process. While events are still sent synchronously from the content process, they are now triggered asynchronously via IPC calls originating from the parent process.

Due to this significant change, you might experience some regressions. If you encounter any issues, please file a bug for the Remote Agent. If the regressions block test execution, you can temporarily revert to the previous behavior by setting the Firefox preference remote.events.async.enabled to false.

With the processing of actions now handled in the parent process the following issues were fixed as well:

WebDriver BiDi

New: format argument for browsingContext.captureScreenshot

Thanks to Liam’s work, the browsingContext.captureScreenshot command now supports the format argument. It allows clients to specify different file formats ("image/png" and "image/jpeg" are currently supported) and define the compression quality for screenshots.

The argument should follow the browsingContext.ImageFormat type, with a "type" property which is expected to be a string, and an optional "quality" property which can be a float between 0 and 1.

-> {
  "method": "browsingContext.captureScreenshot",
  "params": {
    "context": "6b1cd006-96f0-4f24-9c40-a96a0cf71e22",
    "origin": "document",
    "format": {
      "type": "image/jpeg",
      "quality": 0.1
    }
  },
  "id": 3
}

<- {
  "type": "success",
  "id": 3,
  "result": {
    "data": "iVBORw0KGgoAAAANSUhEUgAA[...]8AbxR064eNvgIAAAAASUVORK5CYII="
  }
}

Bug Fixes

Leave a Reply

Your email address will not be published. Required fields are marked *