繁体   English   中英

在Appium混合应用中不推荐使用自来水

[英]Tap deprecated in Appium hybrid app

我对Appium中不推荐使用的tap有问题,因为eclipse说不推荐使用带有坐标的“敲击”。 我用 :

TouchAction touchAction=new TouchAction(driver);
TouchAction perform = touchAction.tap(524, 1735).perform();

点按位置坐标,找不到新的“点击坐标”的新功能

请检查最新的TouchAction类: https ://appium.github.io/java-client/io/appium/java_client/TouchAction.html

对于点击坐标,您可以执行以下操作:

new TouchAction(localdriver).tap(point(xPoint, yPoint)).perform();

不推荐使用的点击/按下功能的替代方法是“ longPress”功能。 这是功能:

public T longPress(LongPressOptions longPressOptions) {
    ActionParameter action = new ActionParameter("longPress", longPressOptions);
    parameterBuilder.add(action);
    //noinspection unchecked
    return (T) this;
}

有关更多信息,请参见: https : //github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/TouchAction.java

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM