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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
axe_playwright_python-0.1.8.tar.gz
(194.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axe_playwright_python-0.1.8.tar.gz.
File metadata
- Download URL: axe_playwright_python-0.1.8.tar.gz
- Upload date:
- Size: 194.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
python-requests/2.34.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97de160210fd5ce51e552d21d3b0a1cabb850235942737643ee3b9398de81a47
|
|
| MD5 |
c69fe267e3bf74a0cd47730ecf9ce0ad
|
|
| BLAKE2b-256 |
4c3a0ac4e97b92a3f8dc98f7dfb3b68c3e8d3811eda630000ccf4f7654e3498a
|
File details
Details for the file axe_playwright_python-0.1.8-py3-none-any.whl.
File metadata
- Download URL: axe_playwright_python-0.1.8-py3-none-any.whl
- Upload date:
- Size: 160.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
python-requests/2.34.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdd263c998388f1a8e67cad02677e612d946248bd44d163be5e8650ea31f95f8
|
|
| MD5 |
a88a3e61ca860381431fcba5fb46ccd3
|
|
| BLAKE2b-256 |
4cc65fdb6d5d96653927b6a4763a4b7aaa9e468d4a6eda5048b7c2e158d17bc9
|