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 104.0.5112.48 | ✅ | ✅ | ✅ |
WebKit 16.0 | ✅ | ✅ | ✅ |
Firefox 102.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://whatsmyuseragent.org/') 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://whatsmyuseragent.org/') 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.
Built Distributions
Close
Hashes for playwright-1.24.1-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7355d00cd2cb24265779b1cd9b18d9dcac17eea4a558d57ce20df650fc766f53 |
|
MD5 | 8bcc8cd498926986e7f1d7b9fa3aed7a |
|
BLAKE2-256 | 605793c43bad2b36b083b66a802feb2f49b33182c4bb993205d7212b3aa2da57 |
Close
Hashes for playwright-1.24.1-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ad16b26f4ae2d539c580273bd323907e24a125dbf0f38460466608d1cb39c83 |
|
MD5 | f3aec739c372d0fc619d4ca42072d885 |
|
BLAKE2-256 | 6c2c04cd091d16e2383ff287fb9b37a000a7810e7539a78a01fe2575ad611bdf |
Close
Hashes for playwright-1.24.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3f2acda4c22e78c94a47eb5b6f77f20c0313ec76f8e19d77c09bee1c44631d9 |
|
MD5 | a3eb51d9b347ea629277f7ca0cdeaa33 |
|
BLAKE2-256 | eeb9c9ab370d1901d21a0862e1369ff28901fa54a748ef512b40490fac937a0f |
Close
Hashes for playwright-1.24.1-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6add5cc97a8b3bca775c38ba3382fe73004d59adc9e404bf59f23f35442ede7 |
|
MD5 | 8b1d393aac9a3d74c4dcb1977359ee00 |
|
BLAKE2-256 | 95c34db8313d2a51c47660584ca04e19f258103e1208ec4847a47f14e8f8d033 |
Close
Hashes for playwright-1.24.1-py3-none-macosx_11_0_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0821859b625ad3dd1c89c9359d5d10d48ce1af81dc99d702437721ab72cd150 |
|
MD5 | 653890ab2d04fe18a65be7c8ecc8570b |
|
BLAKE2-256 | f94fe89d2e59783d8cba2331e984d466e86a89d9e1e02b6d40edb59a2effec63 |
Close
Hashes for playwright-1.24.1-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279c8f150662292814499b61ccbc35917f5041592ede1853e2a46e59456500df |
|
MD5 | fb786ae526e76fa3bc36474db3c47b64 |
|
BLAKE2-256 | aa82510be942e95ea0dffba0e4638567ae8249e825b581fe470496859b9afbeb |
Close
Hashes for playwright-1.24.1-py3-none-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04575c6682098a2f5e851a3fb04bc0e3269af6e00732798103a02f63e4409dfb |
|
MD5 | 82a8fd0c0365e18604111c8596c54c81 |
|
BLAKE2-256 | 87c5321647b4bd09895e2d9bdc8d60fd064865a78900aa0d8fb6ea0690aa3276 |