Playwright default switches
Playwright starts Chromium with its own list of switches (chromiumSwitches in
playwright-core). They suit a test runner. Several of them make the browser differ
from ordinary Chrome in ways a site can see, or switch off things a profile needs.
The Playwright wrapper NinjaSurfer(...) therefore drops those switches by default.
This page lists every switch of playwright-core 1.64.1 (the version the SDK requires,
for the WebKit engine) and what the wrappers do with it. navigator.webdriver stays false
in every case: the browser decides that, not a switch.
Other ways to start the browser (launchAgent, ninjasurfer start PROFILE,
ninjasurfer profile start, startProfile, the MCP server) do not
go through Playwright's launcher and pass none of these switches.
Your choice wins
- Pass
ignoreDefaultArgsand the wrapper hands it to Playwright as given and adds nothing:falsekeeps all of Playwright's switches,truedrops all of them (Playwright then also leaves out the ones it needs to run), a list drops exactly those. - A switch you put in
argsis passed as given, after Playwright's, so you can add back any switch the wrappers drop (for example--mute-audio). - A
--disable-features=…in yourargsreplaces the wrappers' own one, so only your features are disabled.
Decisions
"Dropped" means the wrapper puts the switch in Playwright's ignore list. "Kept" means Playwright still passes it.
| Switch | Decision | Why |
|---|---|---|
--disable-field-trial-config |
Kept | Without it Chromium applies its testing field-trial config, which turns on experiments that most Chrome users do not have. Features stay at their source defaults. |
--disable-background-networking |
Dropped | Stops component, extension and Safe Browsing updates; Chrome does these. |
--disable-background-timer-throttling |
Dropped | Site-visible: timers in background tabs would run unthrottled. |
--disable-backgrounding-occluded-windows |
Dropped | Site-visible: a hidden window would keep reporting visibilityState "visible". |
--disable-back-forward-cache |
Dropped | Site-visible: no back/forward cache (pageshow.persisted, notRestoredReasons). |
--disable-breakpad |
Kept | Crash reporting only; nothing a site sees. |
--disable-client-side-phishing-detection |
Dropped | A protection Chrome has; part of a normal profile. |
--disable-component-extensions-with-background-pages |
Dropped | Chrome loads its component extensions. |
--disable-component-update |
Dropped | Components such as the Widevine CDM (when the build supports it) are what EME (requestMediaKeySystemAccess) offers; without updates they never arrive. |
--no-default-browser-check |
Kept | Otherwise an infobar asks to make it the default browser and shrinks the page. |
--disable-default-apps |
Dropped | Turns off the External Extensions provider: extensions placed in a profile would not load. |
--disable-dev-shm-usage |
Kept | Where shared memory lives; nothing a site sees, and avoids crashes in small /dev/shm (containers). The SDK also passes it itself. |
--disable-edgeupdater |
Kept | Edge only; no effect. |
--disable-extensions |
Dropped | Extensions must work in a profile. |
--disable-features=… |
Replaced | See Disabled features. |
--enable-features=CDPScreenshotNewSurface |
Kept | Affects Playwright screenshots only. |
--allow-pre-commit-input |
Dropped | Site-visible: input would reach a page before its first paint is committed. |
--disable-hang-monitor |
Kept | Only the "page unresponsive" dialog, which would block automation. |
--disable-ipc-flooding-protection |
Dropped | Site-visible: lifts Chrome's limit on rapid navigations and history.pushState calls. |
--disable-popup-blocking |
Dropped | Site-visible: window.open without a user gesture would always succeed. |
--disable-prompt-on-repost |
Kept | Only the "resubmit form?" dialog on reload, which would block automation. |
--disable-renderer-backgrounding |
Dropped | Site-visible: background tabs would keep full priority. |
--disable-updater-scheduler |
Kept | Edge only (the updater scheduler on mac); no effect. |
--force-color-profile=srgb |
Dropped | Site-visible: rendering ignores the display's colour profile. |
--metrics-recording-only |
Kept | No usage reports are sent; nothing a site sees. |
--no-first-run |
Kept | Otherwise first-run dialogs and imports. |
--password-store=basic |
Dropped | Chrome chooses the store (the keyring when one is running, otherwise basic), as every other start of a profile does. One store per profile keeps its saved passwords and cookies readable. |
--use-mock-keychain |
Kept | macOS only; the browser is Linux, so no effect. |
--no-service-autorun |
Kept | No background service on login; nothing a site sees. |
--export-tagged-pdf |
Kept | Affects PDFs made by Playwright's page.pdf() only. |
--disable-search-engine-choice-screen |
Kept | Otherwise a choice dialog blocks the first page. |
--unsafely-disable-devtools-self-xss-warnings |
Kept | DevTools console only. |
--edge-skip-compat-layer-relaunch |
Kept | Edge only; no effect. |
--disable-infobars |
Kept | Chrome for Testing only; no effect. |
--disable-sync |
Kept | This build has no Google API keys, so sync cannot sign in anyway; the switch avoids a known menu crash. |
--enable-unsafe-swiftshader |
Kept | Lets WebGL fall back to SwiftShader on machines without a GPU (see graphics). |
--no-sandbox |
Never | The wrappers always pass chromiumSandbox: true, so Playwright never adds it. |
--headless |
Kept (headless) | Headless mode itself. |
--hide-scrollbars |
Dropped (headless) | Site-visible: scrollbars take no width, so layout and innerWidth − clientWidth differ from Chrome. |
--mute-audio |
Dropped (headless) | The persona's audio output must behave like Chrome's. |
--blink-settings=primaryHoverType=2,…,availablePointerTypes=4 |
Kept (headless) | Reports a mouse (hover: hover, pointer: fine), as a desktop Chrome does; without it headless reports no pointer. |
--user-data-dir, --remote-debugging-pipe, about:blank / --no-startup-window |
Kept | How Playwright runs and talks to the browser. |
--enable-automation |
Dropped | Playwright 1.64 no longer adds it; it would otherwise show the "controlled by automated test software" bar. Kept in the ignore list in case a version adds it again. The bar is also suppressed in the engine (automation.no-automation-infobar), so it never appears even when a driver outside the SDK — Puppeteer, Selenium, an external MCP agent — passes the flag directly. |
Disabled features
Playwright disables these features. The wrappers pass their own
--disable-features before your args. Chromium uses only one --disable-features,
so features that are not in the wrappers' list are enabled again.
| Feature | Decision | Why |
|---|---|---|
AvoidUnnecessaryBeforeUnloadCheckSync |
Stays disabled | Playwright needs it to run beforeunload handlers when it closes a page. |
DestroyProfileOnBrowserClose |
Stays disabled | Shutdown only. |
DialMediaRouteProvider |
Stays disabled | DIAL device discovery on the local network; nothing a site sees. |
GlobalMediaControls |
Stays disabled | Browser UI. |
HttpsUpgrades |
Enabled | Site-visible: Chrome upgrades http:// navigations to HTTPS. |
LensOverlay |
Stays disabled | Browser UI; does not work in Chromium builds. |
MediaRouter |
Enabled | Site-visible: the Remote Playback and Presentation APIs. |
PaintHolding |
Enabled | Site-visible: paint timing on same-origin navigations. |
ThirdPartyStoragePartitioning |
Enabled | Site-visible: Chrome partitions third-party storage. |
BlockOriginHeaderModificationOnRedirect |
Stays disabled | Playwright needs it: stable Origin-header handling across redirects for request interception; not visible to page script. |
AvoidCorsURLLoaderRestartOnRedirect |
Stays disabled | Playwright needs it: avoids a CORS loader restart on redirect that disrupts request interception; not visible to page script. |
Translate |
Stays disabled | Browser UI (the translate offer). |
AutoDeElevate |
Stays disabled | Windows only. |
OptimizationHints |
Stays disabled | Background downloads of hints; nothing a site sees. |
NetworkTimeServiceQuerying |
Stays disabled | Background network-time query; nothing a site sees. |
AimEnabled |
Stays disabled | Edge only. |
msForceBrowserSignIn, msEdgeUpdateLaunchServicesPreferredVersion |
Not passed | Edge only. |
Viewport
Playwright emulates a 1280x720 viewport in every context unless told otherwise,
inside a window that --window-size makes larger. Sites read a gap between the
outer and inner size of the window as open DevTools. The wrappers give pages the real window instead: a profile's context
starts with viewport: null (no_viewport=True), and browser.newContext() /
newPage() (new_context / new_page) of a NinjaSurfer(...) browser get
the same default. A viewport you pass still wins.
Color scheme
Playwright also emulates prefers-color-scheme: light in every context unless
told otherwise (CDP Emulation.setEmulatedMedia), whatever the browser's own
theme. A persona's light or dark appearance is its own (the OS setting of the
machine it copies), so the same contexts and pages start with colorScheme: null (color_scheme="null"): no emulation, the browser's theme shows. A
colorScheme you pass still wins.
Runtime.enable
Playwright enables the Runtime domain on every page and worker. A page could
see that when it logs an error: building the error's description for the
client read its stack, which runs the page's Error.prepareStackTrace.
The browser builds those descriptions
and previews without running page code; clients get error descriptions without
the stack trace. The SDK's own CDP paths (launchAgent, MCP, profiles) never
enable Runtime.
Checking it
The unit tests compare these lists with the installed playwright-core: a Playwright update that adds or renames a switch fails the test until this page and the wrappers' lists are updated.