Unable to find nested elements using XCUITest

I am trying to click on text Enter Coupon Code, but I am not able to select it. Instead whole box is getting selected.
This is happening for all the boxes with iOS. But when trying same thing in Android it is working fine.

Can you please tell me a way to click on exact text using XCUITest?

The element you’re trying to click is probably in that XCUIElementTypeOther section right under that touchable_container. Sometimes I find the inspector to be a bit “loose” with where I select in the UI. Try expanding it in the App Source, and hover over the different sections.

Hi Ben,

I tried expanding all the all the elements in App source but it is not visible. Used Tap for the selected elements, it is not working.
I even tried to Search Elements using inspector but no luck.

Our group here needed to do some tweaking when putting Accessibility IDs on parent objects… looks like the same may need to happen with your app (I don’t know the specifics unfortunately)

I will add Accessibility IDs for the same and try again.
Thank you for your quick response! Appreciate that.