Click exactly on the text area


Good afternoon, how do I click exactly on the words “Liked by” or “others”?

user_likes = driver.find_element(AppiumBy.XPATH,'//android.widget.TextView[contains(@resource-id, "row_feed_textview_likes") and contains(@text, "Curtido")]')


I used this code and a few other code versions, but when the application clicks, it clicks on the profile links in the middle, but I wanted it to go into the “users who liked” tab

I’m assuming that this entire line of text shows up as just one element with no sub elements for the seperate links.

If this is the case there are a couple of things you can do. Firstly, and probably the best option would be to talk to your developers and see if they can seperate it out so that the different links show up as different elements.

If you can’t do that you could try to tap by co-ordinates. If the ‘Curtido per’ always shows up at the start of the line, you could get the bounds of the element and click 10% of the distance from the left of the element for example.

1 Like