Class WebDriverExtensions


  • public final class WebDriverExtensions
    extends Object
    web driver extension that has extra analyze methods.
    • Method Detail

      • 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 scanned
        context - A WebElement to test
        Returns:
        an Results to be formatted
        Throws:
        IOException - if analysis of page reaches an error
        OperationNotSupportedException - 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 page
        prevWindow - ID for the window returned by openAboutBlank