pypom-axe integrates the aXe accessibility testing API with PyPOM.
Requirements
You will need the following prerequisites in order to use pypom-axe:
Python 2.7 or 3.6
PyPOM >= 1.2.0
Installation
To install pypom-axe:
$ pip install pypom-axe
Usage
pypom-axe will run the aXe accessibility checks by default whenever its wait_for_page_to_load() method is called.
If you overload wait_for_page_to_load(), you will need to call super([YOUR CLASS NAME], self).wait_for_page_to_load() within your overloaded method.
base.py
from pypom_axe import AxePage as Page
class Base(Page):
def wait_for_page_to_load(self, context=None, options=None, impact=None):
super(Base, self).wait_for_page_to_load()
self.wait.until(lambda s: self.seed_url in s.current_url)
return self
You also have the option to customize the accessibility analysis using the parameters context, options, and impact. context and options directly reflect the parameters used in axe-core.
impact allows you to specify the impact level you wish to check for.
Running with an impact of minor checks for any violations with a severity of minor or higher.
The same applies to running with an impact of serious.
An impact of critical will only check for critical violations.
from pypom_axe import AxePage as Page
class Base(Page):
def wait_for_page_to_load(self, context=None, options=None, impact=None):
super(Base, self).wait_for_page_to_load(None, None, 'serious')
self.wait.until(lambda s: self.seed_url in s.current_url)
return self
Resources
CHANGELOG
version 0.0.7
Modified impact_included class method to reflect changes to the aXe API:
There are now only 3 impact levels: 'critical', 'serious', and 'minor'
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypom-axe-0.0.6.tar.gz.
File metadata
- Download URL: pypom-axe-0.0.6.tar.gz
- Upload date:
- Size: 63.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c19f53134e18ab26509d05ae80c1453559123aed6dc855646eb6e37ade880fa
|
|
| MD5 |
e23f3ad7deb39a77bcc6a0fb8c38ccc9
|
|
| BLAKE2b-256 |
97804265fc3187cda6aa9b7fe0dbd4f8619d8db2a7a539893de659fe63b0043e
|
File details
Details for the file pypom_axe-0.0.6-py2.py3-none-any.whl.
File metadata
- Download URL: pypom_axe-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 65.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d729e7cb836901d94e55f62d1a3d8e43492857a296b23c84a13aa0bb447c73
|
|
| MD5 |
7e50e15e95a0f20f5afafb053709fd2e
|
|
| BLAKE2b-256 |
3dce9776623bc3bb03bc0d4e94b26bccc8cbd97bbb4bc12ebed67e974bd04581
|