Twitxy Saved

Playwright

Verified account This account is verified. Learn more

@playwrightweb

Playwright is an automation library for cross-browser end-to-end testing by @Microsoft. Available in JavaScript, TypeScript, Python, Java and .NET.
playwright.dev Joined May 2020
5 Following 20K Followers 163 Posts

Latest posts 5

Pinned post

Playwright Verified account @playwrightweb
Playwright MCP or Playwright CLI: pick either, your agent gets all of this 🎭

🧰 WebMCP: pages hand the agent their own tools
πŸ”Ž Find: grep the page instead of reading all of it
πŸͺΆ Leaner snapshots, fewer tokens on every step
πŸ”΄ Do it by hand once, get Playwright code back
πŸ—£οΈ Codegen in TypeScript, Python, Java and C#
πŸ”Œ Your real Chrome, logins included
🎬 60 fps video with an animated cursor and chapters
πŸ“± Mobile and device emulation
πŸŒ— Light/dark flipped mid-session
🌐 Mock any request, or pull the plug and go offline
πŸ“Έ Hi-res screenshots
🩹 Crashed tab or dropped connection? It'll recover

npx @playwright/mcp@latest
github.com/microsoft/play…

npm i -g @playwright/cli@latest
github.com/microsoft/play…
github.com GitHub - microsoft/playwright-mcp: Playwright MCP server Playwright MCP server. Contribute to microsoft/playwright-mcp development by creating an account on GitHub.
49 replies 126 reposts 1.2K likes 81K views View on X
Playwright Verified account @playwrightweb
Playwright and browser security reminder.

We saw a post suggesting that you delete Playwright because it bundles browsers with CVEs. That is a misconception. Do not delete PlaywrightπŸ™ƒ. Here is how it works and what you should do.

No Playwright package bundles a browser. Agents on Playwright MCP or CLI run your stable Chrome, which gets Chrome's security updates, with the sandbox on.

πŸ€– If you use Playwright MCP or the Playwright CLI

They use the stable Chrome / Edge on your machine, so it gets its normal updates. No config edit is needed.

πŸ§ͺ If you use the test runner

When you run npx playwright install, Playwright downloads Chrome for Testing, pinned to the build we tested that release against. The pin is on purpose. Your tests run on the same browser on every laptop and CI machine, and a browser
update cannot suddenly break your suite. You choose when to move by upgrading Playwright. New releases usually pin a build ahead of stable Chrome, so you see breakage before your users do.

We recommend this for full e2e test suites on your own trusted app. This build can miss Chrome security fixes until the next Playwright release, and by default it runs with the sandbox off. Do not use it on the hostile web.

πŸ“š If you use the library API

chromium.launch() has the same defaults: the pinned build with the sandbox off. If your code visits pages you don't control (scrapers, agent scripts), max out protection:

chromium.launch({ channel: 'chrome', chromiumSandbox: true })

πŸ”’ Always keep Chrome / Edge updated. Some bugs can escape a sandbox.

Happy testing!
45 replies 277 reposts 2.4K likes 171K views View on X
Playwright Verified account @playwrightweb
🧱 Component testing in Playwright has a new shape: stories & galleries.

✍️ A story wraps your component in one scenario β€” props, providers, mock data β€” in a *.story.tsx file next to the component.
πŸ–ΌοΈ A gallery page, served by your own dev server, renders stories on demand β€” React, Vue, Svelte, Solid, anything.

Using @playwright/experimental-ct-*? Give the new model a try and tell us how it goes:
πŸ‘‰ github.com/microsoft/play…

Docs: playwright.dev/docs/test-comp…
github.com Component testing has a new story Β· Issue #42139 Β· microsoft/playwright Component testing has a new story β€” try it and tell us what you think With v1.62, Playwright shipped a new approach to component testing built on stories and a gallery page, driven by the built-in ...
9 replies 21 reposts 197 likes 27K views View on X
Playwright Verified account @playwrightweb
🎭 Catching up on Playwright releases β€” v1.60, v1.61 and v1.62 are out!

Highlights:

πŸ”‘ WebAuthn passkeys β€” a virtual authenticator lets you test passkey sign-in in every browser, no hardware key needed
πŸ›‘ AbortSignal support β€” cancel actions, navigations and assertions with a standard AbortController
πŸͺ locator.drop() β€” simulate external drag-and-drop of files onto upload zones, cross-browser
πŸ—ƒοΈ page.localStorage / page.sessionStorage β€” read and write web storage directly
πŸ–ΌοΈ WebP screenshots for visual comparisons β€” just name your snapshot .webp
πŸ” retryStrategy: 'isolated' β€” run retries at the end, one by one, free of interference
πŸ€– Playwright MCP server and CLI now ship in the box: npx playwright mcp

Full release notes: playwright.dev/docs/release-n…
playwright.dev Release notes | Playwright Version 1.65
8 replies 25 reposts 295 likes 26K views View on X