Skip to main content

WebDriver Error Chrome Driver Not Found

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.

Selenium Logo
Error: WebDriver
Unable to obtain driver for chrome

Quick Fix Guide

Follow these steps to resolve the ChromeDriver error quickly

1. Download ChromeDriver

Download the ChromeDriver version that matches your Chrome browser version from the official source.

https://chromedriver.chromium.org/downloads

2. Set System PATH

Add ChromeDriver location to your system's PATH environment variable.

export PATH=$PATH:/path/to/chromedriver

3. Update Code

Specify ChromeDriver path in your Selenium code.

System.setProperty("webdriver.chrome.driver", 
    "/path/to/chromedriver");

4. Verify Installation

Run a simple test to verify ChromeDriver is working correctly.

Detailed Installation Guide

Complete steps to properly install and configure ChromeDriver

Windows Installation

  1. Download ChromeDriver:
    wget https://chromedriver.storage.googleapis.com/[VERSION]/chromedriver_win32.zip
  2. Extract the ZIP file
    Unzip chromedriver_win32.zip to C:\WebDriver\bin
  3. Add to System PATH:

    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'

Linux/Mac Installation

  1. Download and Extract:
    wget https://chromedriver.storage.googleapis.com/[VERSION]/chromedriver_linux64.zip
    unzip chromedriver_linux64.zip
  2. Move to system location:
    sudo mv chromedriver /usr/local/bin/
  3. Set permissions:
    sudo chown root:root /usr/local/bin/chromedriver
    sudo chmod +x /usr/local/bin/chromedriver

Verify Installation

chromedriver --version

If installed correctly, you should see the ChromeDriver version number

Common ChromeDriver Errors

Identify and fix frequent WebDriver issues

Unable to obtain driver for chrome

org.openqa.selenium.WebDriverException: Unable to obtain driver for chrome

Occurs when ChromeDriver executable is not found in the system PATH or specified location.

Version Mismatch

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version XX

Chrome browser version doesn't match with installed ChromeDriver version.

Permission Denied

WebDriverException: Message: ChromeDriver executable may have insufficient permissions

ChromeDriver executable lacks proper execution permissions.

Prevention Tips

  • Always check Chrome and ChromeDriver version compatibility
  • Set proper system PATH environment variables
  • Verify file permissions after installation

Troubleshooting Solutions

Step-by-step solutions to resolve ChromeDriver errors

Solution 1: Manual Installation

1

Download ChromeDriver

wget https://chromedriver.chromium.org/downloads
2

Configure PATH

export PATH=$PATH:/path/to/chromedriver
3

Set Permissions

chmod +x /path/to/chromedriver

Solution 2: WebDriver Manager

1

Add Dependency

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
</dependency>
2

Update Code

WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();

Pro Tip

Using WebDriver Manager is recommended for automatic driver management and version compatibility.

Helpful Resources

Additional documentation and support materials

Selenium Documentation

Official Documentation

Comprehensive guides and API references for Selenium WebDriver

Browser Testing

Browser Testing Tools

Cross-browser testing solutions and compatibility guides

Testing Platforms

Testing Platforms

Cloud-based testing environments and automation tools

Join Our Community

Connect with Selenium experts and fellow users

Discussion Forums

Join active discussions about WebDriver issues and solutions

Stack Overflow

Get answers from the Stack Overflow community

GitHub

Contribute to Selenium on GitHub

Community Support Partners

BrowserStack
SauceLabs
LambdaTest

Need Additional Help?

Our community is always here to help you resolve WebDriver issues

Get Support Now