com.deque.axe
Class AXE.Builder

java.lang.Object
  extended by com.deque.axe.AXE.Builder
Enclosing class:
AXE

public static class AXE.Builder
extends Object

Chainable builder for invoking aXe. Instantiate a new Builder and configure testing with the include(), exclude(), and options() methods before calling analyze() to run.


Constructor Summary
AXE.Builder(org.openqa.selenium.WebDriver driver, URL script)
          Injects the aXe script into the WebDriver.
 
Method Summary
 org.json.JSONObject analyze()
          Run aXe against the page.
 org.json.JSONObject analyze(org.openqa.selenium.WebElement context)
          Run aXe against a specific WebElement.
 AXE.Builder exclude(String selector)
          Exclude a selector.
 AXE.Builder include(String selector)
          Include a selector.
 AXE.Builder options(String options)
          Set the aXe options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AXE.Builder

public AXE.Builder(org.openqa.selenium.WebDriver driver,
                   URL script)
Injects the aXe script into the WebDriver.

Parameters:
driver - An initialized WebDriver
Method Detail

options

public AXE.Builder options(String options)
Set the aXe options.

Parameters:
options - Options object as a JSON string

include

public AXE.Builder include(String selector)
Include a selector.

Parameters:
selector - Any valid CSS selector

exclude

public AXE.Builder exclude(String selector)
Exclude a selector.

Parameters:
selector - Any valid CSS selector

analyze

public org.json.JSONObject analyze()
Run aXe against the page.

Returns:
An aXe results document

analyze

public org.json.JSONObject analyze(org.openqa.selenium.WebElement context)
Run aXe against a specific WebElement.

Parameters:
context - A WebElement to test
Returns:
An aXe results document


Copyright © 2015. All rights reserved.