Seatext library / BotRefund evidence
Signs of a Playwright Bot in Browser API Behavior: A Diagnostic Guide
Playwright bots reveal themselves through mismatches in browser APIs that real browsers don't produce — missing or altered navigator.webdriver flags, inconsistent permissions objects, canvas rendering differences, and init-script patches that break when checked from...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
Playwright and similar automation frameworks leave detectable traces when they patch or hide browser APIs. The most common signs include a missing or spoofed navigator.webdriver flag, permissions objects that don't match the browser's actual capabilities, canvas fingerprint inconsistencies, and initialization scripts that behave differently inside a clean iframe versus the top-level window. These anomalies appear because automation tools must modify native browser behavior to avoid trivial detection, but those modifications create new inconsistencies when the browser is probed from multiple angles.
A single API anomaly is not a bot verdict. Privacy extensions, corporate proxies, unusual hardware, and legitimate testing tools can produce similar deviations. Reliable identification requires treating each API mismatch as one piece of independent evidence, then cross-checking it against network attributes, device characteristics, and behavioral patterns such as mouse movement, scroll timing, and click sequences. The sections below walk through the specific API signals, why they occur, how they are validated, and where the approach reaches its limits.
What "Playwright bot" means in practice
When analysts refer to a Playwright bot, they mean a Chromium, Firefox, or WebKit instance driven by the Playwright library — typically in headless or headful mode — that executes scripted navigation, clicks, form fills, and data extraction. The library injects initialization scripts before any page code runs, allowing it to override or hide properties such as navigator.webdriver, navigator.plugins, navigator.languages, and the Permissions API. These overrides are necessary for the automation to function without immediate blocking, but they create subtle divergences from a genuine user session.
How browser API checks work
Detection systems load a series of lightweight scripts that query standard browser APIs from different execution contexts: the top-level page, a clean sandboxed iframe, and occasionally a dedicated worker. Each context should return consistent values for properties like navigator.webdriver, screen.colorDepth, canvas.toDataURL(), and the results of navigator.permissions.query(). Automation frameworks often patch the top-level context but miss the iframe or worker, producing a mismatch that a real browser does not generate. BotRefund's Playwright Init Scripts check is one of 106 independent checks that follow this pattern, treating each mismatch as objective evidence rather than a final verdict.
Key signs in browser API behavior
- navigator.webdriver flag: A genuine browser returns
falseorundefined. Playwright sets it totrueby default; stealth plugins attempt to delete or spoof the property, but the deletion itself can be detected via property descriptor inspection. - Permissions API inconsistencies: Calls to
navigator.permissions.query({name:'notifications'})or'geolocation'may return a state that contradicts the browser's actual permission UI or the user's known settings. - Canvas rendering differences: Drawing operations (e.g.,
fillText,drawImage) produce slightly different pixel outputs in headless mode or when GPU acceleration is disabled, causing fingerprint hashes to diverge from known-good baselines. - Init-script leakage: Playwright's preload scripts run before page load. If a detection script executes inside a clean iframe that did not receive the same preload, the iframe's APIs reflect the native browser while the top window shows patched values — a direct mismatch.
- Plugin and mime-type arrays:
navigator.pluginsandnavigator.mimeTypesare often empty or truncated in automated sessions, whereas real browsers typically list several entries. - Language and locale mismatches:
navigator.languages,navigator.language, andIntl.DateTimeFormat().resolvedOptions().timeZonemay be set to generic defaults that don't align with the IP geolocation or the OS locale.
Why single signals are not verdicts
Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people. BotRefund keeps each signal as evidence — not a verdict — and cross-checks it against independent browser, network, device, and behavior data. The three-step framework is: (1) independent evidence from one check, (2) cross-checked context to see whether other signals support the same story, and (3) an AI prediction model that weighs the complete pattern instead of trusting a raw rule. This corroboration approach is what enables the reported 99% accuracy.
Cross-checking process: from signal to decision
- Collect independent evidence: Run the Playwright Init Scripts check alongside other browser checks (clean-context iframe, canvas fingerprint, plugin enumeration, etc.). Each produces a boolean or categorical result.
- Assemble context vectors: Attach network data (IP reputation, ASN, proxy/VPN likelihood), device data (screen resolution, battery API, hardware concurrency), and behavioral data (mouse tremor, scroll variance, click timing, session duration patterns).
- Apply the prediction model: The model evaluates how all signals fit together. A cluster of API mismatches combined with superhuman input speed (<1 ms), grid-aligned mouse paths, and data-center IP raises confidence; the same API mismatches with human-like tremor, residential IP, and varied scroll pauses lower it.
- Produce a session-level explanation: The output includes click IDs, campaign details, timestamps, session recordings, and signal-by-signal reasoning formatted for Google and Meta refund reviews.
Common evasion attempts and why they fail
| Evasion technique | What it changes | Where it breaks |
|---|---|---|
| Stealth plugin deleting navigator.webdriver | Removes the property from top window | Property descriptor shows deletion; clean iframe still has native value |
| Overriding Permissions API responses | Returns 'granted' for all queries | Inconsistent with actual browser UI state; mismatches clean iframe |
| Canvas noise injection | Adds random pixels to defeat fingerprinting | Noise pattern is statistically detectable; differs from GPU/driver variance |
| Faking navigator.plugins array | Populates with common plugin names | Plugin objects lack expected methods; mime-type mapping inconsistent |
| Residential proxy rotation | Hides data-center IP | Does not fix browser API mismatches; behavioral signals remain |
Limitations and when this advice does not apply
- Legitimate automation: Accessibility testing, performance monitoring, and QA pipelines using Playwright will trigger the same API signals. The cross-checking step (behavioral + network context) is what separates malicious bots from authorized tooling.
- Advanced persistent bots: Well-resourced operators may run real browsers with injected scripts rather than headless automation, reducing API anomalies. Detection then relies more heavily on behavioral and network signals.
- Privacy-hardened browsers: Hardened Firefox or Brave configurations can mimic some API mismatches (e.g., empty plugin lists). False-positive risk rises without the full corroboration pipeline.
- Single-signal rules: Any rule that blocks on
navigator.webdriver === truealone will catch basic scripts but miss stealth configurations and generate false positives from privacy tools.
Key facts
| Fact | Detail | Source |
|---|---|---|
| Independent checks in BotRefund pipeline | 106 browser, network, device, and behavior checks | S1 |
| Playwright Init Scripts check purpose | Detects mismatches from automation preload scripts | S1 |
| Single-anomaly policy | Each signal is evidence, not a verdict; cross-checked against other vectors | S1 |
| Corroboration steps | Independent evidence → cross-checked context → AI prediction | S1 |
| Reported detection accuracy | 99% when session evidence supports it | S1, S2, S7 |
| Refund-ready report components | Click IDs, campaign details, timestamps, session recordings, signal-by-signal reasoning | S2 |
| Client refund recovery rate | 83% of 2,500+ audited brands recover funds from Google and Meta | S2 |
| Behavioral signals tracked | Ghost clicks, honeypot traps, robotic mouse paths, absent tremor, superhuman speed, grid-aligned movement, static sessions, unnatural durations | S2 |
| Estimated bot click waste | Up to 20% of Google and Meta ad budget | S2 |
| Server-side vs client-side audits | Server-side catches basic scrapers; client-side needed for advanced botnets | S3 |
FAQ
Can a Playwright bot perfectly mimic a real browser's APIs?
Not with current public tooling. Stealth plugins close many gaps, but they cannot simultaneously satisfy every execution context (top window, clean iframe, worker) while also matching GPU-backed canvas rendering, hardware-concurrency reports, and behavioral micro-patterns such as mouse tremor. The more complete the mimicry, the more the bot resembles a real browser — at which point it effectively is one, running on real hardware with a real user profile.
Does headless mode always produce more API anomalies than headful?
Headless mode historically disabled GPU acceleration and produced distinct canvas fingerprints, but modern headless Chrome with --enable-gpu narrows the gap. The init-script and iframe-context mismatches persist regardless of headless/headful because they stem from Playwright's preload architecture, not the rendering path.
How do privacy extensions affect these signals?
Extensions that spoof navigator.webdriver, block canvas reads, or randomize plugin lists create the same API mismatches as automation. That is why cross-checking against behavioral signals (mouse movement, scroll variance) and network context (residential IP, ISP reputation) is essential — privacy users behave like humans; bots do not.
What is the clean-context iframe check and why does it catch Playwright?
A sandboxed iframe created after page load does not inherit Playwright's preload scripts. Its navigator, screen, and canvas APIs reflect the native browser. Comparing top-window values against iframe values reveals patches that only exist in the automated context. This is the Clean Context Iframe check described in BotRefund's documentation.
When should I escalate from API checks to a full refund claim?
When the corroboration pipeline yields high-confidence bot sessions tied to paid clicks (GCLID, FBCLID, click IDs) and the volume represents a meaningful share of spend. BotRefund's reports are formatted for Google and Meta review teams; the 83% recovery rate across 2,500+ audits reflects the combination of 99% detection confidence and platform-acceptable evidence packaging.
Can I run these API checks myself without a vendor?
You can script the individual checks (webdriver flag, permissions query, canvas hash, iframe comparison) in your own tag manager or edge worker. The difficulty lies in maintaining baseline databases for canvas fingerprints, plugin enumerations, and behavioral distributions across browser versions, and in building the cross-checking model that weighs signals without over-fitting. Most teams find the maintenance burden exceeds the cost of a managed service.
What changes if I ignore Playwright API signals?
You lose the earliest, cheapest layer of evidence. Server-side logs (IP, user-agent) miss bots that run on residential proxies with real browser fingerprints. Client-side API checks catch the automation framework itself, before behavioral patterns even emerge. Ignoring them forces reliance on downstream signals that are easier to spoof or that require more session data to reach confidence.
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
How BotRefund can help
BotRefund runs the Playwright Init Scripts check alongside 105 other browser, network, device, and behavioral checks. Each signal feeds a prediction model that weighs the full pattern — not a single rule — to reach up to 99% confidence when the evidence supports it. The output is a refund-ready report with click IDs, campaign details, timestamps, session recordings, and signal-by-signal reasoning formatted for Google and Meta review teams. Across 2,500+ audits, 83% of clients recover funds.
Limitation: the system treats every anomaly as evidence, not a verdict. Legitimate automation (QA, accessibility testing) and privacy-hardened browsers can produce similar API mismatches. The cross-checking step — behavioral micro-patterns, network context, device consistency — is what separates malicious bots from authorized tooling. If your traffic includes significant legitimate automation, you will need to whitelist known test suites or accept a higher review workload.