Seatext library / BotRefund evidence
Playwright Without Detection: A Practical Checklist That Works
To use Playwright without being detected, treat stealth as a layered checklist: install a stealth plugin, rotate user-agents, manage cookies and browser context, avoid headless mode when you can, and fix the tell-tale mismatches...
✓ Built for advertisers who need clear, refund-ready traffic evidence.
The short answer: stealth is a checklist, not a plugin
There is no single switch that makes Playwright undetectable. The realistic goal is to reduce the number of mismatches a bot-detection system can find. This article gives you an ordered implementation checklist, the prerequisites, and one way to verify your work.
Detection services such as BotRefund do not look for one "bot tell". They look for a cluster of evidence across browser, network, device, and behavior data. One anomaly is not a verdict. So your job is to make the whole browser session behave like a normal human session.
Before you start: what you need
- A Playwright project that already works. Get your script working without stealth first. Stealth is a layer on top, not a starting point.
- A recent version of Playwright. Keep it updated. Older versions leak more signals.
- A real browser profile to model. Study how a human browser behaves, then mimic it.
- A test target. Use a detection demo page to verify your setup. Do not test only on the site you intend to automate; you risk being blocked before you learn anything.
The 7-step readiness checklist
- Install and configure a stealth plugin. Playwright patches some automation signals, but not all. A dedicated stealth plugin (for example, playwright-extra with the stealth plugin) hides common markers such as
navigator.webdriver. - Disable or manage the headless mode. Headless Chromium is easier to detect than headed mode. Use headed mode when possible, or use the new headless mode if the site allows it. This is one of the first checks a detector can run.
- Rotate user-agents and viewport settings. A desktop user-agent should match a desktop viewport, and a mobile user-agent should match a mobile viewport. Mismatches are easy signals.
- Handle cookies and storage. Load a realistic cookie jar. A fresh session with no cookies is not normal for a returning user. Use
context.addCookies()or persist a browser context between runs. - Fix WebDriver and CDP leaks. The property
navigator.webdriveris the classic leak. Stealth plugins handle this, but verify it yourself. Also checkwindow.chrome, permissions, and plugins list. - Add human-like delays and actions. Real users move the mouse, scroll, pause, and type with variable speed. Add realistic waits. Do not click at machine speed with zero variation.
- Rotate IP and proxy behavior carefully. Datacenter IPs are a known signal. If you rotate proxies, make sure the IP matches the browser language, timezone, and locale. A US IP with a Europe timezone is a mismatch.
Why stealth often fails anyway
This is the part most guides skip. Detection systems do not trust a single browser property. They cross-check several angles.
Consider BotRefund's Playwright Init Scripts check. It is one of 106 independent checks. The idea is simple: automation tools patch or hide browser APIs, but those changes can break when the browser is checked from another angle. A normal browser runs standard APIs as designed. An automated browser often shows a patch that only works from one direction.
That is why a plugin that passes one detection demo page can still fail on a site that uses a different detection method. A single anomaly is not a verdict, but a cluster of anomalies is.
How to verify your setup (one concrete step)
Run your script against a detection demo page, then check three things in the returned report:
- Is
navigator.webdriverfalse? If it is true, your stealth plugin is not working. - Does your user-agent match your viewport and platform? A Mac user-agent with a Windows-specific WebGL renderer is a mismatch.
- Are there any "suspicious" flags for CDP, headless, or missing plugins? If yes, fix that one signal and re-run.
Do not stop at one demo page. Try two or three different detection demos. A setup that passes all of them is much more durable.
The main options and trade-offs
- Stealth plugin vs. manual patches. A plugin is faster and covers the common leaks. Manual patches give you control but take time and break on browser updates.
- Headed vs. headless. Headed is harder to detect but slower and needs a display. Headless is convenient but easier to flag.
- Fresh context vs. persisted profile. A fresh context is clean but looks like a new visitor every time. A persisted profile looks more human but can carry old cookies and storage that cause other issues.
- Home IP vs. proxies. Home IP is realistic but limited. Proxies scale better but introduce IP reputation risk.
Key facts: what bot detection really checks
| Detection signal | What it looks for | Stealth practice |
|---|---|---|
| Playwright init scripts | Patched or hidden browser APIs that break when checked from another angle | Use a stealth plugin and verify on multiple demo pages |
| Headless markers | Missing head, unusual rendering context | Prefer headed mode or the new headless mode |
| User-agent vs. viewport | Mismatched platform, screen size, timezone | Keep all browser context consistent |
| Cookies and storage | Empty cookie jar on a "returning" visitor | Persist or seed a realistic context |
| Behavior timing | Machine-speed clicks, zero variation | Add human-like delays and mouse movement |
| Network and IP | Datacenter IPs, mismatched locale | Match IP, language, and timezone |
Limitations: when this advice does not apply
Stealth practices do not guarantee success. They reduce the chance of detection. A determined detection system with cross-checked evidence will eventually flag a session that has too many mismatches.
The advice also changes with your use case. Testing your own site does not need stealth at all; Playwright is a legitimate testing tool. Scraping a competitor's site may violate terms of service. That is a legal and policy issue, not a technical one.
BotRefund's own documentation is honest about this. A single anomaly is not a bot verdict. Privacy tools, travel, corporate networks, and unusual devices can produce unexpected behavior for genuine people. Detection services keep signals as evidence, not verdicts, and cross-check them.
Terminology you will see
- User-agent: A string that tells the website which browser and operating system you are using.
- Headless mode: Running a browser without a visible window.
- CDP (Chrome DevTools Protocol): The protocol Playwright uses to control the browser. Its presence is a detection signal.
- WebRTC leak: A way websites can read your real IP address even when using a proxy.
- Fingerprinting: Collecting many small browser properties to identify a unique browser.
FAQ
Does using Playwright with stealth guarantee I will not be detected?
No. Stealth reduces the number of anomalies, but a detection system that cross-checks browser, network, device, and behavior data can still flag a session. There is no guarantee.
Is headless mode the main reason I get detected?
It is a common reason, but not the only one. The navigator.webdriver flag, CDP presence, and inconsistent user-agent details are equally common leaks.
What is the cheapest way to start?
Start with the free layers: use a stealth plugin, run headed mode, match your user-agent to your viewport, and seed cookies. Test on a detection demo page before testing on your real target.
How do I know if my stealth setup works?
Run it against a detection demo page and read the report. If the report shows WebDriver or headless flags, fix those signals and re-run. Try more than one demo page.
Should I use a proxy?
Only if you need IP rotation or geo-targeting. A proxy adds its own risk: datacenter IPs are a known signal, and a proxy that mismatches your browser timezone creates a new anomaly.
Is stealth the same for scraping and testing?
No. For testing your own site, stealth is not needed. For scraping or automation on sites you do not control, stealth may be against their terms of service.
Final check before you go
Run this five-point sanity check on your script:
- WebDriver flag is hidden.
- Headless is off or using the modern headless mode.
- User-agent, viewport, and timezone match.
- Cookie jar is realistic.
- Actions have human-like delays.
If you pass all five on two different detection demo pages, your Playwright setup is about as stealthy as it can reasonably be.
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 you verify your session
BotRefund's Playwright Init Scripts documentation explains one of the 106 independent checks used to build a reliable picture of whether a visit is human or automated. If you want to know what a detection service actually looks for, that page shows you the mismatch that automation tools create.
It also shows the limitation clearly: a single anomaly is not a bot verdict. So if you are building a stealthy Playwright setup, the useful part is understanding how detection systems cross-check evidence across browser, network, device, and behavior data.