简体   繁体   English

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

[英]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.

相关问题 Appium-Android混合应用程序 - Appium - Android Hybrid app 如何使用Java在Appium中垂直滚动混合应用程序 - How to scroll vertically in appium for hybrid app using java 在带有 Appium 的混合应用程序上滚动带有“条款和条件”的文本区域 - Scroll text area with "Terms and Conditions" on Hybrid App with Appium 未知错误:调用函数结果缺少“值” Appium Hybrid App - Unknown error: call function result missing 'value' Appium Hybrid App 无法在 webview 中使用 appium android 定位混合应用程序的 webelements - Not able to locate webelements of hybrid app using appium android in webview 无法识别 android 应用程序 appium 中混合页面中的按钮 - Unable to identify Button in hybrid page in android app appium Appium tap(int x, int y) 函数似乎已被弃用。 有替代品吗? - Appium tap(int x, int y) function seems to be deprecated. Any replacements? 如何在 Appium (Android) 上点击系统活动应用按钮 - How to tap to system active app button on Appium (Android) APPIUM ANDROID 混合应用程序:从混合应用程序中的本机导航到 web 视图时,无法将驱动程序上下文获取为“WEBVIEW” - APPIUM ANDROID Hybrid App: Not able to get driver context as 'WEBVIEW' when navigating to the web view from native in Hybrid app Appium中用于混合应用程序的多个屏幕截图 - Multiple Screenshots in Appium for Hybrid Apps
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM