Scroll and click a textview by matching keyword using Appium

App is made by react native. None of view or control has content-desc or resource-id.

I use Java, Appium 1.8.1. I want to scroll view, search Brazil and click that text programmatically.

I tried below line. Scrolling worked, but cannot find item by keyword. Anyone can help?

((AndroidDriver) driver).findElementByAndroidUIAutomator(“new UiScrollable(new UiSelector()”
+ “.className("android.widget.ScrollView")).scrollIntoView(new UiSelector().text("Brazil"))”).click();


Thank you.

This one is better.

((AndroidDriver) driver).findElementByAndroidUIAutomator(“new UiScrollable(new UiSelector()”
+ “.className("android.widget.ScrollView")).getChildByText(new UiSelector().className("android.widget.TextView"), “+DESTINATION_ELEMENT_TEXT+”)”).click();