[英]Tap deprecated in Appium hybrid app
I have issue with deprecated tap in Appium , because eclipse says that "tap" with coordinates is deprecated . 我对Appium中不推荐使用的tap有问题,因为eclipse说不推荐使用带有坐标的“敲击”。 I use :
我用 :
TouchAction touchAction=new TouchAction(driver);
TouchAction perform = touchAction.tap(524, 1735).perform();
to tap the location coordinates , and can`t find the new function for new "tap with coordinates" 点按位置坐标,找不到新的“点击坐标”的新功能
Please check latest TouchAction class: https://appium.github.io/java-client/io/appium/java_client/TouchAction.html 请检查最新的TouchAction类: https ://appium.github.io/java-client/io/appium/java_client/TouchAction.html
For tap on coordinates you can do: 对于点击坐标,您可以执行以下操作:
new TouchAction(localdriver).tap(point(xPoint, yPoint)).perform();
An alternative to the deprecated tap/press function is the 'longPress' function. 不推荐使用的点击/按下功能的替代方法是“ longPress”功能。 Here's the function :
这是功能:
public T longPress(LongPressOptions longPressOptions) {
ActionParameter action = new ActionParameter("longPress", longPressOptions);
parameterBuilder.add(action);
//noinspection unchecked
return (T) this;
}
For more information, see : https://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/TouchAction.java 有关更多信息,请参见: 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.