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

File metadata

  • Download URL: playwright_firefox-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 06dddba4817daa8bde686cc24302ded2a87c3552eb89085cd9502cd66629824a
MD5 c8078d1ac803f448f6b1d8b79e95493d
BLAKE2b-256 13d1f7afc077406a2670c1f09e3b0d2ae8256b9d62593c04bdce7aef0cb07184

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright_firefox-1.0.2-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b7f0b32fd98cd7918ebd32cd734140209d3770f4373261df86f27a09c05190ad
MD5 a99476522f01821f6e57f7d0f9485220
BLAKE2b-256 1184c95f5babf36028c6460c6de764663ad93a1e5e8f994c46e732d9dff73abb

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