What’s cooking in Marionette – Ultimo September

A few weeks ago I sent out an email to the Marionette mailing list about the topics that have been cooking in Marionette. I intended to make that a semi-regular occurrence, but it was interrupted by travel to TPAC for specification meetings.

The following list enumerates all changes I have deemed relevant to public consumers from Marionette, geckodriver, and webdriver-rust.

Of course many more changes have happened to the (internal) Marionette test harness and there have been several more commits of janitorial nature, but the intention here is to distil the bulk of information into a format that is useful to ① people not actively engaged in development, and ② for us to keep track of what we have in the pipeline for the upcoming release.

I suspect it will also be useful as a reference when triaging new issue reports.


Avoid CPOW when setting file array on <input type=file>

Marionette
status-firefox49 fix-optional
tracking-firefox50 -
status-firefox50 fix-optional
tracking-firefox51 ?
status-firefox51 fixed

There is no longer any need to disable safe CPOW checks when using the latest Nightly. Still I would recommend keeping the preference until the fix has ridden all trains to stable.

The checks are disabled by setting dom.ipc.cpows.forbid-unsafe-from-browser to false. You can enable the checks by removing this preference from the startup profile.

There is a hope to uplift this to Beta once it has been verified to work well there.

DOM events not fired on interacting with <input type=file< element

Marionette
status-firefox49 wontfix
status-firefox50 fixed
status-firefox51 fixed

Marionette will now dispatch the correct DOM events when interacting with <input type=file> elements.

Wrong element is clicked when requested element is out of view in <select> element

Marionette
status-firefox49 fixed
status-firefox50 fixed
status-firefox51 fixed

Marionette now supports interaction with <select> and <select multiple> elements.

Allow quitApplication to accept no parameters

Marionette
status-firefox50 fixed
status-firefox51 fixed

We patched the quitApplication command to optionally take flags, so that one does not have to supply any by default.

It has been uplifted to Firefox 50, which means we will soon be able to remove the explicit eForceQuit usage from geckodriver.

Cross-compile on win32 using Docker image from port-of-rust

geckodriver
tracking 0.11.0

The Windows 32-bit compilation issue we had with Rust was solved by using a Docker image with the right dependencies set up.

Switch to building with Rust beta

geckodriver
tracking 0.11.0

We should probably downgrade this to stable once the relevant fixes make their way there.

Add extension command for finding anonymous nodes

geckodriver
tracking 0.11.0

XBL has the concept of anonymous nodes that are not returned by the usual WebDriver element-finding methods. However there are two Gecko-specific methods of finding them; either by getting all the anonymous children of a reference element, or getting a single anonymous child of a reference element with specified attribute values.

This commit adds two endpoints corresponding to those methods:

/session/{sessionId}/moz/xbl/{elementId}/anonymous_children

Return all anonymous children.

/session/{sessionId}/moz/xbl/{elementId}/anonymous_by_attribute

Return an anonymous element with the given attribute value, provided as a body of the form:

{
  	"name": <attribute name>,
  	"value": <attribute value>
}

Set log verbosity from capability

geckodriver
tracking 0.11.0

Using the capability firefoxOptions.log.level (full usage described in README.md) it’s possible to set the log level of both Firefox and geckodriver itself. This will become useful as most of our users have trouble figuring out how to start geckodriver with the -vv flag in order to enable very verbose logging. From 0.11 we can recommend users to add this to their capabilities instead.

In the same vein, there is an open PR to replace the default log dependency with slog, as env_logger does not allow us to reinstantiate it at runtime. This will cause issues when providing a different log level in the capabilities for subsequent sessions.

Add prefs capability to firefoxOptions

geckodriver
tracking 0.11.0

This takes the form of a dictionary of {pref_name: pref_value}. These prefs are applied after the default prefs, but before those required to enable Marionette.

Disable additional welcome URL

geckodriver
tracking 0.11.0

We also disabled the additional welcome URL in geckodriver which has caused officially branded builds to open two new tabs when started with a clean profile. This doesn’t reproduce in Nightly builds as it does not have it set by default. As the additional welcome page uses a plugin that forks and starts the plugin container process, deleting a session whilst on this site sometimes causes that process to crash. However, we still haven’t pinned down the cause of the underlying issue which is tracked in issue 225.

Log listening host and port when starting geckodriver

geckodriver
tracking 0.11.0

Propagate webdriver::server::start errors and display them in geckodriver without panicking

geckodriver
tracking 0.11.0

Add --webdriver-port argument back as a hidden alias

geckodriver
tracking 0.11.0

This is a hidden and deprecated flag, and we do not recommend using it. The intention is to make the transition somewhat easier for some of our users.

Incrementally improve the UI

geckodriver
tracking 0.11.0

Copying information is currently included in --help and this patch makes it only appear when --version is invoked.

Futhermore, the error messages that are printed on invalid input are made consistent.

Add Get Window Position and Set Window Position commands

webdriver-rust
tracking 0.15.0

Commands are added to the WebDriver specification in w3c/webdriver#307, but still remains to be exposed in geckodriver.

Return early using try!() instead of unwrapping errors

webdriver-rust
tracking 0.15.0

Return hyper::server::Listening so user can access socket address

webdriver-rust
fixed 0.14.0

Correct error type when starting second session

webdriver-rust
fixed 0.14.0

Originally sent to the tools-marionette@lists.mozilla.org mailing list.