Using axe DevTools Python Robot, you can integrate axe DevTools into your existing testing environment. This example project demonstrates how axe DevTools Python Robot is used to detect accessibility issues and generates reports in CSV, HTML, JSON, and XML formats.
Python 3 (does not support Python 2) along with the virtual environment (venv or pyenv).
Follow these steps to clone and navigate to the directory:
- Clone this repo from GitHub.
- Open the project in your favourite python IDE.
- Navigate from the root of the repo to this example with the following command:
cd Python/robotDownload the respective Binary reporter for your operating system and place it in the resources directory.
Install the dependencies including axe DevTools API, DevTools Robot, and DevTools Selenium for the project.
NOTE: You need a valid license to use our APIs. For more information, see Install from Deque’s Agora page. After configuring the access to Deque's private registry, you can install the dependencies for this project.
The following command installs all the required dependencies to run this example project.
pip install -r requirements.txtThe tests directory contains the files example_test.robot, resource.robot, and reporting.py that analyze the page https://broken-workshop.dequelabs.com/ for accessibility issues.
The following command runs the files in the tests directory.
robot .The tests generate results in the a11y-results directory if you have installed the Binary reporter. Otherwise, they generate only JSON results.
The executive-report.html file is an executive summary report aggregating results from all scans into one page.
Every time you run robot ., it replaces all previously saved results with the latest results in the a11y-results directory, so if you want to retain previous test results, you should rename or save them in a different directory.
If you want to modify this project and publish your results in a folder other than ./ally-results, you should update the output directory in the reporting.py file.
