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:
        command - The command to be executed.
        args - Additional arguments to be provided to the command.
        webDriver - Webdriver to run it on.
        Returns:
        the results that would normally be provided to the asynchronous commands callback.
      • inject

        public static void inject​(org.openqa.selenium.WebDriver driver,
                                  String script)
        Injects Axe script into frames.
        Parameters:
        driver - WebDriver instance to inject into
        script - The script to inject
      • injectAsync

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