GitXplorerGitXplorer
m

playwright-python

public
12190 stars
938 forks
47 issues

Commits

List of commits on branch main.
Verified
4ae12bd37016d7fe927076befdd974137fd69704

build(deps): bump pytest-asyncio from 0.25.0 to 0.25.1 (#2711)

ddependabot[bot] committed 11 days ago
Verified
6d777fedc2926452978d52ba3af3fe8328c4d2bf

build(deps): bump mypy from 1.13.0 to 1.14.0 (#2695)

ddependabot[bot] committed 19 days ago
Verified
70c5031cc78439ae6ca6d03984a7de0d0eac7290

build(deps): bump pytest-asyncio from 0.24.0 to 0.25.0 (#2690)

ddependabot[bot] committed a month ago
Verified
00fbc3c6a6ca104c4d016b2341e42d7637ff171b

fix(webSocketRoute): allow no trailing slash in route matching (#2687)

mmxschmitt committed a month ago
Verified
4f2cdde7af89a85d53ac3ea6e00823b7fd72ef25

build(deps): bump twisted from 24.10.0 to 24.11.0 (#2677)

ddependabot[bot] committed a month ago
Verified
8429cf083ae3a61cbeaf90e99a5d352e619979e4

build(deps): bump pytest from 8.3.3 to 8.3.4 (#2678)

ddependabot[bot] committed a month ago

README

The README file for this repository.

🎭 Playwright for Python PyPI version Anaconda version 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 131.0.6778.33
WebKit 18.2
Firefox 132.0

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