axe-selenium-python
====================
axe-selenium-python integrates aXe and selenium to enable automated web accessibility testing.
**This version of axe-selenium-python is using axe-core@3.1.1.**
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg
:target: https://github.com/mozilla-services/axe-selenium-python/blob/master/LICENSE.txt
:alt: License
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg
:target: https://pypi.org/project/axe-selenium-python/
:alt: PyPI
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg
:target: https://travis-ci.org/mozilla-services/axe-selenium-python
:alt: Travis
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg
:target: https://github.com/mozilla-services/axe-selenium-python/issues
:alt: Issues
.. image:: https://api.dependabot.com/badges/status?host=github&repo=mozilla-services/axe-selenium-python
:target: https://dependabot.com
:alt: Dependabot
.. image:: https://coveralls.io/repos/github/mozilla-services/axe-selenium-python/badge.svg?branch=master
:target: https://coveralls.io/github/mozilla-services/axe-selenium-python?branch=master
:alt: Coveralls
Requirements
------------
You will need the following prerequisites in order to use axe-selenium-python:
- selenium >= 3.0.0
- Python 2.7 or 3.6
- The appropriate driver for the browser you intend to use, downloaded and added to your path, e.g. geckodriver for Firefox:
- `geckodriver <https://github.com/mozilla/geckodriver/releases>`_ downloaded and `added to your PATH <https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path#answer-40208762>`_
Installation
------------
To install axe-selenium-python:
.. code-block:: bash
$ pip install axe-selenium-python
Usage
------
.. code-block:: python
from selenium import webdriver
from axe_selenium_python import Axe
def test_google():
driver = webdriver.Firefox()
driver.get("http://www.google.com")
axe = Axe(driver)
# Inject axe-core javascript into page.
axe.inject()
# Run axe accessibility checks.
results = axe.run()
# Write results to file
axe.write_results(results, 'a11y.json')
driver.close()
# Assert no violations are found
assert len(results["violations"]) == 0, axe.report(results["violations"])
The method ``axe.run()`` accepts two parameters: ``context`` and ``options``.
For more information on ``context`` and ``options``, view the `aXe documentation here <https://github.com/dequelabs/axe-core/blob/master/doc/API.md#parameters-axerun>`_.
Contributing
------------
Fork the repository and submit PRs with bug fixes and enhancements;
contributions are very welcome.
Node dependencies must be installed by running `npm install` inside the axe-selenium-python directory.
You can run the tests using
`tox <https://tox.readthedocs.io/en/latest/>`_:
.. code-block:: bash
$ tox
Resources
---------
- `Issue Tracker <http://github.com/mozilla-services/axe-selenium-python/issues>`_
- `Code <http://github.com/mozilla-services/axe-selenium-python/>`_
- `pytest-axe <http://github.com/mozilla-services/pytest-axe/>`_
CHANGELOG
^^^^^^^^^^^^^^
version 2.1.5
*************
**Breaking changes**:
- The Axe class method ``execute`` has been renamed to ``run`` to mirror the method in the axe-core API.
version 2.1.0
**************
- Created package.json file to maintain axe-core dependency
- Replaced unit tests with more meaningful integration tests
- included a sample html file for integration tests
version 2.0.0
**************
- All functionalities that are not part of axe-core have been moved into a separate package, ``pytest-axe``. This includes:
- ``run_axe`` helper method
- ``get_rules`` Axe class method
- ``run`` Axe class method
- ``impact_included`` Axe class method
- ``analyze`` Axe class method.
The purpose of this change is to separate implementations that are specific to the Mozilla Firefox Test Engineering team, and leave the base ``axe-selenium-python`` package for a more broad use case. This package was modeled off of Deque's Java package, axe-selenium-java, and will now more closely mirror it.
All functionalities can still be utilized when using ``axe-selenium-python`` in conjunction with ``pytest-axe``.
version 1.2.3
**************
- Added the analyze method to the Axe class. This method runs accessibility checks, and writes the JSON results to file based on the page URL and the timestamp.
- Writing results to file can be enabled by setting the environment variable ``ACCESSIBILITY_REPORTING=true``. The files will be written to ``results/`` directory, which must be created if it does not already exist.
- Accessibility checks can be disabled by setting the environment variable ``ACCESSIBILITY_DISABLED=true``.
version 1.2.1
**************
- Updated axe to ``axe-core@2.6.1``
- Modified impact_included class method to reflect changes to the aXe API:
- There are now only 3 impact levels: 'critical', 'serious', and 'minor'
version 1.0.0
**************
- Updated usage examples in README
- Added docstrings to methods lacking documentation
- Removed unused files
version 0.0.3
**************
- Added run method to Axe class to simplify the usage in existing test suites
- run method includes the ability to set what impact level to test for: 'minor', 'moderate', 'severe', 'critical'
version 0.0.28
****************
- Added selenium instance as a class attribute
- Changed file paths to OS independent structure
- Fixed file read operations to use with keyword
version 0.0.21
***************
- Fixed include of aXe API file and references to it
- Updated README
Raw data
{
"_id": null,
"home_page": "http://github.com/mozilla-services/axe-selenium-python",
"name": "axe-selenium",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "axe-core selenium pytest-selenium accessibility automation mozilla",
"author": "Kimberly Sereduck",
"author_email": "ksereduck@mozilla.com",
"download_url": "https://files.pythonhosted.org/packages/1b/11/3387d0c94af91a6c39e40d8ebe58428006d648a6ad8cd671ca72b5e45fcf/axe_selenium-2.1.6.tar.gz",
"platform": null,
"description": "axe-selenium-python\n====================\n\naxe-selenium-python integrates aXe and selenium to enable automated web accessibility testing.\n\n**This version of axe-selenium-python is using axe-core@3.1.1.**\n\n.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg\n :target: https://github.com/mozilla-services/axe-selenium-python/blob/master/LICENSE.txt\n :alt: License\n.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg\n :target: https://pypi.org/project/axe-selenium-python/\n :alt: PyPI\n.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg\n :target: https://travis-ci.org/mozilla-services/axe-selenium-python\n :alt: Travis\n.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg\n :target: https://github.com/mozilla-services/axe-selenium-python/issues\n :alt: Issues\n.. image:: https://api.dependabot.com/badges/status?host=github&repo=mozilla-services/axe-selenium-python\n :target: https://dependabot.com\n :alt: Dependabot\n.. image:: https://coveralls.io/repos/github/mozilla-services/axe-selenium-python/badge.svg?branch=master\n :target: https://coveralls.io/github/mozilla-services/axe-selenium-python?branch=master\n :alt: Coveralls\n\n\n\nRequirements\n------------\n\nYou will need the following prerequisites in order to use axe-selenium-python:\n\n- selenium >= 3.0.0\n- Python 2.7 or 3.6\n- The appropriate driver for the browser you intend to use, downloaded and added to your path, e.g. geckodriver for Firefox:\n\n - `geckodriver <https://github.com/mozilla/geckodriver/releases>`_ downloaded and `added to your PATH <https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path#answer-40208762>`_\n\nInstallation\n------------\n\nTo install axe-selenium-python:\n\n.. code-block:: bash\n\n $ pip install axe-selenium-python\n\n\nUsage\n------\n\n.. code-block:: python\n\n from selenium import webdriver\n from axe_selenium_python import Axe\n\n def test_google():\n driver = webdriver.Firefox()\n driver.get(\"http://www.google.com\")\n axe = Axe(driver)\n # Inject axe-core javascript into page.\n axe.inject()\n # Run axe accessibility checks.\n results = axe.run()\n # Write results to file\n axe.write_results(results, 'a11y.json')\n driver.close()\n # Assert no violations are found\n assert len(results[\"violations\"]) == 0, axe.report(results[\"violations\"])\n\nThe method ``axe.run()`` accepts two parameters: ``context`` and ``options``.\n\nFor more information on ``context`` and ``options``, view the `aXe documentation here <https://github.com/dequelabs/axe-core/blob/master/doc/API.md#parameters-axerun>`_.\n\nContributing\n------------\n\nFork the repository and submit PRs with bug fixes and enhancements;\ncontributions are very welcome.\n\nNode dependencies must be installed by running `npm install` inside the axe-selenium-python directory.\n\nYou can run the tests using\n`tox <https://tox.readthedocs.io/en/latest/>`_:\n\n.. code-block:: bash\n\n $ tox\n\nResources\n---------\n\n- `Issue Tracker <http://github.com/mozilla-services/axe-selenium-python/issues>`_\n- `Code <http://github.com/mozilla-services/axe-selenium-python/>`_\n- `pytest-axe <http://github.com/mozilla-services/pytest-axe/>`_\n\nCHANGELOG\n^^^^^^^^^^^^^^\n\nversion 2.1.5\n*************\n**Breaking changes**:\n\n- The Axe class method ``execute`` has been renamed to ``run`` to mirror the method in the axe-core API.\n\nversion 2.1.0\n**************\n- Created package.json file to maintain axe-core dependency\n- Replaced unit tests with more meaningful integration tests\n - included a sample html file for integration tests\n\nversion 2.0.0\n**************\n- All functionalities that are not part of axe-core have been moved into a separate package, ``pytest-axe``. This includes:\n\n - ``run_axe`` helper method\n - ``get_rules`` Axe class method\n - ``run`` Axe class method\n - ``impact_included`` Axe class method\n - ``analyze`` Axe class method.\n\nThe purpose of this change is to separate implementations that are specific to the Mozilla Firefox Test Engineering team, and leave the base ``axe-selenium-python`` package for a more broad use case. This package was modeled off of Deque's Java package, axe-selenium-java, and will now more closely mirror it.\n\nAll functionalities can still be utilized when using ``axe-selenium-python`` in conjunction with ``pytest-axe``.\n\nversion 1.2.3\n**************\n- Added the analyze method to the Axe class. This method runs accessibility checks, and writes the JSON results to file based on the page URL and the timestamp.\n- Writing results to file can be enabled by setting the environment variable ``ACCESSIBILITY_REPORTING=true``. The files will be written to ``results/`` directory, which must be created if it does not already exist.\n- Accessibility checks can be disabled by setting the environment variable ``ACCESSIBILITY_DISABLED=true``.\n\nversion 1.2.1\n**************\n- Updated axe to ``axe-core@2.6.1``\n- Modified impact_included class method to reflect changes to the aXe API:\n- There are now only 3 impact levels: 'critical', 'serious', and 'minor'\n\nversion 1.0.0\n**************\n- Updated usage examples in README\n- Added docstrings to methods lacking documentation\n- Removed unused files\n\nversion 0.0.3\n**************\n- Added run method to Axe class to simplify the usage in existing test suites\n- run method includes the ability to set what impact level to test for: 'minor', 'moderate', 'severe', 'critical'\n\nversion 0.0.28\n****************\n- Added selenium instance as a class attribute\n- Changed file paths to OS independent structure\n- Fixed file read operations to use with keyword\n\n\nversion 0.0.21\n***************\n- Fixed include of aXe API file and references to it\n- Updated README\n",
"bugtrack_url": null,
"license": "Mozilla Public License 2.0 (MPL 2.0)",
"summary": "Python library to integrate axe and selenium for web accessibility testing.",
"version": "2.1.6",
"project_urls": {
"Homepage": "http://github.com/mozilla-services/axe-selenium-python"
},
"split_keywords": [
"axe-core",
"selenium",
"pytest-selenium",
"accessibility",
"automation",
"mozilla"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c7b285a89b83ecc7a09cc5f2c3ef155093e0f53efa0484e7cddb123b808a4b3c",
"md5": "f55cda0d2569e5bf09428c92d490d7a9",
"sha256": "c6dbfe7195d2edb91d61e9b72f63062d0b16e3e9d48e7bc8bc7028adc2fd8857"
},
"downloads": -1,
"filename": "axe_selenium-2.1.6-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f55cda0d2569e5bf09428c92d490d7a9",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 92310,
"upload_time": "2024-09-26T11:03:23",
"upload_time_iso_8601": "2024-09-26T11:03:23.805702Z",
"url": "https://files.pythonhosted.org/packages/c7/b2/85a89b83ecc7a09cc5f2c3ef155093e0f53efa0484e7cddb123b808a4b3c/axe_selenium-2.1.6-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b113387d0c94af91a6c39e40d8ebe58428006d648a6ad8cd671ca72b5e45fcf",
"md5": "9d6bb05bd069b1fa7aed9b0951e59731",
"sha256": "24f0ecd5ae2b171bf36197ece192c39aa24cb04290c6dde02da89f94525a27aa"
},
"downloads": -1,
"filename": "axe_selenium-2.1.6.tar.gz",
"has_sig": false,
"md5_digest": "9d6bb05bd069b1fa7aed9b0951e59731",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 91895,
"upload_time": "2024-09-26T11:03:25",
"upload_time_iso_8601": "2024-09-26T11:03:25.624020Z",
"url": "https://files.pythonhosted.org/packages/1b/11/3387d0c94af91a6c39e40d8ebe58428006d648a6ad8cd671ca72b5e45fcf/axe_selenium-2.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-26 11:03:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mozilla-services",
"github_project": "axe-selenium-python",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "axe-selenium"
}