October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Use ChromeDriver with Selenium for Browser Automation

Create a Selenium 4 Chrome session with Selenium Manager, know when to use a manual ChromeDriver, and fix common setup and compatibility errors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To automate Chrome with Selenium, install Selenium and Chrome, then create a Chrome WebDriver session using Selenium 4. In most current setups, you do not need to download ChromeDriver yourself: Selenium Manager can find and cache a compatible driver when Selenium starts the session.

What ChromeDriver does

Selenium WebDriver sends browser automation commands through a browser-specific driver. ChromeDriver is the component that connects Selenium to Google Chrome; it is not a replacement for Selenium or Chrome. When a test asks Selenium to open a page, find an element, or click a button, WebDriver communicates those instructions to ChromeDriver, which controls the browser.

As an Amazon Associate I earn from qualifying purchases.

Selenium’s Chrome guide says Selenium 4 is compatible by default with Chrome 75 and later, and that the Chrome and ChromeDriver major versions should match. That compatibility floor is the guide’s documented baseline, not a guarantee that every operating system, Chrome build, or customized installation will work without configuration. See Selenium’s Chrome-specific documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with Selenium Manager (recommended)

For ordinary local automation, use a current Selenium binding and let it resolve the driver. Selenium Manager has shipped with Selenium releases since 4.6. When no driver is supplied, Selenium can invoke it to identify the browser version, resolve a matching driver using vendor metadata, download it, and cache it locally. The first run may therefore need network access.

  1. Install Google Chrome if it is not already available on the machine.
  2. Install Selenium for your language binding.
  3. Create a Chrome options object if you need startup settings, then instantiate Chrome without specifying a driver executable path.
  4. Run a small test and allow Selenium Manager to resolve the driver when necessary.

Python example

Install Selenium with python -m pip install -U selenium, then save and run this script:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com")
    print(driver.title)
finally:
    driver.quit()

The webdriver.Chrome() call lets Selenium manage the driver when one has not been provided. The try/finally ensures the browser session is closed even if navigation or the title check fails.

JavaScript example

Install Selenium’s JavaScript binding with npm install selenium-webdriver. A minimal CommonJS script is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');

(async function run() {
  const options = new chrome.Options();
  const driver = await new Builder()
    .forBrowser('chrome')
    .setChromeOptions(options)
    .build();

  try {
    await driver.get('https://example.com');
    console.log(await driver.getTitle());
  } finally {
    await driver.quit();
  }
})();

Java example

Add Selenium WebDriver to your project’s dependencies, then create the session without a manually supplied service path:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class ChromeSmokeTest {
    public static void main(String[] args) {
        ChromeOptions options = new ChromeOptions();
        WebDriver driver = new ChromeDriver(options);
        try {
            driver.get("https://example.com");
            System.out.println(driver.getTitle());
        } finally {
            driver.quit();
        }
    }
}

For Selenium Manager’s release milestones and configuration details, consult the Selenium Manager documentation. The documentation states that Selenium Manager can manage Chrome for Testing browsers as of Selenium 4.11.0; browser management is distinct from the usual case of resolving a driver for Chrome already installed on the machine.

Choose automatic, manual, or remote driver management

Approach Setup effort Version upkeep Best fit
Selenium Manager fallback Low for a typical local setup; Selenium invokes it when no driver is provided. It resolves and caches drivers, subject to network, platform, and installation constraints. Most users starting with current Selenium.
Manually managed driver or explicit path Higher; you obtain the driver and make it discoverable or specify its path. You maintain compatibility as Chrome changes. Custom or pinned environments, or setups the default manager cannot handle.
Selenium Grid / remote session Requires a remote execution environment. Depends on administration of the Grid and browser nodes. Running tests across machines, browsers, or operating systems.

Selenium’s Grid documentation describes Grid as the option for distributed test execution. It is a different deployment choice from launching a local Chrome session.

When to specify Chrome options or a browser version

Use the binding’s Chrome options class for browser startup arguments and other supported Chrome-specific settings. Keep options tied to a real environment requirement rather than copying flags into every script. For example, do not add --no-sandbox by default; only use such a flag when the deployment environment calls for it and you understand the security implications.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium’s Browser Options documentation describes browserVersion as an optional capability. It can request a browser version from a remote end; recent Selenium can also use Selenium Manager to obtain a requested browser that is not present locally. This is useful for controlled test environments, but it does not mean every local browser build or platform can be automatically provisioned.

Use a manually installed ChromeDriver when needed

A manual driver can make sense when a build environment pins browser and driver versions, when you need a specific custom driver location, or when Selenium Manager cannot handle the installation. The driver executable must be compatible with the Chrome browser being automated.

  1. Check Chrome’s installed version and record its major version.
  2. Obtain a ChromeDriver build suitable for that Chrome version and your operating system and architecture.
  3. Either place the executable somewhere on PATH, or pass its location using the service mechanism supported by your Selenium language binding.
  4. Keep the browser and driver versions aligned when either is upgraded.

Manual pinning transfers ongoing compatibility work to you: an automatically updated Chrome can outgrow a driver selected earlier. Selenium Manager supports configuration for some custom locations and environments; check its documentation before assuming it can manage every package-manager build or architecture.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot ChromeDriver setup errors

“Unable to locate driver” or no driver found

  • Check Selenium: Selenium Manager is included starting with Selenium 4.6. If you expect automatic resolution, verify the binding version and update it if appropriate.
  • Inspect diagnostics: Selenium’s current guidance recommends enabling logging and reviewing its output when Selenium cannot locate a driver. Follow the binding’s logging instructions in the Unable to Locate Driver Error guide.
  • Check access and environment: Initial metadata lookup or download may need network access. Proxy or firewall restrictions can prevent resolution; use Selenium Manager’s documented network and proxy configuration or provide a managed driver.
  • Check executable location and platform: For a manual setup, confirm the path is correct, the file can execute, and the driver build matches the operating system and architecture.

“This version of ChromeDriver only supports Chrome version 113”

This wording is an illustrative version-mismatch error in Selenium’s documentation, not a statement about current Chrome releases. It means the driver and installed browser are on different major versions. Check both versions, then either let Selenium Manager resolve a suitable driver or install a compatible driver manually. Selenium’s Chrome guide states that the Chrome and ChromeDriver major versions should match.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selenium Manager cannot download or resolve a driver

  • Confirm that the machine can reach the required metadata and download endpoints, including through any proxy in use.
  • Check that the browser installation and platform are supported by the manager’s documented behavior.
  • If your environment uses a custom browser location or an unusual package build, configure the supported location or use an explicit driver path.
  • Read the manager logs before changing versions; they can distinguish connectivity, discovery, and path problems.

Chrome launches and immediately exits, or the session fails after an upgrade

Compare the installed browser and driver major versions, especially if the driver is manually pinned. Also inspect the exact Selenium error and startup logs for a bad executable path, permissions issue, or an invalid Chrome startup argument. Remove unnecessary flags and retry with a minimal options object before adding environment-specific settings back.

Or skip the browser setup

If the goal is to capture a page rather than interact with it as a browser test, ScreenshotNeo offers a one-request screenshot API. It returns an image or PDF; it is not a substitute for Selenium when your automation must click, fill forms, or assert application behavior.

cURL example using the documented endpoint and parameters:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for authentication and options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for the free plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.