Akshay Kachare
Akshay Kachare

Reputation: 1

Actions not performing on element through winium driver

I am trying to automate calculator application but when I am trying to perform any action(click/sendkeys) it doesn't click on exact element and step getting pass without any exception.

public class TestClass {

    public static void main(String[] args) throws MalformedURLException, InterruptedException {
        WiniumDriver driver = null;
                String appPath = "C:/windows/system32/calc.exe"; 
                DesktopOptions option = new DesktopOptions();
                option.setApplicationPath(appPath);
                option.setDebugConnectToRunningApp(false);
                option.setLaunchDelay(2);
                driver = new WiniumDriver(new URL("http://localhost:9999"),option);
                Thread.sleep(1000);
                WebElement window = driver.findElementByClassName("Windows.UI.Core.CoreWindow");
                WebElement menuItem = window.findElement(By.name("Open Navigation")).findElement(By.id("TogglePaneButton"));
                menuItem.click();
                driver.findElementByName("Scientific").click();
}
}

Upvotes: 0

Views: 47

Answers (0)

Related Questions