Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

playwright-python

> 测试质量
Open source

Python version of the Playwright testing and automation library.

14.9K stars0 likes4 views
WebsiteGitHub

About

Python version of the Playwright testing and automation library.

🎭 Playwright for Python

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 151.0.7922.34 ✅ ✅ ✅
WebKit 26.5 ✅ ✅ ✅
Firefox 153.0 ✅ ✅ ✅

Documentation

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

API Reference

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

Example

python
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()
python
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

  • Node.js (JavaScript / TypeScript),
  • .NET,
  • Java.

Issues· 20 open

View all issuesOpen on GitHub
  • #3208

    [Feature]: relax the pyee upper-bound pin (currently <14) in pyproject.toml

    Updated Sep 30, 2026
  • #3216

    [Bug]: Playwright 1.63.0 Module Not Found on Windows (conda-forge) - playwright not playing nicely with conda and Python 3.12 and later...

    Updated Sep 26, 2026
  • #3207

    [Feature]: Official APIs to resolve/map ephemeral aria-refs to stable locators for LLM automation

    Updated Sep 24, 2026
  • #3195

    Does `context.storage_state()` Work Across All Sites?

    Updated Sep 10, 2026
  • #3188

    [Bug]: RegExp values are not serialized by evaluate(), and returned RegExps leak internal protocol JSON

    Updated Aug 26, 2026
  • #3186

    [Bug]: 0.0 is serialized as -0 when passed to evaluate()

    Updated Aug 24, 2026
  • #3172

    ⚠️ Please file issues at https://github.com/microsoft/playwright

    Updated Aug 12, 2026

> Tags

Pythonchromiumfirefoxplaywrightwebkit

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.