Repolode
microsoft

microsoft/playwright

Playwright is a framework for web testing and automation that drives Chromium, Firefox, and WebKit through one API.

Open-source alternative to:BrowserStackSelenium IDE

Stars
98,174
Forks
6,660
Open issues
178
Last commit
5 hours ago

What is it?

Playwright lets developers write end-to-end tests and browser automation scripts that run against Chromium, Firefox, and WebKit with a single API. Its test runner provides browser isolation for each test, auto-waiting before actions, and web-first assertions that retry until conditions are met.

Beyond testing, the same engine powers standalone scripts for tasks such as screenshots, PDF generation, mobile device emulation, and network request interception. Playwright also ships a CLI and an MCP server aimed at coding agents and LLM-driven browser control, plus a VS Code extension for running, debugging, and recording tests.

Official bindings are available for Python, .NET, and Java alongside TypeScript and JavaScript.

Key features

  • 01Runs tests and scripts across Chromium, Firefox, and WebKit with one API.
  • 02Auto-waits for elements to be actionable and retries web-first assertions.
  • 03Gives each test an isolated browser context and supports saving auth state.
  • 04Records traces, screenshots, and videos on failure for inspection in the Trace Viewer.
  • 05Offers role- and label-based locators that reflect how users see the page.
  • 06Provides an MCP server and CLI for AI agents to control a browser.

Use cases

  • End-to-end testing of web applications across multiple browsers.
  • Browser automation scripts for scraping, screenshots, or PDF generation.
  • Letting AI coding agents or LLM assistants drive a real browser.
  • Debugging failing UI tests with recorded traces in VS Code.

Quick start

  1. 1

    Scaffold a new Playwright Test project

    npm init playwright@latest
  2. 2

    Run the tests

    npx playwright test

Things to know

  • Browser binaries must be installed separately and each test run uses real browsers, so suites are heavier than unit tests.

Topics

FAQ

What is playwright?
Playwright is a framework for web testing and automation that drives Chromium, Firefox, and WebKit through one API. Playwright lets developers write end-to-end tests and browser automation scripts that run against Chromium, Firefox, and WebKit with a single API. Its test runner provides browser isolation for each test, auto-waiting before actions, and web-first assertions that retry until conditions are met.
Is playwright free to use? What license does it have?
playwright is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is playwright still maintained?
Actively maintained. The last commit to playwright was on Oct 20, 2026.
What can I use playwright for?
End-to-end testing of web applications across multiple browsers. Browser automation scripts for scraping, screenshots, or PDF generation. Letting AI coding agents or LLM assistants drive a real browser. Debugging failing UI tests with recorded traces in VS Code.
How do I install playwright?
Scaffold a new Playwright Test project: npm init playwright@latest Run the tests: npx playwright test
Where can I get playwright?
The source code and installation instructions are on GitHub: https://github.com/microsoft/playwright

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects