playwright-python

Installation
SKILL.md

Playwright in Python

Playwright drives a real browser (Chromium/Firefox/WebKit) from Python. Use it for three things in this repo:

  1. Visual verification — screenshot a running app so Claude can Read the PNG and see what the user sees. This closes the loop when iterating on a UI: edit code → screenshot → look → edit again.
  2. Scraping rendered pages — anything that needs JavaScript to run (SPAs, dashboards, lazy-loaded data).
  3. End-to-end testing with pytest — pytest-playwright ships fixtures so each test gets a fresh page.

The async API is the default. Use sync only when calling from a script that can't run an event loop (rare) or from a notebook that already has one running (also rare; prefer async there too).

When NOT to use this

  • The page is plain HTML with no JS — httpx or requests + selectolax/beautifulsoup4 is faster and lighter.
  • You need a headless API client — Playwright is for browsers. Use httpx for raw HTTP.
  • The reference skill microsoft/playwright-cli is a stateful Node CLI; this skill is the Python alternative. Don't conflate them.

Install (handle this first if missing)

Playwright has two install steps that are easy to forget:

Installs
1
Repository
bmsuisse/skills
GitHub Stars
2
First Seen
Jul 26, 2026
playwright-python — bmsuisse/skills