try { driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollToEnd(10)")); Thread.sleep(1000); } catch (InterruptedException e) { // Handle the exception e.printStackTrace(); } ////up try { driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollToBeginning(10)")); Thread.sleep(1000); } catch (InterruptedException e) { // Handle the exception e.printStackTrace(); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter