Repolode
microsoft

microsoft/playwright-python

Python library for automating Chromium, Firefox and WebKit browsers through a single API, with sync and async variants.

Open-source alternative to:Selenium

Stars
15,058
Forks
1,250
Open issues
4
Last commit
8 hours ago

What is it?

Playwright for Python is the Python version of the Playwright browser automation library. It lets you drive Chromium, Firefox and WebKit with one API, covering tasks such as navigating pages, taking screenshots and interacting with page elements.

The library provides both a synchronous API (playwright.sync_api) and an asynchronous API (playwright.async_api), so it fits scripts as well as asyncio-based applications. Browsers run on Linux, macOS and Windows, and the README lists the Chromium, WebKit and Firefox versions currently supported.

The project is published on PyPI and maintained by Microsoft alongside the Node.js, .NET and Java editions of Playwright. Full documentation and an API reference are hosted on playwright.dev.

Key features

  • 01Automates Chromium, Firefox and WebKit with one API
  • 02Provides both sync and async Python interfaces
  • 03Runs on Linux, macOS and Windows
  • 04Takes screenshots and interacts with page elements
  • 05Installable from PyPI

Use cases

  • End-to-end testing of web applications across multiple browsers
  • Scripted screenshots or page scraping
  • Automating repetitive browser workflows in Python

Quick start

  1. 1

    Install the Playwright package from PyPI

    pip install playwright
  2. 2

    Install the browser binaries

    playwright install
  3. 3

    Run the example script with sync API

Topics

FAQ

What is playwright-python?
Python library for automating Chromium, Firefox and WebKit browsers through a single API, with sync and async variants. Playwright for Python is the Python version of the Playwright browser automation library. It lets you drive Chromium, Firefox and WebKit with one API, covering tasks such as navigating pages, taking screenshots and interacting with page elements.
Is playwright-python free to use? What license does it have?
playwright-python is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is playwright-python still maintained?
Actively maintained. The last commit to playwright-python was on Oct 21, 2026.
What can I use playwright-python for?
End-to-end testing of web applications across multiple browsers Scripted screenshots or page scraping Automating repetitive browser workflows in Python
How do I install playwright-python?
Install the Playwright package from PyPI: pip install playwright Install the browser binaries: playwright install Run the example script with sync API
Where can I get playwright-python?
The source code and installation instructions are on GitHub: https://github.com/microsoft/playwright-python

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects