When Selenium opens the wrong browser, first separate three possibilities: your code selected a different browser family, Selenium launched a different installation or channel, or the browser version/profile is not the one you expected. A driver/browser mismatch can also prevent any window from opening and produce a session-creation error. The reliable fix is to inspect, in order, the requested browser, the options attached to the session builder, the browser executable path, the driver source and path, and the detected versions.
Use this sequence rather than reinstalling everything. Selenium Manager is built into Selenium releases since 4.6 and is a fallback when your binding has not already been given a driver. An explicit driver, a driver on PATH, framework configuration, or environment variables can therefore change the result.
What “the wrong browser” can mean
The visible symptom is not specific enough to identify one cause. Classify it before changing configuration.
| Symptom | What to verify |
|---|---|
| Firefox opens when you expected Chrome | The browser family selected by the constructor, builder, test runner, or remote capabilities. |
| The right family opens, but the wrong installation or channel appears | The absolute browser binary path and any Selenium Manager browser-path setting. |
| The right browser opens with an unexpected version or profile | Browser channel/version, user-data or profile arguments, and framework/environment overrides. |
| No window opens; session creation fails | Resolved driver path, browser path, and driver/browser compatibility. A mismatch may show as “session not created,” not as a visibly wrong window. |
Compare six facts: requested family, launched binary path, browser version or channel, driver path and source, driver version, and binding/framework configuration. Record them before making a change.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
Why is Selenium opening the wrong browser?
1. The code or framework selected another browser
Find the browser constructor, builder call, command-line option, and test-runner configuration that creates the session. Also inspect environment variables and remote WebDriver or grid capabilities. Do not infer the selection from whichever browser happens to be installed.
Selenium Manager’s configuration table includes Chrome, Firefox, Edge, Safari, Internet Explorer, Safari Technology Preview, and WebView2. The requested name is a session choice; it is not proof of which executable will ultimately be launched.
2. Options were attached to a different browser
Browser-specific options only affect the browser that receives them. In Selenium’s JavaScript API, options for non-selected browsers are dropped when build() runs. A Chrome binary path placed in a Firefox options object, for example, cannot make a Firefox session use Chrome.
3. An explicit driver or PATH entry changed the fallback
Selenium Manager is a fallback. If your code, a system property, a framework, or a driver executable found on PATH already supplies a driver, that supplied driver can be used instead. The selected driver may then target a different browser installation or fail compatibility checks.
4. The browser path points at another channel or version
Multiple Chrome, Edge, or Firefox installations are common on development machines and CI workers. A default executable can be stable, beta, enterprise-managed, or packaged in a different location from the one you launch manually. Selenium Manager can detect browser versions and accepts browser-path configuration; bindings also expose custom locations through their browser options.
A five-minute diagnostic sequence
Step 1: Confirm the requested browser
- Locate the session creation line or framework setting.
- Write down the family: Chrome, Firefox, Edge, Safari, or another supported browser.
- Check command-line arguments, environment variables, and remote capabilities that may override the local setting.
- For JavaScript, verify that
Builder.forBrowser(...)names the intended browser before callingbuild().
For a minimal reproduction, create one local session with the same language binding and an explicit browser selection. Compare its result with the full test runner; do not assume a difference proves a framework defect.
Step 2: Check that the options belong to that browser
Keep the options object and builder selection together in the same code path. In JavaScript, this pattern selects Chrome and attaches Chrome options:
Rank #2
const {Builder} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const options = new chrome.Options();
// options.setChromeBinaryPath('/absolute/path/to/chrome');
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
The exact option methods vary by binding and release. Check the API for your installed version, and do not attach Chrome options to a builder that ultimately selects Firefox or Edge. The JavaScript API reference documents this selection behavior at Selenium WebDriver JavaScript API.
Free tools Windows power users keep installed
One-click scans. No signup required.
Step 3: Identify the browser executable
Use an absolute path appropriate to the operating system and confirm that the executable exists and can be run by the same user or service account as the test. Selenium Manager supports a browser path, including the SE_BROWSER_PATH/browser-path setting and browser-specific variants such as SE_CHROME_PATH. Names and defaults can evolve, so verify them in the current Selenium Manager documentation.
ChromeDriver’s capabilities documentation also describes setting a custom Chrome binary in options: Capabilities and ChromeOptions. The equivalent option names for Edge and Firefox are binding-specific.
Step 4: Identify the driver source and path
Determine whether the driver came from an explicit service or system property, a manually managed executable on PATH, or Selenium Manager’s fallback. Selenium’s driver-installation guide explains executable-location failures at Unable to Locate Driver Error.
Enable Selenium Manager’s documented debug or trace output for your release. Its diagnostics can show browser detection, driver discovery, resolved driver path, and browser path. Do not delete the cache first: establish which executable is selected, then correct an unintended path or intentionally pin the versions you need.
Recommended Free Tools
Step 5: Compare versions if startup fails
Record all of the following from the failing environment:
- Selenium binding and Selenium Manager version.
- Browser executable path and reported browser version.
- Driver executable path and reported driver version.
- Any requested browser or driver version setting.
- The operating-system user and whether the session is local or remote.
Selenium Manager’s documentation uses the historical example “This version of ChromeDriver only supports Chrome version 113” to illustrate a compatibility failure. Treat that number as an example, not a current Chrome requirement. Manager can detect a local browser version and resolve a corresponding driver, but an explicitly supplied driver or a browser path for another channel can defeat that fallback.
Rank #3
How do I make Selenium use a specific Chrome binary?
JavaScript
Use the Chrome options API supplied by your installed selenium-webdriver version. The following illustrates the relationship; confirm the method name in your version’s API:
const {Builder} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const options = new chrome.Options();
options.setChromeBinaryPath('/opt/google/chrome-beta/google-chrome');
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
Use a Windows or macOS absolute path on those systems, and test that the path is executable by the CI account. Keep forBrowser('chrome') and setChromeOptions(options) paired.
Python
Python’s Chrome options commonly expose binary_location; the service path is separate. Check the API for your installed Selenium version:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
options = Options()
options.binary_location = "/opt/google/chrome-beta/google-chrome"
service = Service(executable_path="/opt/webdrivers/chromedriver")
driver = webdriver.Chrome(service=service, options=options)
If you omit Service, the binding may invoke Selenium Manager. If you provide it, you have intentionally selected a driver and should check its compatibility with the binary.
Java
Java bindings typically use ChromeOptions#setBinary and a ChromeDriverService when a driver path must be explicit. Confirm signatures against the API version in your build:
ChromeOptions options = new ChromeOptions();
options.setBinary("/opt/google/chrome-beta/google-chrome");
WebDriver driver = new ChromeDriver(options);
try {
System.out.println(driver.getCapabilities());
} finally {
driver.quit();
}
When no service path is supplied, Selenium can use its built-in manager. If your project sets a driver system property or service elsewhere, that setting takes precedence over the fallback.
How do I make Selenium use a specific Firefox or Edge binary?
Firefox
Use the Firefox options class for your binding and set its binary location property, then select Firefox in the builder or constructor. Do not reuse Chrome options. Verify the executable path and the profile arguments separately; a profile can make the correct binary look different.
Edge
Use Edge-specific options and select Edge explicitly. Chromium Edge and Chrome are different browser families from Selenium's point of view, even though they share the Chromium engine. Set the Edge binary path through the Edge options API documented for your binding and verify the resulting capabilities.
Because option names and constructors differ among Java, Python, JavaScript, .NET, and Ruby releases, treat the examples above as binding-labeled patterns rather than universal syntax. The Selenium Manager documentation is the authoritative place to check current browser-path, browser-version, driver-version, cache, and environment-variable controls.
Is Selenium using the driver in PATH or Selenium Manager's cached driver?
It depends on whether a driver was already supplied. Selenium Manager is the official driver manager of the Selenium project and is shipped with Selenium releases, but the bindings invoke it when no driver has been provided. A manually managed executable on PATH, an explicit service path, or a framework wrapper can therefore bypass the fallback.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsCheck explicit configuration first
- Search code for a driver service, executable path, system property, or framework driver setting.
- Inspect the test process's
PATHand any container image layer that installs a driver. - Check remote-grid capabilities: the browser may be launching on a different machine.
- Turn on Selenium Manager debug or trace output and note the resolved paths.
Understand the cache without treating it as the cause
Selenium Manager documents a default cache at ~/.cache/selenium and a default metadata/configuration time-to-live of 3600 seconds. These are documented defaults, not guarantees for every binding, custom cache setting, or future release. A cache hit is evidence about where Manager found metadata; it does not by itself prove that the wrong browser was selected. Change or clear cached data only after recording the selected paths and versions.
Framework, CI, and remote-session checks
If a direct local session is correct but the suite is not, inspect the layer between your test and WebDriver:
- Test-runner browser flags and profile templates.
- Environment variables such as browser-path or browser-version settings.
- Container images, package managers, and user permissions.
- Remote WebDriver or grid node capabilities and node-local installations.
- Wrapper libraries that construct their own options or driver service.
Run the minimal session on the same worker, with the same account and environment, then compare browser and driver paths with the full setup. This isolates configuration precedence without claiming that the framework itself is defective.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common errors and precise fixes
“Session not created” or a driver version message
Cause: the selected driver cannot automate the browser version at the selected binary path. Fix: print both paths and versions, remove an unintended manual driver, or explicitly align browser and driver versions. Recheck the channel: stable, beta, and enterprise installations may report different versions.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Best Value
The intended binary path is ignored
Cause: the option was attached to the wrong browser object, a later builder replaced the options, or a framework created a second driver. Fix: keep browser selection and options in one construction path, then inspect the final capabilities and Manager diagnostics.
Selenium cannot locate a driver
Cause: no executable was supplied, PATH is different for the service account, or the binding cannot invoke its manager. Fix: verify the executable location and permissions, or allow Selenium Manager to resolve it in a supported Selenium release. See the official driver installation guide.
The browser opens but has the wrong profile or settings
Cause: profile, user-data-directory, command-line arguments, or a framework profile template changed the session. Fix: remove profile arguments in a minimal run, then add them back one at a time. This is separate from selecting the browser family or executable.
Local and CI behavior differ
Cause: different PATH values, installed channels, operating-system users, container images, or remote nodes. Fix: capture the same six comparison facts in both environments and make the browser path and driver source explicit where reproducibility matters.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Or skip the browser setup
If your actual goal is a clean image or PDF of a web page rather than WebDriver interaction, ScreenshotNeo can capture it with one request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and each response identifies the page verdict and billing status. Its MCP server lets Claude, Cursor, and other MCP clients call screenshot tools directly.
See the ScreenshotNeo API documentation for all options. cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
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)
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}`);
Every plan includes the features. The Free plan provides 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Further reading and version context
Use the current Selenium Manager documentation for evolving configuration names and defaults. The Selenium project’s explanation of browser and driver resolution in Selenium 4.11.0 is available in What's new in Selenium Manager with Selenium 4.11.0; it explains the mechanism and is not a recommendation to pin your project to that release.
Frequently Asked Questions
Does installing another browser fix Selenium choosing the wrong one?
Usually not. First identify the browser selected by code, the executable path, and the driver source. Installing another copy can add another PATH or channel and make selection less predictable.
Can Selenium Manager choose a browser version for me?
Selenium Manager documents browser-version and driver-version controls and can detect local browser versions. Availability and defaults depend on your Selenium release and configuration, so verify the current documentation before relying on a specific setting.
Why does the browser look right but tests still fail?
A visually correct window does not prove driver compatibility. Compare the actual browser and driver paths and versions; a session can fail before navigation when those versions are incompatible.
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.

