4

I have always used Firefox in webdriver. I want to try using Chrome. I have downloaded chromedriver and included it in the Path variable. However, this code returns an error:

>>> webdriver.Chrome()

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I have also tried including the path:

>>> webdriver.Chrome('C:\Python34\chromedriver_win32.zip')

OSError: [WinError 193] %1 is not a valid Win32 application

What is the problem here? I am sorry if I am doing something completely wrong or my problem seems hard to solve. Any help will be appreciated. I have also searched all over the internet, but I have not found anything yet.

Seriously, can't anybody solve this problem?

14
  • For the sake of simplicity, include the chromedriver.exe in the same folder as your script. Commented Sep 13, 2015 at 15:30
  • You have to extract the zip folder in order to obtain the necessary chromedriver.exe Commented Sep 13, 2015 at 15:33
  • @malik that seemed to work a little. Got a different error: Commented Sep 13, 2015 at 15:37
  • @ma selenium.common.exceptions.WebDriverException: Message: 'chromedriver_win32' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home Commented Sep 13, 2015 at 15:37
  • 1
    possible duplicate of Running webdriver chrome with Selenium Commented Sep 13, 2015 at 22:58

1 Answer 1

3

It turns out that I had to unzip the folder and instead of typing the path to the folder as an argument, you had to supply the .exe file in the path as well. Maybe it was an intermittent thing, or something that only didn't work when I posted the question.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.