From 0802a57bcac2c50e569dc7649f3b90ae4e8787c9 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 20 Jun 2017 22:51:20 -0400 Subject: [PATCH] Add legacy detection for new chromedriver --- src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3ee2683..12f9bca 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; } }