Unable to obtain driver for chrome. This common error occurs when the ChromeDriver is not properly set up or cannot be located by Selenium WebDriver.
Follow these steps to resolve the ChromeDriver error quickly
Download the ChromeDriver version that matches your Chrome browser version from the official source.
https://chromedriver.chromium.org/downloads
Add ChromeDriver location to your system's PATH environment variable.
export PATH=$PATH:/path/to/chromedriver
Specify ChromeDriver path in your Selenium code.
System.setProperty("webdriver.chrome.driver",
"/path/to/chromedriver");
Run a simple test to verify ChromeDriver is working correctly.
Complete steps to properly install and configure ChromeDriver
wget https://chromedriver.storage.googleapis.com/[VERSION]/chromedriver_win32.zip
Unzip chromedriver_win32.zip to C:\WebDriver\bin
1. Right-click 'This PC' > Properties
2. Click 'Advanced system settings'
3. Click 'Environment Variables'
4. Under System Variables, select 'Path'
5. Click 'New' and add 'C:\WebDriver\bin'
wget https://chromedriver.storage.googleapis.com/[VERSION]/chromedriver_linux64.zip unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
sudo chown root:root /usr/local/bin/chromedriver sudo chmod +x /usr/local/bin/chromedriver
chromedriver --version
If installed correctly, you should see the ChromeDriver version number
Identify and fix frequent WebDriver issues
org.openqa.selenium.WebDriverException: Unable to obtain driver for chrome
Occurs when ChromeDriver executable is not found in the system PATH or specified location.
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version XX
Chrome browser version doesn't match with installed ChromeDriver version.
WebDriverException: Message: ChromeDriver executable may have insufficient permissions
ChromeDriver executable lacks proper execution permissions.
Step-by-step solutions to resolve ChromeDriver errors
wget https://chromedriver.chromium.org/downloads
export PATH=$PATH:/path/to/chromedriver
chmod +x /path/to/chromedriver
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
</dependency>
WebDriverManager.chromedriver().setup(); WebDriver driver = new ChromeDriver();
Using WebDriver Manager is recommended for automatic driver management and version compatibility.
Additional documentation and support materials
Connect with Selenium experts and fellow users
Our community is always here to help you resolve WebDriver issues
Get Support Now