ScrollTo not working when view has partial area scrollable

Appium :
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.



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

With new java client libs, driver.swipe and driver.scrollTo is working fine, For more details you can watch my video

1 Like