Playwright Stealth Not Working? Patchright vs Camoufox (2026)

Bottom line
Last updated: May 27, 2026 — Cloudflare ML v9 · Web Bot Auth era.
- playwright-extra-plugin-stealth = broken for ~18 months against modern Cloudflare, DataDome, and PerimeterX. The plugin still installs, but it can't fix what's actually leaking in 2026.
- The maintained spiritual successor is Patchright — a Playwright fork with patches applied at the CDP layer (the one place monkey-patching never could). For Firefox semantics, Camoufox is the parallel answer.
- Stealth alone is half the problem. For serious anti-bot evasion in 2026 you need stealth-patched browser + residential IPs + CAPTCHA solver + behavioral pacing. Either bundle them yourself (4 vendors, 4 bills) or use a managed stack that ships all four in one API.
Skip to the diagnostic checklist · 5 alternatives · code comparison · decision tree · FAQ. For a deeper walkthrough, see how playwright with residential proxy works.
Want all 5 strategies in one API call?
Human Browser ships Patchright-patched Chromium + residential IPs + CAPTCHA solving + A2A (v0.3) agent loop behind a single endpoint. Pay-as-you-go, no subscription, try it for $1, then top up from $5. Try Human Browser for $1.
Contents
- How we got here — a brief history of Playwright stealth
- Diagnosing why your playwright-stealth setup is failing
- 5 alternatives that work in 2026
- Code comparison — the same scrape, 5 ways
- Decision tree — which stack should you pick
- FAQ (10 questions)

