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 Selenium errors in Google Colab by identifying the failure class before installing anything: inspect the browser, ChromeDriver, executable paths, and Selenium version; try Selenium Manager on a current Selenium release; then use an explicitly matched driver only when automatic management fails. Colab runtimes are temporary and can change, so a setup that worked yesterday may need to rediscover its browser and driver today.
Start with the complete traceback
Copy the full exception, not just its final line. Selenium errors that look similar require different fixes.
- “Unable to obtain driver” or “Unable to locate driver”: Selenium cannot find a usable driver executable.
- “This version of ChromeDriver only supports Chrome version …”: the browser and driver major versions do not match.
- Session creation or browser-exited errors: Chrome may be crashing at startup, often because of unsuitable headless flags, a damaged profile, permissions, or an incompatible binary.
- Selenium Manager network errors: the built-in manager could not reach an endpoint to discover or download browser/driver metadata.
Do not respond to every error by installing another random chromedriver. First record what is actually installed in this runtime.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Inspect the Colab runtime before changing it
Run these cells in a fresh notebook. They report the Selenium package, browser candidates, driver candidates, and versions without assuming a fixed Colab image.
#1 Best Overall
!python --version
!pip show selenium || true
!which google-chrome || true
!which chromium || true
!which chromium-browser || true
!which chromedriver || true
!google-chrome --version || true
!chromium --version || true
!chromium-browser --version || true
!chromedriver --version || true
Use Python to show the same information from the process environment:
import os, shutil, subprocess, sys
print("Python:", sys.version)
for name in ("google-chrome", "chromium", "chromium-browser", "chromedriver"):
path = shutil.which(name)
print(name, "=>", path)
if path:
try:
print(subprocess.check_output([path, "--version"], text=True).strip())
except Exception as exc:
print("version check failed:", exc)
try:
import selenium
print("Selenium:", selenium.__version__)
except Exception as exc:
print("Selenium import failed:", exc)
Colab’s hosted image and preinstalled software can change. Google recommends using the latest runtime by default and adding installation code when a notebook requires a particular package version. Pinning an older runtime can improve reproducibility, but it may start more slowly and omit newer features. There is no single browser version or universal Selenium recipe guaranteed for every hosted session.
Try Selenium Manager first
Selenium Manager is included with Selenium releases from 4.6 onward. When you do not provide a driver, Selenium bindings can invoke it as a fallback to discover or obtain a compatible driver.
!pip install -U selenium
Restart the runtime if Colab asks you to, then try a minimal headless session:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless=new")
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--window-size=1280,2000")
driver = webdriver.Chrome(options=options)
try:
driver.get("https://example.com")
print(driver.title)
print(driver.current_url)
finally:
driver.quit()
If this works, do not add a manually downloaded driver merely because older tutorials did. Check whether an old chromedriver appears earlier on PATH; a stale executable can be selected before the binary you intended.
Rank #2
How do I fix a ChromeDriver version mismatch in Google Colab?
Compare the browser and driver major versions printed by the inspection cell. A message such as “only supports Chrome version 120” is a direct mismatch signal. ChromeDriver is a separate executable that controls Chrome; both sides must be compatible.
Remove stale path assumptions
Delete or stop prepending an old driver directory, then retry Selenium Manager. In a notebook, inspect PATH and the selected executable:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
import os, shutil
print(os.environ.get("PATH"))
print("chromedriver on PATH:", shutil.which("chromedriver"))
Use a deliberately matched pair
If automatic management cannot be used, install a browser and driver pair that match the browser actually present, and print both versions in the notebook. Chrome’s current distribution guidance uses Chrome for Testing for releases beginning with milestone 115; do not copy a driver URL or version from a stale tutorial without checking the installed browser first.
Pass an explicit path through Selenium’s Service object rather than the legacy executable_path constructor argument:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
service = Service("/absolute/path/to/chromedriver")
options = Options()
options.add_argument("--headless=new")
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
driver = webdriver.Chrome(service=service, options=options)
try:
driver.get("https://example.com")
print(driver.title)
finally:
driver.quit()
The path must point to an executable file in the current runtime. A path from a previous Colab session disappears when that session is reset.
Why can’t Selenium find chromedriver in Colab?
A missing-driver error means Selenium cannot discover a usable executable, not necessarily that Chrome itself is absent. Check these conditions:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →- No executable installed:
which chromedriverreturns nothing. Prefer Selenium Manager or install a compatible pair. - Wrong path: the file exists but is not on
PATH. Supply its absolute path withService. - Permissions: a downloaded file may not be executable. Verify permissions before launching it.
- Stale executable: an older driver earlier on
PATHis being selected. Remove it or adjustPATH. - Browser absent: a driver alone cannot create a session. Locate Chrome or Chromium and, when necessary, set its binary explicitly with
options.binary_location.
After every change, rerun the version and path checks. This creates a reproducible record for the next runtime.
How do I fix Selenium Manager download or connection errors?
Selenium Manager may contact remote endpoints to discover and download artifacts. DNS failures, a proxy, firewall rules, or restricted outbound access can stop that process.
- Read the manager’s complete error and identify whether it names DNS, proxy, TLS, timeout, or permission failure.
- Test basic connectivity from the runtime using an endpoint your environment permits. A general network failure cannot be repaired by changing Python code.
- Check proxy configuration supplied to the runtime and ensure it permits the manager’s requests.
- If outbound access is intentionally restricted, provide browser and driver binaries through an approved, reachable path and pass the driver with
Service.
Manual paths are an alternative, not a guarantee that Colab service restrictions can be bypassed. Keep the installation and version-printing cells in the notebook so a future runtime can be diagnosed.
How do I run Selenium headless in Colab?
Colab notebooks normally do not provide a desktop display, so use headless Chrome and flags suitable for a managed Linux process:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
for arg in (
"--headless=new",
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-gpu",
"--window-size=1365,2000",
):
options.add_argument(arg)
with webdriver.Chrome(options=options) as driver:
driver.get("https://example.com")
driver.save_screenshot("example.png")
print(driver.title)
If Chrome exits immediately, test without custom extensions or a reused profile, confirm the browser binary exists, and try a smaller window size. Avoid adding flags blindly: each one can hide the original cause. A browser that starts but cannot load a page may instead be failing because of the target site’s policy, authentication, or network behavior; WebDriver setup does not grant permission to bypass those controls.
What should I do after a runtime reset?
Colab hosted virtual machines are temporary, have maximum lifetimes, and are subject to resource limits. A reset returns the managed machine toward its original state, so files and manually installed packages may vanish.
- Save the notebook with cells that install Python dependencies.
- Run the inspection cell again rather than assuming the previous browser version.
- Reinstall only the packages and binaries the notebook needs.
- Retry Selenium Manager before adding an explicit driver.
If the environment is damaged or contains conflicting system changes, use Colab’s Disconnect and delete runtime action, then run the setup cells from the beginning. The reset option is rate-limited, so it is not a substitute for a deterministic setup.
Hosted runtime, pinned runtime, or local runtime?
| Option | Best use | Tradeoff |
|---|---|---|
| Selenium Manager | Current Selenium with ordinary browser discovery | Must detect the browser and may need network access for metadata or binaries. |
Explicit Service path |
Controlled environments or a diagnostic fallback | You maintain the path and compatible versions. |
| Reset managed runtime | Suspected damaged or incompatible VM state | All dependencies must be installed again; resets may be rate-limited. |
| Past Colab runtime version | Reproducibility after a newer image breaks a notebook | Startup can take longer and newer features may be unavailable. |
| Local runtime | You need control over installed browsers, drivers, and files | Notebook code can read, write, delete files, and execute commands on your machine; connect only notebooks you trust. |
A local runtime is a different execution arrangement, not a way to bypass Colab restrictions. Paid Colab plans are not established as an automatic fix for ordinary driver discovery or version mismatch.
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 minuteCommon errors and targeted fixes
“Unable to obtain driver”
Confirm Selenium is current, check browser presence, inspect PATH, and retry without a manually supplied driver. If Manager reports a download failure, resolve connectivity or provide a matched local path.
Best Value
“SessionNotCreatedException”
Read the browser and driver versions. Remove stale drivers or install a pair matching the browser actually installed.
Chrome starts and immediately exits
Use --headless=new, --no-sandbox, and --disable-dev-shm-usage; remove custom profiles and extensions; verify the binary path and runtime resources.
The notebook worked until a restart
Treat the restart as a new machine. Re-run installation and inspection cells, because hosted runtime state is not permanent.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Or skip the browser setup
If your goal is a clean image or PDF of a page rather than browser automation, ScreenshotNeo provides a website screenshot API. One GET request can return PNG, JPEG, WebP, or PDF without configuring ChromeDriver.
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}`);
Before capture, ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server supplies take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. See the ScreenshotNeo API documentation for parameters and options. Create a free ScreenshotNeo account.
Keeping a Colab Selenium notebook reliable
- Print Python, Selenium, browser, and driver versions at startup.
- Prefer Selenium Manager on a current Selenium release.
- Keep explicit browser/driver installation in versioned cells when reproducibility matters.
- Use absolute paths only after verifying they exist in the current runtime.
- Expect resets and image updates; never rely on a one-time manual change.
- Record whether failures occur during driver discovery, session creation, browser startup, or page navigation.
Frequently Asked Questions
Is ChromeDriver the same program as Google Chrome?
No. Chrome is the browser; ChromeDriver is a separate WebDriver executable that controls it.
Can I fix every Colab Selenium error by upgrading Selenium?
No. An upgrade may provide Selenium Manager, but version mismatches, missing browsers, path errors, startup crashes, and network restrictions require different remedies.
Does a local Colab runtime behave like a hosted Colab VM?
No. It runs notebook code on your own machine and changes the file-access and security context.
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.

