Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Fix the error by making Selenium resolve a real, executable ChromeDriver before it creates ChromeDriver. In Java, use an absolute path to the driver file with System.setProperty("webdriver.chrome.driver", ...), put the executable on PATH, pass it through a ChromeDriverService, or let Selenium Manager select it automatically. Then verify execute permissions, make Chrome and ChromeDriver compatible, and separate driver-discovery problems from Chrome startup or network failures.
Identify which failure you actually have
The wording “The path to the driver executable must be set by the webdriver.chrome.driver system property” (or “unable to locate the chromedriver executable”) means Selenium could not find a usable driver through its available mechanisms. That is different from a driver that was found but cannot start Chrome, and different again from a driver/browser version mismatch.
- Discovery or configuration: Selenium cannot find the file through
PATH, a service object, a Java system property, or Selenium Manager. - Permission or format: the path names a directory, the wrong platform filename, or a file without execute permission.
- Compatibility: ChromeDriver starts but reports that it supports a different Chrome version.
- Startup: the driver is found, but Chrome exits immediately or cannot launch under the test account.
- Manager download: Selenium Manager cannot detect, download, or reach a compatible driver because of a proxy, network, or cache problem.
Classifying the error first prevents changing a correct path when the real issue is Chrome itself.
Four supported ways to make ChromeDriver discoverable
1. Set an absolute Java system property
Use this historical manual method when you control the driver binary yourself. Set it before constructing the driver, and point to the executable itself—not its containing folder.
#1 Best Overall
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class BasicChrome {
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver",
"/absolute/path/to/chromedriver");
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com");
System.out.println(driver.getTitle());
} finally {
driver.quit();
}
}
}
On Windows, use the actual executable, normally C:\tools\chromedriver.exe, or a Java string with escaped backslashes such as "C:\\tools\\chromedriver.exe". On macOS and Linux, use the platform’s executable name and an absolute POSIX path.
2. Supply a ChromeDriverService
A service object keeps the driver location in code without relying on a global system property and gives you a place to configure the service.
import java.nio.file.Path;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeDriverService;
public class ServiceChrome {
public static void main(String[] args) {
Path executable = Path.of("/absolute/path/to/chromedriver");
ChromeDriverService service = new ChromeDriverService.Builder()
.usingDriverExecutable(executable.toFile())
.build();
WebDriver driver = new ChromeDriver(service);
try {
driver.get("https://example.com");
} finally {
driver.quit();
}
}
}
This is useful in CI when the driver is downloaded into a job-specific directory or when several test suites need different binaries.
3. Put the executable on PATH
Install the matching driver in a directory listed by the account that runs the tests. Check the effective path from that same shell or service account; an IDE, container, scheduled task, and interactive terminal may have different environment variables. With a correct PATH, this is enough:
WebDriver driver = new ChromeDriver();
Do not assume that adding a folder to your personal shell profile changes the environment of a CI runner or IDE process. Print the path from the test process or configure it in the runner’s environment.
4. Let Selenium Manager resolve it
Selenium Manager is Selenium’s official driver manager and has shipped with Selenium releases since 4.6. When no driver is supplied, current bindings can invoke it automatically:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class ManagedChrome {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com");
} finally {
driver.quit();
}
}
}
Use a current Selenium release and keep Chrome installed where Selenium Manager can detect it. This removes a hard-coded path, but it does not remove the need for network access when a driver must be downloaded, nor does it override a deliberately supplied driver.
Prove that the path points to a usable executable
- Check the exact file: list the path and confirm it is a file, not only a directory. Make sure the filename matches the operating system.
- Check permissions: on macOS or Linux, grant execute permission when appropriate with
chmod +x /absolute/path/to/chromedriver. Ensure the test account can read and execute it. - Run the binary directly: execute
chromedriver --versionon PATH, or/absolute/path/to/chromedriver --version. On Windows usechromedriver.exe --version. A version string proves the file can start independently of Selenium. - Check architecture and quarantine policies: a driver built for another operating-system architecture, or blocked by endpoint security, can fail after the path appears correct. Use the driver distributed for the machine running the test.
- Set the property before construction: assigning it after
new ChromeDriver()is too late.
Never “fix” the error by pointing the property at the Chrome browser binary. webdriver.chrome.driver is the ChromeDriver server executable.
Resolve Chrome and ChromeDriver version mismatches
ChromeDriver and Chrome need compatible versions. A typical mismatch says that the installed driver supports Chrome version X while the browser is version Y. Record both versions, then update them as a pair or remove the manually pinned driver so Selenium Manager can select a compatible one.
| What you observe | Likely cause | Action |
|---|---|---|
| Unable to locate driver | No file found through PATH, service, property, or Manager | Use one discovery method and verify the executable directly |
| “Only supports Chrome version X” | Chrome and ChromeDriver are incompatible | Update the pair or allow Selenium Manager to resolve the match |
| Driver starts, Chrome exits | Browser startup, profile, sandbox, or account problem | Launch Chrome under the same account and enable driver logs |
| Manager cannot obtain a driver | Proxy, blocked network, detection, or cache issue | Inspect Manager debug output and configure its proxy/cache |
Browser auto-updates can make a previously pinned driver stale. In reproducible CI, pin compatible browser and driver versions together, or standardize on Selenium Manager with a controlled cache and network policy.
Diagnose Selenium Manager instead of guessing
Selenium Manager stores resolved assets in a cache whose default location is ~/.cache/selenium. It supports configuration through se-config.toml, command-line arguments, and environment variables including SE_PROXY. Enable its debug output in the environment where the test runs; the messages show browser detection, driver discovery, cache use, and download attempts.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute- Verify the proxy value is reachable from the runner, not just from your desktop.
- Allow outbound access to the endpoints required for driver metadata and downloads, or pre-populate the cache in an offline build.
- Check that the cache directory is writable by the test account.
- Remove a corrupted cached artifact and rerun resolution when debug output points to a bad download.
If policy forbids downloads, use a checked-in or provisioned driver with ChromeDriverService and document the browser/driver pair used by the image.
Separate driver discovery from Chrome startup crashes
When the executable runs and the versions are compatible but the session still dies, launch Chrome directly with the same user, container, display, and profile conditions. Then enable ChromeDriver logging and inspect the first startup error rather than changing the path repeatedly. Common causes include an inaccessible profile directory, no display in a headed Linux session, restrictive endpoint software, or a browser binary unavailable to the service account.
Rank #2
Google describes --no-sandbox as an unsupported and highly discouraged workaround. Do not add it as a routine fix; use it only as a last-resort environment investigation while you correct the underlying account, container, or sandbox configuration.
Choose a setup that fits your environment
| Approach | Manual control | CI reproducibility | Network requirement | Best fit |
|---|---|---|---|---|
| System property | Highest; explicit file | High when binary is provisioned | None at test start | Legacy suites and fixed images |
| ChromeDriverService | Highest; scoped in code | High | None at test start | Multiple binaries or job-specific paths |
| PATH | Medium | Depends on machine image | None at test start | Standardized developer or CI hosts |
| Selenium Manager | Lower; automatic selection | High after cache/image policy is set | Often required for first resolution | Current Selenium and changing browser versions |
Whichever method you choose, log the browser version, driver version, Selenium version, operating system, and resolved path on failures. Those five values usually identify the class of problem immediately.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Or skip the browser setup
If your goal is a clean image or PDF of a web page rather than an interactive Selenium session, ScreenshotNeo accepts one request and returns a PNG, JPEG, WebP, or PDF. It accepts the cookie or consent banner before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the result through X-Page-Verdict and X-Billed headers.
See the ScreenshotNeo API documentation for all options. This complete cURL call captures Stripe as WebP:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The equivalent Python request is:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
In Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. Every feature is on every plan: 1,000 shots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Common errors and targeted fixes
“The path to the driver executable must be set”
The property was not set before construction, names the wrong file, or no other discovery method succeeded. Set an absolute executable path, use a service, put the file on PATH, or upgrade Selenium and use Manager.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall“Unable to locate chromedriver”
Inspect the effective PATH and the process account. A path configured in a shell may not exist in an IDE, container, or service. Run the exact binary with --version.
“This version of ChromeDriver only supports Chrome version …”
Compare installed Chrome and driver versions. Update both or remove the stale pinned driver and let Selenium Manager resolve the pair.
Manager reports a download or proxy failure
Turn on Manager debug output, check SE_PROXY, outbound firewall rules, cache permissions, and the default ~/.cache/selenium location. Provision a driver and use a service when downloads are prohibited.
Chrome opens and immediately quits
Treat this as startup, not discovery: reproduce under the same account, inspect ChromeDriver logs, verify profile/display access, and avoid relying on the unsupported --no-sandbox workaround.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Recommended repair checklist
- Copy the complete error and classify it as discovery, permission, compatibility, startup, or Manager networking.
- Choose exactly one primary discovery method and configure it before
new ChromeDriver(). - Verify the executable path and run its
--versioncommand under the test account. - Record Chrome and ChromeDriver versions and make them compatible.
- For Selenium Manager, inspect debug output, proxy settings, and cache permissions.
- For startup crashes, test Chrome directly and read driver logs.
- Keep the working browser, driver, Selenium, operating-system, and path details in CI diagnostics.
Frequently Asked Questions
Does setting webdriver.chrome.driver install ChromeDriver?
No. It only tells Selenium where an existing executable is located; you must provision a compatible, executable binary yourself or use Selenium Manager.
Can I set the property to a relative path?
An absolute path is safer because the working directory can differ between an IDE, shell, and CI runner. Resolve the file explicitly when reproducibility matters.
Will Selenium Manager work behind a corporate proxy?
It can use configured proxy settings such as SE_PROXY, but the runner must still be able to reach the required metadata and download endpoints, or use a pre-populated cache.
Why does the same code work locally but fail in CI?
The CI process may have a different PATH, account, filesystem permissions, browser installation, display environment, proxy, or Selenium Manager cache.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

