This is an early release preview. You may encounter bugs.
Playwright Python logo
Unclaimed

Tool interface

Playwright Python

Browser-automation library that drives Chromium, Firefox, and WebKit through one API, with sync and async interfaces

Built by Microsoft

A+ 90/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Playwright Python.

Playwright for Python is the Python port of Playwright, a library that automates Chromium, Firefox, and WebKit through a single API. It offers both a synchronous and an asynchronous interface, and runs browsers headless or headed on Linux, macOS, and Windows.

Browser Linux macOS Windows
Chromium Yes Yes Yes
WebKit Yes Yes Yes
Firefox Yes Yes Yes

Beyond scripted automation, the wider Playwright project targets testing and AI agents. Its test tooling waits for elements to be actionable before acting and retries assertions until conditions hold, gives each test an isolated browser context, and records traces with DOM snapshots, network requests, and console logs. For agents, it exposes pages as structured accessibility trees (roles, names, and refs) instead of screenshots, through an MCP server and a command-line interface for coding agents. The same library is also available for Node.js, .NET, and Java.

  • One API, three engines: Chromium, Firefox, and WebKit driven through the same calls
  • Sync and async: a synchronous API and an asyncio-based API with matching capabilities
  • Cross-platform: Linux, macOS, and Windows, headless or headed
  • Auto-waiting: actions wait until elements are actionable and assertions retry until conditions are met
  • Test isolation: each test gets a fresh browser context, with saved authentication state reusable across tests
  • User-facing locators: selectors such as role, label, placeholder, and test ID instead of CSS paths
  • Tracing: a timeline of execution with DOM snapshots, network requests, console logs, and screenshots
  • Code generation: record browser actions and generate test code and assertions
  • Agent access: structured accessibility snapshots, an MCP server, and a CLI for coding agents

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Playwright Python.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Playwright Python →

Browse the catalog