appium长按按钮
public static AndroidDriver driver;
/长按操作:waitAction的参数单位是ms/
public static void longClick(String id){
WebElement longClick = driver.findElement(By.id(id));
new TouchAction(driver).longPress(longClick).waitAction(1000).perform();
}
/TouchAction.class中定义/
public TouchAction waitAction(int ms) {
TouchAction.ActionParameter action = new TouchAction.ActionParameter("wait");
action.addParameter("ms", Integer.valueOf(ms));
this.parameterBuilder.add(action);
return this;
勤學如春起之苗,不見其增,日有所長。綴學如磨刀之石,不見其損,日有所虧。