簡體   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