Python library to integrate axe and selenium for web accessibility testing.
Project description
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 axe-core@3.3.2.
Requirements
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
Installation
To install axe-selenium-python-dev:
$ pip install axe-selenium-python-dev
Usage
from 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.
Resources
CHANGELOG
version 2.3.0
Axe-core node modules min file updated from 2.3.1 to 3.3.2
version 2.2.0
Axe-core node modules 3.3.2 path updated
version 2.1.0
Axe-core node modules 3.3.2 path updated
version 2.0.0
Axe-core node modules 3.3.2 updated
version 1.2.0
Updated to install node modules
version 1.1.1
Updated readme
version 1.1.0
Created package.json file to maintain axe-core dependency
version 1.0.0
Forked https://github.com/mozilla-services/axe-selenium-python updated code and initial pypi deploy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for axe-selenium-python-dev-2.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6f9fc44e3df2f884e83a513dbd0d3e262598a5d2223e3a8cb99678e343ff728 |
|
MD5 | 19ca18754961e9eee6f7c5cb73d36e83 |
|
BLAKE2b-256 | d385f8f0371c469962c2606caa1812b6d57d79956a5d1c5fdf64f3618b757166 |
Hashes for axe_selenium_python_dev-2.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ba18316bfb0c348b58ddcbb94e2d7e9337cfb6269dc2590d41b21fe6577ba81 |
|
MD5 | d9822a5cc90fb8f50c06c57f2c95f002 |
|
BLAKE2b-256 | 8179f07e1e6653c2c309f4747b0a5ac84d1e1c515f670aea7616b98e223a2aa3 |