Как исправить такой метод ошибок в основном - PullRequest
0 голосов
/ 10 апреля 2019

Я пишу код для подключения мобильного элемента, используя координаты, но показывая ошибку

Exception in thread "main" java.lang.NoSuchMethodError: org.openqa.selenium.remote.http.HttpClient$Factory.createDefault()Lorg/openqa/selenium/remote/http/HttpClient$Factory;
    at io.appium.java_client.remote.AppiumCommandExecutor.<init>(AppiumCommandExecutor.java:93)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:93)
    at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:95)
    at test.TapElement.setUp(TapElement.java:36)
    at test.TapElement.main(TapElement.java:62)

Код:

AppiumDriver<MobileElement> driver;

//after setting the capabailities

driver = new AndroidDriver<MobileElement>(new URL("url"), caps);

public void tapAction()
{
    TouchAction touchAction = new TouchAction(driver);
    touchAction.tap(PointOption.point(661, 1122)).perform();
}

public static void main(String[] args) throws MalformedURLException {
    TapElement obj = new TapElement();
    obj.tapAction();
}
...