Metadata-Version: 2.5
Name: tracera-playwright
Version: 0.1.0rc1
Summary: Tracera Autotest adapter for Playwright (Python)
Project-URL: Homepage, https://tracera.dev/docs/playwright-python
Project-URL: Bug-Tracker, https://github.com/tracera-dev/tracera-releases/issues
Author-email: Tracera <contact@tracera.dev>
License: SEE LICENSE IN LICENSE.md
License-File: LICENSE.md
Keywords: autotest,playwright,pytest,test-reporting,testops,tracera
Requires-Python: >=3.11
Requires-Dist: tracera-core==0.1.0rc1
Provides-Extra: dev
Requires-Dist: playwright>=1.40; extra == 'dev'
Requires-Dist: pytest-playwright>=0.5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# tracera-playwright

Tracera Autotest adapter for Playwright for Python (pytest plugin).

**Requires Python ≥ 3.11, pytest ≥ 8, and Playwright ≥ 1.40.**

```bash
pip install tracera-playwright
```

How-to: [Playwright Python](https://tracera.dev/docs/playwright-python). Shared env / run mode: [Autotest adapters](https://tracera.dev/docs/adapters).

## Setup

The package registers as a pytest plugin automatically. Do **not** load `tracera-pytest` and `tracera-playwright` in the same pytest run.

```python
from tracera_playwright import id as tracera_id
from tracera_playwright import tracera


@tracera_id(42, "e2e/login")
def test_login(page):
    page.goto("/login")
    tracera.step("assert signed in", lambda: None)
```

## Bind

`@tracera.id(…)` (preferred) or `tracera.test_case`. Optional name may use `{param}` / `{param_id}` from pytest parametrize. If `name` is omitted → `item.name`.

## Skip

Stock `pytest.skip`. The reason becomes a result `comment`.

## Steps

`tracera.step(title, body)`, `@tracera.step("…")`, `with` / `async with tracera.step("…"):`. Function-scoped fixtures → **Setup** / **Teardown**; suite-level fixtures are not reported. Video / trace attach to the result when present under the test output dir.

## Comments, errors, and attachments

`tracera.comment` / `tracera.error` / `tracera.attachment` — see [Autotest adapters](https://tracera.dev/docs/adapters).

## Parameterized

`@pytest.mark.parametrize` + `@tracera.id(id, "login as {login}")`. Retries: final attempt only; `PLAYWRIGHT_RETRY` on Env when retry > 0.
