feat: add --no-isolated flag to enable persistent browser profile
Adds --no-isolated CLI flag to switch from the default incognito-like isolated mode to a persistent browser profile. This enables features that require non-incognito mode, particularly: - Push API (pushManager.subscribe()) for push notifications - Service worker persistence across sessions - Full browser state retention Usage: npx playwright-mcp --no-isolated PLAYWRIGHT_MCP_ISOLATED=false npx playwright-mcp The default behavior (--isolated) remains unchanged for backward compatibility.
This commit is contained in:
parent
d31265d6b0
commit
dccba24345
2 changed files with 6 additions and 2 deletions
|
|
@ -44,7 +44,8 @@ program
|
|||
.option('--headless', 'run browser in headless mode, headed by default')
|
||||
.option('--host <host>', 'host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.')
|
||||
.option('--ignore-https-errors', 'ignore https errors')
|
||||
.option('--isolated', 'keep the browser profile in memory, do not save it to disk.')
|
||||
.option('--isolated', 'keep the browser profile in memory, do not save it to disk. This is the default.')
|
||||
.option('--no-isolated', 'use a persistent browser profile. Enables features like Push API that require non-incognito mode.')
|
||||
.option('--image-responses <mode>', 'whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".')
|
||||
.option('--no-snapshots', 'disable automatic page snapshots after interactive operations like clicks. Use browser_snapshot tool for explicit snapshots.')
|
||||
.option('--max-snapshot-tokens <tokens>', 'maximum number of tokens allowed in page snapshots before truncation. Use 0 to disable truncation. Default is 10000.', parseInt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue