Seatext library / BotRefund evidence
Common Signs Your Playwright Script Is Being Detected (And What to Do Next)
When a site detects Playwright automation, you'll typically see CAPTCHAs, HTTP 403 errors, unexpected redirects, or console warnings about automation. These symptoms appear because detection systems spot inconsistencies in browser fingerprints, network behavior, or...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
If your Playwright scripts suddenly hit CAPTCHAs, receive 403 responses, get redirected to challenge pages, or show navigator.webdriver warnings in the console, the target site has likely flagged your automation. These are the most visible symptoms, but they're only the surface layer. Modern bot detection — like the 106-signal approach BotRefund documents — correlates browser API mismatches, network timing, pointer behavior, and session flow before issuing a challenge or block.
Immediate Symptoms You'll Notice First
The clearest signals appear in the browser itself. A CAPTCHA challenge on a page that normally loads cleanly is the most common sign. HTTP 403 (Forbidden) or 429 (Too Many Requests) responses on valid URLs indicate the edge layer has classified the session as automated. Unexpected redirects to /challenge, /verify, or a CDN interstitial page serve the same purpose. In the DevTools console, you may see warnings like "Automation controlled" or "WebDriver detected" — these come from the browser exposing navigator.webdriver=true or from detection scripts probing for Playwright-specific properties such as window.__playwright or document.__playwright_script.
Less obvious but equally telling: pages load but critical elements (buttons, forms, product grids) remain hidden or disabled. Some sites serve a "clean" HTML shell to suspected bots while withholding the dynamic content real users see. If your script's selectors suddenly stop matching, the DOM you're querying may be a decoy.
Browser-Level Fingerprint Mismatches
Playwright launches real Chromium, Firefox, or WebKit binaries, but the automation layer patches several APIs to enable control. Detection scripts check for the side effects of those patches. The Playwright Init Scripts check documented by BotRefund looks for a mismatch that a real browsing session does not normally create: automation tools often patch or hide browser APIs, but those changes can break when the browser is checked from another angle (S1). Common vectors include:
navigator.webdriverforced totrue(or missing entirely in stealth modes)- Missing or inconsistent
navigator.plugins,navigator.mimeTypes, ornavigator.permissionsstate - Canvas/WebGL fingerprint differences caused by headless rendering paths
window.chromeobject shape deviations (Playwright's Chromium builds differ from consumer Chrome)- JavaScript execution timing anomalies —
performance.now()resolution, event loop tick order, orrequestAnimationFramecallbacks that don't align with vsync
A single anomaly is not a bot verdict. Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people (S1). Detection systems therefore treat each mismatch as evidence, not a verdict, and cross-check it against independent browser, network, device, and behavior data.
Network and Transport Layer Signals
Even with a perfect browser fingerprint, the network path can reveal automation. TLS fingerprinting (JA3/JA4) compares the Client Hello packet against known browser builds. Playwright's bundled browsers often produce a JA3 signature that differs from the current stable Chrome release. HTTP/2 frame ordering, header compression dynamics, and ALPN negotiation order are also fingerprinted.
IP reputation matters. Requests from data-center ASNs, known VPN exit nodes, or proxy pools trigger higher scrutiny. If your script rotates IPs but the subnet reputation is poor, you'll see challenges increase. Connection reuse patterns — keeping a single TCP connection for dozens of requests with no think time — deviate from human browsing where connections open, idle, and close naturally.
Behavioral and Timing Anomalies
Human interaction has micro-variance: mouse movements follow curved paths with acceleration/deceleration, clicks have pre-click hover dwell, scroll events arrive in bursts tied to trackpad or wheel physics. Playwright's default page.click() and page.fill() execute in single event-loop ticks with zero pointer travel. Detection systems record pointer trajectories, scroll delta distributions, keystroke inter-arrival times, and focus/blur sequences. A session that navigates three pages in four seconds with zero mouse movement is statistically implausible.
Session flow also matters. Humans rarely visit /checkout directly from an ad click without viewing product pages, reading reviews, or pausing. Scripts that follow a linear, high-speed path through a funnel create a behavioral cluster that correlates strongly with automation.
How Detection Systems Corroborate Signals
BotRefund's approach illustrates the industry standard: 110+ behavioral, browser, hardware, network, and attribution signals feed a prediction model that weighs the complete pattern instead of trusting a raw rule (S1, S2). The Playwright Init Scripts check contributes one objective fact. That signal enters an AI prediction layer that evaluates the complete picture across browser, network, device, and behavior evidence. By seeing how all signals fit together, the model identifies a visit as bot or human with 99% accuracy (S1). This corroboration logic means fixing one vector (e.g., spoofing navigator.webdriver) rarely suffices — the model still sees the network, timing, and behavioral gaps.
Common Mistakes That Increase Detection Risk
| Mistake | Why It Fails | Better Approach |
|---|---|---|
Relying only on stealth plugins to hide navigator.webdriver | Plugins patch a few properties but leave canvas, WebGL, TLS, and timing untouched | Treat stealth as one layer; pair with realistic behavioral profiles and residential proxies |
| Running headless mode in production | Headless Chromium exposes distinct GPU/renderer strings and lacks audio/video codecs | Use headed mode with a virtual display (Xvfb) or a real desktop session |
| Fixed, fast navigation cadence | Creates a timing fingerprint no human matches | Add randomized think time, scroll pauses, and occasional back-navigation |
| Single IP or data-center proxy pool | IP reputation feeds flag the entire subnet | Rotate across residential or mobile IPs; maintain session stickiness per IP |
| Ignoring cookie/consent state | Missing consent cookies or GDPR banners signal a fresh, script-driven session | Persist cookie jars across runs; handle consent flows like a user would |
| No pointer or scroll simulation | Zero mouse events on interactive pages is a strong bot signal | Use page.mouse.move() with bezier curves; scroll in variable increments |
Diagnostic Order: From Symptom to Root Cause
- Confirm the symptom is detection, not a site change. Open the same URL in a manual browser session. If it loads normally, the issue is your script's fingerprint.
- Check the console for automation warnings. Look for
navigator.webdriver,__playwright, or custom detection script logs. - Inspect network responses. 403/429 on HTML, or 200 with a challenge body, confirms edge-layer blocking.
- Compare TLS fingerprints. Capture a Client Hello from your script and from a real browser on the same OS; compare JA3/JA4 hashes.
- Audit behavioral telemetry. Record a session replay (Playwright's
page.videoor a custom event logger) and review mouse, scroll, and timing distributions. - Test one vector at a time. Swap proxy type, then toggle headless, then add behavioral delays. Isolate which change reduces challenges.
Corrective Actions by Detection Type
Browser Fingerprint Challenges
- Use a persistent user-data-dir with a real Chrome/Edge profile (cookies, extensions, history) instead of a throwaway context.
- Match the target browser version exactly — download the same Chrome build your users run.
- Apply a maintained stealth library (e.g.,
playwright-extra-plugin-stealth) but verify each patched property against a real browser baseline.
Network/TLS Challenges
- Route traffic through a residential or mobile proxy provider with clean ASN reputation.
- Enable HTTP/2 and match the header order/priority of the target browser (use
page.setExtraHTTPHeaderscarefully). - Consider a TLS fingerprinting proxy (e.g.,
utlsormitmproxywith custom Client Hello) if JA3 mismatch is the blocker.
Behavioral Challenges
- Implement a behavioral profile: randomized click offsets, bezier mouse curves, variable scroll velocity, human-like typing cadence (50-150ms per keystroke).
- Add "idle" periods where the script waits for
requestAnimationFramecycles without acting. - Simulate focus/blur cycles when switching tabs or windows.
Key Facts
| Fact | Detail | Source |
|---|---|---|
| Playwright Init Scripts check | One of 106 independent checks BotRefund uses to build a reliable picture of whether a visit is human or automated | S1 |
| Detection philosophy | Single anomaly is not a bot verdict; signals are kept as evidence and cross-checked against independent browser, network, device, and behavior data | S1 |
| Accuracy claim | 99% accuracy from corroboration across 110+ signals, not from one browser tell | S1, S2 |
| Refund-ready reporting | Reports include click IDs, campaign details, timestamps, session recordings, and signal-by-signal reasoning in a format Google and Meta accept | S2 |
| Client recovery rate | 83% of 2,500+ audited brands recover funds from Google and Meta | S2 |
Limitations and When This Advice Doesn't Apply
This article covers detection signals visible to the automation operator. It does not cover server-side fingerprinting that occurs before JavaScript executes (e.g., TCP/IP stack analysis, TLS fingerprinting at the load balancer) in full depth — those require infrastructure-level changes. The corrective actions assume you control the Playwright script and its execution environment. If you're using a managed scraping service, your leverage is limited to the provider's configuration options. Sites that enforce hardware-attested attestation (Apple Private Access Tokens, Google WEI, Cloudflare Turnstile with device binding) cannot be bypassed by browser-layer fixes alone.
FAQ
Why does my script work locally but fail in CI/CD?
CI runners often use headless Chromium in containers with no GPU, distinct font stacks, and data-center IPs. The combined fingerprint (headless + container + cloud IP) triggers detection that a local headed Chrome on a residential IP avoids.
Can I just rotate user-agents to avoid detection?
No. User-agent is one of the weakest signals. Modern detection correlates UA with TLS fingerprint, canvas rendering, JS engine quirks, and behavior. A mismatched UA/Client-Hello pair is a stronger bot signal than a static UA.
How do I know if a CAPTCHA is triggered by my fingerprint or my IP?
Run the same script from two clean IPs (one residential, one data-center) with identical browser config. If only the data-center IP gets challenged, IP reputation is the primary factor. If both get challenged, the browser fingerprint or behavior is the cause.
Does Playwright's stealth mode guarantee evasion?
No. Stealth plugins patch known detection vectors at the JS layer. They don't alter TLS fingerprints, GPU renderer strings, audio stack, or behavioral timing. They raise the bar but don't clear it against systems that corroborate 100+ signals.
What's the difference between a challenge and a hard block?
A challenge (CAPTCHA, Turnstile, interstitial) lets the session continue if solved. A hard block (403, connection reset, empty response) terminates the session. Challenges are often fingerprint-based; hard blocks often indicate IP reputation or rate-limit triggers.
Should I mimic a specific real browser version exactly?
Yes. Match the major.minor.build.patch of the Chrome/Edge/Firefox version your target audience uses. Mismatched versions produce inconsistent navigator.userAgentData, navigator.userAgent, and Client Hello signatures that detection systems flag.
Can behavioral simulation be detected?
Poorly implemented simulation (perfect bezier curves, fixed delays, no micro-jitter) is detectable. High-quality simulation adds per-session variance: randomized control points, log-normal delay distributions, occasional overshoot/correction. The goal is statistical indistinguishability, not perfection.
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 adds an onsite evidence layer that captures the same browser, network, device, and behavioral signals detection systems use — but for your benefit. It records 110+ signals per session, ties each visit to its click ID and campaign, and produces refund-ready reports formatted for Google and Meta review. If invalid traffic is inflating your ad costs, BotRefund helps you document it and recover spend. The system does not replace your edge security (WAF, CDN); it supplements it with marketing-focused attribution and evidence preservation.