我在执行此代码时遇到上述错误
WebElement radio =(WebElement)driver.findElements(By.tagName(" option"))。get(1); radio.click();
TouchAction touch = new TouchAction(driver);
driver.performTouchAction(touch).tap(radio);
org.openqa.selenium.WebDriverException:方法尚未实现(警告:服务器未提供任何堆栈跟踪信息) 命令持续时间或超时:52毫秒
答案 0 :(得分:0)
同样在这里。
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版本,我无法摆脱这个问题。