public class AxeBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
String |
axeRunScript |
String |
sandboxBusterScript |
| Constructor and Description |
|---|
AxeBuilder()
Initialize an instance of AxeBuilder.
|
AxeBuilder(AxeBuilderOptions builderOptions)
Initialize an instance of AxeBuilder.
|
AxeBuilder(AxeBuilderOptions builderOptions,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Initialize an instance of AxeBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
Results |
analyze(org.openqa.selenium.WebDriver webDriver)
Run axe against the entire page.
|
Results |
analyze(org.openqa.selenium.WebDriver webDriver,
boolean injectAxe)
Run axe against the entire page.
|
Results |
analyze(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.WebElement... context)
Run axe against a specific WebElement
or webElements (including its descendants).
|
AxeBuilder |
disableRules(List<String> rules)
Set the list of rules to skip when running an analysis.
|
AxeBuilder |
exclude(List<String> selectors)
Selectors to exclude in the validation.
|
AxeBuilderOptions |
getDefaultAxeBuilderOptions()
get the default axe builder options.
|
String |
getOptions()
gets the options.
|
AxeBuilder |
include(List<String> selectors)
Selectors to include in the validation.
|
AxeBuilder |
setAxeScriptProvider(IAxeScriptProvider axeProvider)
sets the where we get the axe script from.
|
void |
setOptions(String newOptions)
sets the options.
|
AxeBuilder |
setTimeout(int newTimeout)
sets the timeout.
|
AxeBuilder |
withOnlyRules(List<String> rules)
Limit analysis to only the specified rules.
|
AxeBuilder |
withOptions(AxeRunOptions newRunOptions)
Run configuration data that is passed to axe for scanning the web page.
|
AxeBuilder |
withoutIframeSandboxes()
Remove the "sandbox" attribute from iframes on the page.
|
AxeBuilder |
withOutputFile(String path)
Causes analyze() to write the axe results as a JSON file,
in addition to returning it in object format as usual.
|
AxeBuilder |
withRules(List<String> rules)
Limit analysis to only the specified rules.
|
AxeBuilder |
withTags(List<String> tags)
Limit analysis to only the specified tags.
|
public final String axeRunScript
public final String sandboxBusterScript
public AxeBuilder()
public AxeBuilder(AxeBuilderOptions builderOptions)
builderOptions - Builder optionspublic AxeBuilder(AxeBuilderOptions builderOptions, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
builderOptions - Builder optionsobjectMapper - ObjectMapper to usepublic AxeBuilderOptions getDefaultAxeBuilderOptions()
public AxeBuilder setAxeScriptProvider(IAxeScriptProvider axeProvider)
axeProvider - the source of the axe scriptpublic AxeBuilder setTimeout(int newTimeout)
newTimeout - the int value to be setpublic String getOptions()
public void setOptions(String newOptions)
newOptions - the options to be setpublic AxeBuilder withoutIframeSandboxes()
public AxeBuilder withOptions(AxeRunOptions newRunOptions)
newRunOptions - run options to be used for scanning.public AxeBuilder withTags(List<String> tags)
tags - tags to be used for scanningpublic AxeBuilder withOnlyRules(List<String> rules)
rules - rule IDs to be used for scanningpublic AxeBuilder withRules(List<String> rules)
rules - rule IDs to be used for scanningpublic AxeBuilder disableRules(List<String> rules)
rules - rule IDs to be skipped from analysispublic AxeBuilder include(List<String> selectors)
selectors - >Any valid CSS selectorspublic AxeBuilder exclude(List<String> selectors)
selectors - Any valid CSS selectorspublic AxeBuilder withOutputFile(String path)
path - Path to the output file.
Will be passed as-is to the System.IO APIs.public Results analyze(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.WebElement... context)
context - WebElement(s) to testpublic Results analyze(org.openqa.selenium.WebDriver webDriver)
public Results analyze(org.openqa.selenium.WebDriver webDriver, boolean injectAxe)
Copyright © 2020. All rights reserved.