Class FlaNiumDriver

  • All Implemented Interfaces:
    org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.PrintsPage, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator, org.openqa.selenium.WebDriver

    public class FlaNiumDriver
    extends org.openqa.selenium.remote.RemoteWebDriver
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver

        org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
      • Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver

        org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void changeProcess​(String processName, int timeOut)
      Attaches to the first process found by name.
      void deleteFileOrDirectory​(String path)
      Deletes a file or folder at the specified path.
      org.openqa.selenium.remote.Response execute​(String command)  
      org.openqa.selenium.remote.Response execute​(String driverCommand, Map<String,​?> parameters)  
      boolean fileOrDirectoryExists​(String path)
      Checks if a file or folder exists at the specified path.
      org.openqa.selenium.remote.RemoteWebElement getActiveWindow()
      Get the active window or current root element.
      KeyboardActions keyboardActions()
      Get Keyboard Actions instance.
      void killAllProcessesByName​(String processName)
      Terminates all processes found by name.
      MouseActions mouseActions()
      Get Mouse Actions instance.
      void resetRootElement()
      Sets the main window of the connected process as the root element.
      ScreenshotActions screenshotActions()
      Get Screenshot Actions of current item.
      void setDesktopAsRootElement()
      Sets the desktop as the root element for item searches and other actions.
      void setRootElement​(org.openqa.selenium.remote.RemoteWebElement webElement)
      Sets the given web element as the root element.
      void startApp​(String appPath, String appArguments, Integer launchDelayMs)
      Launches the application at the given path.
      TouchActions touchActions()
      Get Touch Actions instance.
      • Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver

        addVirtualAuthenticator, builder, close, execute, executeAsyncScript, executeScript, findElement, findElement, findElements, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, quit, removeVirtualAuthenticator, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startSession, switchTo, toString
      • Methods inherited from interface org.openqa.selenium.JavascriptExecutor

        executeScript, getPinnedScripts, pin, unpin
    • Constructor Detail

      • FlaNiumDriver

        public FlaNiumDriver​(URL remoteAddress,
                             FlaNiumOptions options)
        Initializes a new instance of the FlaNiumDriver lass using the specified remote address and options.
        Parameters:
        remoteAddress - URL containing the address of the FlaNiumDriver remote server.
        options - The FlaNiumOptions object to be used with the FlaNium driver.
      • FlaNiumDriver

        public FlaNiumDriver​(URL remoteAddress,
                             org.openqa.selenium.remote.DesiredCapabilities dc)
        Initializes a new instance of the FlaNiumDriver lass using the specified remote address and options.
        Parameters:
        remoteAddress - URL containing the address of the FlaNiumDriver remote server.
        dc - The DesiredCapabilities object to be used with the FlaNium driver.
    • Method Detail

      • execute

        public org.openqa.selenium.remote.Response execute​(String driverCommand,
                                                           Map<String,​?> parameters)
        Overrides:
        execute in class org.openqa.selenium.remote.RemoteWebDriver
      • execute

        public org.openqa.selenium.remote.Response execute​(String command)
        Overrides:
        execute in class org.openqa.selenium.remote.RemoteWebDriver
      • getActiveWindow

        public org.openqa.selenium.remote.RemoteWebElement getActiveWindow()
        Get the active window or current root element.
        Returns:
        The active window or current root element.
      • setDesktopAsRootElement

        public void setDesktopAsRootElement()
        Sets the desktop as the root element for item searches and other actions. By default, the root element is the application's main window.
      • resetRootElement

        public void resetRootElement()
        Sets the main window of the connected process as the root element.
      • setRootElement

        public void setRootElement​(org.openqa.selenium.remote.RemoteWebElement webElement)
        Sets the given web element as the root element.
        Parameters:
        webElement - Any web element.
      • changeProcess

        public void changeProcess​(String processName,
                                  int timeOut)
        Attaches to the first process found by name. Changes the root element to the process's main window. Also terminates the given process at the end of the session.
        Parameters:
        processName - Process name.
        timeOut - process search timeout in ms.
      • killAllProcessesByName

        public void killAllProcessesByName​(String processName)
        Terminates all processes found by name.
        Parameters:
        processName - Process name.
      • fileOrDirectoryExists

        public boolean fileOrDirectoryExists​(String path)
        Checks if a file or folder exists at the specified path.
        Parameters:
        path - Path to folder or file. System variables are supported, for example:
        "<LOCALAPPDATA>/folder/file.exe"
      • deleteFileOrDirectory

        public void deleteFileOrDirectory​(String path)
        Deletes a file or folder at the specified path.
        If an error occurs during deletion or the file or folder is missing, an exception is thrown.
        Parameters:
        path - Path to folder or file. System variables are supported, for example:
        "<LOCALAPPDATA>/folder/file.exe"
      • startApp

        public void startApp​(String appPath,
                             String appArguments,
                             Integer launchDelayMs)
        Launches the application at the given path.
        Parameters:
        appPath - The absolute path to an .exe file to be started. System variables are supported, for example:
        "<LOCALAPPDATA>/folder/file.exe"
        appArguments - Startup arguments of the application. May be null.
        launchDelayMs - Static timeout to start in ms.
      • touchActions

        public TouchActions touchActions()
        Get Touch Actions instance.
        Returns:
        Touch Actions instance.
      • keyboardActions

        public KeyboardActions keyboardActions()
        Get Keyboard Actions instance.
        Returns:
        Keyboard Actions instance.
      • mouseActions

        public MouseActions mouseActions()
        Get Mouse Actions instance.
        Returns:
        Mouse Actions instance.
      • screenshotActions

        public ScreenshotActions screenshotActions()
        Get Screenshot Actions of current item.
        Returns:
        ScreenshotActions instance.