Skip to content

Commit

Permalink
Add legacy detection for new chromedriver
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Jun 21, 2017
1 parent d273cb8 commit 0802a57
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,13 @@ impl Client {
if err.contains_key("message") &&
err["message"]
.as_string()
.map(|s| s.contains("cannot find dict 'desiredCapabilities'"))
.map(|s| {
// chromedriver < 2.29 || chromedriver == 2.29
s.contains("cannot find dict 'desiredCapabilities'") ||
s.contains("Missing or invalid capabilities")
})
.unwrap_or(false)
{
// chromedriver
legacy = true;
}
}
Expand Down

0 comments on commit 0802a57

Please sign in to comment.