Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(test-runner): add new playwright-features (#24368)
Max Schmittb1ab6484da11
diff --git a/docs/src/test-runners-python.md b/docs/src/test-runners-python.mdindex 59327bc6f1..e3cd41cdf8 100644--- a/docs/src/test-runners-python.md+++ b/docs/src/test-runners-python.md@@ -33,6 +33,7 @@ addopts = --headed --browser firefox- `--tracing` Whether to record a [trace](./trace-viewer.md) for each test. `on`, `off`, or `retain-on-failure` (default: `off`).- `--video` Whether to record video for each test. `on`, `off`, or `retain-on-failure` (default: `off`).- `--screenshot` Whether to automatically capture a screenshot after each test. `on`, `off`, or `only-on-failure` (default: `off`).+- `--full-page-screenshot` Whether to take a full page screenshot on failure. By default, only the viewport is captured. Requires `--screenshot` to be enabled (default: `off`).## Fixtures@@ -64,6 +65,17 @@ def test_my_app_is_working(fixture_name):- `browser_type_launch_args`: Override launch arguments for [`method: BrowserType.launch`]. It should return a Dict.- `browser_context_args`: Override the options for [`method: Browser.newContext`]. It should return a Dict.+Its also possible to override the context options ([`method: Browser.newContext`]) for a single test by using the `browser_context_args` marker:++```python+import pytest+[email protected]_context_args(timezone_id="Europe/Berlin", locale="en-GB")+def test_browser_context_args(page):+ assert page.evaluate("window.navigator.userAgent") == "Europe/Berlin"+ assert page.evaluate("window.navigator.languages") == ["de-DE"]+```+## Parallelism: Running Multiple Tests at OnceIf your tests are running on a machine with a lot of CPUs, you can speed up the overall execution time of your test suite by using [`pytest-xdist`](https://pypi.org/project/pytest-xdist/) to run multiple tests at once: