NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1147 most downloaded on PyPI
A pytest wrapper with fixtures for Playwright to automate web browsers
Latest stable
0.10.0
Last release 1 months ago
08 Oct 2026
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 33 of 40 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
40 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Traces for `playwright.request` API contexts (#333). --tracing now also records contexts created with playwright.request.new_context(), one chunk per
Traces for playwright.request API contexts (#333). --tracing now also records contexts created with playwright.request.new_context(), one chunk per test, so a session-scoped API context yields a trace per test. The traces follow the same retain-on-failure handling, trace-N.zip naming and report attachments as browser traces. Requires Playwright 1.60 or newer.
Artifacts in test reports (#332). Kept screenshots, videos and traces are added to the teardown report as playwright_screenshot, playwright_video and playwright_trace user properties, so --junitxml writes them as <property> elements and pytest_runtest_logreport hooks and reporters can pick them up. With pytest-html >= 4 they are linked from the report, and embedded with --self-contained-html.
Reruns keep their own artifacts (#331). With pytest-rerunfailures, every attempt now writes to its own folder, test-results/<test>-retry1/ and so on, like Playwright Test. Attempts no longer overwrite each other.
Artifacts survive fixture failures in teardown (#330). --tracing retain-on-failure, --video retain-on-failure and --screenshot only-on-failure now keep artifacts when a fixture fails during teardown. A test skipped from a fixture no longer counts as failed.
Per-test browser launch options (#329):
@pytest.mark.parametrize(
"browser_type_launch_args",
[{"args": ["--lang=de-DE"]}],
indirect=True,
)
def test_german(page):
...
Each distinct value launches its own browser; command line options such as --headed and --slowmo still apply.
Multi-browser parametrization fixes. Overriding the page fixture no longer drops --browser parametrization on older pytest versions (#314). browser_name is now parametrized indirectly, so tests keep their original order within a browser (#284).
VS Code debugger (#328). The browser is launched headed under the debugger only when a display is available. On Linux without DISPLAY or WAYLAND_DISPLAY set, it stays headless unless --headed is passed.
pytest-base-url is now an optional dependency (#334). The plugin provides --base-url, the base_url ini option, the PYTEST_BASE_URL environment variable and the base_url fixture on its own. --verify-base-url needs the extra:
pip install pytest-playwright[base-url]
Minimum pytest version is 7.0 for pytest-playwright and 8.2 for pytest-playwright-asyncio (#333).
python-slugify 9.x is now supported (#324).
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.9.0...v0.10.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Adds --playwright-debug=cli: pytest pauses at the start of the first context and prints a python -m playwright cli attach … command so agents (or you)
Adds --playwright-debug=cli: pytest pauses at the start of the first context and prints a python -m playwright cli attach … command so agents (or you) can inspect the live browser.
pytest --playwright-debug=cli -s
# ### The test is currently paused at the start
# ### Debugging Instructions
# - Run `python -m playwright cli attach tw-a1b2c3` to attach to this test
python -m playwright cli attach tw-a1b2c3
python -m playwright cli --s=tw-a1b2c3 snapshot
python -m playwright cli --s=tw-a1b2c3 resume
Adds support for `expect.soft()` soft assertions.
Adds support for expect.soft() soft assertions.
chore(deps): bump django from 4.2.22 to 4.2.24 by @dependabot[bot] in https://github.com/microsoft/playwright-pytest/pull/292
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.7.1...v0.7.2
fix: use png screenshot type after Playwright v1.55.0 alignment by @mxschmitt in https://github.com/microsoft/playwright-pytest/pull/290
Bugfixes:
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.7.0...v0.7.1
Allow declaring connect_options fixture to connect to remote browsers.
Allow declaring connect_options fixture to connect to remote browsers.
devops: publish wheels in https://github.com/microsoft/playwright-pytest/pull/261
Bugfixes:
Nothing published for this version
feat: pytest-playwright-asyncio as separate plugin in https://github.com/microsoft/playwright-pytest/pull/257
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.5.2...v0.6.0
chore: add py.typed file in https://github.com/microsoft/playwright-pytest/pull/245
Bugfixes:
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.5.1...v0.5.2
fix: catch PermissionError when cleaning the tests results with multiple threads (#224) in https://github.com/microsoft/playwright-pytest/pull/230
Bugfixes
fix: improve video naming in https://github.com/microsoft/playwright-pytest/pull/217
Bugfixes:
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.4.4...v0.5.0
fix: use best-effort artifacts folder removal in https://github.com/microsoft/playwright-pytest/pull/191
Bugfixes:
fix: mark.browser_context_args should clear for the next test in https://github.com/microsoft/playwright-pytest/pull/189
Bugfixes:
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.4.2...v0.4.3
Nothing published for this version
Nothing published for this version
Full Page Screenshots by @CGBassPlayer in https://github.com/microsoft/playwright-pytest/pull/148
browser_context_args using a marker by @aklajnert in https://github.com/microsoft/playwright-pytest/pull/146Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.3.3...v0.4.0
fix: have correct trace title by @mxschmitt in https://github.com/microsoft/playwright-pytest/pull/157
python-slugify by @jensenbox in https://github.com/microsoft/playwright-pytest/pull/160Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.3.2...v0.3.3
fix: respect manual base_url fixture override in https://github.com/microsoft/playwright-pytest/pull/154
[BUG] Implement best-effort support when dealing with busy folders. https://github.com/microsoft/playwright-python/issues/1781
chore: enable sources for trace collection by @mxschmitt in https://github.com/microsoft/playwright-pytest/pull/104
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.2.3...v0.3.0
fix: Ignore FileNotFoundError when cleaning up output_dir by @shadowwolf899 in https://github.com/microsoft/playwright-pytest/pull/97
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.2.2...v0.2.3
chore: change browser_context_args back to session fixture by @mxschmitt in https://github.com/microsoft/playwright-pytest/pull/85 (fixes https://gith
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.2.1...v0.2.2
fix: tempfile handling when recording videos by @mxschmitt in https://github.com/microsoft/playwright-pytest/pull/83 (Fixes #81)
Full Changelog: https://github.com/microsoft/playwright-pytest/compare/v0.2.0...v0.2.1
feat: add more testing goodies (screenshot, video, tracing)
session to functionfix: make it compatible with unittest.TestCase and pytest-bdd
Changes:
unittest.TestCase and pytest-bdd (#56)Enhanced support for usage with launch_persistent_context
Enhanced support for usage with launch_persistent_context (#51)
chore: replace headful with headed option
Supports now Playwright >= 1.9.0
Supports now Playwright >= 1.9.0
Update to use Playwright 1.8.0a1
Update to use Playwright 1.8.0a1
fix(screenshot): handle if there is no Page fixture available
Bugfixes:
fix: don't paramaterize test functions that don't use browser fixtures
Bugfixes:
Chore:
docs(readme): add config for pytest.ini
Bugfixes:
Documentation:
Chore:
fix(django): usage with class based tests
Bugfixes:
Docs:
chore(typo): fix browse to browser
BREAKING:
Documentation:
feat: migrated project over to Microsoft namespace
Changes:
BREAKING:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.