In this article, we will understand how to locate WebElements on mobile devices, for this we will be using UIAutomatorViewer tool.
Before continuing further, please refer Appium setup for windows to get started with. (become easy to get started with)
Navigate to the folder explorer on your local driver, where android SDK is installed
then, open tools folder and double click on uiautomatorviewer.bat
- Connect your handset to computer,
- Open the application you want to locate elements (e.g Calculator),
- click on 2nd button [Device screenshot icon] as shown below
- Select device and click on OK
Click on each element on the uiautomator screen to get the details on the right hand side [as shown above]
- Sometimes it’s difficult to keep the application open on mobile screen, so uiautomator gives an option to save or dump the elements.
to do so, click on “Save”, to dump the details so we can use future.
now to open the dumped files, click on “Open” and locate the dumped files. (.png and .uix files)