«Исключение в потоке« main »java.lang.NoSuchMethodError: org.openqa.selenium.remote.HttpCommandExecutor. <init>(Ljava / util / Map; Ljava / net / URL;) V»? - PullRequest
0 голосов
/ 14 сентября 2018

Я использую инструмент Selenium.Winium для автоматизации. Я включил следующие файлы jar для импорта пакетов selenium.winium

  1. Селен-java.jar
  2. winium-WebDriver-0.1.0-1.jar
  3. WebDriver-селен 0.9.7376.jar
  4. Селен-сервер автономный-3.14.0.jar

Ниже мой код Java:

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

Сведения об ошибке:

При запуске проекта с помощью команды «java ProjectName» в окне «Команды» выдается следующая ошибка.

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)

Может ли кто-нибудь помочь нам решить эту ошибку?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...