My objective is scroll down through the drop down until the state such as TN is visible to the user. This was possible in Appium when scrollTo() methods were working but they are deprecated in the current Appium build. I tried driver.swipe() but nothing happens. I am not well versed with iOS Predicates but tried using those too.
Alternatives tried so far but none worked:
MobileElement element = wd.findElementByIosUIAutomation(
".tableViews()" + ".scrollToElementWithPredicate(\"name CONTAINS 'TN'\")");
"mobile: scroll", scrollObject);
Ok I figured out the solution but it was very difficult to find considering the lack of solutions:
String path = "UIATarget.localTarget().frontMostApp().mainWindow().popover().tableViews().cells()[\"TN\"]"; driver.executeScript(path + ".scrollToVisible();"); MobileElement state = driver.findElementByIosUIAutomation(path); state.tap(1, 1);