axe-devtools-selenium Python API Reference

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard

API reference for the axe-devtools-selenium package and the AxeDriver wrapper class

Not for use with personal data

Interface for using Selenium WebDrivers with the axe-devtools-api package. Provides the AxeDriver wrapper class to adapt a Selenium WebDriver for use with Axe.

axe_devtools_selenium.AxeDriver

Wraps a Selenium WebDriver to provide an interface for the Axe class.

AxeDriver(driver)

Create an AxeDriver from a Selenium WebDriver.

You must have a Selenium WebDriver binding (such as chromedriver or geckodriver) installed.

driver: A Selenium WebDriver for the page to check.

driver = webdriver.Chrome()
driver.get("https://dequeuniversity.com/demo/mars/")
axe_driver = AxeDriver(driver)
report = Axe(axe_driver).analyze()