Axe Playwright Python facilitates automated web accessibility testing by integrating the axe-core engine with Playwright. It allows developers to scan web pages for accessibility violations within their Playwright test suites. The current version is 0.1.7. Release cadence appears to be irregular, with updates typically occurring every few months based on the project's changelog, often driven by updates to the underlying axe-core JavaScript library.
Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 3.9s
94MB installed
● package 94MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from axe_playwright_python.sync_playwright import Axe
Used for setting up Playwright in synchronous tests.
from playwright.sync_api import sync_playwright
This quickstart demonstrates how to initialize Axe, launch a Playwright browser, navigate to a page, run an accessibility scan, and print the number of violations. It also includes an example of iterating through detected violations.
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.")
if results.violations_count > 0:
print("Accessibility violations found:")
for violation in results.violations:
print(f" - {violation['id']}: {violation['description']} (Impact: {violation['impact']})")
print(f" Help: {violation['helpUrl']}")
else:
print("No accessibility violations found.")
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.