Install androidsdk-uiautomatorviewer by entering the following commands in the terminal:
sudo apt update sudo apt install androidsdk-uiautomatorviewer
Tool to scan and analyze the UI components of an Android application
The uiautomatorviewer tool provides a convenient visual interface to inspect the layout hierarchy and view the properties of the individual UI components that are displayed on the test device. Using this information, you can later create uiautomator tests with selector objects that target specific UI components to test.