Playwright is a web automation and testing framework that drives Chromium, Firefox, and WebKit through a single API. It serves three audiences: test suites, browser automation scripts, and AI agents that need to operate a browser.
It comes in several forms. Playwright Test is an end-to-end test runner, the Playwright library handles scripted automation such as scraping, PDF generation, screenshots, and device emulation, and a VS Code extension runs, debugs, and records tests in the editor. For agents, Playwright MCP exposes browser control through the Model Context Protocol, and Playwright CLI gives coding agents such as Claude Code and GitHub Copilot a command-line interface that avoids loading large tool schemas and accessibility trees into the model context.
Agents see a page as a structured accessibility tree with element references, so they click and type by reference rather than from screenshots, with no vision model involved. The library is also available for Python, .NET, and Java, and runs headless or headed on Linux, macOS, and Windows.
| Browser | Linux | macOS | Windows |
|---|---|---|---|
| Chromium (Chrome for Testing by default) | Yes | Yes | Yes |
| WebKit | Yes | Yes | Yes |
| Firefox | Yes | Yes | Yes |
Features
- Auto-wait and web-first assertions: actions wait for elements to be actionable and assertions retry until conditions hold
- Locators: find elements by role, label, placeholder, or test ID
- Test isolation: each test runs in a fresh browser context, and saved authentication state is reused across tests
- Tracing: execution traces with DOM snapshots, network requests, console logs, screenshots, and video, inspected in the Trace Viewer
- Parallelism: tests run in parallel across configured browsers and shard across machines
- CodeGen: records browser interactions and writes the test code, including assertions
- Playwright MCP: a Model Context Protocol server with tools for navigation, form filling, screenshots, network mocking, and storage
- Playwright CLI: a token-efficient command-line interface for coding agents, with installable skills and a dashboard of live browser sessions
- Library automation: scraping, PDF generation, screenshots, mobile device emulation, and network interception
- Languages: TypeScript and JavaScript, Python, .NET, and Java


