Appium : 1.2.4.1
Java-Client : 2.0.0
Platform : Windows
Device : Android
scrollTo function appear to work on few pages but it is not scrolling the page if page has partial area scrollable.
In my case 5 % of left screen is a static linear layout and remaining 95% is scrollable. In this case scrollto function is not working.
driver.scrollTo("IndiGo");
@Kamal_Girdher
Have you got the solution ?
No… I wrote a custom function for the time being…
JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, Double> swipeObject = new HashMap<String, Double>();
swipeObject.put("touchCount", 1.0);
swipeObject.put("startX", 349.00);
swipeObject.put("startY", 1026.00);
swipeObject.put("endX", 374.00);
swipeObject.put("endY",458.00 );
swipeObject.put("duration", 0.9173047);
js.executeScript("mobile: swipe", swipeObject);
@Kamal_Girdher,
With new java client libs, driver.swipe and driver.scrollTo is working fine, For more details you can watch my video
1 Like