Python 'chromedriver' executable needs to be in PATH
ChromeDriver is a separate executable that Selenium WebDriver uses to control Chrome. It is maintained by the Chromium team with help from WebDriver contributors.
To setup selenium webdriver, we need to install Chromedriver and set the path.
1. Run following command in Command Prompt install webdriver:
pip install chromedriver
2. Find the path it install and copy it, Shown below.
3. Now add this path in "Environment variables" with adding "/chromedriver" .
The example is given below:-
4. After adding it, check in Command Prompt by writing 'chromedriver', Given Below.
So You have Successfully installed and set the Executable Path.
if you are installing Chromedriver for Web Automation using selenium, So in python there are other library called
'webdriver_manager' for every webdriver.
let's work with it
install the library using Command Prompt by following command:
pip install webdriver-manager
Here the Example for launch the chromedriver using selenium and webdriver-manager.
# Import webdriver for automation
from selenium import webdriver
# Importing the ChromeDriver class for handling webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install()) # diver