Skip to content
Latchkey

ChromeDriver "not found in PATH" / executable needs to be in PATH in CI

A Selenium client that manages its own driver could not find chromedriver on PATH. Either the driver was never installed on the runner, or it is installed to a directory that is not on PATH for the test step.

What this error means

The session fails to start with "'chromedriver' executable needs to be in PATH" (older Selenium) or "Unable to obtain driver for chrome" when the binary is missing.

ChromeDriver
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable
needs to be in PATH. Please see https://chromedriver.chromium.org/home

Common causes

The driver is not installed on the runner

No setup step downloaded chromedriver, so there is no executable for Selenium to launch.

The driver is installed off PATH

The binary exists in a project or cache directory that the test step's PATH does not include.

How to fix it

Upgrade to Selenium Manager or install the driver

Selenium 4.6+ resolves and downloads the driver automatically; otherwise install it and put it on PATH.

.github/workflows/ci.yml
- uses: nanasess/setup-chromedriver@v2
- run: python -m pytest tests/  # chromedriver now on PATH

Point the client at the driver explicitly

If the driver is in a known directory, pass its path via a Service so PATH is irrelevant.

Python
from selenium.webdriver.chrome.service import Service
driver = webdriver.Chrome(service=Service('/usr/local/bin/chromedriver'))

How to prevent it

  • Prefer Selenium 4.6+ so the driver is resolved without PATH juggling.
  • If installing manually, place the driver in a directory already on PATH.
  • Verify with which chromedriver in a debug step when unsure.

Frequently asked questions

What causes ""chromedriver ... not found in PATH""?
No setup step downloaded chromedriver, so there is no executable for Selenium to launch.
How do I fix "chromedriver ... not found in PATH"?
Selenium 4.6+ resolves and downloads the driver automatically; otherwise install it and put it on PATH.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card