Thanks for your reply, I didn’t get any error message at all. But, the swipe action doesn’t happens for me. I have printed the size and x coordinates value and given a try with different values, but swipe action doesn’t occurs. I don’t exactly, how to grab the coordinates and pass it in swipe().
@VikramVI Your problem is probably due to the xshift being too small, if you set it to a larger value that may help with what you’re trying to achieve.
Have you tried the latest stable version of Appium? 1.5.3 works well for me and my swipes are working there. Version 1.4.8 seems kinda old and may have had some issues.
Hi,
I am trying to swipe an element & perform some action which need waiting duration.
I am working iOS native app.
Here is my code:
public void swipeLeft(By locator){
RemoteWebElement iosElement=(RemoteWebElement) wd.findElement(locator);
JavascriptExecutor js = (JavascriptExecutor) wd;
HashMap swipeObject = new HashMap();
swipeObject.put(“direction”, “left”);
swipeObject.put(“duration”, “5000”);
swipeObject.put(“element”, iosElement.getId());
js.executeScript(“mobile: swipe”, swipeObject);
}
Here, element is getting swipe but don’t wait to perform any action on it.
Has anyone came across such issue?