axe
Accessibility (A11y) Testing with aXe
Last updated
Accessibility (A11y) Testing with aXe
Last updated
The axe
fixture is the recommended way to run A11y audits since it's so easy and straightforward.
You can generate the report as a JSON and/or use the AxeReport object directly.
Running an audit will generate a JSON report only if a name
is given.
name: str
The file path (including name and .json
extension) of the report to save as a JSON
context: Dict
The dictionary of page part(s), by CSS Selectors, to include or exclude in the audit
options: Dict
The dictionary of aXe options to include in the audit
AxeReport - object that represents the audit report in code
If you include the name
argument, then that report is also created at the specified file path.
If any of the directories in the path do not exist, then a FileNotFound
error is raised.