playwright-stealth was a 2022 answer to a 2026 question.
How we got here — a brief history of Playwright stealth
If you opened this post, you probably already know that playwright-extra and puppeteer-extra-plugin-stealth were, for several years, the default answer to "how do I make Playwright look like a real browser." They are still the top StackOverflow answer to that question. Both are excellent pieces of open-source engineering. Both are also, for the purpose you came here for, no longer enough.
Here is the compressed timeline:
- 2019–2022 (golden age):
puppeteer-extra-plugin-stealthships, gets ported to Playwright, and works against virtually every commercial bot detector. The plugin's monkey-patches — hidingnavigator.webdriver, faking Chrome runtime, papering over the iframe.contentWindow leak — are surgical and effective. You add three lines to your script and your scraper passes. - 2023: Cloudflare ships Bot Management v2, DataDome ships v3. Both start fingerprinting combinations of signals rather than individual leaks. Several stealth plugin patches become counterproductive — patching a signal in a way no real browser would creates a new, unique combination that the detectors learn. The plugin maintainers ship fixes, but the cat-and-mouse loop accelerates.
- Mid-2024: The plugin's last substantive update lands. Maintainers are clear in the GitHub issues that keeping up with Cloudflare's release cadence is no longer sustainable as a side project. The ecosystem starts to look for replacements.
- Mid-2025 (the break): Cloudflare rolls out a new TLS fingerprint check (JA4) and a deeper CDP-layer probe that inspects the
Runtime.enablecommand itself — a signal that exists at the DevTools Protocol layer, beneath where any JavaScript-injected monkey-patch can reach. From this point on, no amount ofpage.addInitScriptcan fix the leak. The plugin's architecture is wrong for the problem. - January 2026: Cloudflare ML model v9 ships to all zones. The bot score formula now weights TLS+CDP signals more aggressively than JS-layer signals. Existing scripts that were marginal pass-rates in 2025 hard-fail in 2026.
- May 2026: Cloudflare launches Web Bot Auth, a cryptographic agent-passport standard. Anchor Browser and Browserbase ship first-party support the same week. The industry now has a legitimacy lane in addition to an evasion lane.
The takeaway: the playwright-stealth maintainers are good engineers and the plugin is good software. It is not "broken" in the sense of being abandoned spaghetti — it is broken in the sense that the field moved past JavaScript-layer monkey-patching as the right shape of solution. The replacements (Patchright, Camoufox) accept the same architectural truth and patch at the CDP/binary layer where the signals actually live.
Diagnosing why your playwright-stealth setup is failing
Before you swap stacks, it is worth ruling out the boring reasons. The five things below account for the overwhelming majority of "playwright-stealth not working" reports we see in our inbox.
1. The Runtime.enable / CDP leak (still #1 in 2026)
This is the architectural one. When Playwright (or Puppeteer) attaches to Chromium, it issues a Runtime.enable command over the DevTools Protocol. Modern fingerprinters detect this command by probing for the side-effects it produces on the Chromium process. playwright-extra-plugin-stealth cannot fix this because the leak happens before any JavaScript is injected into the page. Patchright patches it at the protocol layer. If your script gets blocked even on a brand-new residential IP with a perfect user-agent string, this is almost always why.
2. Mismatched user-agent vs CDP / TLS fingerprint
You set the UA to iPhone Safari. Cloudflare sees the request announcing iPhone Safari over a TLS handshake that matches Linux Chrome. JA4 catches this in milliseconds. The fix is either a browser that ships a matching TLS stack (Patchright/Camoufox handle this; Browserbase managed; Human Browser bundled) or a TLS-impersonation layer in front of your scraper (curl-impersonate, but only for headless HTTP — won't work for browser sessions). Pure user-agent string swapping has not been a winning strategy since ~2023.
3. Canvas / WebGL / Audio fingerprints the stealth plugin does not even touch
The plugin's evasion list focuses on the obvious automation flags. It does not normalize canvas hashes, WebGL renderer strings beyond a basic spoof, or AudioContext output. Modern detectors hash all three and cross-reference against a known-good corpus. You need a browser that ships realistic, varied-per-session values for all three — which is Patchright (Chrome-side) or Camoufox (Firefox-side, strongest WebRTC/canvas defaults).
4. Worker / iframe navigator inheritance
The classic gotcha: you patch navigator.webdriver in the main context and call it a day. Then a Web Worker spawns and its navigator object inherits from the original prototype chain — webdriver = true again. Cloudflare's fingerprint script reads worker context. Same for nested iframes on the same origin. playwright-stealth has a partial fix for this; Patchright handles it more comprehensively at the binary level.
5. ML-based behavioral signals you can't fingerprint your way out of
This is the new one. Cloudflare's v9 model weights behavioral telemetry — mouse path entropy, time-on-page, scroll velocity, time-to-first-input — alongside the static fingerprint signals. You can pass every fingerprint check and still get scored as a bot because you typed faster than any human types, or because you clicked the submit button 80ms after the page rendered. No stealth plugin fixes this. The fix is human-paced input loops (Bezier mouse curves, 60–220ms typing intervals, realistic scroll), which is engineering work the plugin was never trying to do.
DIY checklist — 6 tests to confirm it's the plugin, not your setup
- Test on bot.sannysoft.com with playwright-stealth enabled. If you still see red rows, the plugin isn't even doing its baseline job — check that you're invoking
chromium.use(stealth())before launch. - Test on iphey.com — richer report with TLS, audio, canvas. Anything that turns red here is a real leak.
- Run creepjs. If your trust score is below 25%, the JS-layer leaks are bad. Above 50% with the plugin is the realistic ceiling.
- Curl-impersonate the same target. If curl-impersonate-chrome can hit the page and your headless browser can't, the issue is CDP-layer, not network-layer.
- Try the same script with
headless: false. If a visible browser passes and headless fails, you're being detected on a headless-specific signal. (This is the easiest one to test, and the result tells you whether to look at Patchright or just at xvfb-headed.) - Swap to Patchright with one import change. If Patchright passes where playwright-extra fails, the architectural diagnosis is confirmed. If both fail equally, your blocker is IP or behavioral, not stealth.
One-line diagnostic: If curl-impersonate-chrome can reach the target page from your same IP but your Playwright script gets challenged, you have a stealth (CDP-layer) problem. If curl-impersonate also gets blocked, you have an IP/proxy problem. This single test routes 90% of "playwright-stealth not working" tickets correctly.
5 alternatives that work in 2026
Here are the five real options we actively use, recommend, or benchmark against. Each gets an honest take on what it solves, what it doesn't, and when to reach for it.
1. Patchright — the maintained Playwright fork
Best for: Drop-in replacement for playwright-extra-stealth. Chromium semantics, free, self-hosted, the actual successor.
Patchright (and the Patchright Python sibling) is a Playwright fork by Kaliiiiiiiiii-Vinyl. It applies patches at the Chromium / CDP layer that playwright-extra-plugin-stealth structurally cannot apply, including the Runtime.enable leak referenced above, the console.context object signature, and several Worker/iframe navigator inheritance issues. The API surface is identical to upstream Playwright — same page, context, browser, same auto-waiting selectors — so migration is usually one import line.
Install:
npm install patchright
// In your script:
const { chromium } = require('patchright'); // was: require('playwright');
const browser = await chromium.launch({ headless: false });
const ctx = await browser.newContext();
const page = await ctx.newPage();
await page.goto('https://your-target.com');That's it. No chromium.use(stealth()), no plugin chain. The patches are baked into the bundled Chromium build.
What Patchright does NOT solve: residential IPs (bring your own proxy), CAPTCHA challenges (bring your own solver — we cover this in our Turnstile guide), and behavioral pacing (bring your own humanization loop). Patchright is the browser layer. The rest of the stack is your problem.
Pick Patchright if: you already have proxy contracts and a CAPTCHA solver wired up and just need the browser leak fixed.
2. Camoufox — Firefox stealth with C++-level patches
Best for: Hard targets that fingerprint Chromium variants specifically. Strongest WebRTC/canvas/audio defaults of any open-source browser.
Camoufox is a Firefox fork by daijro with anti-fingerprinting patches applied at the C++ source level. Unlike Patchright (which patches the protocol layer of an otherwise stock Chromium), Camoufox modifies the Gecko engine itself — canvas hashes, audio context output, WebRTC IP leaks, and font metrics are normalized below the JavaScript layer. It runs in headless or headful mode and is driven via a standard Playwright Firefox driver.
Install (Python is the more mature target):
pip install camoufox[geoip]
# Download the patched Firefox build (one-time)
python -m camoufox fetch
# In your script:
from camoufox.sync_api import Camoufox
with Camoufox(headless=False) as browser:
page = browser.new_page()
page.goto('https://your-target.com')When to pick Camoufox over Patchright: some Cloudflare Enterprise zones and most DataDome configurations weight Chromium-specific signals heavily (CDP shape, V8 quirks). A Firefox-shaped fingerprint sails through those zones precisely because the detector wasn't trained on Firefox bot traffic. Camoufox is also the stronger answer for canvas-heavy targets — banking, ticketing, and some travel sites whose detector reads canvas hashes as the primary signal.
Caveat: Camoufox is Firefox, so any test recorded against a real Chrome session won't replay cleanly. If your scraping target is Chrome-only (some streaming and DRM cases), this is not the right tool.
3. Anchor Browser — the verified-agent path via Web Bot Auth
Best for: Legitimate AI agents talking to sites that have opted into Cloudflare's verified-bot lane.
Anchor Browser took a different swing at the problem. Instead of evading bot detection, they partnered with Cloudflare to launch Web Bot Auth (reference implementation) in May 2026. Anchor browsers carry a cryptographic agent passport; Cloudflare verifies the signature at the edge; verified traffic passes without challenge on opted-in sites.
This is genuinely a clean architecture for the use case it serves. If your scraper is a known agent with a stable identity (you're building a B2B research tool, a tax-document fetcher, a personal-data exporter) and the long-tail of your target sites are likely to opt into Web Bot Auth over the next 12–18 months, Anchor is the cleanest path forward.
The limitation is that adoption is in month one. The vast majority of Cloudflare-protected sites have not yet enabled the verified-bot lane, which means Anchor will get challenged exactly like any other browser on those sites. The realistic plan: use Anchor where the lane exists, residential+stealth everywhere else.
Pick Anchor if: your scraper has a public identity worth signing, your target sites skew enterprise (more likely to opt in), and you can wait for adoption to catch up.
4. Browserbase + Stagehand — managed Chromium with an agent SDK
Best for: Teams who want a managed cloud Chromium and an LLM-driven agent layer on top, and are comfortable bringing their own proxy and solver.
Browserbase is a managed cloud Chromium service: you call their API, they spin up a remote browser session, you drive it over Playwright-compatible APIs. Their open-source agent layer Stagehand wraps Playwright with LLM-driven natural-language actions (page.act("click the submit button")) and a structured-extraction API.
Stagehand is the strongest open-source agent SDK we've benchmarked against — the natural-language action layer is well-designed and the structured-extraction API is genuinely useful for production. Browserbase as the underlying browser provider ships sensible stealth defaults and joined Web Bot Auth as a launch partner.
What you still bring yourself: the residential proxy contract (Browserbase has a proxy add-on but most teams BYOP), the CAPTCHA solver (separate vendor), and the billing/budget logic if you're running at agent-scale.
Pick Browserbase + Stagehand if: your real bottleneck is the agent layer, not the browser, and you're comfortable assembling the rest of the stack from independent vendors. See our detailed Human Browser vs Browserbase comparison for the side-by-side.
5. Human Browser — Patchright + residential + CAPTCHA + agent loop, one API
Best for: Developer-first teams, AI agent builders, anyone who wants one API and one bill instead of four vendors.
Disclosure: this is us. We're going to be opinionated about why we built it the way we built it, and we'll try to be honest about who it's not for.
Human Browser bundles a real headful Chrome (Patchright-patched Chromium), residential IPs in 75 countries with sticky sessions, a 12-category CAPTCHA solver, and an A2A (v0.3) agent endpoint behind a single API. One call, one bill, all five layers wired correctly out of the box.
The case for the bundle: if you're starting fresh, integrating Patchright + Decodo (or Bright Data) + 2Captcha + Stagehand + a behavioral-pacing layer is roughly two weeks of plumbing before you can scrape your first page. With Human Browser it's one API call. The bundled stack also means we can tune the integration points — sticky-IP-per-session is wired to the browser session ID automatically, captcha solver knows the proxy IP for solver-as-the-IP scenarios, and the A2A endpoint handles the long-poll/webhook patterns agent frameworks expect.
The case against: if you have existing proxy and solver contracts you're happy with, you'll prefer Patchright or Camoufox direct and avoid paying the integration premium. We have no interest in arguing you out of that — the bundle is for the audience that explicitly does not want to manage four vendors.
Pricing (pay-as-you-go, no subscription): $0.10/hr browser time, $4/GB residential proxy, $0.005/captcha, $0.02 per agent step with the AI included. Unused balance never expires. Try it for $1 — about 4 typical tasks; top up from $5. See /pricing for the full breakdown.
Pick Human Browser if: you want to ship in one afternoon instead of two weeks; you're building an AI agent that needs an A2A endpoint; you'd rather have one bill than four.
Code comparison — the same scrape, 5 ways
Same task: hit a Cloudflare-protected target, wait for the page to render, extract the page title and the first 2,000 chars of body text. Same proxy provider where applicable. Counting non-blank, non-import lines so the comparison is fair.
Plain Playwright (broken — the baseline)
// playwright_baseline.js — ~7 lines, blocked on Cloudflare in 2026
const { chromium } = require('playwright');
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://target.com');
const title = await page.title();
const body = (await page.textContent('body')).slice(0, 2000);
await browser.close();
// → "Just a moment..." on most Cloudflare zones. Bot score: ~2.Patchright + manual proxy + manual humanization (~30 lines)
// patchright_diy.js — Patchright + Decodo residential + hand-rolled pacing
const { chromium } = require('patchright');
const browser = await chromium.launch({
proxy: {
server: 'http://ro.decodo.com:13001',
username: process.env.DECODO_USER,
password: process.env.DECODO_PASS
}
});
const ctx = await browser.newContext({
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X)' +
' AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1' +
' Mobile/15E148 Safari/604.1',
viewport: { width: 393, height: 852 },
isMobile: true, hasTouch: true,
locale: 'en-US', timezoneId: 'Europe/Bucharest'
});
const page = await ctx.newPage();
await page.goto('https://target.com', { waitUntil: 'domcontentloaded' });
// Hand-rolled humanization
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
await sleep(800 + Math.random() * 1200);
await page.mouse.move(100, 200, { steps: 12 });
await page.mouse.move(300, 600, { steps: 18 });
await sleep(400 + Math.random() * 800);
await page.evaluate(() => window.scrollBy({ top: 500, behavior: 'smooth' }));
await sleep(1200);
const title = await page.title();
const body = (await page.textContent('body')).slice(0, 2000);
// Optional: detect Turnstile, hand off to 2captcha — another ~40 lines
await browser.close();Camoufox Python (~12 lines)
# camoufox_scrape.py
from camoufox.sync_api import Camoufox
import os
with Camoufox(
headless=False,
geoip=True,
proxy={'server': 'http://ro.decodo.com:13001',
'username': os.environ['DECODO_USER'],
'password': os.environ['DECODO_PASS']}
) as browser:
page = browser.new_page()
page.goto('https://target.com')
title = page.title()
body = page.text_content('body')[:2000]
# Camoufox handles fingerprinting; you still BYO captcha solver and humanization.Browserbase + Stagehand (~10 lines)
// stagehand_scrape.js
import { Stagehand } from '@browserbasehq/stagehand';
const stagehand = new Stagehand({
env: 'BROWSERBASE',
apiKey: process.env.BROWSERBASE_API_KEY,
projectId: process.env.BROWSERBASE_PROJECT_ID
});
await stagehand.init();
await stagehand.page.goto('https://target.com');
const data = await stagehand.page.extract({
instruction: 'Extract the page title and first 2000 chars of body text',
schema: z.object({ title: z.string(), body: z.string() })
});
await stagehand.close();
// Proxy + captcha = separate vendor contracts.Human Browser via A2A (~3 lines)
// hb_a2a_scrape.js — one POST, residential + Patchright + captcha + behavior bundled
const r = await fetch('https://agent.humanbrowser.cloud/a2a', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.HB_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0', id: 1, method: 'message/send',
params: { message: { role: 'user', parts: [{ kind: 'text',
text: 'Go to https://target.com and return the page title plus first 2000 chars of body text.' }] } }
})
});
const { result } = await r.json();
// result.artifacts[0].parts[0].text contains the extracted content.Line count, same task:
- Plain Playwright: ~7 lines — broken
- Patchright + DIY: ~30 lines — works, you maintain
- Camoufox Python: ~12 lines — works for Firefox-friendly targets
- Browserbase + Stagehand: ~10 lines — works, plus 2 separate vendor contracts
- Human Browser A2A: ~3 lines — works, one vendor
This is not a "ours has fewer lines" argument — Patchright's 30 lines aren't bad code, they're a real stack that you should genuinely consider if you have the headroom to maintain it. It's a "where do you want to spend your engineering time" argument. If your differentiator is the data pipeline downstream of the browser, paying someone else to maintain the browser plumbing is a good trade.

