CreateWithAIHub

Library Microsoft

Playwright

Microsoft's open-source framework for end-to-end testing and browser automation across Chromium, Firefox and WebKit.

Visit website ↗
Save

What it is

Playwright is Microsoft's framework for web testing and automation that drives Chromium, Firefox and WebKit through one API. It includes Playwright Test, a test runner with auto-waiting, web-first assertions, isolated browser contexts, parallel runs and a trace viewer, and a library for scripts such as scraping, PDFs and screenshots, with bindings for TypeScript/JavaScript, Python, .NET and Java. This entry is the framework itself; Playwright MCP, the separate MCP server built on it for AI agents, has its own entry, and the related Playwright CLI and Test Agents target coding agents.

What it's useful for

Writing end-to-end tests for a signup flow that run headless in CI on Chromium, Firefox and WebKit, with traces saved on failure.

Key features

  • Playwright Test runner: auto-wait, web-first assertions, role-based locators, test isolation and parallelism
  • Trace Viewer, screenshots and video on failure; codegen and locator picking in the VS Code extension
  • Library mode for browser scripts: screenshots, PDFs, device emulation and network interception
  • Test Agents (planner, generator, healer) set up with npx playwright init-agents for VS Code, Claude, Codex or OpenCode
  • Playwright CLI (@playwright/cli) for coding agents, described as more token-efficient than MCP
  • Bindings for TypeScript/JavaScript, Python, .NET and Java

How to use it

Before you start

  • Node.js 22.x, 24.x or 26.x (for the Node.js version)
New test project
npm init playwright@latest
Add to an existing project
npm i -D @playwright/test
npx playwright install
Library only
npm i playwright
Test Agents for Claude Code
npx playwright init-agents --loop=claude

Commands are copied from the official documentation. Check the docs for the latest version before running them.

Limitations to know

  • Node.js runner requires Node.js 22, 24 or 26
  • Supported OS: Windows 11+ / Server 2019+ / WSL, macOS 14+, Debian 12/13 and Ubuntu 22.04/24.04/26.04
  • Downloads its own browser builds (Chrome for Testing by default for Chromium)
  • Not an MCP server by itself; use Playwright MCP for MCP clients

MCP servers for this

Open-source MCP server that gives coding agents simplified Figma layout and styling data to implement designs.

Free plan + paidOpen source

Community MCP server and Blender addon that let an AI agent model, light and render scenes in a running Blender.

Free plan + paidOpen source

Docker Desktop's MCP Toolkit and Catalog that run MCP servers in containers and connect them to clients through one gateway.

Free plan + paidOpen source

Skills for this

Design skill for coding agents with 24 commands to steer, critique and audit UI, plus a rule-based detector for AI-slop patterns.

FreeOpen source

Collection of 93 plugins with 199 subagents, 185 skills and 103 commands, written once and adapted to seven coding tools.

FreeOpen source

Skills-based software development workflow for coding agents: brainstorm, plan, test-first, subagent execution.

FreeOpen source

Related resources

Coding agent that runs each thread in a cloud sandbox, with a CLI, web, desktop and mobile apps.

Free plan + paid

Anthropic's agentic coding tool that works in your terminal, IDE, desktop app and on the web.

Paid

OpenAI's open-source coding agent that runs locally in your terminal, with IDE, desktop and cloud variants.

Free plan + paidOpen source

Factory's Droid coding agent for the terminal, desktop app, IDEs and Slack, with BYOK on a free plan.

Free plan + paid

Articles that mention Playwright

Type to search. Use ↑ ↓ and Enter.