Skip to content
Patel Parth edited this page Dec 28, 2023 · 1 revision

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();
   }

}

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