Learn how you can locate elements using appium inspector.
Steps to start Appium Inspector and inspect elements -
- First of all, you need to start Appium GUI and then start a new session with appropriate desired capabilities for the AUT.
- A new window will open up, as shown in the above image.
- Now to locate the elements, do the following -
- Click on any element on the image on the left-hand side of the screen.
- After clicking, you will find the XML hierarchy of the app source displayed on the screen.
- On the right-hand side of the screen, you will find the attributes of the selected element like id or XPath of the element.
- You can now use your preferable method of finding the element, either by XPath or by id or by class.
For more ideas on how to locate elements using xpath, check out the following sites: