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
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
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
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]>
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]>
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]>
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]>
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]>
* 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]>
* 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]>
* 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]>
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]>
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]>
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]>
No functional changes, except aligning how we import standard library
functions.
Source-Repo: https://github.com/mozilla/webdriver-rust
Source-Revision: c0aabb6c77e00f05da1a90efa258fe5d615373b5
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
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