P
playwright
Apache-2.0TypeScriptPlaywright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
★ 94kFork 6k更新于 2026-08-01
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
Playwright 是一个用于 Web 测试和自动化的框架,通过单一 API 驱动 Chromium、Firefox 和 WebKit。它支持端到端测试、浏览器自动化脚本、AI 代理集成,并提供测试运行器、CLI、MCP 服务器和 VS Code 扩展等多种使用方式。
docker build -t playwright-app . && docker run --rm playwright-app
Playwright 支持 Chromium、Firefox 和 WebKit(包括 Safari)。
Playwright 支持多浏览器(Puppeteer 仅 Chromium),并提供更丰富的功能如自动等待、网络拦截和追踪。
对于测试运行器,运行 `npm init playwright@latest`;对于库,运行 `npm i playwright`。
是的,Playwright 内置了设备描述符(如 iPhone 15),可以模拟移动设备。