我正在编写代码以使用坐标点击移动元素但显示错误
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();
}