Automation framework leftovers
Test tools leave marks on the page that a script can look for.
Selenium, PhantomJS, Playwright and Puppeteer inject helper properties or bindings into the page, such as cdc_ prefixed document keys, callPhantom, or names starting with __playwright and __pw. Bot defenses scan the window and document for these names. Operators rename or remove them with patches.
What it can and can't do
What the user does: Nothing. It runs from page script
It can
- List window and document properties
- Match known test tool names
- Block or challenge clients with a hit
- Combine hits with the webdriver flag
It cannot
- Catch a tool that renames its marks
- Tell a good test from a bad scrape
- See what the script does
- Prove who runs it
How it differs between platforms: Names change between driver versions and are removed by stealth patches. Only a known name is a hit, so new tools pass until lists catch up.
Browser support
Version notes
- Chrome: Names depend on the driver and its version
- Edge: Same Chromium behavior
- Firefox: Some drivers leave marks here too
- Safari: Fewer known marks
- Chrome on Android: When driven by Selenium or Appium
- Samsung Internet: Not verified
How a site asks for it
| API | Object.keys(window) and document for names like $cdc_, __playwright*, __pw*, callPhantom, _phantom, domAutomation, __nightmare, __selenium* |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Page script enumerates window and document property names
- Script matches them against a list of known automation names
- A hit adds to a bot score
Data you get
Shape: list
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
matchedNames | list | None | automation related property names found on window or document | Not listed |
count | integer | None | 0 in an ordinary browser | Not listed |
Technical limits
- Names vary by version
- Patched by stealth plugins
- Says nothing about intent
The story
What it is
Automation tools sometimes leave their own handwriting on the page. Defenders keep a list of the known handwriting.
For you
You never see it. A normal browser has none of these names. Test tools you run may be spotted by them.
For makers
Keep your list current and match exact known names, not loose patterns, to avoid false positives. Treat a hit as strong, and a miss as meaning nothing.
Where you see it
| Type | Example | Apps |
|---|---|---|
| security | A web firewall flags sessions that carry a cdc_ marker on the document. | Cloudflare |
| shopping | A ticket seller blocks scripted browsers with Playwright marks. | None named |
| games | A browser game bans accounts whose window has automation bindings. | None named |
| ads | An ad network discards views with PhantomJS marks. | None named |
| developer | A tester checks a bot detection page to see which marks their framework leaves. | Selenium, Playwright |
| analytics | A traffic tool flags visits with known automation names as bots. | None named |
Risks
- Blocks useful automation
- Easy to patch
What the platform says
- Selenium: WebDriver documentation. Docs describe the browser automation standard and its drivers.
Good uses and abuse
Legitimate uses
- Bot defense
- Fraud scoring
Known abuse
- Blocking legitimate agents
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.2 | Rough identifying entropy, when known |
History
- 2016, Chrome: cdc_ style ChromeDriver marks widely documented by bot detection write ups
Related capabilities
Related
- Automation (webdriver) flag. Can tell if Selenium, Playwright, or Puppeteer is controlling the browser
- DevTools Protocol side effect. Can tell that a debugging tool is attached to the browser
- Headless runtime mismatches. Can tell when the page has no real desktop behind it
- Bot detection and CAPTCHA signals. Can combine many browser and network clues to guess if you are a bot
Sources
How well checked: Inferred from related behavior.