How to scroll list in Android app by specifix text

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?

try a bit other solution -> How to find Android elements that have the same Resource-Id but different Indexs and Names

Thank you for reply, unfortunately it didn’t worked, maybe you have ideas where to search for solution?

@Aleksei I found why its not working, problem is in GRID 4

1 Like

Nice… left wait for fix.
I do not use grid. I connect all 25 phones directly to macMini.

1 Like