Skip to content

Releases

v0.1.24

Choose a tag to compare

@yury-s yury-s released this 10 Nov 01:16
2612064

✨ Highlights

  • 🪟 Let agents use your logged-in browser without taking over your screen (microsoft/playwright#42973) — PLAYWRIGHT_MCP_BACKGROUND=1 playwright-cli attach --extension=chrome keeps controlled tabs and the browser window in the background. You can also set "background": true in your CLI config. (microsoft/playwright#43864)
  • 🎬 Record the whole viewport in headless Chrome and Edge — playwright-cli video-start no 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 snapshot preserves 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 run playwright-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": false in your CLI config and use playwright-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 of report.csv become report-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-data no longer deletes the persistent profile of work-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 as requests and recording-start, rather than MCP tools, and avoid doubled Error: prefixes. (#515, microsoft/playwright#43932)
  • fix(cli): avoid killing Windows process enumerators — playwright-cli kill-all correctly 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.json and ~/.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 --device reports 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 as eval and click no 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 with run-code appear in console output instead of terminating the session. (microsoft/playwright#43770, microsoft/playwright#43686)
  • fix(mcp): report one-based console source lines — playwright-cli console reports 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 respect CHROME_CONFIG_HOME and XDG_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-page captures 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 as aria-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 a TypeError. (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)
    ...
Read more

v0.1.23

Choose a tag to compare

@pavelfeldman pavelfeldman released this 31 Oct 15:21
0a80807

✨ Highlights

  • 👥 Use different signed-in users in one session — playwright-cli tab-new https://example.com --isolated-context=user-b opens a tab with separate cookies and storage. Tabs with the same context name share their login state; different names stay isolated. (microsoft/playwright#43087)
  • 🎬 Smaller video recordings with less encoding CPU — playwright-cli video-start demo.webm now records with VP9, keeping the same WebM output format. Stop and save the recording with playwright-cli video-stop. (microsoft/playwright#43021)
  • 📋 Keep console messages and requests across navigations (#479) — playwright-cli console --all and playwright-cli requests --all include retained entries from earlier navigations, so warnings and failed requests are not lost when checking a multi-page flow. Request numbers stay stable for playwright-cli request 5. (microsoft/playwright#43526)
  • 🔎 Keep common searches from flooding the agent's context (microsoft/playwright#42077) — playwright-cli find button --max-results=5 returns at most five matching items and reports the total match count. (microsoft/playwright#42947)
  • 🍪 Delete one site's cookie without signing out of others (microsoft/playwright#43310) — playwright-cli cookie-delete session_id --domain=example.com --path=/ removes only the cookie matching that name, domain and path, leaving same-named cookies elsewhere intact. (microsoft/playwright#43319)
  • 🔒 Redact session tokens in URLs printed in responses (microsoft/playwright-mcp#1791) — add "redactUrlParams": ["access_token", "code"] to .playwright/cli.config.json to replace those query and fragment parameter values with <redacted> in command responses. (microsoft/playwright#43258)

🐛 Fixes

  • fix(cli): do not force-kill the browser on close — playwright-cli close lets Chrome shut down normally, preventing temporary app-clone folders from accumulating on macOS. (#475, microsoft/playwright#43229)
  • fix(cli): respect npm registry config in update check — update checks honor npm's registry, scoped registry, proxy and authentication settings instead of contacting the public registry directly when a custom registry is configured. (#478, #484)
  • fix(cli): report run-code route handler exception once and verbatim — asynchronous route callback errors return their original message without duplicated errors or an extra Error: prefix. (#476, microsoft/playwright#43203)
  • fix(chromium): do not hang on pages without a renderer when connecting over CDP — attach --cdp handles discarded or crashed tabs without wedging every command; a follow-up closes those tabs while preserving live ones. (microsoft/playwright#41714, microsoft/playwright#42936, microsoft/playwright#43075)
  • fix(chromium): report local frames of existing oopifs when connecting over CDP — attaching to an already-loaded page discovers nested frames correctly instead of replacing the main document with a sandboxed iframe. (microsoft/playwright#42955, microsoft/playwright#43000)
  • fix(mcp): report invalid element targets and accept locators in any language — action targets accept JavaScript, Python, Java and C# locators. Invalid targets explain the accepted forms, including how to pass a bare snapshot ref. (microsoft/playwright-mcp#1797, microsoft/playwright#43539)
  • fix(mcp): normalize bare host URLs and loopback IP addresses — playwright-cli open 127.0.0.1:3000 uses HTTP, and bare external hosts with ports are normalized to HTTPS rather than mistaken for custom schemes. (microsoft/playwright#43263, microsoft/playwright#43264)
  • fix(mcp): race browser_navigate_back and forward against modal states — go-back and go-forward surface navigation dialogs immediately so they can be handled, rather than hanging until timeout. (microsoft/playwright#43251, microsoft/playwright#43252)
  • fix(mcp): preserve origin filters when modifying request headers — header-only route handlers no longer skip configured allowed/blocked-origin filters. (microsoft/playwright#43630, microsoft/playwright#43637)
  • fix(mcp): pass custom headers to route.fulfill when mocking response — mocked route responses retain supplied headers, including CORS and cache headers. (microsoft/playwright#43245, microsoft/playwright#43244)
  • fix(mcp): match browser_route header names case-insensitively — request-header replacement and removal work consistently regardless of header-name casing. (microsoft/playwright#43215, microsoft/playwright#43227)
  • fix(mcp): match cookie list domain filter on domain boundaries — cookie-list --domain=example.com includes that domain and its subdomains, not unrelated names such as my-example.com; matching ignores case and a leading dot. (microsoft/playwright#43308, microsoft/playwright#43316)
  • fix(mcp): do not match sibling paths in cookie-list path filter — cookie-list --path=/api includes /api and paths under /api/, not /apikeys. (microsoft/playwright#43366, microsoft/playwright#43368)
  • fix(mcp): ask for a cookie domain when the page has no host — cookie-set on about:blank or a data URL asks for --domain instead of returning an internal assertion error. (microsoft/playwright#43309, microsoft/playwright#43318)
  • fix(mcp): pass credentials from --proxy-server as proxy username/password — authenticated proxy URLs supplied through PLAYWRIGHT_MCP_PROXY_SERVER retain their credentials instead of failing proxy authentication. (microsoft/playwright#43048, microsoft/playwright#43071)
  • fix(mcp): accept Windows paths in browser_resume location — pause-at accepts Windows source locations such as C:\tests\example.spec.ts:42. (microsoft/playwright#43340, microsoft/playwright#43349)
  • fix(video): hide ffmpeg console windows on Windows — video-start no longer opens a terminal window that steals focus during background recording. (microsoft/playwright#43515, microsoft/playwright#43575)
  • feat(cli): keep sockets in XDG_RUNTIME_DIR — Unix CLI sessions and the dashboard prefer $XDG_RUNTIME_DIR/playwright over the shared temporary directory when it is usable. (microsoft/playwright#43698, microsoft/playwright#43732)
  • fix(tracing): do not store secrets in trace context options — trace metadata no longer copies credential-bearing context options such as HTTP credentials, proxy credentials, extra headers and storage-state cookies. (microsoft/playwright#38673, microsoft/playwright#43220)
  • fix(aria): preserve iframe snapshots with fallback text — snapshots show a loaded iframe's content and element refs even when its HTML contains fallback text. (microsoft/playwright#43628, microsoft/playwright#43635)
  • fix(aria): quote ~, .inf and .nan in aria snapshots — YAML-special text remains a string when snapshot output is parsed or reused. (microsoft/playwright#43451, microsoft/playwright#43469)
  • fix(a11y): treat inert elements and content outside of modal dialogs as hidden — snapshots exclude controls that cannot currently be used, and click/fill actions wait for targets t...
Read more

v0.1.22

Choose a tag to compare

@yury-s yury-s released this 28 Sep 23:23
b85c7a7

Bug Fixes

v0.1.21

Choose a tag to compare

@pavelfeldman pavelfeldman released this 18 Sep 23:34
74354ec

✨ Highlights

  • 🎬 Smooth 60 fps, styleable videos — video-start --fps=60 records smooth 60 fps videos instead of the default 25, and video-start --cursor renders an animated mouse cursor that travels to each action point and stays visible between actions. video-show-actions takes --point-style, --highlight-style and --title-style CSS declarations; the action point marker and the target highlight are now only shown when styled. (microsoft/playwright#42752, microsoft/playwright#42758)
  • 🧰 WebMCP tools show up in the snapshot — the tools a page registers are listed at the top of the page snapshot with their descriptions and input schemas, so webmcp-call can be used without running webmcp-list first. Set webmcp: false in the config file (env PLAYWRIGHT_MCP_WEBMCP=false) to stop collecting page-registered tools. (microsoft/playwright#42671)
  • 🌗 Switch between light and dark color scheme (microsoft/playwright#42243) — an agent working on a dark theme had no way to see it mid-session. New set-color-scheme, set-reduced-motion, set-forced-colors, set-contrast and set-media commands emulate media features on the fly, and the matching clear-* commands reset them. (microsoft/playwright#42668)
  • 📁 Absolute paths in results (microsoft/playwright#42497) — links to snapshots, screenshots, console logs and downloads are relative to the working directory, which a consumer without one cannot resolve. Set filePaths: "absolute" in the config file (env PLAYWRIGHT_MCP_FILE_PATHS=absolute) to get absolute paths instead. (microsoft/playwright#42673)

🐛 Fixes

  • fix(chromium): bypass service workers on the storage state page — state-save no longer runs the site's own scripts, or fails when they redirect, for origins with an active service worker (microsoft/playwright#42656). (#42664, #42741)
  • fix(mcp): keep upload modal, skip short secrets and bad headers — a failed upload keeps the file chooser open so it can be retried, secrets shorter than 4 characters no longer rewrite the whole output with <secret> markers, and route ignores header lines that have no name. (#42713)

📦 Upgrading

npm install -g @playwright/cli@0.1.21

v0.1.20

Choose a tag to compare

@yury-s yury-s released this 14 Sep 21:26
1222845

What's New

🎉 New Commands

  • webmcp-list / webmcp-call — List and call the tools a page registers through the WebMCP API, letting the page do the work instead of driving its UI. When a page has WebMCP tools, the page status reports how many are available (#42613). WebMCP is experimental, see WebMCP in Chrome for how to enable it.

Other Changes

  • Headless sessions now shut down after one hour without commands, so a session an agent never closed no longer holds a browser; run open again to start a new one. Use open --idle-timeout <ms> (config timeouts.idle, env PLAYWRIGHT_MCP_IDLE_TIMEOUT) to change the timeout, 0 disables it. Headed browsers stay open, and attached browsers are only detached when attach --idle-timeout <ms> is set (#42676)
  • The skill includes a guide for attaching screenshots and videos to pull requests with gh --attach (#42645)

Bug Fixes

  • Session daemons exit when their control socket is deleted or replaced, instead of staying alive with the browser (#42454)
  • Explicitly named output files in a nested directory (e.g. screenshot --filename=sub/shot.png) no longer fail with ENOENT (#42540)
  • Video chapters and screencast overlays are no longer hidden behind open dialogs and popovers (#42642)
  • npx playwright test --debug=cli works for tests that create more than one browser context and for every test in a worker, not just the first (#42503)
  • With PLAYWRIGHT_MCP_EXTENSION_TOKEN set, attach --extension fails after 30 seconds with a hint when the extension never connects (e.g. the token belongs to another Chrome profile) instead of hanging forever (#42525)
  • Disable the Chromium sandbox by default on Linux for the bundled Chromium build, which lacks the setuid sandbox helper (#42490)

Upgrading

npm install -g @playwright/cli@0.1.20

v0.1.19

Choose a tag to compare

@yury-s yury-s released this 01 Sep 15:57
397ee39

What's New

New Commands

  • recording-start / recording-stop — Record actions that the user performs manually in the browser and return them as Playwright code. Useful when the user wants to demonstrate a flow instead of describing it (#42359)

Bug Fixes

  • The update check result is cached again, so commands no longer pay a network round-trip to the npm registry on every invocation (#454)
  • The installed-skill check honors NO_UPDATE_NOTIFIER / CI and runs at most once a day (#447)
  • Negative positional arguments (e.g. mousewheel scroll-up deltas) are no longer parsed as flags (#42333)
  • The session daemon no longer opens a console window on Windows (#42155)
  • Long workspace paths no longer truncate the daemon socket path, which left sessions stuck with EADDRINUSE (#42185)
  • install --skills adds .playwright-cli/ to .gitignore, since traces there can contain credentials (#42318)
  • The hint printed after attach shows -s instead of --s (#42138)
  • screenshot returns the original screenshot bytes instead of silently downscaling them to model-specific limits (#42406)
  • Drop the cached browser backend after close with a shared browser context, so subsequent commands no longer fail (#42365)
  • Tracing can be restarted after a failed tracing-stop instead of permanently producing broken archives (#42425)
  • The default codegen language is inferred from the environment (#42150)
  • Do not clobber the chromiumSandbox setting from the config file (#42288)
  • Honor --user-data-dir in extension mode (#42190)
  • Do not treat orphaned browser preferences entries as an installed extension (#42224)
  • state-save / state-load no longer hang when the state contains IndexedDB and a page on that origin is open (#42260)

v0.1.18

Choose a tag to compare

@yury-s yury-s released this 06 Aug 00:15
ca196c2

Highlights

Fixes

v0.1.17

Choose a tag to compare

@yury-s yury-s released this 09 Jul 19:10
793cfb3

Fixes

  • goto no longer crashes the browser session on privileged pages (#433) — navigating to pages like chrome://extensions/ or chrome://settings/ used to throw TypeError: Cannot read properties of undefined (reading 'url') and take down the whole session. (microsoft/playwright#41675)
  • fix(mcp): await init page before screenshot — screenshots taken right after open no longer race the page init. (microsoft/playwright#41646)
  • fix(mcp): preserve directory for additional tab videos — videos for extra tabs are saved to the configured output directory. (microsoft/playwright#41680)
  • feat(mcp): always pass noDefaults for CDP connections — attaching over CDP no longer applies unwanted default context options. (microsoft/playwright#41676)

v0.1.16

Choose a tag to compare

@yury-s yury-s released this 09 Jul 19:01
22d98af

Highlights

  • Search a large snapshot instead of capturing the whole thing — the new find command searches the page snapshot for text or a regexp and returns just the matching nodes with surrounding context (like grep -C), keeping big pages out of the model context. (microsoft/playwright#41605, microsoft/playwright#41654)
  • Mobile emulation — open --mobile emulates a generic mobile device (Pixel for Chromium, iPhone for WebKit) and --device="iPhone 15" targets a specific one; mobile pages are usually lighter, so snapshots are smaller and cheaper. (microsoft/playwright#41657)
  • Leaner snapshots — AI snapshots are distilled to be less verbose, cutting token cost on every command that returns page state. (microsoft/playwright#41604)
  • Local invocation via npx playwright cli — the CLI is now exposed as playwright cli (and playwright mcp), so a locally installed Playwright can drive it without a separate global install. (microsoft/playwright#41577)

Fixes

  • feat(mcp): surface non-2xx navigation status — navigation now reports the HTTP status instead of silently succeeding on error responses. (microsoft/playwright#41589)
  • fix(mcp): enable the chromium sandbox for the default browser — the default Chromium browser now runs sandboxed. (microsoft/playwright#41652)
  • fix(routing): normalize literal glob components through new URL() — route patterns with literal glob characters now match reliably. (microsoft/playwright#41682)
  • fix(mcp): close isolated HTTP client context on disconnect — isolated sessions release their context cleanly on disconnect. (microsoft/playwright#41560)

v0.1.15

Choose a tag to compare

@pavelfeldman pavelfeldman released this 30 Jun 14:52
74d9bf1

Highlights

  • High resolution screenshots (#376) — playwright-cli screenshot --hires captures at the device's full pixel ratio instead of downscaling to CSS pixels. (microsoft/playwright#41465)
  • Secrets filtered from console logs (#41509) — configured secret values are now redacted in captured console log artifacts. (microsoft/playwright#41515)

Heads up

  • The CLI now checks for updates — on startup it notifies you when a newer @playwright/cli is available on npm. (#426)
  • The CLI now warns when your installed skill is out of date — if the bundled Playwright skill is newer than the one installed in your workspace, you'll be prompted to reinstall it. Re-run playwright-cli install --skills to update. (#427)

Fixes

  • fix(mcp): pass action timeout to browser_wait_for waitFor calls — wait_for now honors the configured action timeout instead of waiting indefinitely. (microsoft/playwright#41270)
  • fix(mcp): wait for next pause or context closure in browser_resume — resuming a paused session settles reliably. (microsoft/playwright#41293)
  • fix(mcp): assign caps as array for legacy --vision flag — the legacy --vision flag works again. (microsoft/playwright#41253)
  • fix(mcp): never include data: URL payloads in snapshot or network output — large data: URLs no longer flood snapshot and network output. (microsoft/playwright#41450)
  • fix(mcp): list a failed network request only once — failed requests are no longer duplicated in network output. (microsoft/playwright#41481)
  • fix(mcp): check tracing state before stopping in browser_stop_tracing — stopping tracing when it is not running no longer errors. (microsoft/playwright#41040)
  • fix(mcp): add missing .catch() on sessionLog write queue — a failed session-log write no longer crashes the session. (microsoft/playwright#41234)
    (microsoft/playwright#41382)