How do I confirm I'm using the right chromedriver?
Asked Answered
K

4

27

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?

Khano answered 16/1, 2014 at 15:47 Comment(2)
What's your full PATH? The one of the user who runs chromedr I mean. Also, in order to tell what the version of chromedriver is, it should have a '-v' flagSceptre
My suggestion dont use brew to install chromedriver and I use this PATH /usr/bin/ instead /usr/local/bin/ download chromedriver from here chromedriver.storage.googleapis.com/2.9/chromedriver_mac32.zip unzip it and put it on PATHTrinh
V
25

It would be tricky to verify the chrome driver version frequently when you download it with homebrew. I would suggest downloading the driver and maintaining it in a folder mapped in your PATH.

So that maintaining or identifying the driver version will be easy with the below steps:

  1. Go to the folder where you have chromeDriver
  2. Open command prompt pointing the folder
  3. run: chromeDriver -v
Vidda answered 14/8, 2017 at 11:40 Comment(2)
Fair comment. However, I'm running on Windoze and wanted to know the version of chromedriver I was running. Google brought me here and the answer was very useful. Hence, it's an upvote from me.Disarrange
How we can get this (Browser Driver version) using python ??Domitian
L
0

ChromeDriver is at version 2.16 now. I would recommend manually updating your driver instead of updating with whatever older version that homebrew wants to update you to.

Luzluzader answered 28/6, 2015 at 16:19 Comment(0)
E
0

You can use command line: pip freeze to list down all packages you have installed with their version. Or you also can use pip show <package name> to check the details of the package, which also includes package version.

Equatorial answered 5/5, 2017 at 2:9 Comment(0)
D
0

Go to chrome://version for checking your chrome driver version.

Now it's time to check the latest release version. So click here latest release version

Compare between;

Detective answered 20/10, 2022 at 19:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.