Get text using coordinate

Hi,

I want to grab text from an element using its coordinates only.Used gettext() method for elements with ids but how do i go when i am having only text(which is dynamic), so need to know how to do it with help of coordinates.

please feel free to give your suggestion.

I suppose you have to set an ID to the component. for example, if you are working on a web applicatión, you should set an id on the div.

Thank you for replying,

But I am working on mobile app developed in react native, my dev team has added only text for that element but its dynamic.They say that they have also added content-desc for that but i am not able to see that in uiautomator.

Is there any option to get the text by passing its co-ordinates or any other way to get this job done:sweat_smile:

can you try this
@AndroidFindBy(xpath="//*[@content-desc=‘Provided by Dev Team’]")

When dev team set two property i.e Accessibility-id and test-id while defining an element, that can be seen as content-desc on the uiautomator, but they say they have added that and i am not able to see that on my uiautomator is there any other.