General Questions
When should I use Playwriter vs WebFetch?
When should I use Playwriter vs WebFetch?
- You need to interact with pages (click, type, scroll)
- The site requires login or authentication
- You’re dealing with bot detection or CAPTCHAs
- You need to execute JavaScript on the page
- You want to use browser extensions (ad blockers, etc.)
- You need to handle complex navigation flows
- You only need to read static HTML content
- The page doesn’t require authentication
- No JavaScript execution is needed
- You want minimal overhead and faster execution
- Bot detection isn’t a concern
Why does the extension icon stay gray?
Why does the extension icon stay gray?
- Restricted page: Chrome doesn’t allow extensions on
chrome://,chrome-extension://, or Chrome Web Store pages - No tab loaded: The tab is still loading or is
about:blank - Extension not installed: Make sure you installed from Chrome Web Store
How do I know which tabs are being controlled?
How do I know which tabs are being controlled?
- Green extension icon: Tab is connected and can be automated
- Chrome automation banner: “Chrome is being controlled by automated test software”
- Session list: Run
playwriter session listto see active sessions
Can I use Playwriter with multiple Chrome profiles?
Can I use Playwriter with multiple Chrome profiles?
- Install the extension in each profile you want to automate
- Each profile gets its own relay server connection
- Sessions are isolated per profile
Does Playwriter work on Windows/Mac/Linux?
Does Playwriter work on Windows/Mac/Linux?
- macOS: Full support
- Windows: Full support (including WSL)
- Linux: Full support
Troubleshooting
Error: 'Chrome is not running or extension is not connected'
Error: 'Chrome is not running or extension is not connected'
- Open Chrome with the Playwriter extension installed
- Click the extension icon on at least one tab (turns green)
- Wait a few seconds for the extension to connect to the relay
- Try your command again
- Check that Chrome is actually running
- Verify the extension is installed and enabled
- Check relay server logs:
playwriter logfile - Try restarting Chrome
Error: 'Session not found'
Error: 'Session not found'
Error: 'All pages are about:blank'
Error: 'All pages are about:blank'
chrome.debugger API. Fix it by:- Restart Chrome completely (quit and reopen)
- Click the extension icon on a tab to reconnect
- Try again
Browser switches to light mode when I start automating
Browser switches to light mode when I start automating
- Manually switch back to dark mode in Chrome settings
- Or set your OS to light mode so it matches
How do I debug issues with the relay server?
How do I debug issues with the relay server?
- Extension connection events
- WebSocket messages
- CDP command traffic
- Error stack traces
Why does page.goto() fail with 'net::ERR_BLOCKED_BY_CLIENT'?
Why does page.goto() fail with 'net::ERR_BLOCKED_BY_CLIENT'?
- Ad blocker: Disable uBlock Origin or similar extensions for that site
- Privacy extensions: Disable Privacy Badger, Ghostery, etc.
- Network blocker: Check if your network is blocking the domain
Bot Detection & Captchas
How do I bypass bot detection?
How do I bypass bot detection?
- Chrome shows an automation banner (“Chrome is being controlled…”)
- Sites can detect
navigator.webdriverand other signals
- Disconnect the extension after navigating to the page
- Click the green extension icon to turn it gray
- The automation banner disappears
- The site sees a normal browser session
Can Playwriter solve CAPTCHAs automatically?
Can Playwriter solve CAPTCHAs automatically?
- Let the automation run until it hits a CAPTCHA
- Disconnect the extension (click green icon → gray)
- Manually solve the CAPTCHA in the browser
- Reconnect the extension (click gray icon → green)
- Continue automation
- Use your logged-in browser (sites trust authenticated users)
- Add delays between actions to appear more human-like
- Avoid rapid-fire requests that trigger rate limits
- Use services like 2Captcha or Anti-Captcha
- Integrate their API in your automation code
- These services use human solvers or ML models
Does Playwriter hide the 'controlled by automation' banner?
Does Playwriter hide the 'controlled by automation' banner?
Advanced Usage
How do I access iframes with Playwriter?
How do I access iframes with Playwriter?
Can I record video of my automation?
Can I record video of my automation?
How do I set breakpoints in page JavaScript?
How do I set breakpoints in page JavaScript?
Can I live-edit JavaScript on a running page?
Can I live-edit JavaScript on a running page?
How do I intercept network requests?
How do I intercept network requests?
Can I use Playwriter programmatically (not CLI)?
Can I use Playwriter programmatically (not CLI)?
Sessions & State
What is a Playwriter session?
What is a Playwriter session?
- Separate state: Each session has its own
stateobject - Shared tabs: All sessions share the same browser tabs
- Persistent: State survives between execute calls
How does session state work?
How does session state work?
state object persists between execute calls in the same session:- Store page references:
state.page = await context.newPage() - Accumulate data:
state.items = [] - Maintain CDP sessions:
state.cdp = await getCDPSession({ page }) - Keep debugger state:
state.dbg = createDebugger({ cdp: state.cdp })
Do sessions share browser tabs?
Do sessions share browser tabs?
How do I reset a session if it gets stuck?
How do I reset a session if it gets stuck?
playwriter session reset:Can I list all active sessions?
Can I list all active sessions?
playwriter session list:Need More Help?
If your question isn’t answered here:- Check the docs: Browse the Guides and API Reference
- View logs: Run
playwriter logfileand check for errors - Open an issue: Report bugs on GitHub
- Ask the community: Join discussions on GitHub