iOS
public static void scrollToElement(IOSDriver driver,String elementName) {
String targetCell = “//UIATableCell[UIAStaticText[@name=”"+elementName+""]]";
WebElement cellWithText = driver.findElement(By.xpath(targetCell));
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put(“element”, ((RemoteWebElement)cellWithText).getId());
driver.executeScript(“mobile: scrollTo”,scrollObject);
}
P.S . How to do scroll action till the particular element is present or not?