在执行此代码时,我得到了以上错误。
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毫秒
发布于 2017-09-15 15:09:13
我也是。
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版本,我无法解决这个问题。
https://stackoverflow.com/questions/45622246
复制相似问题