Package FlaNium.WinAPI.webdriver
Class DesktopOptions
- java.lang.Object
-
- FlaNium.WinAPI.webdriver.DesktopOptions
-
- All Implemented Interfaces:
FlaNiumOptions
public class DesktopOptions extends Object implements FlaNiumOptions
Class to manage options specific toFlaNiumDriver
-
-
Constructor Summary
Constructors Constructor Description DesktopOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DesktopOptionssetApplicationPath(String applicationPath)Sets the absolute path to an .exe file to be started.DesktopOptionssetArguments(String arguments)Sets startup arguments of the application under test.DesktopOptionssetConnectToRunningApp(Boolean connectToRunningApp)If false (default) - always starts a new application process (with closing the current one, if any).DesktopOptionssetInjectionActivate(Boolean injectionActivate)Using injection technology to access application data.DesktopOptionssetInjectionDllType(String injectionDllType)Set type of DLL for inject.DesktopOptionssetLaunchDelay(Integer launchDelay)Sets the launch delay in milliseconds, to be waited to let visuals to initialize after application started.DesktopOptionssetProcessFindTimeOut(Integer processFindTimeOut)Sets the search time for the application process specified in the processName parameter.DesktopOptionssetProcessName(String processName)Setting the name of the application process.DesktopOptionssetResponseTimeout(Integer responseTimeout)Setting the response timeout.org.openqa.selenium.CapabilitiestoCapabilities()Convert options to DesiredCapabilities for FlaNium Desktop Driver
-
-
-
Method Detail
-
setApplicationPath
public DesktopOptions setApplicationPath(String applicationPath)
Sets the absolute path to an .exe file to be started.- Parameters:
applicationPath- Absolute path to an .exe file to be started.
System variables are supported, for example:
"<LOCALAPPDATA>/folder/file.exe"
-
setArguments
public DesktopOptions setArguments(String arguments)
Sets startup arguments of the application under test.- Parameters:
arguments- Startup arguments of the application under test.
-
setConnectToRunningApp
public DesktopOptions setConnectToRunningApp(Boolean connectToRunningApp)
If false (default) - always starts a new application process (with closing the current one, if any).If true and the application is not running, then starts the application.
If true and the application is running, then it simply uses the current state of the application.
Also, if true - then the application does not close when the session ends.
- Parameters:
connectToRunningApp- An option that allows you to connect to a previously launched application.
-
setLaunchDelay
public DesktopOptions setLaunchDelay(Integer launchDelay)
Sets the launch delay in milliseconds, to be waited to let visuals to initialize after application started.- Parameters:
launchDelay- Launch delay in milliseconds.
-
setProcessFindTimeOut
public DesktopOptions setProcessFindTimeOut(Integer processFindTimeOut)
Sets the search time for the application process specified in the processName parameter.- Parameters:
processFindTimeOut- Process lookup timeout in milliseconds.
-
setProcessName
public DesktopOptions setProcessName(String processName)
Setting the name of the application process. It is used in cases when the process id changes after starting the application.- Parameters:
processName- process name of the main window of the application.
-
setInjectionActivate
public DesktopOptions setInjectionActivate(Boolean injectionActivate)
Using injection technology to access application data. Need EXTENDED version of FlaNium Driver.- Parameters:
injectionActivate- Activate injection technology
-
setInjectionDllType
public DesktopOptions setInjectionDllType(String injectionDllType)
Set type of DLL for inject. Use with InjectionActivate.- Parameters:
injectionDllType- Type of Dll.
-
setResponseTimeout
public DesktopOptions setResponseTimeout(Integer responseTimeout)
Setting the response timeout. If no response is received from the Win API within this time, an exception will be thrown.- Parameters:
responseTimeout- response timeout in milliseconds.
-
toCapabilities
public org.openqa.selenium.Capabilities toCapabilities()
Convert options to DesiredCapabilities for FlaNium Desktop Driver- Specified by:
toCapabilitiesin interfaceFlaNiumOptions- Returns:
- The DesiredCapabilities for FlaNium Desktop Driver with these options.
-
-