Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: microsoft/playwright-cli

v0.1.14

10 Jun 00:19
@yury-s yury-s
9b118a1
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Highlights

  • Annotate actions in recorded videos — new video-show-actions / video-hide-actions commands draw a callout naming each action and highlighting its target in the recording. (microsoft/playwright#40914)
  • exposeNetwork and other connect options for remote browsersremoteEndpoint now accepts a full ConnectOptions object, so settings like exposeNetwork and headers apply to remote connections. (microsoft/playwright#40964)
  • Bounded output size--output-max-size caps captured output and evicts to disk after the response, keeping large sessions manageable. (microsoft/playwright#41031)

Fixes

  • fix(cli): support attaching to a Playwright browser server endpoint (microsoft/playwright#41154) — playwright-cli attach --endpoint=<ws-url> connects to a running browser server instead of erroring out. (microsoft/playwright#41203)
  • fix(mcp): support moz-firefox BiDi channels via --browser — connect to Firefox over BiDi using --browser. (microsoft/playwright#41126)
  • fix(mcp): keep remoteHeaders working for remote browser endpoint — custom headers are sent again when connecting to a remote endpoint. (microsoft/playwright#41156, #40828)
  • fix(cli): persist traces when CLI attaches to existing CDP browser — traces are now saved when attaching over CDP. (microsoft/playwright#40810)
  • fix(cli): accept single --modifiers value for click and dblclick--modifiers=Shift works without requiring a list. (microsoft/playwright#40784)
  • fix(cli): trim overlong session names to fit unix socket path limit — long session names no longer break the daemon socket. (microsoft/playwright#40898)
  • fix(cli): do not pass PLAYWRIGHT_CLI_SESSION as daemon --endpoint — fixes spurious endpoint resolution from the session env var. (microsoft/playwright#41019)
  • fix(mcp): report missing ffmpeg distinctly from missing browser — clearer error when video recording fails due to a missing ffmpeg. (microsoft/playwright#40867)
  • fix(mcp): report invalid tool arguments — invalid arguments now produce a readable error instead of failing silently. (microsoft/playwright#40979)
  • fix(mcp): use writable cache dir for MCP user data, not browsers path — avoids permission errors on read-only browser installs. (microsoft/playwright#40961)
  • fix(mcp): use waitUntil commit for navigate back/forward — back/forward navigation resolves more reliably. (microsoft/playwright#41153)
  • fix(mcp): tear down dashboard server on cli show --killcli show --kill fully stops the dashboard. (microsoft/playwright#40968)
  • fix(tracing): mkdir tracesDir before live .stacks writes — fixes a crash when the traces directory does not yet exist. (microsoft/playwright#40730)
  • docs(cli): document & URL escaping on Windows — guidance on escaping & in URLs on cmd.exe and PowerShell. (microsoft/playwright#40742)

Upgrading

npm install -g @playwright/cli@0.1.14
Assets 2
Loading

v0.1.13

07 May 23:01
@yury-s yury-s
3a1bafc
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Fixes

  • fix(mcp): forward browser-level CDP commands in extension modecookie-list, state-save, and other browser-scoped commands now work when attached via the Chrome extension. (microsoft/playwright#40706)
Loading
sheaking reacted with thumbs up emoji
1 person reacted

v0.1.12

06 May 23:01
@yury-s yury-s
695107b
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Highlights

  • Chrome extension now supports multiple tabs (#373tab-new, tab-list, etc. work in attach --extension sessions.

  • Multi-screenshot UI Review in the dashboard — collect, annotate, and submit several screenshots in one dashboard session, with a sidebar of frames and per-comment highlight.

Fixes

  • fix(mcp): recover from page renderer crash — the current tab is reopened automatically when its renderer crashes. (microsoft/playwright#40617)
  • fix(mcp): auto-recover when remote browser disconnects mid-session — the next tool call transparently reconnects. (microsoft/playwright#40652)
  • fix(mcp): anchor aria-ref regex in target resolution — locators with e\d+ substrings are no longer misclassified. (microsoft/playwright#40610)
  • fix(mcp): skip base64 image when filename is provided — explicit-filename screenshots no longer also embed the image in the response. (microsoft/playwright#40577)
Loading

v0.1.11

01 May 22:35
@yury-s yury-s
212b11d
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Fixes

  • fix(dashboard): handle null viewport in annotate screenshotplaywright-cli annotate against a headed browser launched with viewport: null produced an empty annotated screenshot; the dashboard now falls back to window.innerWidth/innerHeight. (microsoft/playwright#40569)
Loading

v0.1.10

30 Apr 20:17
@yury-s yury-s
8d95174
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Highlights

  • Network inspection split into numbered commands (#377) — network is replaced with:

    • requests — numbered list of requests with stable indexes
    • request <num> — full details for one request
    • request-headers <num>, request-body <num>, response-headers <num>, response-body <num> — pipe-friendly part extractors

    Bodies are no longer inlined; pass --filename on any part-command to save the result to a file. (microsoft/playwright#40447, microsoft/playwright#40454)

  • Spec-driven testing skill — a new references/spec-driven-testing.md reference guides agents through a plan / generate / heal workflow for driving Playwright tests from a written spec. (microsoft/playwright#40460)

Behavior changes

  • Read-only data-fetching commands (cookie-list, cookie-get, localstorage-list, localstorage-get, sessionstorage-list, sessionstorage-get, route-list, request-headers, request-body, response-headers, response-body) now emit raw output by default — no more ### Result wrapper, no --raw needed. (microsoft/playwright#40473)
  • Extension mode now ignores the browser section of any loaded config file (both userDataDir and executablePath); only the browser/channel from --browser or PLAYWRIGHT_MCP_BROWSER applies. (microsoft/playwright#40475)
  • requests now appends a hint when static requests are filtered out, telling the user to pass --static to see them. (microsoft/playwright#40454)

Fixes

  • fix(cli): resolve initPage/initScript paths and surface load errors (#290) — relative initPage / initScript paths from --config files now resolve against the config dir (matching Vite/Vitest/ESLint), and CLI-flag / env-var entries resolve against cwd. Load errors are no longer silently swallowed. (microsoft/playwright#40451)
  • fix(mcp): detect extension in non-default Chrome profiles — the --extension preflight now scans every Profile * subdirectory under the user data dir, not just Default. (microsoft/playwright#40471)
  • fix(mcp): surface unhandled rejections instead of crashing the server — async errors from user-installed callbacks (e.g. a page.route handler) are now reported on the next tool response instead of tearing down the MCP transport. (microsoft/playwright#40452)
Loading

v0.1.9

25 Apr 03:20
@pavelfeldman pavelfeldman
ee24ded
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Highlights

  • show --annotate — provide agent with visual and structural feedback while developing or testing. (microsoft/playwright#40262, microsoft/playwright#40238)

    Screenshot from 2026年04月24日 17-58-53
  • drop command for files and clipboard-like data — drop files or typed data (text/plain, text/html, etc.) onto an element from outside the page. Useful for file-upload widgets and drag-from-desktop scenarios where upload doesn't fit. (microsoft/playwright#40367, microsoft/playwright#40283)

  • highlight command for visual confirmation — show a persistent highlight overlay on an element (with optional custom CSS via --style), and hide one or all overlays with --hide. Lets coding agents visually confirm what they're about to act on. (microsoft/playwright#40213, microsoft/playwright#40215, microsoft/playwright#40219)

  • generate-locator command — produce a stable Playwright locator expression for an element ref. Pair with --raw to feed locators straight into test assertions. (microsoft/playwright#40313)

  • --json global flag — wrap every reply as structured JSON for machine parsing. (microsoft/playwright#40284)

    > playwright-cli eval --json "document.body.childNodes.length"
    {
     "result": "4"
    }
  • snapshot --boxes — include each element's bounding box as [box=x,y,width,height] in aria snapshots, making it easy to drive coordinate-based tools off of a snapshot. (microsoft/playwright#40389)

    - paragraph [ref=e35] [box=86,381,700,99]:
     - text: One API to drive Chromium, Firefox, and WebKit — in your tests, your scripts...
     - link "TypeScript" [ref=e36] [cursor=pointer] [box=535,417,98,27]:
     - /url: https://playwright.dev/docs/intro
     - text: ","
     - link "Python" [ref=e37] [cursor=pointer] [box=644,417,66,27]:
     - /url: https://playwright.dev/python/docs/intro
     - text: ","
     - link ".NET" [ref=e38] [cursor=pointer] [box=721,417,42,27]:
     - /url: https://playwright.dev/dotnet/docs/intro
     - text: ", and"
     - link "Java" [ref=e39] [cursor=pointer] [box=127,450,38,27]:
     - /url: https://playwright.dev/java/docs/intro
  • Discover attachable system browsers with list --all — surfaces Chrome/Edge instances running with remote debugging so attach --cdp=<channel> has something to connect to. (microsoft/playwright#40253, microsoft/playwright#40342)

  • detach command and channel-named attach sessions — attach sessions now use the channel name (e.g. chrome, msedge) and can be cleanly detached without closing the underlying browser. (microsoft/playwright#40408)

  • Skill discoverable from --helpplaywright-cli --help now prints the path to the installed agent skill, so coding agents can find it without being told. (microsoft/playwright#40274)

  • run-code accepts a fileplaywright-cli run-code --filename=./script.js runs a Playwright snippet from disk instead of the command line. (microsoft/playwright-cli#337)

Behavior changes

Fixes

  • fix(cli): exit daemon when extension connection fails — no more orphaned daemons when the browser extension can't connect. (microsoft/playwright#40328)
  • fix(cli): prefix bare filenames with ./ in printed links — output file links now open reliably in terminals and editors. (microsoft/playwright#40311)
  • fix(cli): show "(no browsers)" when list is empty without --all — clearer empty-state output from list. (microsoft/playwright#40277)
  • fix(mcp): disable CDP timeout for extension connection — long-running extension attaches no longer time out. (microsoft/playwright#40265)
  • fix(mcp): support page close via extension in protocol v2 — closing tabs through the extension works again. (microsoft/playwright#40249)
  • fix(mcp): throw clear error for tab creation in extension protocol v1 — replaces a cryptic failure with a readable message. (microsoft/playwright#40261)
  • fix(mcp): ensure --proxy-server overrides config-file proxy — explicit CLI proxy now wins over the config value. (microsoft/playwright#40212)
  • fix(server): close browsers when PlaywrightServer shuts down — cleaner shutdown, no lingering browser processes. (microsoft/playwright#40294)

Upgrading

npm install -g @playwright/cli@latest
Loading
lingmingyu reacted with thumbs up emoji
1 person reacted

v0.1.8

14 Apr 19:03
@pavelfeldman pavelfeldman
0406ada
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Highlights

  • Remote debugging mode against your local Chrome (#358) — you can now drive the Chrome you already have open, with its existing logins, instead of a sandboxed copy. playwright-cli attach --cdp=chrome (also msedge, chrome-canary, etc.) resolves the channel and connects via chrome://inspect/#remote-debugging. Supports Chrome / Chrome Beta / Dev / Canary and Edge / Edge Beta / Dev / Canary on Linux, macOS, and Windows. (microsoft/playwright#40177)
  • Heavy CPU/memory and orphaned Chrome processes (#360) — no more manually killing leftover Chrome processes after long CLI/agent sessions. (microsoft/playwright#40190)

Fixes

  • fix(mcp): no tombstones on the server registry level — defaults browserToken to 'chrome' when none is specified (no more undefined in userDataDir paths); simplifies stale-entry cleanup in the server registry; passes force to session stop during delete-data. (#40179)

Upgrading

npm install -g @playwright/cli@0.1.8
Loading

v0.1.7

12 Apr 00:03
@yury-s yury-s
1a3b1f3
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's Changed

Fixes

  • snapshot: resolve element refs correctly so snapshots taken after navigation no longer fail to look up references (microsoft/playwright#40114)
  • kill-all: match the current cliDaemon.js process so playwright-cli kill-all actually terminates running daemons (microsoft/playwright#40165)
Loading
PhilosophiMoonbeam reacted with thumbs up emoji hiepluong-lmapps reacted with rocket emoji
2 people reacted

v0.1.6

07 Apr 23:29
@yury-s yury-s
278fcad
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

Bug Fixes

  • Dashboard: current workspace sessions are shown first and expanded — fixes ordering and expansion of the current workspace group in playwright-cli show when running outside a workspace.
Loading

v0.1.5

03 Apr 18:12
@yury-s yury-s
a0d5bfd
This commit was created on GitHub.com and signed with GitHub’s verified signature.
GPG key ID: B5690EEEBB952194
Verified
Learn about vigilant mode.

Choose a tag to compare

What's New

Pipe CLI Output with --raw

The new global --raw flag strips page status, generated code, and snapshot sections from the output, returning only the result value. Use it to pipe command output into other tools:

playwright-cli --raw eval "JSON.stringify(performance.timing)" | jq '.loadEventEnd - .navigationStart'
playwright-cli --raw eval "JSON.stringify([...document.querySelectorAll('a')].map(a => a.href))" > links.json
TOKEN=$(playwright-cli --raw cookie-get session_id)
playwright-cli --raw localstorage-get theme
playwright-cli --raw snapshot > before.yml
playwright-cli click e5
playwright-cli --raw snapshot > after.yml
diff before.yml after.yml

Commands that don't produce output return nothing.


Attach to Browser via CDP

The attach command now supports connecting to an existing browser via a CDP endpoint URL:

playwright-cli attach --cdp=http://localhost:9222

This makes it easy for coding agents to connect to a browser that's already running (e.g. a dev browser or a remote debugging target) without launching a new one.


attach --extension Replaces open --extension

Connecting to a browser via the Playwright MCP Bridge extension has moved from open to the dedicated attach command. You can also specify the browser:

playwright-cli attach --extension
playwright-cli attach --extension=chrome
playwright-cli attach --extension=msedge

Bug Fixes

  • tab-new now navigates to the URL when provided — previously playwright-cli tab-new https://example.com opened a blank tab instead of navigating.
  • list command no longer fails when workspaceDir is undefined — fixes a crash when running playwright-cli list outside a workspace.
Loading
Previous 1
Previous

AltStyle によって変換されたページ (->オリジナル) /