I am using Selenium.Winium tool for automation. I have included the below jar files for importing the selenium.winium packages

  1. selenium-java.jar
  2. winium-webdriver-0.1.0-1.jar
  3. webdriver-selenium-0.9.7376.jar
  4. selenium-server-standalone-3.14.0.jar

Below is my Java code :

import org.openqa.selenium.By;
import org.openqa.selenium.winium.DesktopOptions;
import org.openqa.selenium.winium.WiniumDriver;
import org.openqa.selenium.WebElement;
import java.net.MalformedURLException;
import java.net.URL;

public class WiniumTestProject
{
public static void main(String[] args) throws MalformedURLException, InterruptedException
{
    DesktopOptions options= new DesktopOptions();
options.setApplicationPath("C:\\Windows\\System32\\calc.exe");
    try
    {
        WiniumDriver driver=new WiniumDriver(new URL("http://localhost:9999"),options);         
        driver.close();
    }
    catch(Exception e)
    {
        System.out.println(e.getMessage());
    }
 }
}

Error Details :

When running the project through the command “java ProjectName” in Command window, it throws the following error.

Exception in thread "main" java.lang.NoSuchMethodError: 
org.openqa.selenium.remote.HttpCommandExecutor.<init>(Ljava/util/Map;Ljava/net/URL;)V
    at org.openqa.selenium.winium.WiniumDriverCommandExecutor.<init>(WiniumDriverCommandExecutor.java:64)
    at org.openqa.selenium.winium.WiniumDriver.<init>(WiniumDriver.java:84)
    at WiniumTestProject.main(WiniumTestProject.java:18)

Could anyone please help us to resolve this error?

0

There are 0 answers