🎭 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.20 | ✅ | ✅ | ✅ |
| WebKit 15.4 | ✅ | ✅ | ✅ |
| Firefox 100.0.2 | ✅ | ✅ | ✅ |
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
Metadata
Release files for playwright 1.23.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| playwright-1.23.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| playwright-1.23.1-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| playwright-1.23.1-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| playwright-1.23.1-py3-none-macosx_11_0_universal2.whl | Python 3 | none | macOS 11.0+ universal2 (ARM64, x86-64) | Details |
| playwright-1.23.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl | Python 3 | none | macOS 10.13+ x86-64 | Details |
Total release size: 206.0 MB
Release files / playwright-1.23.1-py3-none-win_amd64.whl
| Download URL | playwright-1.23.1-py3-none-win_amd64.whl |
|---|---|
| Size | 26.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
72f2e21effda5f3f8a0a23988bc4b49b78ca6a78303159e6ee4aa514c2451ca0
|
|
BLAKE2b-256 checksum How to use checksums |
ee5e9fc6efe73bf38d4ff3dee620e0ed1ae414a9533eba0751526a46d314acb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-win32.whl
| Download URL | playwright-1.23.1-py3-none-win32.whl |
|---|---|
| Size | 26.5 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
f337c8fc4be9b5ebd63297ae235aae4b8e0cb694adfbef88478fc78712afca09
|
|
BLAKE2b-256 checksum How to use checksums |
086b1ac671c39eef6d5e3fd707eba0203cd584764bfcbbd1f42ee2b5d89918b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | playwright-1.23.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 32.2 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b8573ab3aa669c951421dd4cfc4c99f3f6c3f3a2a0318c6b91c45c0f5fa2f7c3
|
|
BLAKE2b-256 checksum How to use checksums |
7ba13ff63949d7b6472226cae48dc3347d62904082dc5fe3da411f57c6765e1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-manylinux1_x86_64.whl
| Download URL | playwright-1.23.1-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 32.3 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c928a6c2af723f7196dc0c243d857ac96b0951360166cc5cb114ae76c42c359e
|
|
BLAKE2b-256 checksum How to use checksums |
7c71cd6c6ae0358b82d5ea9b4dc8c67348ea374ecd510135c8b6ab9de4e18801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-macosx_11_0_universal2.whl
| Download URL | playwright-1.23.1-py3-none-macosx_11_0_universal2.whl |
|---|---|
| Size | 30.0 MB |
| Tags | Python 3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
34ec1c952e0dfe203e45e52109f490b6bd90ccecdfaa389dc551ed580c7d94b4
|
|
BLAKE2b-256 checksum How to use checksums |
97727c452c6349599cd30048c75edc5b972ed7c4ec05f3a9ed30917b9d5e6e4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-macosx_11_0_arm64.whl
| Download URL | playwright-1.23.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 28.5 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4559648db378752072965bce139993720212328fe1a009474e3136df381216a3
|
|
BLAKE2b-256 checksum How to use checksums |
595f9e0b82142c15adb0f6faf3f432e49f043933a6b269f76ff67a13b3360985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|
Release files / playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl
| Download URL | playwright-1.23.1-py3-none-macosx_10_13_x86_64.whl |
|---|---|
| Size | 30.0 MB |
| Tags | Python 3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
438c15c20930cbdb0a8d1d8d6e37f2d8f35e810303f10ac18f12fca0b15c2e11
|
|
BLAKE2b-256 checksum How to use checksums |
5ee78328a607e498bab03641b9c4fc8b362b33c1e4475908f4234d9b59a2b730
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.10 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
|