Check that the Host header is set and that the host and port are local
or match the address that the WebDriver server is running on.
Differential Revision: https://phabricator.services.mozilla.com/D83499
The "webSocketUrl" capability offers an opt-in
mechanism for WebDriver HTTP implementations to
make use of WebDriver BiDi, the bi-directional
protocol based on a WebSocket connection.
If the used version of Firefox has support for
WebDriver BiDi enabled, and the capability is
set to "true", it will be returned as part of
the "New Session" capabilities and contains
the host and port of the WebSocket server.
Differential Revision: https://phabricator.services.mozilla.com/D116689
The arguments to map_or_else were the wrong way around. Since it's easier to read in this case
switch over to an explicit match statement.
Differential Revision: https://phabricator.services.mozilla.com/D117155
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
When creating a Firefox session with a custom binary, ensure that it
either has a valid application ini file or a valid version string when
run with --version.
Differential Revision: https://phabricator.services.mozilla.com/D81531
When creating a Firefox session with a custom binary, ensure that it
either has a valid application ini file or a valid version string when
run with --version.
Differential Revision: https://phabricator.services.mozilla.com/D81531
webdriver depends on the regex crate for unit testing which adds
significant overhead building the crate. We could depend on
serde_json::from_value() instead, following the same pattern set
forth in the marionette crate.
Differential Revision: https://phabricator.services.mozilla.com/D48318
--HG--
extra : moz-landing-system : lando
We don't expect to use any unsafe and doing this helps static analysis tools
determine that the library is low risk from the point of view of memory unsafety,
and makes it less likely someone will add in some unsafe code in the future without
appropriate care.
Differential Revision: https://phabricator.services.mozilla.com/D41730
--HG--
extra : moz-landing-system : lando
Make sure that deserializing an ActionSequence which misses the "id" field raises an "InvalidArgument" error.
Differential Revision: https://phabricator.services.mozilla.com/D39784
--HG--
extra : moz-landing-system : lando
Bug 1568889 enabled the rustfmt lint checks in continuous integration,
and while they did not cause any errors, this is a follow-up patch
to fix the non-fatal warnings.
Differential Revision: https://phabricator.services.mozilla.com/D39484
--HG--
extra : moz-landing-system : lando