Reputation: 11
unable to swipe on my ios app screen using appium.
i am using appium 1.3.1 with iso 8 iphone 6 simulator.
my ios screen is divided into two screens having image on the top and data below...
on the device we can swipe on any where , but not working with appium
I'm trying to run Appium 1.3.1 with iOS SDK 8.1 (Xcode 6.1)
Upvotes: 0
Views: 1001
Reputation: 112
Perfectly Working solution:
WebElement webElement = wd.findElementByXPath(objectPath);
try {
//WebElement element = driver.findElement(By.xpath("//window[1]/tableview[2]"));
JavascriptExecutor js = (JavascriptExecutor) wd;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "down");
scrollObject.put("element", ((RemoteWebElement) webElement).getId());
js.executeScript("mobile: scroll", scrollObject);
Upvotes: 1
Reputation: 1370
scroll when string contains "abc" - driver.scrollTo("abc"); for exact string "abc" appear you can use - driver.scrollToExact("abc");
Upvotes: 0