Commit Graph
245 Commits
Author SHA1 Message Date
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
Henrik Skupin 2abc6eced5 Bug 1461463 - [geckodriver] Empty response value should be null and not {}. r=ato
WebDriver commands which do not return a value have to send null.
But currently geckodriver returns an empty object.

MozReview-Commit-ID: EEmNlbmxu5n
2018-05-17 15:56:39 +02:00
Bastien Orivel eb9d463afc Bug 1463251 - Part 1. Update regex in both webdriver and geckodriver. r=ato,jgraham
Also bump webdriver's version so it can be released and updated in servo

MozReview-Commit-ID: 7jMycZ6t3mm
2018-05-21 22:24:30 +02:00
Andreas Tolfsen bcf7c97559 Bug 1401129 - Release webdriver 0.35.0. r=whimboo
MozReview-Commit-ID: lnoyZZbtcF
2018-03-08 16:05:08 +00:00
Greg Fraley e09ed49b3d Bug 1396823 - Use unicode-segmentation to iterate graphemes instead of chars r=ato
MozReview-Commit-ID: 8QsOmtXDnGI
2018-03-06 21:31:14 -05:00
Henrik Skupin 2098acb7ea Bug 1442028 - Move webdriver actions into its own module. r=ato
MozReview-Commit-ID: Bf0Ut8AGwtl
2018-02-28 22:31:47 +01:00
Andreas Tolfsen b1746fdfba Bug 1396819 - Improve error messages from capabilities matching. r=whimboo
This patch somewhat marginally improves error messages returned
during capabilities negotiation.

MozReview-Commit-ID: IHTRk7Rl4ZU
2018-02-14 15:43:56 +00:00
Gurzau Raul bf76d75c79 Backed out changeset 1f94fa48c7dc (bug 1396819) for build bustage 2018-02-19 14:21:12 +02:00
Andreas Tolfsen a4c9e55a5f Bug 1396819 - Improve error messages from capabilities matching. r=whimboo
This patch somewhat marginally improves error messages returned
during capabilities negotiation.

MozReview-Commit-ID: IHTRk7Rl4ZU
2018-02-14 15:43:56 +00:00
Bastien Orivel f5f48e7e92 Bug 1438195 - Update log to 0.4 in webdriver and bump version. r=ato
MozReview-Commit-ID: 4lkBqe4EzEI
2018-02-15 13:01:10 +01:00
Henrik Skupin f30d88b4f6 Bug 1403923 - Safely shutdown Firefox from in delete_session. r=jgraham
With the request to shutdown the browser, a given amount of time
has to be waited to allow the process to shutdown itself. Only
if the process is still running afterward it has to be killed.

Firefox has an integrated background monitor which observes
long running threads during shutdown, and kills those after
65s. To allow Firefox to shutdown on its own, geckodriver
has to wait that time, and some additional seconds.

MozReview-Commit-ID: 4LRLQE0jZzw
2017-10-05 23:49:17 +02:00
Cosmin Sabou 5aff1171b1 Backed out changeset 34faef444ae3 (bug 1403923) for WD failures on Linux debug and x64 debug at /webdriver/tests/execute_async_script/user_prompts.py r=backout on a CLOSED TREE 2017-12-15 21:02:58 +02:00
Henrik Skupin 6c181950bf Bug 1403923 - Safely shutdown Firefox from in delete_session. r=jgraham
With the request to shutdown the browser, a given amount of time
has to be waited to allow the process to shutdown itself. Only
if the process is still running afterward it has to be killed.

Firefox has an integrated background monitor which observes
long running threads during shutdown, and kills those after
120s. To allow Firefox to shutdown on its own, geckodriver
has to wait that time, and some additional seconds.

MozReview-Commit-ID: 4LRLQE0jZzw
2017-10-05 23:49:17 +02:00
Matt Brubeck b563ebd374 Bug 1422366 - Update webdriver Rust crate to cookie-0.10. r=jgraham
MozReview-Commit-ID: 3gJPSBSNTxF
2017-12-01 10:12:07 -08:00
Steve Armand ac7977732f Bug 1414256 - [webdriver] Fix spelling error for unknown capabilities. r=jgraham,whimboo
MozReview-Commit-ID: 5mrQLw81loK
2017-11-04 19:00:48 -04:00
Andreas Tolfsen 3c28a12bf2 Bug 1410799 - Fix HTTP status for stale element reference error r=jgraham
The HTTP status for the "stale element reference" error in WebDriver
should be 404 (Not Found).

MozReview-Commit-ID: CBb7Ds8AEY3
2017-11-01 18:02:15 +00:00