Skip to main content

Pytest Playwright

A Pytest wrapper for Playwright to automate web browsers (Chromium, Firefox, WebKit).

Features

  • Have a separate new page and context for each test with Pytest fixtures
  • Run your end-to-end tests on multiple browsers by a CLI argument
  • Run them headful with the --headful argument to debug them easily
  • Using base-url to only use the relative URL in your Page.goto calls

Fixtures

browser_name - session scope

A string which contains the current browser name.

browser - session scope

A Playwright browser instance for the whole test run.

context - function scope

A separate Playwright context instance for each new test.

page - function scope

A separate Playwright page instance for each new test.

launch_arguments - session scope

A fixture which you can define to overwrite the launch arguments. It should return a Dict.

context_arguments - session scope

A fixture which you can define to overwrite the context arguments. It should return a Dict.

CLI arguments

--browser

Per default, the tests run on all the browsers. You can pass multiple times the --browser flag to run it on different browsers or a single time to run it only on a specific browser.

Possible values: chromium, firefox, webkit

--headful

Per default, the tests run in headless mode. You can pass the --headful CLI flag to run the browser in headful mode.

Release files for pytest-playwright 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-playwright 0.0.3
File Size Uploaded
pytest-playwright-0.0.3.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-playwright 0.0.3
File Interpreter ABI Platform
pytest_playwright-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / pytest-playwright-0.0.3.tar.gz

Download URL pytest-playwright-0.0.3.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c95bc7ebc208c3711c34ed85cdcc9f30fb6d1bc48d6c6a5942d9150c0d263bca
BLAKE2b-256 checksum
How to use checksums
021d1a41e6fa67e2b72cfb022045897598f2500026b7e88cdded4f456f5f5b4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release files / pytest_playwright-0.0.3-py3-none-any.whl

Download URL pytest_playwright-0.0.3-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76c008240eb271e12fcf7eecb6bf034fc6d413616a38affbc449b9367efb9bdf
BLAKE2b-256 checksum
How to use checksums
dc49d6d3aa219536199958a8b35004b07da4cf43583807af351fa911ed2550e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

1 release file

0.6.0

1 release file

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page