axe-playwright-python
Automated web accessibility testing using axe-core engine and Playwright.
Documentation
Further Reading & More
- "Automated accessibility audits" - Pamela Fox (North Bay Python 2023)
- Using Python to Fix my Accessibility Night of a Website & Website Accessibility Audit Reports via GH Actions by Jay Miller
Dependencies
- Python >= 3.10
- playwright >= 1.25.0
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_playwright_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
Acknowledgments
This project is based on axe-core-python by @ruslan-rv-ua and also takes inspiration from axe-selenium-python for output formats.
Release files for axe-playwright-python 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| axe_playwright_python-0.1.8.tar.gz | 194.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| axe_playwright_python-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 355.3 kB
Release files / axe_playwright_python-0.1.8.tar.gz
| Download URL | axe_playwright_python-0.1.8.tar.gz |
|---|---|
| Size | 194.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97de160210fd5ce51e552d21d3b0a1cabb850235942737643ee3b9398de81a47
|
|
BLAKE2b-256 checksum How to use checksums |
4c3a0ac4e97b92a3f8dc98f7dfb3b68c3e8d3811eda630000ccf4f7654e3498a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / axe_playwright_python-0.1.8-py3-none-any.whl
| Download URL | axe_playwright_python-0.1.8-py3-none-any.whl |
|---|---|
| Size | 160.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdd263c998388f1a8e67cad02677e612d946248bd44d163be5e8650ea31f95f8
|
|
BLAKE2b-256 checksum How to use checksums |
4cc65fdb6d5d96653927b6a4763a4b7aaa9e468d4a6eda5048b7c2e158d17bc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|