Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to use chrome webdriver in my python application but I am facing following error WebDriverException: Message: ‘chromedriver’ executable needs to be available in the path in python. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
- How WebDriverException: Message: 'chromedriver' executable needs to be available in the path Error Occurs ?
- How To Solve WebDriverException: Message: 'chromedriver' executable needs to be available in the path Error ?
- Solution 1: Use webdriver-manager
- Solution 2: Just assign full path for web driver
- Solution 3: Add path string and use raw string
- Solution 4: Install Chrome driver
- Summary
How WebDriverException: Message: ‘chromedriver’ executable needs to be available in the path Error Occurs ?
I am trying to use chrome webdriver in my python application but I am facing following error.
WebDriverException: Message: 'chromedriver' executable needs to be available in the path. Please look at http://docs.seleniumhq.org/download/#thirdPartyDrivers and read up at http://code.google.com/p/selenium/wiki/ChromeDriver
How To Solve WebDriverException: Message: ‘chromedriver’ executable needs to be available in the path Error ?
- How To Solve WebDriverException: Message: 'chromedriver' executable needs to be available in the path Error?
To Solve WebDriverException: Message: 'chromedriver' executable needs to be available in the path Error You should use webdriver-manager. This can be done automatically with just installing this module. First of all run this command: pip install webdriver-manager Then use this code.
Second Solution is This error may face while you are assigning wrong path to webdriver. Here is my example browser = webdriver.Chrome(executable_path='F:\Python Script\WebDriver\chromedriver.exe')
Third Solution is You should Add path string and use raw string. - WebDriverException: Message: 'chromedriver' executable needs to be available in the path
To Solve WebDriverException: Message: 'chromedriver' executable needs to be available in the path Error You should use webdriver-manager. This can be done automatically with just installing this module. First of all run this command: pip install webdriver-manager Then use this code.
Second Solution is This error may face while you are assigning wrong path to webdriver. Here is my example browser = webdriver.Chrome(executable_path='F:\Python Script\WebDriver\chromedriver.exe')
Third Solution is You should Add path string and use raw string.
Solution 1: Use webdriver-manager
You should use webdriver-manager. This can be done automatically with just installing this module. First of all run this command.
pip install webdriver-manager
Then use this code.
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
Solution 2: Just assign full path for web driver
This error may face while you are assigning wrong path to webdriver. Here is my example.
browser = webdriver.Chrome(executable_path='F:\Python Script\WebDriver\chromedriver.exe')
Solution 3: Add path string and use raw string
You should Add path string and use raw string Just like this.
driver = webdriver.Chrome(r"F:\Python Script\WebDriver\chromedriver.exe")
Solution 4: Install Chrome driver
If You are using Ubuntu then Just run this command.
sudo apt install chromium-chromedriver
If You are using Debian then Just run this command.
sudo apt install chromium-driver
If You are using macOS then Just run this command.
brew cask install chromedriver
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read