Metadata-Version: 2.4
Name: testmu-playwright-python
Version: 0.1.0
Summary: TestMu binding for Playwright Python — thin test runtime for TestMu/LambdaTest exports
Author-email: TestMu AI <engineering@testmu.ai>
License-Expression: MIT
Project-URL: Homepage, https://testmu.ai
Project-URL: Documentation, https://docs.testmu.ai
Project-URL: Repository, https://github.com/testmuai/testmu-bindings
Keywords: testing,ai,agents,playwright,lambdatest,testmu
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Software Development :: Testing
Classifier: Framework :: Pytest
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.57.0
Requires-Dist: pyotp>=2.9.0
Requires-Dist: aiohttp
Requires-Dist: httpx>=0.27.0
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Dynamic: license-file

# testmu-playwright-python

TestMu binding for Playwright Python — a thin test runtime for running TestMu exported tests locally or on the LambdaTest grid.

## Installation

```bash
pip install testmu-playwright-python
```

## Quick Start

```python
import testmu

testmu.configure(
    username="YOUR_LT_USERNAME",
    access_key="YOUR_LT_ACCESS_KEY",
)

@testmu.test
async def my_test(page):
    async with testmu.step("Open site"):
        await page.goto("https://example.com")

    async with testmu.step("Verify title"):
        testmu.expect(page).to_have_title("Example Domain")

testmu.run(my_test)
```

## Features

- **Test decorator** — `@testmu.test` wraps async Playwright tests with session lifecycle
- **Step tracking** — `testmu.step(...)` context manager for structured test steps
- **Variable system** — `var()` / `set_var()` for template-based test data
- **Helpers** — vision queries, API/DB/JS execution, network assertions, SmartUI snapshots
- **Reporters** — local console and LambdaTest cloud reporting
- **Self-healing locators** — automatic locator recovery via heal patch

## Requirements

- Python >= 3.11
- Playwright >= 1.57.0

## Links

- Homepage: [testmu.ai](https://testmu.ai)
- Documentation: [docs.testmu.ai](https://docs.testmu.ai)

## License

MIT — see [LICENSE](LICENSE)
