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 <david.burns@theautomatedtester.co.uk>

--HG--
extra : subtree_source : http%3A//tristan.corp.lon2.mozilla.com%3A8000
extra : subtree_revision : d555f9bcb03b61434b83973ee5736ca771926183
This commit is contained in:
Henrik Skupin 2017-08-18 12:49:34 +01:00
parent dac7fbd059
commit 6df788afcf

View File

@ -174,6 +174,10 @@ impl SpecNewSessionParameters {
"httpProxy" => try!(SpecNewSessionParameters::validate_host(value)),
"sslProxy" => try!(SpecNewSessionParameters::validate_host(value)),
"socksProxy" => try!(SpecNewSessionParameters::validate_host(value)),
"socksVersion" => if !value.is_number() {
return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
"socksVersion was not a number"))
},
"socksUsername" => if !value.is_string() {
return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
"socksUsername was not a string"))