Commit Graph
260 Commits
Author SHA1 Message Date
Cameron McCormack b170f630f8 Bug 1508820 - fix "warning: variant is never constructed: Quit" r=ato
Differential Revision: https://phabricator.services.mozilla.com/D12489
2018-11-20 23:16:10 +00:00
Andreas Tolfsen 3e84d0602b bug 1507428: webdriver: fix incorrect Content-Type header; r=whimboo
The Content-Type header contains the correct MIME type, but the
charset option is "utf8" and invalid: it should be "utf-8".

Differential Revision: https://phabricator.services.mozilla.com/D12116
2018-11-16 19:17:37 +00:00
Andreas Tolfsen 56d260b811 bug 1502864: webdriver: add strictFileInteractability capability; r=jgraham
Depends on D10272

Depends on D10272

Differential Revision: https://phabricator.services.mozilla.com/D10273
2018-11-03 16:32:34 +00:00
Ciure Andrei cb626bfb4a Backed out 8 changesets (bug 1502864) for failing test_capabilities.py CLOSED TREE
Backed out changeset 6e4454a6f3ee (bug 1502864)
Backed out changeset 3f7ca511af8c (bug 1502864)
Backed out changeset 9382a6630231 (bug 1502864)
Backed out changeset 1eb51f6b4ba0 (bug 1502864)
Backed out changeset 2fda41394085 (bug 1502864)
Backed out changeset 0b421dd8a7d5 (bug 1502864)
Backed out changeset 9caa2f0e2e38 (bug 1502864)
Backed out changeset 7616e25a07b3 (bug 1502864)
2018-11-02 19:14:52 +02:00
Andreas Tolfsen 0cf96375f6 bug 1502864: webdriver: add strictFileInteractability capability; r=jgraham
Depends on D10272

Differential Revision: https://phabricator.services.mozilla.com/D10273
2018-11-02 14:26:00 +00:00
Andreas Tolfsen 57781c6f78 bug 1491288: webdriver: release 0.38.0; r=whimboo
Differential Revision: https://phabricator.services.mozilla.com/D7300
2018-10-03 15:00:00 +00:00
Andreas Tolfsen 67a6e3f3e0 bug 1495475: webdriver: warn on using desiredCapabilities/requiredCapabilities r=whimboo
This emits a warning when the webdriver library reverts to using the
legacy Selenium-styled capabilities negotiation for new sessions.
It provides a helpful link which will explain to users how to update.

Differential Revision: https://phabricator.services.mozilla.com/D7305
2018-10-02 06:50:22 +00:00
Henrik Skupin 0b1eb2dd42 Bug 1494637 - [geckodriver] Only serialize non null arguments for Marionette. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D7210
2018-09-29 15:34:38 +00:00
Henrik Skupin 4f0a5d2a95 Bug 1494617 - [geckodriver] Fix evaluation of "desiredCapabilities" and "requiredCapabilities". r=ato
The refactoring of the webdriver crate to use Serde (bug 1396821)
caused this regression. By instructing Serde to correctly rename
both properties fixes it.

Differential Revision: https://phabricator.services.mozilla.com/D7079
2018-09-27 12:06:00 +00:00
Kerem Kat 737a51f708 bug 1453292: webdriver, geckodriver: remove elementTap command r=whimboo
Removes the non-standard /session/{session id}/element/{element
id}/tap endpoint command from geckodriver.

Differential Revision: https://phabricator.services.mozilla.com/D6879
2018-09-26 09:49:03 +00:00
Andreas Tolfsen 3bce2ec657 bug 1492647: webdriver: remove unused travis config; r=whimboo
DONTBUILD
2018-09-21 13:34:56 +01:00
Andreas Tolfsen 608289b34f bug 1492647: webdriver: remove unused ignore files; r=whimboo
The rules in the .gitignore file are duplicated by the root-level
.gitignore file, and the .hgignore file does not take effect because
hg does not subdirectory ignore files.

DONTBUILD
2018-09-21 13:34:55 +01:00
Henrik Skupin 3f94a8c01c Bug 1491751 - [geckodriver] "Pause" action primitive should allow duration to be optional. r=ato 2018-09-17 13:32:31 +02:00
Andreas Tolfsen 609a3f271e bug 1490660: webdriver: release 0.37.0; r=jgraham 2018-09-12 16:12:21 +01:00
Andreas Tolfsen 65b690df81 bug 1490660: webdriver: correct README; r=jgraham
The usage example is out of date, and the URLs for the mailing list
archive and the WebDriver specification were wrong.
2018-09-12 16:12:20 +01:00
Henrik Skupin 7edd7fd2db Bug 1489141 - [webdriver] Ignore any unknown variant of enum PointerOrigin.
To keep backward compatibility, the legacy "ELEMENT" key for an
instance of PointerOrigin has to be supported, but ignored.

