Android - Can't scroll to a MobileElement in a dropdown when the dropdown appears above its AutoCompleteTextView

Hey all,

I’m effectively using the methods described here to scroll to and select values in dropdown menus.

E.g.

MobileElement element = (MobileElement) driver.findElement(MobileBy.AndroidUIAutomator(
        "new UiScrollable(new UiSelector().scrollable(true))" +
         ".scrollIntoView(new UiSelector().textContains(\"California\"))"));
element.click();

This is able to find “California” in the State dropdown!

However, all other things being the same, the same function does not work when the dropdown appears above its associated field:

E.g.

MobileElement element = (MobileElement) driver.findElement(MobileBy.AndroidUIAutomator(
        "new UiScrollable(new UiSelector().scrollable(true))" +
         ".scrollIntoView(new UiSelector().textContains(\"Aetna\"))"));
element.click();

This is unable to find “Aetna” in the list Health plan dropdown.

Has anyone ever seen this issue before? Please let me know! Any help is very much appreciated!

Related to those issues: