I'm currently working with Chrome extension of selenium web-driver in windows 8 AMD64. I got an issue launching Chrome; It gives me this:
Traceback (most recent call last):
File "D:/java/code/SVN/OMC/trunk/Test/Scripts/PMS\elements\UILoader.py", line 164, in __init__
self.driver = webdriver.Chrome(executable_path="F:\\driver\\chromedriver.exe")
File "C:\Python27\lib\site-packages\selenium-2.42.1-py2.7.egg\selenium\webdriver\chrome\webdriver.py", line 65, in __init__
keep_alive=True)
File "C:\Python27\lib\site-packages\selenium-2.42.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 73, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium-2.42.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 121, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Python27\lib\site-packages\selenium-2.42.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 173, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium-2.42.1-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 164, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: u'unknown error: cannot find Chrome binary\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.2 x86_64)'
I also have put IEDriverServer.exe
in the same path and it works fine; this path has been added to the system PATH. I also tried to launch it from another computer with windows 7 AMD64 and it works fine there.
I googled a bit and I saw this; but when I checked the path it specified for chrome.exe
, I couldn't find the executable file for chrome. I tried to update Google Chrome, but it gave me error code 1.
I also tried this:
opts = webdriver.ChromeOptions()
opts.binary_location(value = "C:\\WebDrivers\\chromedriver.exe")
driver = webdriver.Chrome(chrome_options = opts)
What should I do?
The last line of the error is the important one:
selenium.common.exceptions.WebDriverException: Message: u'unknown error: cannot find Chrome binary\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.2 x86_64)'
The ChromeDriver has been found, and it is reporting that it cannot find the chrome browser executable. Make sure that is installed and on the current path. Some additional information is on the Selenium Wiki.