I need to scroll list till I get element with specific text. I’m using UiSelector:
public void tapOnElementByIdAndText(String resourceId, String visibleText) {
driver.findElementByAndroidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"" + resourceId + "\").text(\"" + visibleText + "\").instance(0))").click();
hideKeyboard();
}
But it throws exception:
org.openqa.selenium.InvalidArgumentException: Unable to determine element locating strategy for -android uiautomator
Appium version 1.22, Android 10. Any other smooth solutions for scrolling view?