Bug 1387470 - Allow geckodriver to use the webdriver conforming click.
To allow the selection of the new webdriver spec conforming
"clickElement" method over the old legacy Selenium one, the
"moz:webdriverClick" capability can be used. Setting it's value
to true will enable the conforming click.
MozReview-Commit-ID: HMvFFEJDvpG
--- a/testing/geckodriver/src/capabilities.rs
+++ b/testing/geckodriver/src/capabilities.rs
@@ -154,16 +154,23 @@ impl<'a> BrowserCapabilities for Firefox
Ok(true)
}
fn validate_custom(&self, name: &str, value: &Json) -> WebDriverResult<()> {
if !name.starts_with("moz:") {
return Ok(())
}
match name {
+ "moz:webdriverClick" => {
+ if !value.is_boolean() {
+ return Err(WebDriverError::new(
+ ErrorStatus::InvalidArgument,
+ "moz:webdriverClick is not a boolean"));
+ }
+ }
"moz:firefoxOptions" => {
let data = try_opt!(value.as_object(),
ErrorStatus::InvalidArgument,
"moz:firefoxOptions is not an object");
for (key, value) in data.iter() {
match &**key {
"binary" => {
if !value.is_string() {