Use UiScrollable to find elements and scroll into view
masterThe driver supports UiScrollable to handle elements that are not currently visible on the screen. You can use UiScrollable to find a scrollable container and then use methods like getChildByText or scrollIntoView to locate specific elements.
getChildByText: Finds a child element within a scrollable container by its text.scrollIntoView: Scrolls the container until the specifiedUiSelectoris visible and returns that element.
# Find a TextView with text "Tabs" inside a scrollable container
element = find_element(:uiautomator, 'new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className("android.widget.TextView"), "Tabs")')
# Scroll to an element matching a UiSelector and return it
element = find_element(:uiautomator, 'new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text("WebView").instance(0));')