I came in to the office yesterday morning to find that my Capybara tests couldn't interact with Chrome. I'm seeing
Selenium::WebDriver::Error::UnknownError: unknown error: unable to discover open pages
Googling around revealed that this was likely caused by an out-of-date chromedriver
or selenium-webdriver
, which sounded very plausible, since neither had been updated in a long time (I think chromedriver
was at 2.2
and selenium-webdriver
was at 2.35.1
), and since Chrome auto-updated to 32.0.1700.77
on January 14, that seemed like good solid evidence to me.
So I've updated selenium-webdriver
to 2.39.0
. Figuring out what version of chromedriver
I had been using actually turned out to be more difficult. I had a version of chromedriver
sitting in my Downloads directory that I thought my code was referring to, but I couldn't find my Downloads directory in the PATH
(I'm using OS X by the way). I tried replacing this file with version 2.8
from here, but it had no effect. I became skeptical that the version in my Downloads directory was the version that was being used in the first place, so I used brew to install it. brew info chromedriver
now yields:
chromedriver: stable 2.8
http://code.google.com/p/chromedriver/
/usr/local/Cellar/chromedriver/2.8 (2 files, 21M) *
Built from source
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/chromedriver.rb
Looks good. My PATH
contains /usr/local/bin
, which has a chromedriver
link to the location brew installed to. As far as I understand it, this should allow my automation to detect and launch the chromedriver
.
Unfortunately, my issue is still unresolved. I remain unable to discover pages
. Can anyone confirm that I've done what one normally does to set up the chromedriver
?
Side Question: After downloading chromedriver 2.8
directly and also installing it with brew
, I tried launching both the downloaded version and the brew
version separately to confirm that either version could launch successfully. I'm certain they are both in fact version 2.8
, but when I launch either one the console says:
Starting ChromeDriver (v2.2) on port 9515
Is that normal? I certainly wasn't expecting it to say v2.2
, but there are no other versions apart from 2.8
installed by brew (so I doubt brew
is accidentally using the older version), and when I run the file I downloaded directly, I'm quite sure it's version 2.8
from the Chromedriver website. Is this an oversight on their part, or does v2.2
refer to something else, unlikely though that may seem?