Commit Graph
186 Commits
Author SHA1 Message Date
Henrik Skupin aa573ef618 Bug 1403503 - Remove obsolete socksUsername and socksPassword capabilities. r=automatedtester
MozReview-Commit-ID: bHqc96uzsm
2017-09-28 09:28:13 +02:00
Andreas Tolfsen e491a11ac4 Bug 1391605 - Release webdriver 0.31.0. r=me
MozReview-Commit-ID: O3cTr5t58F
2017-09-16 15:13:50 +01:00
Sebastian Hengst 4cdb195eab Backed out changeset 82b8e6f1b4d9 (bug 1391605) for build bustage. r=backout 2017-09-16 14:22:54 +02:00
Andreas Tolfsen 1572917abb Bug 1391605 - Release webdriver 0.31.0. r=me
MozReview-Commit-ID: O3cTr5t58F
2017-09-16 11:45:07 +01:00
Andreas Tolfsen 8e2c900a36 Bug 1396866 - Relax WindowRectResponse typing. r=jgraham
The WindowProxy screenX/screenY/outerWidth/outerHeight fields are
platform-independent longs, meaning the bitness of the system is not
taken into account.  This is defined in WebIDL as "a signed integer type
that has values in the range [−2147483648, 2147483647]".  This can be
represented with an i32 internally.

Additionally, the WebDriver specification says that we should accept
JSON Numbers as input.  This means the input value can be either a float
or an integer.  rustc_serialize handles this very badly and we first
need to extract the input as f64 because this is the most liberal type
(i.e. an integer can be coerced to a float without problem).

We then we cast the number to an i64 which trims off any decimals without
worrying that the number wraps.  We then run bounds checks of an i32
and error if the number will not fit within the set range.

This patch expects the output from Marionette to be conforming.

MozReview-Commit-ID: CVdUZWh2t8X
2017-09-09 12:21:50 +01:00
Andreas Tolfsen 05f390ebc3 Bug 1396838 - Drop WindowState. r=jgraham
The window state concept was removed from WebDriver level 1.

MozReview-Commit-ID: 6cogstpDc0a
2017-09-05 14:50:06 +01:00
Andreas Tolfsen d2b41d1034 Bug 1396831 - Align HTTP status codes with specification. r=jgraham
Some of the HTTP status codes have changed in the WebDriver specification,
as shown in:

	https://github.com/w3c/webdriver/commit/d678562e3d5f94fa71d74aeb467214bf8dd734e1

MozReview-Commit-ID: 4DLkYDXckew
2017-09-05 14:42:12 +01:00
Andreas Tolfsen 1e169d4d2b Bug 1396831 - Improve readability of error_code and http_status. r=jgraham
No semantic changes.

MozReview-Commit-ID: F4TJI2i5bJo
2017-09-05 14:39:32 +01:00
Andreas Tolfsen c74001b4cf Bug 1368265 - Add testing/webdriver hgignore file. r=automatedtester
MozReview-Commit-ID: A2JHz2Eqdv5
2017-09-03 17:19:37 +01:00
Andreas Tolfsen 1821c0cb8f Bug 1368265 - Remove unnecessary license files. r=automatedtester
Since both these Rust programs are hosted in mozilla-central,
they are governed by the top-level LICENSE file.  See also
toolkit/content/license.html.

MozReview-Commit-ID: 4C0fEAeJZ6h
2017-09-03 17:17:13 +01:00
Andreas Tolfsen 2bfdccf10a Bug 1368265 - Provide a webdriver README. r=automatedtester
Documentation is the hallmark of a good software library and this isn't
great, but it is a step in the right direction.

