Discover / Data & Research

Playwright Python Automation

by microsoftPython

Python library for Playwright to automate Chromium, Firefox and WebKit for scraping.

Toolstable

Maturity: stable because 6y old, v1.61.0 released 35d ago. Derived from release and commit history, not a rating.

Stars
15k
Forks
1.2k
Downloads / mo
88.9M
Last commit
2026-07-31
License
Apache-2.0
Open issues
5

Market and trust evidence

Edition not yet matched

No exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.

Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.

In practice

Written by AI from this repository’s README · medium confidence

Cross browser end to end automation otherwise needs a different driver and API for each browser engine.

Use it when

When you need Python browser automation or end to end tests running on all three engines with sync or async APIs.

Not the right pick when

Wrong pick if your project is not Python, since the README points to separate Node.js, .NET and Java distributions.

Capabilities

  • automates Chromium, Firefox and WebKit with a single API
  • synchronous sync_playwright and asynchronous async_playwright APIs
  • page navigation and screenshot capture
  • supported on Linux, macOS and Windows

Cost: Free and open source

Install

Derived from the published package name in the repository, not from a model.

Video walkthroughs

Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.

What the repository ships

Ships CLAUDE.mdHas testsHas examplesSecurity policyCI configured

Detected from the actual files in the repository root.

Latest release v1.61.0

Published 2026-06-29

🔑 WebAuthn passkeys

New Credentials virtual authenticator, available via browserContext.credentials, lets tests register passkeys and answer navigator.credentials.create() / navigator.credentials.get() ceremonies in the page — no real hardware key required, works in all browsers:


context = browser.new_context()

# Seed a passkey your backend provisioned for a test user.
context.credentials.create("example.com",
    id=credential_id,
    user_handle=user_handle,
    private_key=private_key,
    public_key=public_key,
)
context.credentials.install()

page = context.new_page()
page.goto("https://example.com/login")
# The page's navigator.credentials.get() is answered with the seeded passkey.

You can also let the app register a passkey once in a setup test, read it back with credentials.get(), and seed it into later tests — see Credentials for details.

🗃️ Web Storage

New WebStorage API, available via page.localStorage and page.sessionStorage, reads and writes the page's storage for the current origin:


page.local_storage.set_item("token", "abc")
token = page.local_storage.get_item("token")
items = page.session_storage.items()

New APIs

🛠️ Other improvements

  • Playwright now supports Ubuntu 26.04.
  • HAR and trace recordings now include WebSocket requests.

Browser Versions

  • Chromium 149.0.7827.55
  • Mozilla Firefox 151.0
  • WebKit 26.5

This version was also tested against the following stable channels:

  • Google Chrome 149
  • Microsoft Edge 149

Tags

README

🎭 Playwright for Python PyPI Join Discord

Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright delivers automation that is ever-green, capable, reliable and fast. See how Playwright is better.

| | Linux | macOS | Windows |

| :--- | :---: | :---: | :---: |

| Chromium <!-- GEN:chromium-version -->151.0.7922.19<!-- GEN:stop --> | ✅ | ✅ | ✅ |

| WebKit <!-- GEN:webkit-version -->26.5<!-- GEN:stop --> | ✅ | ✅ | ✅ |

| Firefox <!-- GEN:firefox-version -->152.0.4<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Documentation

https://playwright.dev/python/docs/intro

API Reference

https://playwright.dev/python/docs/api/class-playwright

Example


from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        page.goto('http://playwright.dev')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()

import asyncio
from playwright.async_api import async_playwright

async def main():
    async with async_playwright() as p:
        for browser_type in [p.chromium, p.firefox, p.webkit]:
            browser = await browser_type.launch()
            page = await browser.new_page()
            await page.goto('http://playwright.dev')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.run(main())

Other languages

More comfortable in another programming language? Playwright is also available in

Related tools