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
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_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
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.4.tar.gz
(148.9 kB
view details)
Built Distribution
File details
Details for the file axe_playwright_python-0.1.4.tar.gz
.
File metadata
- Download URL: axe_playwright_python-0.1.4.tar.gz
- Upload date:
- Size: 148.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100f2f4af4525eea231bcc527ac40593805523e1433984e048fde28fea1d488a |
|
MD5 | a5d3d3e82e6a6fd0b57d58b0b150488d |
|
BLAKE2b-256 | 6ce61b5f21cb55fa7fcba64a1efe9989208650f87b3e23ff23d79dadfb83b41f |
File details
Details for the file axe_playwright_python-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: axe_playwright_python-0.1.4-py3-none-any.whl
- Upload date:
- Size: 116.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74c0993ac92c2ede522c56bf2cdda42216b22af53c4d94a684767fd42883c7fb |
|
MD5 | 47bf0a5f949bdec929ad17602ae1150d |
|
BLAKE2b-256 | ce1b3fdbaba9260311a0bbb1d387242032da4fe2b83b14670d487d141caded7a |