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.3.tar.gz
(149.0 kB
view hashes)
Built Distribution
Close
Hashes for axe_playwright_python-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cc7b7f638e417a0ab095f0434dd8a3cf88c9f98a5e279ba0b6a74400eaff9f9 |
|
MD5 | 9e3ffbebfcffe9f7d35ef114394fd727 |
|
BLAKE2b-256 | 23d8ac1da3ed6f361ac83227658a8b0fd1eb444d5afca0d8586147de495adbae |
Close
Hashes for axe_playwright_python-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69deb5384e25984d50f962662b33817e33a6fa1680e3a800121b24ff75e4e728 |
|
MD5 | ca26944aac8e729bd6188450764d4148 |
|
BLAKE2b-256 | 09ce5a6030804088f1a2162a8372d4b224b34903c41172a57e7bc9a5333d511f |