# What is Selenium detection?

> Selenium detection is how a site spots a browser driven by Selenium: navigator.webdriver, the globals ChromeDriver adds, headless tells, DevTools traces.

Source: https://mosaicbrowser.com/glossary/selenium-detection

## Selenium detection: the marks ChromeDriver leaves in a page

Selenium detection is a website recognising that a browser is being driven by Selenium WebDriver. The usual evidence is navigator.webdriver reading true, global variables ChromeDriver adds with a cdc prefix, signs of headless mode, and side effects of the DevTools protocol the driver uses.

![Selenium detection starts with one property, drawn as a mosaic of tiles](https://mosaicbrowser.com/covers/selenium-detection.webp)

Selenium does not click inside the browser by magic. It sends WebDriver commands to a driver program, ChromeDriver for Chrome, and the driver turns them into DevTools protocol calls and snippets of JavaScript run in the page. Each layer leaves something a page can read, and Selenium detection is a page reading them.

## How Selenium detection works

Detectors check the cheap, certain signals first and the expensive, fuzzy ones last.

1. `navigator.webdriver`. The WebDriver specification defines it so a browser can say it is being driven, and MDN lists when Chrome sets it: the `--enable-automation` or `--headless` flag, or a debugging port of 0 ([MDN](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver), read 2 November 2026). ChromeDriver starts Chrome with automation switched on, so under a default Selenium launch it reads `true`. The details, and why hiding it with one line of script makes things worse, are in [navigator.webdriver](https://mosaicbrowser.com/glossary/navigator-webdriver).
2. ChromeDriver's globals. The driver's own helper scripts read built-ins through saved copies, for example `window.cdc_adoQpoasnfa76pfcZLmcfl_Array || window.Array` and the same for `Promise`, `Symbol`, `JSON` and `Proxy` ([ChromeDriver source](https://chromium.googlesource.com/chromium/src/+/main/chrome/test/chromedriver/js/call_function.js), read 2 November 2026). A page that lists `Object.keys(window)` and finds a `cdc_` name has found ChromeDriver.
3. Headless markers. A headless Chrome names itself `HeadlessChrome` in its User-Agent unless told otherwise, and reports a software renderer where a real machine has a GPU. [Headless browser detection](https://mosaicbrowser.com/glossary/headless-browser-detection) lists the rest.
4. DevTools side effects. Anything that talks to Chrome over the DevTools protocol can leave traces that are not Selenium-specific. The one we measured is enabling the `Runtime` domain, which flipped deviceandbrowserinfo's detector to `isBot=true`; [CDP detection](https://mosaicbrowser.com/glossary/cdp-detection) has that run.
5. Behaviour. `element.click()` produces a click with no mouse travel before it, and `send_keys` can fill a field faster than anyone types. Bot vendors weigh these with the network and the device.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: REST API](https://mosaicbrowser.com/features/rest-api)

## Why hiding Selenium is a moving target

The first two signals are easy to remove, which is why tools exist that rename ChromeDriver's `cdc_` prefix in the binary or pass flags that keep `navigator.webdriver` false. That fixes the marks a free test page checks. It leaves the rest: the same fingerprint for every run on one machine, a datacentre IP if the script runs on a server, and input with no human timing. A detector that scores all of them does not need the `cdc_` name.

The second problem is that every such fix is a guess about one version of the driver. The variable names live in ChromeDriver's source, and a release that changes how its helpers work changes what the fix has to hide.

## How to check whether a page can detect your Selenium setup

Open `bot.sannysoft.com` from the browser your script drives and read the WebDriver row and the rows under it; [the Sannysoft bot test, explained](https://mosaicbrowser.com/guides/sannysoft-bot-test-explained) says what each row checks. In the console, run `navigator.webdriver` and `Object.keys(window).filter(k => k.startsWith('cdc_'))`. Then repeat on a detector that reads DevTools side effects, because a clean Sannysoft page does not cover those.

![Mosaic API keys: one per script or tool, each revocable on its own](https://mosaicbrowser.com/shots/api-keys.png)
*One API key per script, revocable on its own*

## How Mosaic handles Selenium detection

Mosaic does not ship or modify ChromeDriver, and we have not tested Selenium against it. Its automation path is different: start a profile over the local REST API, or from an AI assistant over MCP, and the start call returns a DevTools endpoint that Puppeteer and Playwright attach to ([using Playwright with an anti-detect browser](https://mosaicbrowser.com/guides/use-playwright-with-an-anti-detect-browser) has the code). Tesseract Chrome is changed so that automation switches on the command line no longer turn `navigator.webdriver` on, and Mosaic's own page tools never enable the `Runtime` domain. Each profile's audit has a row for `navigator.webdriver` and one for automation globals, which fails if a `cdc_` name is present. Clicks and keystrokes from Mosaic's tools go through its human-input pipeline, never `element.click()`. Automate accounts and sites you are allowed to automate; the API is Pro.

## Sources

1. [Chromium source: ChromeDriver call_function.js](https://chromium.googlesource.com/chromium/src/+/main/chrome/test/chromedriver/js/call_function.js), read November 2, 2026
2. [MDN: Navigator.webdriver](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver), read November 2, 2026

## Questions

### How do websites detect Selenium?

Most start with navigator.webdriver, which is true under WebDriver. Then they look for ChromeDriver's cdc_ globals, headless markers such as HeadlessChrome in the User-Agent, and side effects of the DevTools protocol. Behaviour, such as clicks with no mouse movement, comes last.

### What is the cdc_ variable in ChromeDriver?

ChromeDriver keeps its own references to built-in objects such as Array, Promise and Symbol under window properties whose names begin cdc_adoQpoasnfa76pfcZLmcfl_. A page can list the window's keys and look for that prefix.

### Does a modified ChromeDriver stop Selenium detection?

A modified driver can remove the best-known marks, such as the cdc_ names and the webdriver flag. It does not change the browser's fingerprint, the IP address or how the script behaves on the page, which detectors also read.

### Is it legal to use Selenium on a website?

Automating a browser is ordinary testing practice. Whether a particular site allows automated access is set by its own terms, which is where to look before running a script against it.

## Related

[navigator.webdriver: the flag that says automation is driving](https://mosaicbrowser.com/glossary/navigator-webdriver): navigator.webdriver is a browser property that reads true when automation controls the browser. Chrome sets it for --enable-automation and --headless.

[CDP detection: how a page notices DevTools is driving it](https://mosaicbrowser.com/glossary/cdp-detection): CDP detection is a page noticing that the Chrome DevTools Protocol is driving the browser, usually because Puppeteer or Playwright enabled Runtime.

[Headless browser detection: how sites spot a browser with no screen](https://mosaicbrowser.com/glossary/headless-browser-detection): Headless browser detection is how a site tells a browser with no window, usually under automation, from one a person uses. Here is what it reads.

[Sannysoft bot test explained, row by row](https://mosaicbrowser.com/guides/sannysoft-bot-test-explained): bot.sannysoft.com checks webdriver, window.chrome, plugins, languages, WebGL and a broken image for signs of a headless browser. What each row tests.

[How to use Playwright with an anti-detect browser](https://mosaicbrowser.com/guides/use-playwright-with-an-anti-detect-browser): Use Playwright with an anti-detect browser by starting the profile first and attaching with connectOverCDP. Keep its context; leave the fingerprint alone.





[How to use Puppeteer with an anti-detect browser](https://mosaicbrowser.com/guides/use-puppeteer-with-an-anti-detect-browser): Use Puppeteer with an anti-detect browser through puppeteer.connect: start the profile, pass its wsEndpoint, set defaultViewport to null, then disconnect.

## See selenium detection on a real profile

Mosaic shows the values a site reads, per profile, and runs a leak test from inside the profile’s own page. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