MozReview-Commit-ID: IHDwp2pjXom
2017-09-03 17:15:03 +01:00
Andreas Tolfsen 6da43632a7 Bug 1368265 - Update geckodriver and webdriver Cargo.tomls. r=automatedtester
MozReview-Commit-ID: 6MsrxinrYEp
2017-09-03 16:24:55 +01:00
Andreas Tolfsen 011d99ee71 webdriver: move crate to m-c
IGNORE BAD COMMIT MESSAGES
2017-09-03 15:56:42 +01:00
Henrik Skupin 40af5801a7 webdriver: Add "noProxy" support for manual proxy type (#121)
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 89df5f92278488697460b279eea0708e482c3813

committer: GitHub <[email protected]>
2017-08-30 21:02:55 +02:00
David Burns 57eab32051 webdriver: Add Tag Name as a valid location strategy. (#118)
* Add Tag Name as a valid location strategy.

While creating WDSpec for Find Element and similar commands it showed
that we do not support Tag Name as a valid selector. Tests can be found
at https://reviewboard.mozilla.org/r/172110/

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 5cd49eb129f4ae1ae7e047f274cfa31092353d65

committer: jgraham <[email protected]>
2017-08-24 14:22:02 +01:00
Andreas Tolfsen 2bf4fbb9cd webdriver: cargo: release 0.30.0
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: bd7c82e977ddf0f2f90e9300fef70d0d2eb7ff33
2017-08-18 13:27:38 +01:00
Henrik Skupin ce799affab webdriver: Add support for socksVersion (#115)
To add a socks proxy the socks version is a required capability.
This patch adds the handling of the capability.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 94cdfcbb8e92bc070f144ad13bc1f074f0761eb5

committer: David Burns <[email protected]>
2017-08-18 12:49:34 +01:00
Henrik Skupin 280b56e21a webdriver: Make proxy port an optional suffix for all *Proxy capabilities (#115)
As given by the spec the proxy port is no longer a separate capability,
but an optional part of ftpProxy, httpProxy, sslProxy, and socksProxy.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: f42568128d5a4218cc9f71d727ca3550c99c012e

committer: David Burns <[email protected]>
2017-08-18 12:49:34 +01:00
Henrik Skupin 68e9e164d1 webdriver: Fix invalid check for scheme in proxy host. (#114)
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 12e62a7956219ca4ebb3d6161e4ce9c853e82217

committer: jgraham <[email protected]>
2017-08-08 15:27:32 +01:00
Andreas Tolfsen 4ff0889f19 webdriver: cargo: release 0.29.0
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 7d2bf526b6ed9c45e06b5b2abd395c996328d3ca
2017-08-08 14:51:02 +01:00
Henrik Skupin d3615cb5a8 webdriver: Add support to format values with {:?} (#111)
For debugging purposes it is helpful when enum and struct
definitions are using derive Debug.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 989cfcb7ab23ab356b2bf77ff37a37ab1c7be89d

committer: jgraham <[email protected]>
2017-08-08 11:14:55 +01:00
Andreas Tolfsen 0ac08d3872 webdriver: common, response: add window state to window rect response (#109)
The WebDriver specification recently introduced an additional "state"
field for the window rect.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 2b54d3d8ad30f25b0df9b186661be15de4e280fb

committer: jgraham <[email protected]>
2017-08-07 19:28:32 +01:00
Henrik Skupin d18cb9457d webdriver: capabilities: use proxyType "direct" instead of "noproxy" (#107)
The WebDriver spec has been changed a while ago to support "direct"
as proxyType.  So "noproxy" is no longer a valid proxy type.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: d4c7c73af12a38c3723750f32370197ab6130c67

committer: Andreas Tolfsen <[email protected]>
2017-08-03 17:47:22 +01:00
James Graham 9ebb6aa3a5 webdriver: Update version number for release
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 2746c4f91f1c3582fe0ce5dea91f8971f8f20390
2017-07-18 16:42:19 +01:00
SimonP d4612d8b08 webdriver: Implement the minimize window for webdriver-rust (#105)
* Implement the minimize window for webdriver-rust

Symptom: Now webdriver-rust cannot minimize window
Root Cause: No minimize command
Solution: Add the minimize command
Project: webdriver-rust
Note: After add this patch
      Then add one in geckodriver
      Then add support in firefox(marionette)
      At last add patch in selenium(firefox webdriver)

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 37b661f0d103ecde3f4bb87962142d054812f767

committer: jgraham <[email protected]>
2017-07-06 15:03:13 +01:00
Andreas Tolfsen fb71a1cdc2 webdriver: cargo: release 0.27.0
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 1b8863b569ef6efe5f20f7a084e5910f1280285f
2017-06-19 13:14:44 +01:00
Jon Gjengset 2a61205ac2 webdriver: cargo: bump cookie dependency to 0.9 (#104)
Fixes: #103
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 107a60caf001239e69a14fed292f9177e3279e81

committer: Andreas Tolfsen <[email protected]>
2017-06-17 00:04:34 +01:00
Andreas Tolfsen e9aa511289 webdriver: response: add single cookie response type (#102)
* response: add single cookie response type

The WebDriver specification mandates that the GetNamedCookie command
should return a cookie serialisation object, and not an array of
cookies.

This patch introduces WebDriverResponse::Cookie and CookieResponse types
to allow WebDriver implementations to return single cookie objects.

Fixes: https://github.com/mozilla/geckodriver/issues/463
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 9b49e5a6ec370e0da09521bfedcc596427c93cd5

committer: jgraham <[email protected]>
2017-06-16 17:10:59 +01:00
David Burns 670f486af2 webdriver: Simplify Responses for Rect type calls to use same struct and impl (#101)
This merges the WindowRectResponse and ElementRectResponse into
a single struct. It also moves the types in the struct to floats which
aligns with the WebDriver specification as in
https://w3c.github.io/webdriver/webdriver-spec.html#get-element-rect
and in https://w3c.github.io/webdriver/webdriver-spec.html#dfn-window-rect.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 1c59375428214f3f8e2d61b1bee6182a8eaca5f8

committer: Andreas Tolfsen <[email protected]>
2017-06-15 15:05:39 +01:00
James Graham 6159783516 webdriver: Update version number for release
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 5fdecf11323c499950c3b9778d5595c9dbe82d09
2017-06-07 12:58:10 +01:00
David Burns bc61531b49 webdriver: Implement Fullscreen command support (#100)
* Implement Fullscreen command support

This adds the HTTP endpoint and command structures for supporting the
Fullscreen command as in
https://w3c.github.io/webdriver/webdriver-spec.html#fullscreen-window

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 7ce4ae6266c73547a50b974355e1ef5fa426924c

committer: jgraham <[email protected]>
2017-06-07 12:37:58 +01:00
jgraham 75ea35f502 webdriver: Don't return existing session id when the wrong one is supplied (#99)
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: dae3f0689a1d589d10225d558e0528fb232a3842

committer: Andreas Tolfsen <[email protected]>
2017-06-01 08:17:13 +01:00
Jason Juang fda9ebc0c9 webdriver: Fix spelling of unhandledPromptBehavior (#97)
The W3C spec requires the American spelling.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: bdd5efda8cf6acb5be1207a77be86e16e1fb5128

committer: Andreas Tolfsen <[email protected]>
2017-05-23 15:50:02 +01:00
Andreas Tolfsen 441122549c webdriver: Make log output safe for windows prompt (#96)
* server: make log output safe for windows prompt

The characters "←" and "→" are obfuscated in the Windows command
prompt.  Use ASCII versions.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 6de6e225e14b545381719e2e97398bc1a8f87b13

committer: jgraham <[email protected]>
2017-05-08 14:45:19 +01:00
Jason Juang d8147bf129 webdriver: Fix error messages for timeout params.
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: d568fd0d344c017a8ef9b116bc6db055a7684278

committer: jgraham <[email protected]>
2017-05-04 09:49:01 +01:00
Andreas Tolfsen e61eca4aa7 webdriver: cargo: release v0.25.2
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 6e19650591d50b8a657bf8f0f6ac1c7ef648473e
2017-04-20 14:00:37 +01:00
Andreas Tolfsen 74355929ae webdriver: command: improve error handling of decoding request body as json
This patch splits the decoding of the HTTP request body out to a
separate function, decode_body, on WebDriverMessage.  This is in
line with get_session_id, and reduces somewhat the complexity of
WebDriverMessage::from_http.

It also handles rustc_serialize::json::ParserErrors individually, by
making SyntaxError discernable from IoError.

The SyntaxError error handler re-uses the stacktrace produced by the
JSON parser when failing to decode the HTTP request body as JSON.
This improves the readability of the returned error.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: d7fe400fa903b752b3c90c2c7e80ae9d5719e16b

committer: jgraham <[email protected]>
2017-04-20 13:55:59 +01:00
Andreas Tolfsen 5efd7eae4b webdriver: error: enable custom stacktraces in WebDriverError
With the new constructor WebDriverError::new_with_stack it is possible
for consumers to set their own stacktraces.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 46761f45b0e0fe70ec78acf360c492b800c8a60a

committer: jgraham <[email protected]>
2017-04-20 13:55:59 +01:00
Andreas Tolfsen 5b54983904 webdriver: server: improve logging of http requests and responses
HTTP requests and responses will now be logged in a
similar style as Marionette chatter in geckodriver (following
https://github.com/mozilla/geckodriver/pull/636) and in the Marionette
server in Gecko, by employing arrows.

The logging of responses is reduced from two log entries, to one.
It also makes use of the fmt::Display trait of the status.

For requests, the HTTP method, URI, and full body is included.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 7e2a2042fa80018c8bce8bddee81ab6985db65f8

committer: jgraham <[email protected]>
2017-04-20 13:55:59 +01:00
Andreas Tolfsen 6ed6bf3c44 webdriver: capabilities: enclose ipv6 hosts in brackets
According to https://tools.ietf.org/html/rfc2732 and
https://url.spec.whatwg.org/, IPv6 hostnames when represented in URLs
must be enclosed with "[" and "]" bracket characters.

Fixes: https://github.com/mozilla/geckodriver/issues/655
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: a43ba8a5225ec07e518ceb48a71524ad875a69b9

committer: David Burns <[email protected]>
2017-04-19 21:52:03 +01:00
Andreas Tolfsen 108d80cab5 webdriver: cargo: bump version number to 0.25.1
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 935a526e0a40f6644731f8c2de3facd12015eeab
2017-04-18 19:32:03 +01:00
Andreas Tolfsen d1080124fd webdriver: capabilities, command: provide a few structs with Debug trait (#89)
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 921b6b1ffe35f1ab30276909d0728aaf93a674d6

committer: jgraham <[email protected]>
2017-04-12 15:00:26 +01:00
Jason Juang 218a2844ba webdriver: Recognize sslProxy and sslProxyPort capabilities.
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 50a0ee1bc6d37fef72066b8014e2b4fd85fa2f46

committer: jgraham <[email protected]>
2017-04-11 14:21:17 +01:00
Jason Juang 32957e1600 webdriver: Fix validate_port if value is a Json::U64 (#87)
Fixes: https://github.com/mozilla/geckodriver/issues/631
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 43defd8d6bf33bd1edf56fd6e669660f99fdb20e

committer: Andreas Tolfsen <[email protected]>
2017-04-11 13:28:00 +01:00
Andreas Tolfsen f09c220a2e webdriver: cargo: release 0.25.0
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 8a36155ebd199bcba9cc57d1ea40ca97490d59a2
2017-04-10 13:24:27 +01:00
Andreas Tolfsen d9c1ccd771 webdriver: error: lint
No functional changes, except aligning how we import standard library
functions.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: c0aabb6c77e00f05da1a90efa258fe5d615373b5
2017-04-03 13:56:09 +01:00
Andreas Tolfsen c94e0f536c webdriver: error: add documentation for ErrorStatus
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: f7a78ba7827b790a9adbbfca218f5c937fe362e2
2017-04-03 13:56:09 +01:00
Andreas Tolfsen 8c5abd9038 webdriver: error: rename WebDriverError.status_code to error_code
The WebDriver standard uses the term "JSON error code" and "error code" to
refer to the string identifier of the error type.  We should follow suit.

Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: fd03b53eb29dd4dea37f41648196c7888905693f
2017-04-03 13:56:09 +01:00
Andreas Tolfsen 1726707d59 webdriver: error: align errors with standard
Several errors were outdated, amongst others element click intercepted,
element not interactable/element not visible, invalid element
coordinates/invalid coordinates, no such cookie, unable to capture screen,
and unknown command.

Fixes: https://github.com/mozilla/geckodriver/issues/579
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: 2ea0bb192c7239addb744bd2a7e8fdca4977d990
2017-04-03 13:56:09 +01:00
James Graham 0905713def webdriver: Update version number for release
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: b4b3ec9ef00b030d09f226fcb7cd97f61725195c

committer: Andreas Tolfsen <[email protected]>
2017-03-27 15:35:42 +01:00