gecko-dev/testing/geckodriver
James Graham 0e4d383ed3 Bug 1443520 - Move session deletion on teardown into webdriver lib, r=webdriver-reviewers,whimboo
Currently we have a `delete_session` function in
webdriver::server::Dispatcher which is called either when the session
has been cleanly deleted with a delete session method, or when we want
the session to be deleted. But all that method actually does is call
into WebDriverHander::delete_session, which then has to decide whether
to initiate a clean shutdown and then do any impl-specific shutdown
steps (close the connection in the case of geckodriver).

The whole setup is easier to understand if we make
webdriver::server::Dispatcher resposible for ensuring that the session
has been deleted by the time we notify the handler. We rename
`delete_session` `teardown_session` to reflect the fact that the
session may already have been deleted. This takes a single parameter,
a `SessionTeardownKind`, which indicates whether the session was
already deleted or not. In case there is a session, but it wasn't
deleted, `teardown_session` will attempt to send a `DeleteSession`
message.

On the handler side the `teardown_session` method which replaces
delete session gets a `SessionTeardownKind` that reflects whether we
ever handled a DeleteSession response, either from an explict user
request or from the implicit message sent by the dispatcher. In
geckodriver we use this to decide whether to wait for the browser to
close by itself before signalling it.

This fixes several issues; a regression in which we were waiting for
the browser to shut down when we shouldn't, and an issue where we were
sending too many delete session messages in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D116886
2021-06-07 11:25:23 +00:00
..
.cargo
doc Bug 1693993 - [marionette] Move Marionette server code to /remote/marionette. r=remote-protocol-reviewers,marionette-reviewers,jdescottes,webdriver-reviewers 2021-05-31 17:36:06 +00:00
marionette Bug 1713935 - Make geckodriver pass clippy, r=webdriver-reviewers,whimboo 2021-06-02 20:29:53 +00:00
src Bug 1443520 - Move session deletion on teardown into webdriver lib, r=webdriver-reviewers,whimboo 2021-06-07 11:25:23 +00:00
CHANGES.md Bug 1698968 - Always send marionette-startup-requested r=whimboo,aklotz,webdriver-reviewers 2021-04-30 20:48:37 +00:00
CONTRIBUTING.md
Cargo.toml Bug 1700557 - [geckodriver] Release version 0.29.1. r=webdriver-reviewers,jgraham 2021-04-08 11:38:20 +00:00
ISSUE_TEMPLATE.md
README.md
build.rs Bug 1676513 - Fix clippy warnings r=emilio,webdriver-reviewers,whimboo,rhunt 2020-11-17 12:02:22 +00:00
mach_commands.py Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers 2021-05-17 16:15:58 +00:00
moz.build Bug 1650891 - [geckodriver] Make profile customizable to support root-less Android devices. r=webdriver-reviewers,jgraham,bc,marionette-reviewers 2020-10-28 12:33:47 +00:00

README.md

geckodriver

Proxy for using W3C WebDriver compatible clients to interact with Gecko-based browsers.

This program provides the HTTP API described by the WebDriver protocol to communicate with Gecko browsers, such as Firefox. It translates calls into the Marionette remote protocol by acting as a proxy between the local- and remote ends.

Downloads

Documentation

Source code

geckodriver is made available under the Mozilla Public License.

Its source code can be found in mozilla-central under testing/geckodriver. This GitHub repository is only used for issue tracking and making releases.

Contact

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

There is also a Matrix channel to talk about using and developing geckodriver on #interop:mozilla.org <https://chat.mozilla.org/#/room/#interop:mozilla.org>__