Python library to integrate axe and selenium for web accessibility testing.
axe-selenium-python integrates aXe and selenium to enable automated web accessibility testing.
This version of axe-selenium-python is using firstname.lastname@example.org.
You will need the following prerequisites in order to use axe-selenium-python:
To install axe-selenium-python:
$ pip install axe-selenium-python
The method axe.execute() accepts two parameters: context and options.
For more information on context and options, view the aXe documentation here.
Fork the repository and submit PRs with bug fixes and enhancements; contributions are very welcome. You can run the tests using Docker:
$ docker build -t axe-selenium-python . $ docker run -it axe-selenium-python tox
- All functionalities that are not part of axe-core have been moved into a separate package, pytest-axe. This includes: - run_axe helper method - get_rules Axe class method - run Axe class method - impact_included Axe class method - analyze Axe class method.
The purpose of this change is to separate implementations that are specific to the Mozilla Firefox Test Engineering team, and leave the base axe-selenium-python package for a more broad use case. This package was modeled off of Deque’s Java package, axe-selenium-java, and will now more closely mirror it.
All functionalities can still be utilized when using axe-selenium-python in conjunction with pytest-axe.
- Added the analyze method to the Axe class. This method runs accessibility checks, and writes the JSON results to file based on the page URL and the timestamp.
- Writing results to file can be enabled by setting the environment variable ACCESSIBILITY_REPORTING=true. The files will be written to results/ directory, which must be created if it does not already exist.
- Accessibility checks can be disabled by setting the environment variable ACCESSIBILITY_DISABLED=true.
- Updated axe.min.js to email@example.com
- Modified impact_included class method to reflect changes to the aXe API:
- There are now only 3 impact levels: ‘critical’, ‘serious’, and ‘minor’
- Updated usage examples in README
- Added docstrings to methods lacking documentation
- Removed unused files
- Added run method to Axe class to simplify the usage in existing test suites
- run method includes the ability to set what impact level to test for: ‘minor’, ‘moderate’, ‘severe’, ‘critical’
- Added pytest-axe usage example to README
- Added usage example to README
- Added selenium instance as a class attribute
- Changed file paths to OS independent structure
- Fixed file read operations to use with keyword
- Fixed include of aXe API file and references to it
- Updated README
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|axe_selenium_python-2.0.3-py2.py3-none-any.whl (77.2 kB) Copy SHA256 hash SHA256||Wheel||py2.py3||Apr 17, 2018|
|axe-selenium-python-2.0.3.tar.gz (75.6 kB) Copy SHA256 hash SHA256||Source||None||Apr 17, 2018|