axe-selenium-python
Python library to integrate axe and selenium for web accessibility testing.
What it is and what it does
axe-selenium-python wraps the aXe accessibility testing engine (axe-core@4.10.2) inside a Selenium-driven browser automation layer, letting you inject accessibility checks into live web pages and collect structured violation reports. It's designed for developers and QA engineers who want to catch accessibility issues—WCAG violations, color contrast failures, missing labels, etc.—as part of their test suites or continuous integration pipelines.
The package provides an Axe class that injects aXe's JavaScript into a page, runs the scan, and returns results as JSON. You can write results to disk, assert on violation counts, or generate reports. It depends on selenium for browser control and pytest as a test framework integration point. The library is actively maintained and uses modern Python (3.12+), making it suitable for contemporary test automation workflows.
Use it for:
- Run automated accessibility scans in Selenium-based test suites to catch WCAG violations before release.
- Generate accessibility audit reports for compliance documentation and stakeholder review.
- Integrate accessibility checks into CI/CD pipelines to fail builds when new violations are introduced.
- Test multiple pages or user workflows by injecting and running axe checks at different points in a Selenium script.
- Validate that accessibility fixes actually resolve reported violations by re-running scans after code changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates aXe accessibility testing with Selenium to automate web accessibility scanning and report violations found on web pages.
Yes. The package is actively maintained, has low install friction, no known vulnerabilities, and directly solves the common problem of automating web accessibility testing in Selenium workflows. The copyleft license (MPL 2.0) is standard for accessibility tooling and poses no barrier to most projects. Install if you need to integrate accessibility scanning into your test automation.
Install
axe-selenium-python on PyPI
pip
pip install axe-selenium-pythonuv
uv add axe-selenium-pythonpoetry
poetry add axe-selenium-pythonInstalling axe-selenium-python
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained as of April 2026 with recent commits. Requires selenium >= 4.2 and Python 3.12+, plus a browser driver (geckodriver, chromedriver, etc.) added to PATH.
License in practice
Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. Derivative works and modifications must be distributed under the same license; proprietary use of unmodified binaries is permitted.
Quickstart
pip install axe-selenium-python
from selenium import webdriver
from axe_selenium_python import Axe
driver = webdriver.Firefox()
driver.get("http://www.google.com")
axe = Axe(driver)
axe.inject()
results = axe.run()
axe.write_results(results, 'a11y.json')
driver.close()
Requires Python 3.12+, selenium >= 4.2, and a browser driver (geckodriver, chromedriver, etc.) downloaded and added to your system PATH.
Verify before relying
- Whether axe-core@4.10.2 covers all WCAG 2.1 or 2.2 conformance levels.
- Performance characteristics when scanning large or complex pages.
- Compatibility with headless browser modes and CI/CD environments.
Package facts
| License | Mozilla Public License 2.0 (MPL 2.0) (copyleft) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — selenium, pytest |
| Maintenance | actively maintained — 117 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 252,124/month — #8,556 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: axe_selenium_python-3.0.0-py3-none-any.whl
Keywords: axe-core, selenium, pytest-selenium, accessibility, automation, mozilla
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
axe-playwright-pythonRuns automated accessibility audits on web…
unclear · top 15,000 on PyPI
seleniumSelenium provides Python bindings to automate…
permissive · top 1,000 on PyPI
selenium-wireExtends Selenium's Python bindings to…
permissive · top 5,000 on PyPI
selenium-stealthModifies a Selenium Chrome WebDriver to evade…
permissive · top 15,000 on PyPI
java-access-bridge-wrapperWraps the Windows Java Access Bridge to let…
permissive · top 15,000 on PyPI
pytest-seleniumpytest-selenium is a pytest plugin that…
copyleft · top 15,000 on PyPI
requestiumRequestium merges Requests, Selenium, and…
permissive · top 15,000 on PyPI
Selenium-ScreenshotCaptures full-page or element-level screenshots…
permissive · top 15,000 on PyPI
webdriver-managerAutomatically downloads, caches, and manages…
permissive · top 5,000 on PyPI
etelemetryEtelemetry is a lightweight Python client that…
permissive · top 15,000 on PyPI