Appium按住元素不再起作用

时间:2018-08-08 21:13:33

标签: android appium

我尝试使用旧代码按住按钮几秒钟,但是它不再起作用:

TouchAction action = new TouchAction(driver);
        WebElement pttB = driver.findElementById("com.br.ptt.brww:id/ptt_button");
        Thread.sleep(2000); 
action.press(pttB).waitAction(Duration.ofMillis(20000)).release().perform();

它引发错误:

  

TouchAction类型的press(PointOption)方法不适用于参数(WebElement)

0 个答案:

没有答案