How to click on a visible text using Appium and Java?

Hi All,

I need to automate the following scenario.
There is text inside a textview in an android app. I need to click some words of that text. Then the app will take those words as the answer.
Please see the screenshot.

The problem I am facing here is, I cannot click on those words because the words cannot take as an element locator.

Appreciate if you can help me to automate this scenario.

Thank You!

Hi @osanda.deshan

Do you know what type of element it is?
If you do, you can click on the element by using the xpath //NODE_TYPEt[@text=‘question4’].

But from the screenshot it appears that the word test and question 4 are adjacent. If the words are to be selected, then you should be placed in different nodes.