A pytest plugin providing async fixtures for Playwright (via asyncio), enabling async/await browser automation in tests. Current version 0.7.2, requires Python >=3.10. Released as needed; follows pytest-playwright patterns.
pip install pytest-playwright-asyncioNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic async test using the page fixture. Ensure you have a conftest.py with the plugin import or set pytest_plugins.
If you need function-scoped fixtures, explicitly set scope='function' in conftest.py.
Use the 'context' fixture to share state between pages within a test.
Use 'browser_type.launch()' instead of relying on the 'browser' fixture.
Set in pytest.ini: [pytest] asyncio_mode = auto or use @pytest.mark.asyncio explicitly.
Install the package and ensure conftest.py has 'pytest_plugins = ["pytest_playwright_asyncio"]'.
Ensure all Playwright calls are awaited: await page.goto('...')