This workaround can be removed once legacy support gets dropped
from geckodriver.
2018-09-07 11:27:04 +02:00
Bastien Orivel ba7befcc6d Bug 1489792 - Part 1: Update base64 to 0.9. r=ato 2018-09-11 10:18:40 +01:00
Andreas Tolfsen 9b77ce54b2 Bug 1487986: webdriver: prefer x.is_empty() over x.len() == 0; r=whimboo 2018-09-04 13:40:23 +01:00
Andreas Tolfsen b028d08a5f Bug 1487993: webdriver: avoid explicitly calling iteration protocols; r=whimboo
Instead of making explicit calls to iterator protocol methods such as
x.iter() or x.into_iter(), we can loop over references to collections.
This is considered better style.
2018-09-04 13:36:52 +01:00
Andreas Tolfsen abbed5fc09 Bug 1487989: webdriver: deref matched expressions; r=whimboo
Instead of accessing each variant using a reference, we should
dereference the matched expression when possible.
2018-09-04 13:31:04 +01:00
Andreas Tolfsen ef96b6e41f Bug 1488004: webdriver: use separators in MAX_SAFE_INTEGER definitiion; r=whimboo
This silences a clippy warning.
2018-09-03 13:38:04 +01:00
Andreas Tolfsen 4109d1e228 Bug 1487999: webdriver: simplify cloning of merged_capabilities; r=whimboo
We clone merged_capabilities in the CapabilitiesMatching implementation
for SpecNewSessionParameters::match_browser using x.map(|x| x.clone()),
but this can be simplified to x.cloned().
2018-09-03 13:36:18 +01:00
Andreas Tolfsen b66f2aa576 Bug 1487997: webdriver: fix needless string formatting; r=whimboo
Also fixes some x.or() to x.or_else() so that the closures are not
evaluated unless they have to be.
2018-09-03 13:33:54 +01:00
Andreas Tolfsen 8cb2da6603 Bug 1487995: webdriver: avoid redundant mapping closure; r=whimboo
The deserialised value is already Some({u,i}64).
2018-09-03 13:30:12 +01:00
Andreas Tolfsen c34931cb4c Bug 1487994: webdriver: fixup; r=me
DONTBUILD
2018-09-03 13:22:49 +01:00
Andreas Tolfsen e59912715f Bug 1487994: webdriver: avoid unnecessary passing by value; r=whimboo
In some places we pass variables by value unnecessarily.  In these
cases it would be more memory efficient to pass a reference so that
we avoid copying.
2018-09-03 13:22:21 +01:00
Andreas Tolfsen 36e2dceb6e Bug 1487992: webdriver: drop redundant return statements; r=whimboo 2018-09-03 13:14:36 +01:00
Andreas Tolfsen 9a2c2e7ce3 Bug 1487988: webdriver: make single character patterns use chars; r=whimboo
Single-character constant patterns should be made into chars as
these are faster to use and does not require heap memory allocation.
2018-09-03 13:04:13 +01:00
Andreas Tolfsen 4e3b7ea631 Bug 1487985: webdriver: stop throwing away error causes; r=whimboo
Instead of using a catch-all that ignores the error cause, we can
print the cause as part of the panic.

Eventually the error handling in this function should be fixed to
not panic at all, obviously.
2018-09-03 13:00:48 +01:00
Andreas Tolfsen 614fce6ba6 Bug 1487808: webdriver: remove redundant field names in struct init; r=whimboo 2018-09-01 13:44:20 +01:00
Henrik Skupin 35bfc23ffa Bug 1486793 - [webdriver] Fix regression in "Take Element Screenshot" from conversion to Serde. r=ato
The command "Take Element Screenshot" expects the web element as
parameter, and not as part of the body.
2018-08-29 10:15:32 +02:00
Henrik Skupin f27d8e77fa Bug 1486467 - [webdriver] Rename sessionId to session_id for NewSessionResponse. r=ato 2018-08-27 16:44:35 +02:00
Henrik Skupin f804e91586 Bug 1486467 - [webdriver] Rename pageLoad to page_load for TimeoutsResponse. r=ato 2018-08-27 16:44:06 +02:00
Henrik Skupin 88edf3fdfc Bug 1485580 - [geckodriver] Make parsing of float timeout values spec conforming. r=jgraham 2018-08-23 09:59:39 +02:00
Bastien Orivel 7e2fe9cabc Bug 1484462 - Update webdriver to hyper 0.12. r=ato 2018-08-23 13:15:22 +01:00
Andreas Tolfsen da710dfacb Bug 1485414 - Make lazy_static a dev dependency. r=whimboo
This silences an unused macro_use warning at build time.
2018-08-23 11:55:12 +01:00
Andreas Tolfsen 5222382f2e Bug 1484941 - Change ErrorStatus::{ScriptTimeout,Timeout} HTTP codes from 408 to 500. r=whimboo
Whilst it is logically correct to use 408 for the
ErrorStatus::ScriptTimeout and ::Timeout errors, it
causes a collision with HTTP semantics implement in HTTP clients.
To support Keep-Alive we allow retries in HTTP clients and if a
client sees code 408 it thinks that the server has gone away and
retries the request.

