skillfed

axe-selenium-python

Python library to integrate axe and selenium for web accessibility testing.

axe-selenium-python v3.0.0 252.1K downloads/30d#8,556 on PyPI71
Copyleft license Mozilla Public License 2.0 (MPL 2.0) Active released

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-python

uv

uv add axe-selenium-python

poetry

poetry add axe-selenium-python

Installing 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

web accessibility testing automationaxe core selenium integrationautomated a11y testing pythonaccessibility violation detectionselenium accessibility scanningwcag compliance testingweb accessibility audit tool
accessibility-testingwcag-complianceselenium-integration

More Quality Assurance packages