Skip to main content

Download chromedriver binary and add to your PATH for automated functional testing

Published: 2018-09-19 • Lastmod: 2019-09-12

Many automated functional testing projects these days rely on chromedriver as the main driver. Below are steps for Mac and Windows to download it, add it to your PATH, and verify setup.

You can obviously place the chromedriver binary in any directory you like, I just used ~/bin and C:\bin for this example.

Mac #

  1. Create directory ~/bin
  2. Download chromedriver for Mac and save to ~/bin
  3. cd ~/bin && chmod +x chromedriver to make it executable
  4. Add directory to your PATH:
    1. Open ~/.bash_profile in a text editor
    2. Add line export PATH="$PATH:$HOME/bin" then save the file
    3. Restart your terminal
  5. Verify setup with chromedriver -v

Windows #

  1. Create directory C:\bin
  2. Download chromedriver for Windows and save to C:\bin
  3. Add directory to your PATH:
    1. Depending on your Windows version:
      • If you’re using Windows 8 or 10, press the Windows key, then search for and select System (Control Panel)
      • If you’re using Windows 7, right click the Computer icon on the desktop and click Properties
    2. Click Advanced system settings
    3. Click Environment Variables
    4. Under System Variables, find the PATH variable, select it, and click Edit. If there is no PATH variable, click New
    5. Add C:\bin to the end of the variable value, preceeded by a ;. For example, if the value was C:\Windows\System32, change it to C:\Windows\System32;C:\bin
    6. Click OK
    7. Restart your command prompt
  4. Verify setup with chromedriver.exe -v