Skip to content
Gleb Golovin edited this page Oct 10, 2016 · 3 revisions

Table of Contents

app

The absolute local path to an .exe file to be started. Note that this capability is not required if debugConnectToRunningApp is specified.

e.g., C:\test\app.exe


args

Sets the set of command-line arguments to use when starting the application.

e.g., -port 345 -name jora


launchDelay

Launch delay in milliseconds, to be waited to let visuals to initialize after application started.

e.g., 0 (default)


debugConnectToRunningApp

If true, then application starting step are skipped.

e.g., true or false (default)


keyboardSimulator

Keyboard simulator type.

e.g., BasedOnWindowsFormsSendKeysClass or BasedOnInputSimulatorLib (default)

package testcases; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.By; import org.openqa.selenium.winium.DesktopOptions; import org.openqa.selenium.winium.WiniumDriver public class calculator {

public static void main(String[] args) throws MalformedURLException, InterruptedException {
    DesktopOptions option = new DesktopOptions();
    option.setApplicationPath("C:\\Windows\\System32\\calc.exe");
    WiniumDriver driver = new WiniumDriver(new URL("http://localhost:9999"), option);
    Thread.sleep(5);
    driver.findElement(By.name("Five")).click();
    driver.findElement(By.id("multiplyButton")).click();
    driver.findElement(By.name("Six")).click();
    driver.findElement(By.id("equalButton")).click();

} }

Clone this wiki locally