Skip to content
Permalink
Browse files

import of v0.24.0

  • Loading branch information...
whimboo committed Jan 28, 2019
1 parent db536ed commit 17945ac838449dda1defc8cda0c6dadb042519b2
Showing with 383 additions and 245 deletions.
  1. +0 −11 .travis.yml
  2. +64 −0 CHANGES.md
  3. +7 −7 Cargo.toml
  4. +15 −2 README.md
  5. +12 −1 doc/Support.md
  6. +5 −4 doc/Testing.md
  7. +2 −2 doc/TraceLogs.md
  8. +2 −2 doc/index.rst
  9. +22 −21 mach_commands.py
  10. +8 −10 moz.build
  11. +50 −44 src/capabilities.rs
  12. +28 −23 src/command.rs
  13. +14 −4 src/main.rs
  14. +135 −104 src/marionette.rs
  15. +19 −10 src/prefs.rs
@@ -13,17 +13,6 @@ before_install:

matrix:
include:
- os: linux
env:
- TARGET=armv7-unknown-linux-gnueabihf
- NAME=arm7hf
- EXT=tar.gz
addons:
apt:
packages: &armhf
- gcc-arm-linux-gnueabihf
- libc6-armhf-cross
- libc6-dev-armhf-cross
- os: linux
env:
- TARGET=x86_64-unknown-linux-musl
@@ -4,6 +4,69 @@ Change log
All notable changes to this program is documented in this file.


0.24.0 [917474f3473e] (2018-01-28)
------------------------------------

### Added

- Introduces `strictFileInteractability` capability

The new capabilitiy indicates if strict interactability checks
should be applied to `<input type=file>` elements. As strict
interactability checks are off by default, there is a change
in behaviour when using [Element Send Keys] with hidden file
upload controls.

- Added new endpoint `GET /session/{session id}/moz/screenshot/full`
for taking full document screenshots, thanks to Greg Fraley.

- Added new `--marionette-host <HOSTNAME>` flag for binding to a
particular interface/IP layer on the system.

- Added new endpoint `POST /session/{session_id}/window/new`
for the [New Window] command to create a new top-level browsing
context, which can be either a window or a tab.

- When using the preference `devtools.console.stdout.content` set to
`true` logging of console API calls like `info()`, `warn()`, and
`error()` can be routed to stdout.

- geckodriver now sets the `app.update.disabledForTesting` preference
to prevent Firefox >= 65 from automatically updating whilst under
automation.

### Removed

- Turned off builds for arm7hf, which will no longer be released but
can still be built from the source.

### Changed

- Allow file uploads to hidden `<input type=file>` elements

Through a series of changes to the WebDriver specification,
geckodriver is now aligned with chromedriver’s behaviour that
allows interaction with hidden `<input type=file>` elements.

This allows WebDriver to be used with various popular web
frameworks that—through indirection—hides the file upload control
and invokes it through other means.

- Allow use of an indefinite script timeout for the [Set Timeouts]
command, thanks to reimu.

### Fixed

- Corrected `Content-Type` of response header to `utf-8` to fix
an HTTP/1.1 compatibility bug.

- Relaxed the deserialization of timeouts parameters to allow unknown
fields for the [Set Timeouts] command.

- Fixed a regression in the [Take Element Screenshot] to not screenshot
the viewport, but the requested element.


0.23.0 (2018-10-03)
-------------------

@@ -1078,6 +1141,7 @@ and greater.
[insecure certificate]: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-insecure-certificate
[Minimize Window]: https://w3c.github.io/webdriver/webdriver-spec.html#minimize-window
[New Session]: https://w3c.github.io/webdriver/webdriver-spec.html#new-session
[New Window]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/New_Window
[Send Alert Text]: https://w3c.github.io/webdriver/webdriver-spec.html#send-alert-text
[Set Timeouts]: https://w3c.github.io/webdriver/webdriver-spec.html#set-timeouts
[Set Window Rect]: https://w3c.github.io/webdriver/webdriver-spec.html#set-window-rect
@@ -1,6 +1,6 @@
[package]
name = "geckodriver"
version = "0.23.0"
version = "0.24.0"
description = "Proxy for using WebDriver clients to interact with Gecko-based browsers."
keywords = ["webdriver", "w3c", "httpd", "mozilla", "firefox"]
repository = "https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver"
@@ -9,21 +9,21 @@ license = "MPL-2.0"
publish = false

