I am trying to run a simply test just to click a button by ID. However, test fails. The problem is Resource ID value I think. I can’t get correct Resource ID, because uiautomatorviewer do not provide me such information, it just shows layouts. So I am taking ID from app web page by inspecting element. So my question would be, what is another possible way to get information about app Resource ID? My app is hybrid.
Provide the full XML for the button in question. There’s likely some unique attribute you can key from such as @content-desc or @text which you can then use, including in your xpath such as.
//android.widget.TextView[@text="Submit"]
If you’re not seeing any unique attribute you likely just need to drill down the tree further. You’re probably looking at some upper level container element and the actual button is a child element further down the tree.