Skip to main content

pytest fixture for axe-selenium-python

Project description

pytest fixture for axe-selenium-python

License PyPI Issues


You will need the following prerequisites in order to use pytest-axe:

  • Python 2.7 or 3.6
  • pytest-selenium >= 3.0.0
  • axe-selenium-python


To install pytest-axe:

$ pip install pytest-axe


To run tests using pytest-selenium (a dependency of axe-selenium-python), tests must be marked with the non-destructive pytest decorator:

def test_my_test_function():
  assert true

Test suites using axe-selenium-python must import pytest and the Axe class.

pytest-selenium relies on the base_url fixture, which can be set in a configuration file, or as a command line argument.

Configuration File

 base_url =

Command Line Argument

$ pytest --base-url

Example Test Function

import pytest
from axe_selenium_python import Axe
import pytest_axe

def test_accessibility(self, axe):

  response = axe.execute()

  assert len(response['violations']) == 0,



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-axe, version 0.0.200
Filename, size File type Python version Upload date Hashes
Filename, size pytest_axe-0.0.200-py2-none-any.whl (4.6 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size pytest-axe-0.0.200.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page