Skip to main content

A high-level API to automate web browsers

Project description

🎭 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 139.0.7258.5
WebKit 26.0
Firefox 140.0.2

Documentation

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

API Reference

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

Example

from playwright_firefox.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_firefox.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playwright_firefox-1.0.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file playwright_firefox-1.0.1.tar.gz.

File metadata

  • Download URL: playwright_firefox-1.0.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for playwright_firefox-1.0.1.tar.gz
Algorithm Hash digest
SHA256 76a7980cbf3082555d3fa9a874e08608ea6ed2b1a858d2431cb62a625b42f7f4
MD5 58a1b4ca8a81d921cab9220e1010d8eb
BLAKE2b-256 2e50036cf6e85aeb42f68afbcd78a5ac583eca454cd41d43e165b5ccefc051e7

See more details on using hashes here.

File details

Details for the file playwright_firefox-1.0.1-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for playwright_firefox-1.0.1-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 df3fe9d47ecb8c904ae3bd3dd06fe45365edb2f8aa55fb20467813375dcc4d2e
MD5 e803512b29dcc943513097ad2566e751
BLAKE2b-256 68df5ebf6c7cf79979bd75da10cbea74bfe73943adb7852b74fc722aec5a69c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page