axe-playwright-python
Automated web accessibility testing using axe-core engine
and Playwright.
Documentation
Dependencies
Installation
python3 -m pip install -U axe-playwright-python
python3 -m playwright install --with-deps
Usage
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.
Contributing
See guide on contributing.
Acknowledgments
This project is based on axe-core-python by @ruslan-rv-ua and also takes inspiration from axe-selenium-python for output formats.