0e4d383ed3
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 |
||
---|---|---|
.. | ||
.cargo | ||
doc | ||
marionette | ||
src | ||
CHANGES.md | ||
CONTRIBUTING.md | ||
Cargo.toml | ||
ISSUE_TEMPLATE.md | ||
README.md | ||
build.rs | ||
mach_commands.py | ||
moz.build |
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>
__