axe-selenium-python-dev was forked from https://github.com/mozilla-services/axe-selenium-python on date 29/10/2020 all credits to them, there was no official pypi distribution available which supports axe-core 3.3.2 so took the opportunity to create this to support others like us
This version of axe-selenium-python-dev supports all changes in repo https://github.com/mozilla-services/axe-selenium-python before date 29/10/2020
This version of axe-selenium-python-dev is using [email protected].
You will need the following prerequisites in order to use axe-selenium-python:
- selenium >= 3.0.0
- Python 2.7 or 3.6
- The appropriate driver for the browser you intend to use, downloaded and added to your path, e.g. geckodriver for Firefox:
- geckodriver downloaded and added to your PATH
To install axe-selenium-python-dev:
$ pip install axe-selenium-python-devfrom selenium import webdriver
from axe_selenium_python import Axe
def test_google():
driver = webdriver.Firefox()
driver.get("http://www.google.com")
axe = Axe(driver)
# Inject axe-core javascript into page.
axe.inject()
# Run axe accessibility checks.
results = axe.run()
# Write results to file
axe.write_results(results, 'a11y.json')
driver.close()
# Assert no violations are found
assert len(results["violations"]) == 0, axe.report(results["violations"])The method axe.run() accepts two parameters: context and options.
For more information on context and options, view the aXe documentation here.
- Remove unused build modules
- Axe-core node modules min file updated from 2.3.1 to 3.3.2
- Axe-core node modules 3.3.2 path updated
- Axe-core node modules 3.3.2 path updated
- Axe-core node modules 3.3.2 updated
- Updated to install node modules
- Updated readme
- Created package.json file to maintain axe-core dependency
- Forked https://github.com/mozilla-services/axe-selenium-python updated code and initial pypi deploy