A high-level API to automate web browsers
Project description
🎭 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 129.0.6668.29 | ✅ | ✅ | ✅ |
WebKit 18.0 | ✅ | ✅ | ✅ |
Firefox 130.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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for playwright-1.47.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ec1056042d2e86088795a503347407570bffa32cbe20748e5d4c93dba085280 |
|
MD5 | c8e8775e2f31aca509461b5da4f502ed |
|
BLAKE2b-256 | cb889a3c77025702e506fe04275e677676246ff0b2e6964de5d2527dfdab3416 |
Close
Hashes for playwright-1.47.0-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b977ed81f6bba5582617684a21adab9bad5676d90a357ebf892db7bdf4a9974 |
|
MD5 | 100ad7b3fee14f5133a05e52d2a6903e |
|
BLAKE2b-256 | 7d6c34225ee5707db5e34bffa77f05d152c797c0e0b9bf3d3a5b426d99160f8f |
Close
Hashes for playwright-1.47.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a1b61473d6f7f39c5d77d4800b3cbefecb03344c90b98f3fbcae63294ad249 |
|
MD5 | 47e105438ae5f39e249ec6580e8d0898 |
|
BLAKE2b-256 | d650b573c13d3748a1ab94ed45f2faeb868c63263df0055f57028c4cc775419f |
Close
Hashes for playwright-1.47.0-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1935672531963e4b2a321de5aa59b982fb92463ee6e1032dd7326378e462955 |
|
MD5 | 3e0bc4e3499d4fb3b3ea5a9b9c255eec |
|
BLAKE2b-256 | 80a6c5152c817db664d75c439c2bd99d51f906a31c1df4a04e673ef51008b12f |
Close
Hashes for playwright-1.47.0-py3-none-macosx_11_0_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e212dc472ff19c7d46ed7e900191c7a786ce697556ac3f1615986ec3aa00341 |
|
MD5 | 5bbca030bf187b5c5171f9866bcde432 |
|
BLAKE2b-256 | 5a6a3cff2abfa4b4c52e1fa34fa8b71bf09cc2a89b03b7417733e5138f1be61d |
Close
Hashes for playwright-1.47.0-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc820faf6885f69a52ba4ec94124e575d3c4a4003bf29200029b4a4f2b2d0ab |
|
MD5 | c860c1ebf5d8dc1a61b11e371d58f666 |
|
BLAKE2b-256 | 42172300e578b434b56ebfc3d56a5e0fe6dc5e99d6ff43a88fa492b881f3b7e3 |
Close
Hashes for playwright-1.47.0-py3-none-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f205df24edb925db1a4ab62f1ab0da06f14bb69e382efecfb0deedc4c7f4b8cd |
|
MD5 | 3fe4fc93941bd6deb9ddbf5442195aa1 |
|
BLAKE2b-256 | f87001cad1d41861cd939fe66bff725771dd03f2de39b7c25b4479de2f583ce0 |