🎭 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 153.0.8010.12 | ✅ | ✅ | ✅ |
| WebKit 26.6 | ✅ | ✅ | ✅ |
| Firefox 155.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
Release files for playwright 1.63.0
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.63.0-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| playwright-1.63.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| playwright-1.63.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| playwright-1.63.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| playwright-1.63.0-py3-none-manylinux1_x86_64.whl | Python 3 | none | Linux glibc 2.5+ x86-64 | Details |
| playwright-1.63.0-py3-none-macosx_11_0_universal2.whl | Python 3 | none | macOS 11.0+ universal2 (ARM64, x86-64) | Details |
| playwright-1.63.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| playwright-1.63.0-py3-none-macosx_10_13_x86_64.whl | Python 3 | none | macOS 10.13+ x86-64 | Details |
Total release size: 339.4 MB
Release files / playwright-1.63.0-py3-none-win_arm64.whl
| Download URL | playwright-1.63.0-py3-none-win_arm64.whl |
|---|---|
| Size | 34.5 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
1e4a3a838ce22fb68ad17193fcd142a19610d9d70fb9966d2239f5dddc0cc05b
|
|
BLAKE2b-256 checksum How to use checksums |
be752432b3e3c7c62103b72d4c4cc8b16a56383ada372bbb0d1278591e988f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-win_amd64.whl
| Download URL | playwright-1.63.0-py3-none-win_amd64.whl |
|---|---|
| Size | 38.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2f9a707a6c6c91157ed77bff2b8caeb04b3c8d46e70d585fc134298cbe4b5cc6
|
|
BLAKE2b-256 checksum How to use checksums |
76ebd6b8d92658038e260dbc7dd69fb3fdbe245aac283953de8b50b02bfe5f61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-win32.whl
| Download URL | playwright-1.63.0-py3-none-win32.whl |
|---|---|
| Size | 38.6 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
660c00c62639e31b16700ba5456b351ddba55bb766b7ce8261223aa34928e482
|
|
BLAKE2b-256 checksum How to use checksums |
698df74ff6b52751859f4b69caf66aa7d4a3c8d6c1f0c7dc9920da103612ee39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | playwright-1.63.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 47.9 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
354e15b29503565fc598b89f16fbe070459343bef9d7498a93e304864000c6a7
|
|
BLAKE2b-256 checksum How to use checksums |
f3823d85505284c5a210f2da6c07b8f757524e79d1fba9cfdafe1eafb766ae59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-manylinux1_x86_64.whl
| Download URL | playwright-1.63.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 48.2 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
ad21bc07516b187965a7521c5cf0df0bd657b17482eaad74335272d35a2b07de
|
|
BLAKE2b-256 checksum How to use checksums |
279c103a5037789062bdab27c7dca53f3ca6b075b572ab2cd96eec825b3aec4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-macosx_11_0_universal2.whl
| Download URL | playwright-1.63.0-py3-none-macosx_11_0_universal2.whl |
|---|---|
| Size | 44.3 MB |
| Tags | Python 3 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
c89fc4736502a1f0fac2c8ca5d10c0cbc1c669f1f4774a2d8507a43140e4d53f
|
|
BLAKE2b-256 checksum How to use checksums |
9411dc5c13fa1602371603acd461be47529c1b3513815d3a0dc98f642c291a10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-macosx_11_0_arm64.whl
| Download URL | playwright-1.63.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 42.9 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fd1aa00631d44d55e56e0975bf3f3f285fac4a9fd2813183f0c12a488f1a1b24
|
|
BLAKE2b-256 checksum How to use checksums |
f59a948b930b1a8c4ee869e5a139a2b7747caa06aab56a3f09a2f0abdcbda221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / playwright-1.63.0-py3-none-macosx_10_13_x86_64.whl
| Download URL | playwright-1.63.0-py3-none-macosx_10_13_x86_64.whl |
|---|---|
| Size | 44.3 MB |
| Tags | Python 3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
84c540759e8e7f01e690e197e04060f48899d37cea322299f255843273d3385d
|
|
BLAKE2b-256 checksum How to use checksums |
19ddfbb3d34228ad753bc14464d5f2252585b73367539775a88d0a3949cf5a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|