Selenium.common.exceptions.webdriverexception: Message: Unknown Error: Failed To Create Chrome Process With Chromedriver Chrome With Selenium Python
Solution 1:
You need to take care of a couple of things:
While passing the absolute location of chromedriver binary use a single forward slash along with the raw i.e.
r
switch. So the effective line of code will be:driver = webdriver.Chrome(executable_path=r'C:\chromedriver.exe')
Execute your
@Test
as non-administrator / non-root user.
Update
Another possible reason is Chrome is not installed in the default location as per the specification:
Solution
There can be two approaches to solve this situation:
- Uninstall Chrome and reinstall Chrome at default location.
Use
binary_location
property to point to the chrome binary location.from selenium import webdriver from selenium.webdriver.chrome.optionsimportOptions options = Options() options.binary_location = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" driver = webdriver.Chrome(chrome_options=options, executable_path="C:/Utility/BrowserDrivers/chromedriver.exe", ) driver.get('http://google.com/')
Solution 2:
If you are still getting this error then try to reinstall your chrome
It worked for me, I got the same issue, I tried all of the ways but still cannot fix it but after I reinstall my chrome browser It Worked!
Solution 3:
you have to edit
driver = webdriver.Chrome(executable_path="C:\chromedriver.exe")
to
driver = webdriver.Chrome(executable_path="C:\\chromedriver.exe")
you miss \
If you get the same error, try running as administrator
or
move chromedriver.exe
to other path like c:/seleniumdriver/chromedriver.exe"
and edit executable_path
Post a Comment for "Selenium.common.exceptions.webdriverexception: Message: Unknown Error: Failed To Create Chrome Process With Chromedriver Chrome With Selenium Python"