Found a solution at least for Android -
Use the below code snippet.
public void scrollDown() {
int pressX = driver.manage().window().getSize().width / 2;
int bottomY = driver.manage().window().getSize().height * 4/5;
int topY = driver.manage().window().getSize().height / 8;
int i = 0;
do{
isPresent = driver.findElements(By.id("urid")).size()>0;
if(isPresent){
we = driver.findElement(By.id("urid"))
we.click();
break;
}
else{
scroll(pressX, bottomY, pressX, topY);}
i++;
} while(i <= 4);
}
private void scroll(int fromX, int fromY, int toX, int toY) {
TouchAction touchAction = new TouchAction(driver);
try{
catch(WebDriverException wd){
}
touchAction.longPress(fromX, fromY).moveTo(toX, toY).release().perform();
}
This can be improved, this is just a raw material. Let me know if it doesnât work for Android.
Appium version - 1.7.2
Java Client - 5.0.2 - BETA