同樣在這裏。
org.openqa.selenium.WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)
這是我使用的代碼。
以爲蒙上了
Webdriver
到
AppiumDriver
public TouchAction touchAction() {
if (driver instanceof AppiumDriver) {
return new TouchAction((AppiumDriver) driver);
} else {
try {
throw new DriverIsNotAnInstanceOfAtriumDriverException(
"The driver is not an instance of io.appium.java_client.AppiumDriver");
} catch (DriverIsNotAnInstanceOfAtriumDriverException e) {
e.printStackTrace();
}
}
return null;
}
我使用硒3.5.3和5.0.3 Appium
TouchAction finger = device.touchAction()
.press(width/4, height/4)
.waitAction(Duration.ofMillis(10000))
.moveTo(width/4, 60)
.release();
TouchAction thumb = device.touchAction()
.press(width/4, (height/4) + 40)
.waitAction(Duration.ofMillis(10000))
.moveTo(width/4, 80)
.release();
device.multiTouchAction().add(finger).add(thumb).perform();
我的設備的方法。到目前爲止我發現的是關於錯誤的Appium版本,我無法擺脫這個問題。