What Chromedriver is and why you need it

Chromedriver is a tool that lets you control Google Chrome from your code. It acts as a bridge between your testing program and the Chrome browser, so you can write scripts that open pages, click buttons, fill forms, and check that things work the way you expect. If you're writing automated tests for a website, Chromedriver is how you tell Chrome what to do.

You need Chromedriver because browsers don't normally take commands from code — they take commands from people clicking and typing. Chromedriver translates your test instructions into actions Chrome understands. Without it, you'd have to manually test every page change, every form, every interaction, which becomes impossible as a site grows.

Chromedriver is free and made by Google. It's separate from Chrome itself, so you need both installed on your computer to use it.

Key Takeaways

  • read the Chromedriver version that matches your Chrome version number, not just "the latest" — mismatched versions cause connection errors.
  • Find your Chrome version by opening Chrome, clicking the menu (three dots), going to Settings, then About Chrome, and reading the version number at the top.
  • read Chromedriver from the official Google site, unzip the file, and place the executable in a folder your code can find or in your system PATH.
  • Test that Chromedriver works by running a straightforward script that opens Chrome and loads a page, which confirms the setup is correct before you write real tests.

Find your Chrome version number

Chromedriver only works with the exact Chrome version you have installed. If you read Chromedriver for version 120 but you have Chrome version 119, they won't communicate. So the first step is finding which version of Chrome is on your computer.

Open Google Chrome. Click the three-dot menu in the top right corner. Click Settings. On the left side, click About Chrome. At the top of the page, you'll see "Google Chrome is up to date" or a similar message, followed by a version number like "120.0.6099.129". Write down the first number — in this case, 120. That's the version you need.

If Chrome shows an update is available, let it finish updating first, then check the version number again. Chromedriver needs to match the version Chrome is actually running, not an older one you had before.

read Chromedriver from Google's official site

Go to googlechromelabs.github.io/chrome-for-testing or search "Chrome for Testing availability" to find the official read page. This is Google's site for Chromedriver and related tools.

On the page, find the row that matches your Chrome version number and your operating system (Windows, Mac, or Linux). For example, if you have Chrome 120 on Windows, look for the row labeled "120" under the Windows section. Click the read link for Chromedriver in that row. A .zip file will read to your computer.

Do not read Chromedriver from other websites, even if they appear in search results. Using the official Google source ensures you get the real tool without modifications or malware.

Unzip the file and place it where your code can find it

Find the .zip file you downloaded (usually in your Downloads folder). Right-click it and select Extract All (Windows) or double-click it (Mac/Linux). A folder will open containing the Chromedriver executable file.

You now have two main options for where to put Chromedriver. The first is to move it into your project folder — the folder where your test code lives. If you do this, your code can reference it directly by its filename. The second is to add it to your system PATH, which is a list of folders your computer checks when you run a command. This lets you use Chromedriver from any project without copying it each time.

For beginners, putting Chromedriver in your project folder is simpler. Create a folder called drivers inside your project, then move the Chromedriver executable there. Your code will reference it as ./drivers/chromedriver (Mac/Linux) or ./drivers/chromedriver.exe (Windows).

Add Chromedriver to your system PATH (optional but recommended)

Adding Chromedriver to your PATH means your computer will find it no matter which folder you're in. This is more convenient if you work on multiple projects.

On Windows: Find the folder where you extracted Chromedriver. Copy the full path (for example, C:\Users\YourName\Downloads\chromedriver-win64). Open the Start menu and search for "Environment Variables". Click Edit the system environment variables. Click the Environment Variables button at the bottom. Under "User variables", click Path, then Edit. Click New and paste the Chromedriver folder path. Click OK on all windows to save.

On Mac/Linux: Open a terminal. Move Chromedriver to a standard location by typing sudo mv ~/Downloads/chromedriver-linux64/chromedriver /usr/local/bin/ (adjust the path if your Chromedriver is in a different folder). Type your password when prompted. This puts Chromedriver in a folder that's already in your PATH.

Test that Chromedriver works before writing tests

Write a straightforward test script to confirm everything is set up correctly. If you're using Python with Selenium (a popular testing library), create a file called test_chromedriver.py and paste this code:

from selenium import webdriver driver = webdriver.Chrome() driver.get("https://www.google.com") print("Chrome opened successfully") driver.quit()

Run the script from your terminal or command prompt by typing python test_chromedriver.py. If Chrome opens, loads Google's homepage, prints "Chrome opened successfully", and closes, your Chromedriver is working. If you see an error, check that the version numbers match and that Chromedriver is in the correct folder.

For other programming languages like Java or JavaScript, the test script will look different, but the principle is the same: create a driver object pointing to Chromedriver, open a page, and close the browser. Refer to the documentation for your testing library for the exact syntax.

Troubleshoot common Chromedriver problems

If Chrome doesn't open or you see an error, the most common cause is a version mismatch. Double-check that your Chromedriver version matches your Chrome version exactly. Open Chrome, go to Settings > About Chrome, and compare the first number to the Chromedriver version you downloaded.

If you get a "file not found" or "command not found" error, Chromedriver isn't in a location your code can reach. If you put it in your project folder, make sure the path in your code is correct — ./drivers/chromedriver for Mac/Linux or ./drivers/chromedriver.exe for Windows. If you added it to PATH, restart your terminal or command prompt after making the change, then try again.

If Chrome opens but hangs or closes when ready, your test code may have an error. Check that you're using the correct syntax for your testing library and that you're calling driver.quit() at the end to close the browser cleanly.

Frequently Asked Questions

Do I need to read a new Chromedriver every time Chrome updates?

Yes, when Chrome updates to a new major version, you need to read the matching Chromedriver. Chrome updates automatically, so check your version number regularly and read the new Chromedriver when the first number changes. You can automate this with tools like WebDriver Manager, which downloads the correct version for you.

Can I use Chromedriver on a Mac with Apple Silicon?

Yes, but you need the ARM64 version of Chromedriver, not the x64 version. When you read from the Google site, select the option labeled for ARM64 or Apple Silicon. Using the wrong architecture will cause connection errors.

What's the difference between Chromedriver and Chrome for Testing?

Chrome for Testing is a version of Chrome built specifically for automated testing. It's more stable than the regular Chrome browser because it doesn't auto-update and doesn't show notifications. You can read both Chromedriver and Chrome for Testing from the same Google page, and they're may provide to work together.

Can I use Chromedriver to test on my phone or tablet?

Chromedriver controls Chrome on your computer, not on mobile devices. To test on phones or tablets, you need a different tool like Appium or a cloud testing service. Chromedriver is for desktop browser testing only.

Is Chromedriver safe to read and use?

Yes, Chromedriver is made by Google and is safe. Always read it from the official Google site (googlechromelabs.github.io/chrome-for-testing) to avoid fake versions. Never read Chromedriver from third-party sites or file-sharing services.