Skip to content

Commit 0802a57

Browse files
committed
Add legacy detection for new chromedriver
1 parent d273cb8 commit 0802a57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,13 @@ impl Client {
390390
if err.contains_key("message") &&
391391
err["message"]
392392
.as_string()
393-
.map(|s| s.contains("cannot find dict 'desiredCapabilities'"))
393+
.map(|s| {
394+
// chromedriver < 2.29 || chromedriver == 2.29
395+
s.contains("cannot find dict 'desiredCapabilities'") ||
396+
s.contains("Missing or invalid capabilities")
397+
})
394398
.unwrap_or(false)
395399
{
396-
// chromedriver
397400
legacy = true;
398401
}
399402
}

0 commit comments

Comments
 (0)