Metadata-Version: 2.1
Name: axe-playwright-python
Version: 0.1.2
Summary: Automated web accessibility testing using axe-core engine and Playwright.
Keywords: accessibility,axe,axe-core,playwright
Author-email: Pamela Fox <pamela.fox@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Adaptive Technologies
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Dist: playwright >= 1.36.0
Requires-Dist: pytest == 7.4.0 ; extra == "dev"
Requires-Dist: pytest-cov == 4.1.0 ; extra == "dev"
Requires-Dist: pytest-playwright == 0.3.3 ; extra == "dev"
Requires-Dist: pytest-asyncio == 0.21.1 ; extra == "dev"
Requires-Dist: mkdocs == 1.4.3 ; extra == "dev"
Requires-Dist: mkdocstrings == 0.22.0 ; extra == "dev"
Requires-Dist: mkdocs-material == 9.1.19 ; extra == "dev"
Requires-Dist: black == 23.7.0 ; extra == "dev"
Requires-Dist: ruff == 0.0.280 ; extra == "dev"
Requires-Dist: pre-commit == 3.3.3 ; extra == "dev"
Requires-Dist: flit ; extra == "dev"
Project-URL: Documentation, https://pamelafox.github.io/axe-playwright-python
Project-URL: GitHub, https://github.com/pamelafox/pytest-axe-playwright-snapshot
Provides-Extra: dev

# axe-playwright-python

Automated web accessibility testing using [axe-core](https://github.com/dequelabs/axe-core) engine
and [Playwright](https://playwright.dev/python/docs/intro).

## Documentation

- [Full documentation](https://pamelafox.github.io/axe-playwright-python/).

## Dependencies

- Python >= 3.10
- [playwright](https://github.com/microsoft/playwright-python) >= 1.25.0

## Installation

```console
python3 -m pip install -U axe-playwright-python
python3 -m playwright install --with-deps
```

## Usage

```python
from playwright.sync_api import sync_playwright
from axe_core_python.sync_playwright import Axe

axe = Axe()

with sync_playwright() as playwright:
    browser = playwright.chromium.launch()
    page = browser.new_page()
    page.goto("https://www.google.com")
    results = axe.run(page)
    browser.close()

print(f"Found {results.violations_count} violations.")
print(f"Full axe-core response: {results.response}")
```

For more examples see [documentation](https://pamelafox.github.io/axe-playwright-python/).

## Contributing

See [guide on contributing](CONTRIBUTING.md).

## Acknowledgments

This project is based on [axe-core-python](https://github.com/ruslan-rv-ua/axe-core-python) by @ruslan-rv-ua and also takes inspiration from [axe-selenium-python](https://pypi.org/project/axe-selenium-python/) for output formats.

