as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

Inspect Your App with Appium Inspector

Appium Inspector is a companion tool for Appium that helps in writing reliable automated test scripts for native, mobile, and hybrid apps. It lets you view an app's screen and page structure, exposing the underlying UI elements and properties.

Appium Inspector is a free, open-source tool hosted on GitHub. It provides visibility into an app's UI, letting you:

  • Inspect the app's screen and page structure
  • Select UI elements and view their properties
  • Use XPath expressions to search for elements
  • Perform actions like clicking on selected elements
  • Record scripts for automated testing

Prerequisites

Make sure you complete the steps in Install Appium for Vega Integration.

Inspect your app

  1. Connect your device:

    Fire TV Stick:

    kepler exec vda connect <DEVICE_IP>
    

    Copied to clipboard.

    kepler exec vda devices
    

    Vega Virtual Device:

    Copied to clipboard.

    kepler virtual-device start
    
  2. Start the automation toolkit:

    Copied to clipboard.

    vda shell touch /tmp/automation-toolkit.enable
    
  3. Run the Appium Server:

    Copied to clipboard.

    appium
    
  4. Launch the Appium Inspector:

    On Mac: Open from the Applications folder or Spotlight search

  5. Add capabilities.

    Learn about the required capabilities in Manage Appium Sessions.

  6. Click the Start session button to start the Appium Inspector.

    Screenshot that shows the location of the Appium Inspector Start Session button.

    Example of JSON capabilities:

    Copied to clipboard.

    {
      "platformName": "Kepler",
      "appium:automationName": "automation-toolkit/JSON-RPC",
      "kepler:device": "vda://default"
    } 
    

    Appium Inspector captures screenshots and shows XML source in the App Source panel.

    Screenshot of an Appium Inspector session displaying an app screenshot and XML source.

    To update the displayed content, click the Refresh Source and Screenshot button.

Other functionalities

Select an element

In the App Source panel, select an element from the displayed XML tree.

Screenshot of the Selected Element panel with properties and available actions displayed. The panel appears when you select a line from the App Source code.

The page displays the element properties and available actions in the Selected Element panel.

Use xpath expressions to search for elements

Appium Inspector suggests a XPath selector with an id for the selected element. However, id values can be dynamic. Instead, use the test_id attribute or other attributes like role or description for more reliable element selection.

Screenshot that shows the XPath search functionality for locating UI elements.

Examples of valid xpath expressions

  • //*[@role="button"] to get all the elements containing role="button" attribute.
  • //*[contains(@description, "Music")] to get all the elements containing Music in the description attribute.

To test your xpath expressions, use the Search button.

Perform a click

To perform a click on the selected element, use the Tap icon.

Screenshot that shows location of the icon you can tap to perform click actions on selected elements.

Record a script

Appium Inspector lets you record a script based on your interactions with the app:

  1. Launch Appium Inspector and connect to your device.

  2. Click the Record icon in the top bar to start recording.

    Screenshot that shows the Recorder tab and icon button that can capture user interactions.
  3. Perform the necessary actions:

    In the Search for Element panel, perform actions like locating elements and interacting with them using the Tap icon. The script area shows all your actions as you record.

  4. Reclick the Record icon to stop recording.

    Use the generated script as a starting point for your automated tests or modified as needed. In the example, the sampleTest method captures the recorded actions.

    To change the script's recording language, use the drop-down menu in the Recorder panel's top-right corner.

Troubleshooting

If you encounter an issue, provide the details in community.amazondeveloper.com.


Last updated: Oct 31, 2025