Class WebDriverInjectorExtensions


  • public final class WebDriverInjectorExtensions
    extends Object
    Holds the Web driver injection extension methods.
    • Method Detail

      • executeAsyncScript

        public static Object executeAsyncScript​(org.openqa.selenium.WebDriver webDriver,
                                                String command,
                                                Object... args)
        Execute an asynchronous JavaScript command.
        Parameters:
        webDriver - for the page to be scanned
        command - The command to be executed.
        args - Additional arguments to be provided to the command.
        Returns:
        the results that would normally be provided to the asynchronous commands callback.
      • inject

        public static void inject​(org.openqa.selenium.WebDriver driver,
                                  IAxeScriptProvider scriptProvider,
                                  boolean disableIframeTesting)
                           throws OperationNotSupportedException,
                                  IOException
        Injects Axe script into frames. If a frame (not top-level) errors when injecting due to not being displayed, the error is ignored.
        Parameters:
        driver - WebDriver instance to inject into
        scriptProvider - Provider that get the aXe script to inject
        Throws:
        OperationNotSupportedException - if the operation errors out
        IOException - if an IO exception occurs
      • inject

        public static void inject​(org.openqa.selenium.WebDriver driver,
                                  String script,
                                  boolean disableIframeTesting)
        Injects Axe script into frames. If a frame (not top-level) errors when injecting due to not being displayed, the error is ignored.
        Parameters:
        driver - WebDriver instance to inject into
        script - The script to inject
      • injectAsync

        public static void injectAsync​(org.openqa.selenium.WebDriver driver,
                                       String script,
                                       boolean disableIframeTesting)
        Injects script into frames to be run asynchronously.
        Parameters:
        driver - WebDriver instance to inject into
        script - The script to inject