This causes WebDriverCommand::ExecuteScript, ::Get, and ::Refresh
commands to be sent twice with some HTTP clients.

This is a backwards incompatible change to WebDriver in order to
not break HTTP/1.1 Keep-Alive.
2018-08-23 11:48:24 +01:00
Henrik Skupin 3a4e9cc4f0 Bug 1396821 - [geckodriver] Apply rustfmt on other webdriver modules. r=ato
MozReview-Commit-ID: LLLVkRvL08O
2018-08-22 10:26:46 +02:00
Henrik Skupin 1a280f1dce Bug 1396821 - [geckodriver] Switch webdriver crate from rustc_serialize to serde. r=ato
The patch switches the serialization and deserialization of data
structures from the rustc_serialize crate to serde. By doing that
all the custom code for serialization and deserialization can be
removed in favor of serde's automatically derived serializers and
deserializers.

MozReview-Commit-ID: F25p325gbiC
2018-08-22 10:26:19 +02:00
Andreea Pavel 996270f409 Backed out 6 changesets (bug 1396821) for linux tier2 build bustages on a CLOSED TREE
Backed out changeset 2fa2975f97e3 (bug 1396821)
Backed out changeset c5895db52483 (bug 1396821)
Backed out changeset 5c0ddd45f926 (bug 1396821)
Backed out changeset 7c97853a85b9 (bug 1396821)
Backed out changeset b61ce753f01e (bug 1396821)
Backed out changeset 7ef3912feb2c (bug 1396821)
2018-08-21 20:20:24 +03:00
Henrik Skupin 4228229dd4 Bug 1396821 - [geckodriver] Apply rustfmt on other webdriver modules. r=ato
MozReview-Commit-ID: LLLVkRvL08O
2018-08-17 14:56:05 +02:00
Henrik Skupin 5a9c1f9536 Bug 1396821 - [geckodriver] Switch webdriver crate from rustc_serialize to serde. r=ato
Instead use serde. This is the simplest possible conversion using the
serde Value type everywhere. The intent is to use the automatically
derived deserializers in the future.

MozReview-Commit-ID: F25p325gbiC
2018-06-11 17:49:22 -07:00
Henrik Skupin 54d6e6171e Bug 1469601 - [webdriver] Fix Add Cookie command to raise an "invalid argument" error if parameters are null. r=ato 2018-08-14 17:25:17 +02:00
Andreas Tolfsen e6bf7db572 Bug 1470659 - Add setWindowRect capability to geckodriver. r=automatedtester
It will never be possible to configure setWindowRect, and trying
to do so will cause geckodriver to return with an error.
2018-08-01 18:31:25 +01:00
Andreas Tolfsen e6293a4131 Bug 1471201 - Increase webdriver HTTPD Keep-Alive timeout to 90s. r=automatedtester
Increasing geckodriver's Keep-Alive timeout duration to 90
seconds, from the default five seconds, will reduce the number of
HTTP connections a persistent-enabled client will have to make,
potentially boosting performance.

In more recent hyper versions the default is 90 seconds, which
means we can get rid of this line when hyper is upgraded.

This will help mitigate https://github.com/mozilla/geckodriver/issues/1304
but not fundamentally resolve it, due to a standard library bug in
Python 2.7's urllib.

MozReview-Commit-ID: 98AFDQgWfpw
2018-07-05 12:50:33 +01:00
Andreas Tolfsen d8a6851ff5 Bug 1408509 - Support web elements, frames, and windows in geckodriver. r=whimboo
This makes geckodriver support WebDriver web elements, web frames,
and web windows.

Marionette sends back JSON Objects such as

	{<element key>: <uuid>}

where the element key is one of the unique strings this patch adds
to geckodriver::marionette.

MozReview-Commit-ID: HegkGFqxkms
2018-06-19 19:04:36 +01:00
Andreas Tolfsen 342f64def4 Bug 1441204 - Release webdriver crate 0.36.0. r=maja_zf
MozReview-Commit-ID: 1C5QHSWGZZu
2018-06-14 13:28:33 -07:00
Andreas Tolfsen 3c1469338e Bug 1441204 - Upgrade unicode-segmentation from 1.1.0 to 1.2.1. r=maja_zf
MozReview-Commit-ID: 1KUU2U7AVz4
2018-06-14 13:01:20 -07:00
David Burns 62521a1c5d Bug 1468398: Allow Keep Alive connections in geckodriver r=jgraham
MozReview-Commit-ID: 9lX9qgMgDJi
2018-06-12 22:31:01 +01:00
Henrik Skupin 9358e8dfec Bug 1468185 - [geckodriver] Add support for all unhandledPromptBehavior options. r=ato
geckodriver currently only supports "accept" and "dismiss".
But to be compliant with the WebDriver specification all
allowed options have to be supported.

Given that Marionette uses the hard-coded dismiss and notify
behavior for unexpected prompts, inappropriately marked as
failed tests for accept/dismiss + notify for
execute_(async_)script will pass now.

MozReview-Commit-ID: 14kRTpvJYjZ
2018-06-11 08:50:58 -07:00