Skip to main content

Automated web accessibility testing using axe-core engine and Playwright.

Project description

axe-playwright-python

Automated web accessibility testing using axe-core engine and Playwright.

Documentation

Dependencies

Installation

python3 -m pip install -U axe-playwright-python
python3 -m playwright install --with-deps

Usage

from playwright.sync_api import sync_playwright
from axe_core_python.sync_playwright import Axe

axe = Axe()

with sync_playwright() as playwright:
    browser = playwright.chromium.launch()
    page = browser.new_page()
    page.goto("https://www.google.com")
    results = axe.run(page)
    browser.close()

print(f"Found {results.violations_count} violations.")
print(f"Full axe-core response: {results.response}")

For more examples see documentation.

Contributing

See guide on contributing.

Acknowledgments

This project is based on axe-core-python by @ruslan-rv-ua and also takes inspiration from axe-selenium-python for output formats.

Project details


Download files

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

Source Distribution

axe_playwright_python-0.1.4.tar.gz (148.9 kB view hashes)

Uploaded Source

Built Distribution

axe_playwright_python-0.1.4-py3-none-any.whl (116.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page