Skip to main content

pypom-axe integrates the aXe accessibility testing API with PyPOM.

License PyPI wheel Issues

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.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. For more information on context and options, view the aXe documentation here.

The third parameter, impact, allows you to filter violations by their impact level.

The options are 'critical', 'serious' and 'minor', with the default value set to None.

This will filter violations for the impact level specified, and all violations with a higher impact level.

from pypom_axe.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

pypom-axe-0.1.0.tar.gz (64.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypom_axe-0.1.0-py2.py3-none-any.whl (65.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pypom-axe-0.1.0.tar.gz.

File metadata

  • Download URL: pypom-axe-0.1.0.tar.gz
  • Upload date:
  • Size: 64.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pypom-axe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45ab059f3f76ce0020a04d4b10395ca57ed3c42a3383d3054e6d60375759b3ab
MD5 4e35b51f2f5840b34e6081ed019d4d20
BLAKE2b-256 17abb6834ee9595a9daa1a78e07b70ae9b3d7da2af3304d0f0525f131ed1435b

See more details on using hashes here.

File details

Details for the file pypom_axe-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pypom_axe-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2fc107b0a6555f33282512077f8ba02ae0296a412e7bbb6c2f85dfca6493f3f8
MD5 aa2f646f93a1bccc06627b00a781c7b3
BLAKE2b-256 ec87b46b76f46db04bb47089ac30905221269157b76a57b231fc3439f7783d1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page