$npx skillfedfor your agent

pytest-playwright

A pytest wrapper with fixtures for Playwright to automate web browsers

Worth itPyPI TestingReleased Aug 20269.6M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_playwright-0.9.0-py3-none-any.whl
v0.9.0 · released 2026-08-10 · Python >=3.10 · 4 runtime deps: playwright, pytest, pytest-base-url, python-slugify

Yes. This is a well-maintained, actively developed plugin from Microsoft with no known vulnerabilities, low install friction, and a permissive license. It fills a clear need for teams using pytest who want to write end-to-end browser tests without boilerplate. The only gotcha is that Playwright requires browser binaries to be installed separately, but that is a one-time setup step and is well-documented.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Playwright also requires browser binaries; use `playwright install` after installing the package to download them.
  • Low friction install with a pure-Python wheel.

License · maintenance · safety

permissive license (permissive) — Licensed under Apache License 2.0 (permissive). You can use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and note any changes you make.

last release 2026-08-10 (4 days) · last repo commit 2026-08-11 · 556 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 9,625,460 downloads/mo, #1,516 on PyPI

Verify before relying

pip install pytest-playwright

# In a test file:
import pytest

def test_example(page):
    page.goto("https://example.com")
    assert page.title() == "Example Domain"
  • Whether pytest-base-url and python-slugify are required at runtime or only for specific test scenarios.
  • Whether the plugin automatically handles browser binary installation or if manual setup is needed in CI/CD environments.
Same gist for agents: .md · .json

What it is and what it does

pytest-playwright is a pytest plugin that wraps the Playwright browser automation library, exposing browser primitives as pytest fixtures so you can write end-to-end tests directly in your test functions. Instead of manually instantiating and managing browser contexts, you declare a `page` fixture (or `browser`, `context` fixtures) in your test signature and pytest-playwright handles the setup and teardown. It supports all modern browsers—Chromium, WebKit, and Firefox—and can run tests in headless or headed mode.

The plugin is maintained by Microsoft (Playwright's creator) and sits at the intersection of pytest's test discovery and fixture system with Playwright's cross-browser automation API. It's designed for teams writing web application tests that need to verify behavior across multiple browsers without writing boilerplate context management code. The package has no known vulnerabilities and is actively developed, with a recent release and steady repository maintenance.

Use it for

  • Write end-to-end tests for web applications that verify user workflows across Chromium, Firefox, and WebKit without manual browser setup.
  • Run headless browser tests in CI/CD pipelines to validate web app functionality on every commit.
  • Test responsive design and cross-browser compatibility by parameterizing tests to run against multiple browser contexts.
  • Automate visual regression testing or screenshot capture as part of pytest test suites.
  • Verify form submissions, navigation, and DOM interactions in web apps using Playwright's page API within pytest test functions.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a well-maintained, actively developed plugin from Microsoft with no known vulnerabilities, low install friction, and a permissive license. It fills a clear need for teams using pytest who want to write end-to-end browser tests without boilerplate. The only gotcha is that Playwright requires browser binaries to be installed separately, but that is a one-time setup step and is well-documented.

Install

pytest-playwright on PyPI

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a recent release (4 days old) and steady repository activity. Requires Python 3.10 or later and depends on playwright, pytest, pytest-base-url, and python-slugify—all standard testing and utility packages.

Requires Python 3.10 or later. Playwright also requires browser binaries; use `playwright install` after installing the package to download them.

License in practice

Licensed under Apache License 2.0 (permissive). You can use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and note any changes you make.

Quickstart

pip install pytest-playwright

# In a test file:
import pytest

def test_example(page):
    page.goto("https://example.com")
    assert page.title() == "Example Domain"

Verify before relying

  • Whether pytest-base-url and python-slugify are required at runtime or only for specific test scenarios.
  • Whether the plugin automatically handles browser binary installation or if manual setup is needed in CI/CD environments.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
playwrightpytestpytest-base-urlpython-slugify
MaintenanceActively maintained 4 days since the last release
Last repo commit
First released
Downloads9,625,460 / month, #1,516 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: PytestLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: pytest_playwright-0.9.0-py3-none-any.whl

Tags

Capabilities
pytest playwright integrationend-to-end web testingbrowser automation testingpytest browser fixturescross-browser e2e testsplaywright pytest pluginweb app testing framework
Topics
e2e-testingbrowser-automationpytest-plugin

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest playwright integration”

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-playwright-asyncio · wptserve · playwright · camoufox · scrapy-playwright · pyppeteer · robotframework-browser · testmuai-playwright-bindings · robocorp-browser · eyes-common