[dependencies]
base64 = "0.9"
base64 = "0.10"
chrono = "0.4.6"
clap = { version = "^2.19", default-features = false, features = ["suggestions", "wrap_help"] }
hyper = "0.12"
lazy_static = "1.0"
log = { version = "0.4", features = ["std"] }
mozprofile = "0.4.0"
mozrunner = "0.8.0"
mozversion = "0.1.3"
mozprofile = "0.5.0"
mozrunner = "0.9.0"
mozversion = "0.2.0"
regex = "1.0"
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
uuid = { version = "0.5", features = ["v4"] }
webdriver = "0.38.0"
uuid = { version = "0.6", features = ["v4"] }
webdriver = "0.39.0"
zip = "0.4"

[[bin]]
@@ -40,16 +40,29 @@ Documentation
* [C# API](https://seleniumhq.github.io/selenium/docs/api/dotnet/)
* [JavaScript API](https://seleniumhq.github.io/selenium/docs/api/javascript/)
* [Java API](https://seleniumhq.github.io/selenium/docs/api/java/)
* [Perl API](https://metacpan.org/pod/Selenium::Remote::Driver)
* [Python API](https://seleniumhq.github.io/selenium/docs/api/py/)
* [Ruby API](https://seleniumhq.github.io/selenium/docs/api/rb/)

* [geckodriver usage](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Usage.html)
* [Supported platforms](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Support.html)
* [Firefox capabilities](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Capabilities.html)
* [Capabilities example](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Capabilities.html#capabilities-example)
* [Enabling trace logs](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/TraceLogs.html)
* [Analyzing crash data from Firefox](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/CrashReports.html)

* [Contributing](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/index.html#for-developers)
* [Contributing](https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/#for-developers)


Source code
-----------

geckodriver’s canonical source code can be found in [mozilla-central].
We only use this GitHub repository for issue tracking and making releases.
See our [contribution documentation] for more information.

[mozilla-central]: https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver
[contribution documentation]: https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/#for-developers


Contact
@@ -59,7 +72,7 @@ The mailing list for geckodriver discussion is
tools-marionette@lists.mozilla.org ([subscribe], [archive]).

There is also an IRC channel to talk about using and developing
geckodriver in #ateam on irc.mozilla.org.
geckodriver in #interop on irc.mozilla.org.

[subscribe]: https://lists.mozilla.org/listinfo/tools-marionette
[archive]: https://lists.mozilla.org/pipermail/tools-marionette/
@@ -4,6 +4,12 @@ Supported platforms
The following table shows a mapping between [geckodriver releases],
supported versions of Firefox, and required Selenium version:

<style type="text/css">
table { width: 100%; margin-bottom: 2em; }
table, th, td { border: solid gray 1px; }
td { padding: 5px 10px; text-align: center; }
</style>

<table>
<thead>
<tr>
@@ -17,6 +23,11 @@ supported versions of Firefox, and required Selenium version:
</tr>
</thead>

<tr>
<td>0.23.0
<td>≥ 3.11 (3.14 Python)
<td>57
<td>n/a
<tr>
<td>0.22.0
<td>≥ 3.11 (3.14 Python)
@@ -57,7 +68,7 @@ supported versions of Firefox, and required Selenium version:
<td>≥ 3.4
<td>52
<td>62

</table>

Clients
-------
@@ -28,12 +28,13 @@ As these are functional integration tests and pop up Firefox windows
sporadically, a helpful tip is to surpress the window whilst you
are running them by using Firefox’ [headless mode]:

% MOZ_HEADLESS=1 ./mach wpt testing/web-platform/tests/webdriver
% ./mach wpt --headless testing/web-platform/tests/webdriver

In addition to the `MOZ_HEADLESS` output variable there is also
`MOZ_HEADLESS_WIDTH` and `MOZ_HEADLESS_HEIGHT` to control the
The `--headless` flag is equivalent to setting the `MOZ_HEADLESS`
output variable. In addition to `MOZ_HEADLESS` there is also
`MOZ_HEADLESS_WIDTH` and `MOZ_HEADLESS_HEIGHT` for controlling the
dimensions of the no-op virtual display. This is similar to using
xvfb(1) which you may know from the X windowing system, but has
Xvfb(1) which you may know from the X windowing system, but has
the additional benefit of also working on macOS and Windows.

As you get in to development of geckodriver and Marionette you will
@@ -140,7 +140,7 @@ As with C#, the log output is helpfully propagated to stdout.
Python
------

The Selenium [Python client] comes with an
The Selenium [Python client] comes with a
[`selenium.webdriver.firefox.options.Options`] helper that can
be used programmatically to construct the [`moz:firefoxOptions`]
capabilities object:
@@ -150,7 +150,7 @@ capabilities object:

opts = Options()
opts.log.level = "trace"
driver = Firefox(firefox_options=opts)
driver = Firefox(options=opts)

The log output is stored in a file called _geckodriver.log_ in your
script’s current working directory.
@@ -47,10 +47,10 @@ For developers
Communication
=============

The mailing list for Marionette discussion is
The mailing list for geckodriver discussion is
tools-marionette@lists.mozilla.org (`subscribe`_, `archive`_).

If you prefer real-time chat, there is often someone in the #ateam IRC
If you prefer real-time chat, there is often someone in the #interop IRC
channel on irc.mozilla.org. Don’t ask if you may ask a question;
just go ahead and ask, and please wait for an answer as we might
not be in your timezone.
@@ -4,47 +4,47 @@

from __future__ import absolute_import, print_function, unicode_literals

import argparse
import os
import logging

from mach.decorators import (
Command,
CommandArgument,
CommandArgumentGroup,
CommandProvider,
SubCommand,
)

from mozbuild.base import (
MachCommandBase,
MachCommandConditions as conditions,
)
from mozbuild.base import MachCommandBase


@CommandProvider
class GeckoDriover(MachCommandBase):
class GeckoDriver(MachCommandBase):

@Command("geckodriver",
category="post-build",
description="Run the WebDriver implementation for Gecko.")
category="post-build",
description="Run the WebDriver implementation for Gecko.")
@CommandArgument("--binary", type=str,
help="Firefox binary (defaults to the local build).")
help="Firefox binary (defaults to the local build).")
@CommandArgument("params", nargs="...",
help="Flags to be passed through to geckodriver.")
help="Flags to be passed through to geckodriver.")
@CommandArgumentGroup("debugging")
@CommandArgument("--debug", action="store_true", group="debugging",
help="Enable the debugger. Not specifying a --debugger option will result in the default debugger being used.")
help="Enable the debugger. Not specifying a --debugger "
"option will result in the default debugger "
"being used.")
@CommandArgument("--debugger", default=None, type=str, group="debugging",
help="Name of debugger to use.")
@CommandArgument("--debugger-args", default=None, metavar="params", type=str,
group="debugging",
help="Flags to pass to the debugger itself; split as the Bourne shell would.")
help="Name of debugger to use.")
@CommandArgument("--debugger-args", default=None, metavar="params",
type=str, group="debugging",
help="Flags to pass to the debugger itself; "
"split as the Bourne shell would.")
def run(self, binary, params, debug, debugger, debugger_args):
try:
binpath = self.get_binary_path("geckodriver")
except Exception as e:
print("It looks like geckodriver isn't built. "
"Add ac_add_options --enable-geckodriver to your mozconfig ",
"Add ac_add_options --enable-geckodriver to your "
"mozconfig ",
"and run |mach build| to build it.")
print(e)
return 1
@@ -90,17 +90,18 @@ def run(self, binary, params, debug, debugger, debugger_args):
args = [self.debuggerInfo.path] + self.debuggerInfo.args + args

return self.run_process(args=args, ensure_exit_code=False,
pass_thru=True)
pass_thru=True)


@CommandProvider
class GeckoDriverTest(MachCommandBase):

@Command("geckodriver-test",
category="post-build",
description="Run geckodriver unit tests.")
category="post-build",
description="Run geckodriver unit tests.")
@CommandArgument("-v", "--verbose", action="store_true",
help="Verbose output for what commands the build is running.")
help="Verbose output for what"
" commands the build is running.")
def test(self, verbose=False, **kwargs):
from mozbuild.controller.building import BuildDriver

@@ -6,17 +6,15 @@ RUST_PROGRAMS += ["geckodriver"]
# Some Rust build scripts compile C/C++ sources, don't error on warnings for them.
AllowCompilerWarnings()

# https://bugzil.la/1425365
if CONFIG["OS_ARCH"] != "WINNT":
RUST_TESTS = [
"geckodriver",
"webdriver",
RUST_TESTS = [
"geckodriver",
"webdriver",

# TODO: Move to mozbase/rust/moz.build once those crates can be
# tested separately.
"mozprofile",
"mozrunner",
"mozversion",
# TODO: Move to mozbase/rust/moz.build once those crates can be
# tested separately.
"mozprofile",
"mozrunner",
"mozversion",
]

with Files("**"):

0 comments on commit 17945ac

Please sign in to comment.
You can’t perform that action at this time.