Automated web accessibility testing using axe-core engine and Playwright.
Project description
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.
Project details
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.5.tar.gz
(188.3 kB
view details)
Built Distribution
File details
Details for the file axe_playwright_python-0.1.5.tar.gz
.
File metadata
- Download URL: axe_playwright_python-0.1.5.tar.gz
- Upload date:
- Size: 188.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
dcc8e92af93a3d1dd2fd2275ab7c90054e73579a051f5cf15173a5f9f74bf544
|
|
MD5 |
1fd5dbcf342a3e613e66ff2d5d5cd53a
|
|
BLAKE2b-256 |
070bebae89b69ea9d501844a248744ae04d04deab1b3eee9566edf100c95312d
|
File details
Details for the file axe_playwright_python-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: axe_playwright_python-0.1.5-py3-none-any.whl
- Upload date:
- Size: 155.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1e4e02ac955977cf80451afe4d93a0186a2179b135d1626521bcc953547fd7ab
|
|
MD5 |
e36afcbf657ac16204217748584045b8
|
|
BLAKE2b-256 |
b4a3128f8307a281df75c4e1b6ff4404ef5d3e222f8e7f12f6f48114c81e670b
|