✨ Highlights
- 🪟 Let agents use your logged-in browser without taking over your screen (microsoft/playwright#42973) —
PLAYWRIGHT_MCP_BACKGROUND=1 playwright-cli attach --extension=chromekeeps controlled tabs and the browser window in the background. You can also set"background": truein your CLI config. (microsoft/playwright#43864) - 🎬 Record the whole viewport in headless Chrome and Edge —
playwright-cli video-startno longer loses the bottom of the page to browser-toolbar sizing in the new headless mode. Trace screenshots benefit too. (microsoft/playwright#43904) - 🧭 Snapshots keep the names agents need (microsoft/playwright#43809) —
playwright-cli snapshotpreserves identifying names on dialogs, landmarks, tables and column headers, even when their heading or caption also appears below them. (microsoft/playwright#43810) - 👁️ Ignore hidden duplicate elements by default (microsoft/playwright#43855) — set
"browser": { "contextOptions": { "locateOnlyVisible": true } }in your CLI config, then runplaywright-cli open --config=cli.config.json. Locators resolve only visible matches, avoiding strict-mode failures from hidden, cached UI. This is opt-in. (microsoft/playwright#43903) - 🗂️ Keep your tab strip free of agent-created groups (microsoft/playwright#43038) — set
"tabGroup": falsein your CLI config and useplaywright-cli attach --extension=chrome --config=cli.config.json. Extension sessions can control tabs without creating a Chrome tab group or changing your existing groups. (microsoft/playwright#43814)
🐛 Fixes
fix(cli): use ordinal filenames for repeated downloads— repeated downloads ofreport.csvbecomereport-1.csv,report-2.csv, and so on instead of silently overwriting earlier files. (#514, microsoft/playwright#44011)fix(cli): restrict profile deletion to the exact session—playwright-cli -s=work delete-datano longer deletes the persistent profile ofwork-test. (#499, microsoft/playwright#43928)fix(cli): report command failures in text and JSON modes— invalid arguments and startup failures produce a readable error, or an{ "isError": true, "error": "..." }object with--json, and exit with code 1 instead of exposing an unhandled rejection. (#502, #522)fix(cli): use CLI command names in error messages— validation errors and recovery hints name commands you can actually run, such asrequestsandrecording-start, rather than MCP tools, and avoid doubledError:prefixes. (#515, microsoft/playwright#43932)fix(cli): avoid killing Windows process enumerators—playwright-cli kill-allcorrectly reports the daemons it stopped on Windows instead of saying none were found. (#525, microsoft/playwright#44008)fix(mcp): preserve non-JSON evaluation results—playwright-cli eval '() => 10n', circular objects, regular expressions and special numeric values are represented without turning successful evaluations into serialization errors or losing their values. JSON-compatible results retain their existing format. (microsoft/playwright-mcp#1838, microsoft/playwright#43973)fix(mcp): resolve config file paths relative to their source— relative profile, storage-state, executable and output paths now resolve next to the config file, including.playwright/cli.config.jsonand~/.playwright/cli.config.json, rather than the working directory. Paths supplied through flags or environment variables remain relative to the working directory. (microsoft/playwright-mcp#1836, microsoft/playwright#43970)fix(mcp): validate device names and preserve device descriptors— an unknown--devicereports a clear error instead of silently disabling emulation; context overrides no longer mutate shared device presets. (microsoft/playwright-mcp#1834, microsoft/playwright#43971)fix(mcp): bound settle waits when page timers cannot run— commands such asevalandclickno longer hang during their post-action wait on CSP-sandboxed pages or pages with paused clocks. (microsoft/playwright#43752, microsoft/playwright#43767)fix(mcp): report event listener exceptions as console errors— exceptions in page or context listeners registered withrun-codeappear in console output instead of terminating the session. (microsoft/playwright#43770, microsoft/playwright#43686)fix(mcp): report one-based console source lines—playwright-cli consolereports line numbers that match editors and DevTools. (microsoft/playwright-mcp#1839, microsoft/playwright#43975)fix(extension): report lost tab instead of crashing— losing the last controlled tab produces an actionable error instead of an undefined-property exception, with guidance when another extension's frame may have caused debugger detachment. (microsoft/playwright#43230, microsoft/playwright#43863)fix(chromium): honor Linux config directories for channel connections— browser discovery and attachment respectCHROME_CONFIG_HOMEandXDG_CONFIG_HOME; CDP connections also use the WebSocket path recorded by Chrome instead of failing with a 404. (microsoft/playwright#43880, microsoft/playwright#43884)fix(chromium): preserve fonts when connecting with noDefaults— attaching to an existing headless browser preserves its font settings and page layout. (microsoft/playwright#43715, microsoft/playwright#43773)fix(chromium): preserve HTTP navigations across HTTPS upgrade modes— explicit HTTP URLs and HTTP route mocks stay on HTTP instead of being unexpectedly upgraded or failing in Chromium, Chrome and Edge. (microsoft/playwright#43871, microsoft/playwright#43877)fix(screenshot): support full-page SVG documents—playwright-cli screenshot --full-pagecaptures standalone SVG documents instead of timing out. (microsoft/playwright#43962, microsoft/playwright#43972)feat(actionability): wait for elements to be non-inert— clicks, fills and option selection wait for inert subtrees to become interactive. Inert elements and content outside modal dialogs remain available in snapshots and role locators. (microsoft/playwright#43792, microsoft/playwright#43850, microsoft/playwright#43851)fix(selectors): support labels for form-associated custom elements— label locators and accessible names recognize labels associated with custom form controls. (microsoft/playwright#43898, microsoft/playwright#43900)fix(aria): match mixed-case selected options in accessible names— embedded comboboxes contribute their selected option's name even with values such asaria-selected="True". (microsoft/playwright#43785, microsoft/playwright#43787)fix(selector generator): do not throw when css fallback path is not unique— ambiguous matches in slotted web components report a useful strict-mode error instead of aTypeError. (microsoft/playwright#43701, microsoft/playwright#43705)fix(frames): reject context waits when page closes— pending operations on an iframe whose document has not loaded fail when its page closes instead of waiting indefinitely. (microsoft/playwright#43647, microsoft/playwright#43650)fix(install): report missing dependencies for all browsers—playwright-cli install-browserreports missing Linux dependencies across browsers in one pass, including package names for Vulkan and Graphene. (microsoft/playwright#43747, microsoft/playwright#43750)
📦 Upgrading
npm install -g @playwright/cli@0.1.24