Initially when I started to learn about appium inspector and its usage, I did not get better documentation with the steps on it. Finally I got it with the help of appium google group and some exploration. So I thought to document that here, and it would be helpful for new starters...
I used appium inspector for the following purpose,
- To understand the element hierarchy
- To find the xpath, name and value of the objects
- To record the manual actions
The steps to use appium inspector are as below,
- Initially download the appium.app from here, then add it to the Applications in your machine
- Now Double click on the appium.app, it will open the appium server with the default IP Address 0.0.0.0 and the port 4723 as below,
- Next we have to specify the app, which we want to open in appium inspector.
1. Check the check box 'App Path', Now 'Choose' button is enabled
2. Click on the 'Choose' button and select your .app file from your local, e.g. Recipes.app
- Now click on the 'Launch' button, Once you launched the appium server, the blue color icon, which present beside the 'Launch' button is enabled.
- Click on the blue color icon, it will open up the appium inspector and simulator with your application as below,
- Now you will see the element hierarchy of the application in the first column of appium inspector.
- Choosing the particular element will display ,
1. Its childs in the second column
2. Highlights the object in the app.
3. Element's xpath and its attributes at the right bottom corner.
Parts of Appium Inspector
- And you can do actions by clicking on the action buttons Tap, Swipe etc displayed in the left bottom of the appium inspector.
- By clicking on the 'Record' button we can create the automation script as below, you can see the recording script below the appium inspector,