繁体   English   中英

滑动不适用于iOS的Appium

[英]Swipe not working Appium for iOS

我正在使用Appium版本1.4.0(draco)和版本6.4的Xcode。 我无法在自动测试中使用滑动功能。 iOS模拟器设备为iPad air。 任何有用的帖子,将不胜感激。

移动应用程序页面是“表视图”还是“滚动视图”? 它在表格视图中有效,但在滚动视图中无效。

这对我有用。 试试这个解决方案,它应该可以工作。 我有Appium 1.4.13; 带有Java-Client 3.2.0的Xcode 7.0.1,可在iOS 8.x / 9.0模拟器中使用。 “ ElementName”是屏幕滚动到此处的元素名称。

 JavascriptExecutor js = (JavascriptExecutor) iosDriver; HashMap <String, String> scrollObject = new HashMap <String, String>(); scrollObject.put("element", ((RemoteWebElement) iosDriver.findElement(By.name("elementName"))).getId()); js.executeScript("mobile: scroll", scrollObject); 

您使用什么语言?

在红宝石这对我来说是execute_script "mobile: scroll", direction: "right"

您可以在此处查看完整列表

暂无
暂无

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

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