Class WebDriverExtensions
- java.lang.Object
-
- com.deque.html.axecore.extensions.WebDriverExtensions
-
public final class WebDriverExtensions extends Object
web driver extension that has extra analyze methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Resultsanalyze(org.openqa.selenium.WebDriver webDriver)Run axe against the entire page.static Resultsanalyze(org.openqa.selenium.WebDriver webDriver, AxeBuilderOptions axeBuilderOptions)Run axe against the entire page.static Resultsanalyze(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.WebElement context)Run axe against the entire page.static Resultsanalyze(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.WebElement context, AxeBuilderOptions axeBuilderOptions)Run axe against the entire page.static voidcloseAboutBlank(org.openqa.selenium.WebDriver webDriver, String prevWindow)Closes the about:blank window and switches back to the provided window.static StringopenAboutBlank(org.openqa.selenium.WebDriver webDriver)Open about:blank in a secure context.
-
-
-
Method Detail
-
analyze
public static Results analyze(org.openqa.selenium.WebDriver webDriver) throws IOException, OperationNotSupportedException
Run axe against the entire page.- Parameters:
webDriver- for the page to be scanned- Returns:
- an Results to be formatted
- Throws:
IOException- if analysis of page reaches an errorOperationNotSupportedException- if an unaccepted error occurs
-
analyze
public static Results analyze(org.openqa.selenium.WebDriver webDriver, AxeBuilderOptions axeBuilderOptions) throws OperationNotSupportedException, IOException
Run axe against the entire page.- Parameters:
webDriver- for the page to be scannedaxeBuilderOptions- Builder options- Returns:
- an Results to be formatted
- Throws:
IOException- if analysis of page reaches an errorOperationNotSupportedException- if an unaccepted error occurs
-
analyze
public static Results analyze(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.WebElement context) throws IOException, OperationNotSupportedException
Run axe against the entire page.- Parameters:
webDriver- for the page to be scannedcontext- A WebElement to test- Returns:
- an Results to be formatted
- Throws:
IOException- if analysis of page reaches an errorOperationNotSupportedException- if an unaccepted error occurs
-
analyze
public static Results analyze(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.WebElement context, AxeBuilderOptions axeBuilderOptions) throws OperationNotSupportedException, IOException
Run axe against the entire page.- Parameters:
webDriver- for the page to be scannedcontext- A WebElement to testaxeBuilderOptions- Builder options- Returns:
- an Results to be formatted
- Throws:
IOException- if analysis of page reaches an errorOperationNotSupportedException- if an unaccepted error occurs
-
openAboutBlank
public static String openAboutBlank(org.openqa.selenium.WebDriver webDriver)
Open about:blank in a secure context.- Parameters:
webDriver- of the open page- Returns:
- ID of window at before the switch. Pass this to closeAboutBlank
-
closeAboutBlank
public static void closeAboutBlank(org.openqa.selenium.WebDriver webDriver, String prevWindow)Closes the about:blank window and switches back to the provided window.- Parameters:
webDriver- for the open pageprevWindow- ID for the window returned by openAboutBlank
-
-