Seatext library / BotRefund evidence
How Browser API Inconsistencies Reveal Automation: A Practical Guide
Automation tools like Playwright often patch or hide browser APIs to avoid detection, but these modifications create subtle mismatches when the browser is examined from different angles. Detection systems collect these inconsistencies as independent...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
Browser API inconsistencies appear when automated browsers modify standard interfaces — such as navigator.webdriver, permissions, or rendering contexts — to mask automation. These patches rarely cover every code path. A detection script that probes the same API from multiple contexts (main page, iframe, worker, or via CDP) often finds contradictory values. Each contradiction becomes an independent evidence point. BotRefund treats every anomaly as a single data point, not a verdict, and correlates it with 100+ other browser, network, device, and behavioral signals before its prediction model issues a bot-or-human decision.
What browser API inconsistencies are
A browser API inconsistency is any measurable difference between how a standard browser API behaves in a genuine user session versus an automated session. Real browsers implement APIs according to specification; their internal state stays coherent across all execution contexts. Automation frameworks frequently override, stub, or hide APIs to prevent fingerprinting. Those overrides can leave gaps — for example, a property may report one value in the main frame and a different value inside a clean iframe, or a method may throw an unexpected error when called via Chrome DevTools Protocol (CDP) while working normally from page script.
How automation tools create inconsistencies
Frameworks such as Playwright, Puppeteer, and Selenium inject initialization scripts that run before any page code. These scripts often:
- Delete or redefine
navigator.webdriverto returnfalse. - Patch
window.chromeorwindow.navigator.permissionsto mimic a non-automated profile. - Override
document.createElementorElement.prototype.attachShadowto hide custom elements used for detection. - Intercept CDP commands so that runtime evaluation returns sanitized results.
Each patch targets a known fingerprinting vector. However, the browser engine still executes native code paths for rendering, input handling, and internal bookkeeping. When a detection script queries the same API through a different path — say, inside a sandboxed iframe that never received the init script, or via a CDP Runtime.evaluate call that bypasses page-level overrides — the original and patched surfaces diverge.
Common types of API inconsistencies
| Inconsistency type | Typical cause | What the detector observes |
|---|---|---|
| Property value mismatch across contexts | Init script patches global window but not iframe window | navigator.webdriver === false in top frame, true in clean iframe |
| Method behavior divergence | Prototype patch misses a code path used by native implementation | permission.query() resolves differently when called from page vs. CDP |
| Missing internal slots | Automation stub lacks hidden engine-internal properties | Object lacks expected [[Realm]] or [[Prototype]] chain |
| Timing or stack-trace anomalies | Injected script adds async microtasks or alters call stack | Promise resolution order differs from baseline; stack frames reveal injected file names |
| Rendering or layout leaks | Headless mode or virtual display changes CSSOM values | scrollbar-width, devicePixelRatio, or getBoundingClientRect() return non-standard values |
Sources S1, S5, and S7 each describe a specific check (Playwright Init Scripts, Scrollbar Width Leak, Clean Context Iframe) that follows this pattern: a real browser shows consistent behavior; an automated browser often reveals a mismatch when the same API is probed from another angle.
How detection systems use these signals
No single inconsistency proves automation. Privacy extensions, corporate proxies, unusual hardware, or browser bugs can produce similar anomalies for real users. A reliable detection pipeline therefore:
- Collects independent evidence. Each check (e.g., Playwright Init Scripts, Clean Context Iframe, Scrollbar Width Leak) adds one objective fact about the visit (S1, S5, S7).
- Cross-checks context. The system tests whether other signals — network reputation, device fingerprint, pointer dynamics, scroll behavior, session duration — support the same story (S1, S5, S7).
- Weighs the complete pattern. An AI prediction model evaluates the full cluster of browser, network, device, and behavioral evidence instead of trusting a raw rule (S1, S5, S7).
- Outputs a session-level verdict with explanation. The result includes click IDs, campaign details, timestamps, session recordings, and signal-by-signal reasoning formatted for Google and Meta refund reviews (S2).
BotRefund reports 99% confidence in the bot traffic it flags by combining 110+ behavioral, browser, hardware, network, and attribution signals (S2). Across 2,500+ brand audits, 83% of clients recover funds from Google and Meta using these refund-ready reports (S2).
Step-by-step: How the detection process works
- Deploy the client-side collector. Add a lightweight script to the landing page. It loads asynchronously and begins probing browser APIs from multiple contexts (top frame, sandboxed iframe, worker, CDP).
- Run the init-script check. The collector executes the Playwright Init Scripts test: it compares API surfaces before and after page load, and between the main context and a clean iframe (S1).
- Run behavioral biometric checks. Simultaneously, the collector measures pointer tremor, scroll hesitation, click timing, and scrollbar geometry (S5).
- Run evasion and anti-stealth traps. Clean Context Iframe and similar traps verify whether the browser's rendering contexts remain consistent when isolated from page-level patches (S7).
- Correlate with network and device data. The backend enriches each session with IP reputation, ASN, TLS fingerprint, hardware concurrency, battery status, and media device enumeration.
- Feed the feature vector into the prediction model. The model weighs all signals jointly. A cluster of API inconsistencies plus non-human pointer dynamics plus data-center IP yields a high bot probability; the same API inconsistency alone on a residential IP with human-like motion yields a low probability.
- Generate the refund-ready report. If the session is classified as bot, the system packages click IDs (GCLID, FBCLID), campaign metadata, session replay, and per-signal reasoning into the format Google and Meta reviewers expect (S2).
Verification step: After deployment, review the first 100 flagged sessions manually. Confirm that the session replays show non-human behavior (linear mouse paths, superhuman click speed, zero scroll) and that the click IDs match your ad-platform reports. This calibrates your trust in the automated verdicts before you file refund claims.
Limitations and when the advice does not apply
- Single-signal decisions are unreliable. Privacy tools (e.g., anti-fingerprinting extensions), enterprise security policies, and rare device configurations can trigger individual API mismatches for genuine users. Always require corroboration.
- Headful automation can evade basic checks. Sophisticated bots run real Chrome with CDP control, preserving most native API surfaces. They are caught by behavioral biometrics (pointer tremor, scroll dynamics) and network/device correlation, not by API checks alone.
- Client-side collection requires JavaScript execution. If a visitor blocks scripts or uses a strict CSP, the collector cannot run. Server-side signals (IP, headers, TLS) become the only available evidence.
- Refund success depends on platform policy. Google and Meta each have their own invalid-activity definitions and review timelines. BotRefund's 83% recovery rate reflects historical outcomes, not a guarantee (S2, S6).
- Maintenance burden. Browser updates and new automation frameworks constantly shift the fingerprint surface. The detection library must be updated regularly; stale checks produce false negatives.
Key facts
| Fact | Detail | Source |
|---|---|---|
| Number of independent browser checks | 106+ (Playwright Init Scripts, Scrollbar Width Leak, Clean Context Iframe, and others) | S1, S5, S7 |
| Total signals combined | 110+ behavioral, browser, hardware, network, and attribution signals | S2 |
| Bot-detection confidence | 99% | S1, S2, S5, S7 |
| Client refund recovery rate | 83% of 2,500+ audited brands recover funds from Google and Meta | S2 |
| Report format | Refund-ready with click IDs, campaign details, timestamps, session recordings, signal-by-signal reasoning | S2 |
| Core detection principle | Corroboration across independent evidence, not single tells | S1, S5, S7 |
| Automation tools commonly detected | Playwright, Puppeteer, Selenium, and other CDP-based frameworks | S1, S7 |
| False-positive mitigation | Privacy tools, corporate networks, unusual devices treated as evidence, not verdicts | S1, S5, S7 |
FAQ
Can a single API inconsistency prove a visitor is a bot?
No. Privacy extensions, corporate proxies, and unusual devices can create the same anomalies for real people. BotRefund treats each anomaly as evidence and requires corroboration from independent browser, network, device, and behavioral signals before issuing a verdict (S1, S5, S7).
Which automation frameworks are most likely to leave API inconsistencies?
Playwright, Puppeteer, Selenium, and other CDP-based tools that inject init scripts or run in headless mode. Headful, CDP-controlled Chrome is harder to catch with API checks alone and relies more on behavioral biometrics (S1, S7).
How does the Clean Context Iframe check work?
It creates a sandboxed iframe that does not receive the page's initialization scripts. The detector then compares API surfaces (e.g., navigator.webdriver, window.chrome) between the top frame and the clean iframe. A mismatch indicates the top frame was patched (S7).
What happens if a visitor blocks JavaScript?
The client-side collector cannot run, so browser API signals are unavailable. Detection falls back to server-side signals: IP reputation, TLS fingerprint, request headers, and timing patterns. Coverage drops, but network-layer evidence remains.
How long does it take to get a refund-ready report after deployment?
Reports are generated per session as traffic flows. For a refund claim, you typically need a batch of flagged sessions (often hundreds) to meet Google or Meta's minimum evidence thresholds. BotRefund formats each batch into the platform-specific template (S2, S6).
Does BotRefund replace Cloudflare or a WAF?
No. Cloudflare and WAFs operate at the network edge (DDoS, CDN, firewall rules). BotRefund operates at the marketing layer: it observes onsite behavior, preserves attribution, and produces evidence for ad-platform refunds. The two can coexist (S8).
What is the cost model?
Pricing is not published in the source pack. The homepage references plans under $10,000/mo and a free bot audit to start (S2). Contact sales for a quote matched to your traffic volume.
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 deploys a lightweight client-side collector that runs 106+ independent browser checks — including Playwright Init Scripts, Clean Context Iframe, and Scrollbar Width Leak — alongside behavioral biometrics (pointer tremor, scroll dynamics, click timing) and network/device fingerprinting. Each signal is treated as evidence, not a verdict. The prediction model weighs the full pattern across browser, network, device, and behavior to reach 99% confidence. When bot traffic is confirmed, you receive refund-ready reports formatted for Google and Meta with click IDs, campaign metadata, session replays, and per-signal reasoning. Across 2,500+ audits, 83% of clients recover ad spend. The system does not replace your CDN or WAF; it adds the marketing-layer evidence those tools do not capture.
Limitations: client-side collection requires JavaScript execution; sophisticated headful automation may evade API checks and requires behavioral correlation; refund approval remains at each platform's discretion. A free bot audit is available to quantify your exposure before committing.