Inspecting the elements in native Android App

We can use UI Automator in Android Monitor to inspect the elements inside app.

Below image shows that we have inspected the chat contact in WhatsApp application.

Taking UI hierarchy dump in Android monitor

Taking UI hierarchy dump in Android monitor

 

Inspecting element using UI Automator in Android device monitor

Inspecting element using UI Automator in Android device monitor

From the node details, we can get properties and values of selected element. This information can be used to write XPATH expressions used to identify the elements.

You may also like...