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.0.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.0.tar.gz.

File metadata

  • Download URL: playwright_firefox-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e02200e712a4693d2d981654b5c902603674366fd498f8ee94291799e3c4473c
MD5 fe1b9ebcf3b661b1fb2f03899c9aea47
BLAKE2b-256 11ad251e88a02d414758fc6c8838146e6f0f008d26284ce27bb0d4194f50966b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright_firefox-1.0.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e9fda7451590d2da416259cf1e7f8869d8aacbb2edc9c432581d189f529d24c4
MD5 05d266f9526ea00ebffb1b658d0d4f00
BLAKE2b-256 2a92be889cc73135c73627fbbe1588e788e2e7c99cc4e3097411fb9d662208c6

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