这里也一样。
org.openqa.selenium.WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)
这是我使用的代码。
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();
我将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;
}
我正在使用 Selenium 3.5.3 和 Appium 5.0.3。到目前为止,我发现的是错误的 Appium 版本,我无法摆脱这个问题。