Decision tree — which stack should you pick
Pick Patchright if: you already have a residential proxy contract you're happy with (Decodo, Bright Data, IPRoyal, NodeMaven), you have a CAPTCHA solver wired up (2Captcha, CapSolver), and your scraper team has the headroom to maintain the integration. You will spend less than the bundled options at scale, and the stack is fully open source.
Pick Camoufox if: your target sites fingerprint Chromium variants aggressively (Cloudflare Enterprise on specific banking/ticketing zones, most DataDome configurations, canvas-heavy detector setups). Firefox-shape fingerprints sail through detectors that weren't trained on them.
Pick Anchor Browser if: you're a legitimate AI agent with a stable identity and you're betting on Web Bot Auth adoption over the next 12-18 months. Strongest fit for enterprise-targeted research tools, B2B data fetchers, and personal-data exporters where the site owner has a reason to allow you in.
Pick Browserbase + Stagehand if: the agent layer (LLM action loop, structured extraction) is your real bottleneck and the browser is incidental. You should be comfortable assembling proxy + solver + budget logic from independent vendors. Best fit: teams building agentic products on top of LLM frameworks.
Pick Human Browser if: you want one API, one bill, and the four layers (Patchright, residential, CAPTCHA, agent loop) wired together by someone else. Best fit: developer-first teams shipping bottom-up, AI agent builders who need an A2A (v0.3) endpoint, anyone who values "afternoon to first scrape" over per-call cost optimization.
All five work in 2026. The choice is about where you want to spend engineering time and how much vendor surface area you can tolerate. Anyone who tells you there is one right answer is selling you their thing — including, with full self-awareness, us.
Try the bundled stack — $1 for about 4 typical tasks
Human Browser ships Patchright-patched Chromium + residential IPs (75 countries) + CAPTCHA solving + A2A (v0.3) agent loop behind a single API. Pay-as-you-go: $0.10/hr browser time, $4/GB residential proxy, $0.005/captcha, $0.02 per agent step with the AI included. No subscription, unused balance never expires. Try it for $1 — humanbrowser.cloud.
FAQ
Is playwright-extra-plugin-stealth dead in 2026?
Effectively yes against modern anti-bot. The plugin has not received a substantive update since mid-2024 and the ecosystem moved to maintained forks. The plugin itself still installs and runs; it just fails the JavaScript challenges that Cloudflare, DataDome, and PerimeterX ship in 2026. The maintained spiritual successor is Patchright.
What is the difference between Patchright and playwright-stealth?
playwright-stealth (playwright-extra-plugin-stealth) is a plugin layered on top of stock Playwright that monkey-patches Chromium APIs at runtime via page.addInitScript. Patchright is a maintained fork of Playwright with patches applied directly to the Chromium DevTools Protocol layer — including a fix for the well-known Runtime.enable leak, which monkey-patching architecturally cannot fix. The CDP-layer fix is the part that actually matters in 2026.
Will adding residential proxies fix my stealth issues by themselves?
No. A clean residential IP gets you past Cloudflare's IP-reputation gate, but the JavaScript fingerprint and TLS fingerprint challenges still run after the IP check. Stock Playwright on a residential proxy still leaks the CDP Runtime.enable signal and still fails JA4 TLS matching. You need stealth AND residential AND realistic behavior — missing one of the three is the most common failure mode we see in support tickets. The companion residential proxy benchmark covers the IP half.
How do you bypass Cloudflare with Patchright?
Install Patchright via npm or pip, swap the import from playwright to patchright, route the browser through a residential proxy, and pace input with humanlike timing. See the code example above. For the full bypass walkthrough including Web Bot Auth and a 12-method benchmark, see our Playwright Cloudflare guide.
Is Camoufox better than Patchright?
Different tool, different job. Patchright is Chromium-based with CDP-level patches — best for sites that fingerprint Chrome specifically. Camoufox is a Firefox fork with C++-level patches and the strongest WebRTC/canvas/audio fingerprint defaults — best for hard targets that flag Chrome variants. Human Browser runs Patchright-patched headful Chromium and bundles the IP, CAPTCHA and behavior layers around it.
Are there free Playwright stealth options that still work?
Patchright and Camoufox are both free, open-source, and still effective against most Cloudflare and DataDome rulesets — for the browser half of the problem. The cost component you cannot eliminate is residential IP traffic, which all serious proxy providers charge per GB. You can self-host browsers for free; you cannot self-host residential IPs at any meaningful scale.
What is Web Bot Auth and should I just go that route?
Web Bot Auth is a Cloudflare-led standard (launched May 2026) for cryptographically signing AI agent traffic so verified agents pass without challenge. Anchor Browser and Browserbase shipped first-party support that same week. It is the cleanest path IF (a) you are a legitimate agent with a stable identity, and (b) the target site has opted into the verified-bot lane. Adoption is in month one — most Cloudflare-protected sites have not enabled it — so for the next 12-18 months you still need an evasion path for the long tail.
How do I detect if my Playwright stealth is actually working?
Hit a known fingerprint-test endpoint with your configured browser before you ever hit your real target. bot.sannysoft.com still works as a sanity check for the obvious leaks. iphey.com gives a richer report including TLS, audio, and canvas hashes. creepjs is the strictest — if you pass creepjs with a non-zero trust score you are in the top percentile of stealth setups. None of these are perfect proxies for Cloudflare itself, but they identify the layer that is leaking.
Why doesn't Selenium work for stealth in 2026?
Selenium drives browsers via the W3C WebDriver protocol, which broadcasts navigator.webdriver=true at the driver level and leaks distinctive command timing patterns that modern detectors flag before any JavaScript runs. undetected-chromedriver papers over the worst leaks but is architecturally in the same bind as playwright-stealth: monkey-patching cannot fix a protocol-level signal. If you must stay on Selenium, look at SeleniumBase UC Mode for the closest functional analog to Patchright. Most teams who can migrate find Patchright the easier path.
Can I migrate from playwright-stealth to Patchright without rewriting my scripts?
In most cases yes — Patchright is a drop-in fork of Playwright with the same async/page/context API. The migration is usually one import line (playwright → patchright) plus removing the playwright-extra and stealth-plugin chain. Two gotchas: (1) Patchright's bundled Chromium is the patched build, so do not point it at a stock Chromium executable via executablePath; (2) some advanced CDP commands have been disabled or patched, so any code that called the raw Runtime.enable command directly will need to migrate to the higher-level Patchright APIs.
Related Articles
- How to Bypass Cloudflare with Playwright in 2026 — Pillar · Cloudflare
- Best Residential Proxies for Scraping 2026 — Real Benchmarks — Pillar · Proxies
- Human Browser vs Browserbase — A Developer's Honest Comparison — Compare
- Cloudflare Turnstile Bypass — What Actually Works in 2026 — Guide
- Python Cloudflare Bypass — What Works in 2026 — Python
- Browser Automation for AI Agents — Patterns That Scale — AI Agents