Skip to content
This repository was archived by the owner on Apr 1, 2019. It is now read-only.

Correct conditional check for acceptsInsecureCerts #91

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/capabilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl SpecNewSessionParameters {
x @ "browserVersion" |
x @ "platformName" => if !value.is_string() {
return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
format!("{} was not a boolean", x)))
format!("{} was not a string", x)))
},
"pageLoadStrategy" => {
try!(SpecNewSessionParameters::validate_page_load_strategy(value))
Expand Down Expand Up @@ -417,12 +417,11 @@ impl CapabilitiesMatching for SpecNewSessionParameters {
}
}
"acceptInsecureCerts" => {
if value.as_boolean().unwrap_or(false) &&
!browser_capabilities
if browser_capabilities
.accept_insecure_certs(merged)
.unwrap_or(false) {
return None;
}
return None;
}
},
"proxy" => {
let default = BTreeMap::new();
Expand Down