简体   繁体   中英

Swipe not working Appium for iOS

I am using Appium version 1.4.0 (draco) and Version 6.4 of Xcode. I cannot get the swipe feature to work on my automated test. The iOS simulator device is iPad air. Any helpful post would be greatly appreciated.

Is the mobile App page Table View or Scroll View?. It works in table view but not in Scroll View.

This is working for me. Try this solution and it should work. I have Appium 1.4.13; Xcode 7.0.1 with Java-Client 3.2.0 and this is working in iOS 8.x / 9.0 simulators. "ElementName" is the name of element where screen is scrolled till there.

 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); 

what language are you using?

in ruby this is working for me execute_script "mobile: scroll", direction: "right"

you can check the full list here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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