How to Use the Appium Inspector

Reading Time : 14 min read
kobiton-appium-inspector

Navigating mobile app testing becomes easier when you can inspect an app’s UI elements before writing or debugging automation scripts. Appium Inspector provides a visual way to examine Android and iOS app elements, view their properties, and identify locators for automated tests.

Recent Appium versions (2.x and 3.x) use a modular, driver-based design, which makes Appium Inspector flexible across different testing setups. Whether you are working with Android or iOS, you can use Appium Inspector to inspect elements, verify attributes, identify locators, and troubleshoot automation sessions.

Introduction to Appium Inspector 

Inspector tools allow engineers to confirm the proper operation of mobile app elements. The most common element inspectors in use today are:

  • Chrome and Safari Dev Tools
  • Appium Inspector
  • UiAutomatorViewer (Android)
  • XCUiTest, including Accessibility Inspector (iOS)

With Appium 2.0, the modular architecture lets users choose which drivers and plugins to install, making it easier to customize your testing setup. This means you can tailor Appium Inspector to work specifically with your testing needs, whether it’s Android, iOS, or even both. For Android testing, understanding the benefits of Appium Inspector for Android can help teams inspect elements, identify locators, and create more reliable automation workflows.

To get the most out of each tool, it’s important to have expert guidance, which Kobiton offers — supporting both tools and processes.

What is Appium and What Does it Do?

Appium is an open-source mobile automation testing framework that supports multiple programming languages. Its primary purpose is to combat device/ platform fragmentation when automating for both Android and iOS apps.

Like the element inspectors mentioned, Appium Inspector allows automation engineers to inspect both Android and iOS applications’ DOM (Document Object Model) in one ecosystem. With Appium 2.0, this capability is more flexible than ever, thanks to its plugin-based system. Whether you’re working with native apps, web apps, or hybrid apps, you can use the Inspector with customized drivers that suit your testing goals. 

Appium eBook

What is Appium Inspector and What is its Purpose?

Appium Inspector is a key utility in Appium’s ecosystem, enabling developers and automation engineers to inspect a mobile app’s UI for both Android and iOS devices. It facilitates mobile automation by allowing engineers to select the Appium server, then start a session to inspect and interact with UI elements in real-time.

With Appium 2.0, you now have greater control over which components of the Inspector you use. The plugin-based architecture makes it easy to extend or modify Appium’s functionality. For instance, you can install only the iOS or Android drivers you need and even add custom plugins for enhanced inspection capabilities like optimizing element locators.

How to Download and Install Appium Inspector (Windows and macOS)

Appium Inspector is a standalone desktop application, so it is installed separately from the Appium server. Before starting an inspection session, download the version that matches your operating system.

Download Appium Inspector

Go to the Appium Inspector releases page on GitHub and select the installer for your operating system.

– Windows: Download the .exe installer.

– macOS: Download the .dmg installer and select the version that matches your Mac’s processor.

– Linux: Download the .AppImage package when available.

Install Appium Inspector on Windows

After downloading the Windows installer, open the .exe file and follow the installation prompts.

If Windows SmartScreen prevents the application from opening, check the file’s Properties and use the available Unblock option before launching it again.

Once installation is complete, open Appium Inspector from the Start menu or desktop shortcut.

Install Appium Inspector on macOS

Open the downloaded .dmg file and drag Appium Inspector into your Applications folder.

When launching the application for the first time, macOS may display a security warning. If the application is blocked, open System Settings, go to Privacy & Security, and use the available option to allow the application to open.

Install Appium Before Starting a Session

Appium Inspector is the interface used to inspect your application, but it still needs an Appium server and the appropriate platform driver to create a session.

If Appium is not installed yet, install Appium first and then add the driver required for your testing platform.

Appium vs. UI Automator vs. XCUiTest

UI Automator is a framework for functional testing on Android, while XCUITest is Apple’s official IDE for iOS. Both tools offer rich capabilities for element inspection, but Appium Inspector provides a unified cross-platform solution. It can handle both iOS and Android app testing within the same session, leveraging Appium 2.0’s multi-driver support, making it the go-to choice for automation engineers who need flexibility across platforms.

What are the Differences Between Appium and Appium Studio?

Appium is an open-source mobile automation framework that provides diverse programming language and platform support options. Appium Studio, an IDE created by Experitest, delivers additional features such as a better GUI and enhanced device management. However, it is a commercial extension more suited to large-scale, enterprise-level deployments.

FeatureAppiumAppium Studio
LicenseOpen-sourceCommercial (paid)
CustomizationHigh (via plugins, drivers)Limited (pre-set enterprise features)
Ease of UseRequires more technical knowledgeUser-friendly GUI, more suitable for less technical testers
Cross-Platform SupportSupports iOS, Android, and WindowsSupports iOS and Android
Device ManagementRequires third-party solutions or cloud providersBuilt-in device management and easy access to device farms
Programming LanguagesSupports multiple languagesPrimarily focused on GUI-based testing
SupportCommunity-driven supportDedicated customer support from Experitest
Suitable ForSmaller teams, individual testers, or companies with custom requirementsLarger enterprises with the need for enhanced management and advanced features

How do I get the Appium Inspector?

Visit the Appium Inspector GitHub releases page and choose the correct version for your operating system (e.g., .dmg for macOS or .exe for Windows). Download and install it.

When do I use Appium Inspector?

This tool is most helpful for:

  • Automation Script Creation
  • XPath Expression Generation
  • Element Identification
  • Cross-platform Testing
  • Debugging/Troubleshooting
  • Record and Playback Testing

With Appium 2.0, these tasks become even more efficient, thanks to the introduction of custom plugins that enhance core functionalities like element searching or session management.

Key Features of Appium Inspector

Element Identification & Attribute Verification: Appium Inspector’s GUI helps users identify and verify element properties such as text, color, and position. With Appium 2.0, you can leverage enhanced XPath and Accessibility ID performance through newly available plugins, ensuring faster and more stable element location.

Script Creation: Use Appium Inspector to create cross-platform automation scripts, reusing them for both Android and iOS apps. Appium 2.0’s streamlined architecture makes this even easier by allowing parallel script execution across devices, ensuring greater efficiency in test automation.

Debugging Capabilities: The improved debugging tools in Appium Inspector include video recordings, screenshots, and device logs, which help troubleshoot failed tests more effectively. With Appium 2.0, debugging can be further customized using plugins tailored for capturing detailed logs and error reports.

XPath and Accessibility ID Generation: Appium Inspector helps generate precise XPath expressions and Accessibility IDs for stable element targeting. In Appium 2.0, XPath generation can be optimized using custom plugins, providing a more robust way to handle dynamic elements.

Getting Started with Appium Inspector

Appium Inspector

Set Up Appium Inspector in 5 Steps

1

Install Appium and a driver

Install the core server with npm i -g appium, then add a platform driver: appium driver install uiautomator2 for Android or xcuitest for iOS.

2

Start the Appium server

Open a terminal and run appium. The server starts with only the drivers you installed, so it stays fast and lean.

3

Connect the Inspector

Open Appium Inspector and set the remote host to 127.0.0.1 and port 4723. Testing in the cloud? Point it at your Kobiton endpoint instead.

4

Set desired capabilities

Enter platformName, deviceName, automationName, and your app path. Save the set to reuse it next session.

5

Start a session and inspect

Click Start Session to launch your app, then tap any element to read its ID, XPath, and accessibility attributes for your scripts.

Kobiton runs Appium Inspector against real iPhones and Android phones in the cloud, so you can inspect on devices your team does not have on the desk.

Appium uses a modular, driver-based setup. You install the core server once, then add only the drivers you need for the platforms you test. Recent versions (2.x and 3.x) keep drivers separate from the core, so your setup stays light and you update each piece on its own.

Install the platform drivers before you start a session:

appium driver install uiautomator2
appium driver install xcuitest

Desired Capabilities Builder

Pick your platform and fill in the details. Copy the capabilities JSON straight into Appium Inspector, and the matching driver-install command into your terminal.

Desired capabilities (JSON)


  
Install the driver first


  
Copied

Works with Appium 2.x and 3.x. Install the core server with npm i -g appium, then add the driver shown above. Testing on real devices in the cloud? Point the Inspector’s remote host at your Kobiton endpoint instead of localhost.

1. Start Appium Server

Open a terminal and launch Appium 2.0 using the appium command. The modular nature of Appium 2.0 lets you start the server with only the relevant drivers, ensuring faster performance.

With only the drivers you need installed, the server starts fast and stays lean.

Terminal screenshot showing Appium 2.0 server startup with autodetected home path and URLs for the Appium REST HTTP interface listener
Starting Appium 2.0 server via terminal

2. Connect to Appium’s Server

Open Appium Inspector and Set the Remote Host to 127.0.0.1 and the Remote Port to 4723. You can customize this further by connecting to remote servers or cloud services like Kobiton.

3. Set Desired Capabilities

Desired capabilities define the device on which tests will run. With *Appium 2.0*, saving and reusing these capabilities is easier than ever. Here’s an updated example:

{
  "platformName": "Android",
  "appium:deviceName": "...",
  "appium:automationName": "UiAutomator2",
  "appium:app": "..."
}

Tip: Save your desired capabilities for future sessions to streamline testing, especially when switching between devices or apps.

4. Start New Session

Click 'Start Session' to begin your connection and start inspecting app elements. You’ll quickly begin identifying issues and optimizing your app’s performance in real-time.

Appium Inspector interface showing saved capability sets for an Android app with platform name, device name, and automation name UIAutomator2.
Configuring and saving desired capabilities in Appium Inspector

5. Inspect Elements

Use Appium Inspector’s locator strategies such as ID,XPath, or Accessibility ID to find elements in your app. With Appium 2.0, the improved Selector plugin allows for even more efficient element identification, reducing errors and speeding up the test creation process.

On iOS, the same idea applies, but lean on Accessibility ID and predicate strings more than XPath. XPath on iOS can be slow and brittle. Make sure the xcuitest driver is installed and your device or simulator is set up for automation before you start the session.

Appium Inspector interface displaying the app source tree for AndroidSelfTest, with the selected element’s attributes and selectors including ID,Xpath,and class.
Inspecting elements in an Android app using Appium Inspector, showing detailed element attributes

Limitations of Appium Inspector

While Appium Inspector offers robust capabilities for mobile app testing, there are some limitations:

  • Hybrid app support is limited.
  • Requires basic programming knowledge.
  • Some features may not work on older Android versions (pre-4.2).

With Appium 2.0, many of these limitations can be mitigated by utilizing custom plugins. For example, hybrid app support can be enhanced through third-party plugins or drivers, and performance on older devices can be improved by using optimized configurations.

Using Appium Inspector on Windows OS

Appium Inspector works on Windows, but ensure you have Appium 2.0 installed, along with the relevant drivers for your platform (Android/iOS). You can customize your setup using Appium’s plugin system, making it easier to switch between platforms.

Is Appium Inspector Compatible with Cloud-based Testing Services?

Yes. You can point Appium Inspector at a cloud device provider instead of a local server, so you can inspect apps on real devices you do not have on your desk. With Kobiton, you set the remote host to your cloud endpoint, start a session, and inspect elements on real iPhones and Android phones in the cloud. This helps when you need to reproduce an issue on a device or OS version your team does not own.

Free Appium Course

Troubleshooting Common Appium Inspector Issues

A few problems come up often when you start a session. Here is how to clear them fast.

Session will not start. Check that the Appium server is running and that the Remote Host and Port in the Inspector match the server (default 127.0.0.1 and 4723). A mismatch here is the most common cause.

"No driver found” or the platform will not load. You are missing the driver for that platform. Install it with appium driver install uiautomator2 for Android or appium driver install xcuitest for iOS, then restart the server.

Element not found, or the source tree looks empty. Give the app a moment to finish loading before you refresh the source. If an element still will not appear, it may sit inside a WebView or hybrid context. Switch context in the Inspector to reach it.

Capabilities rejected. Double-check platformName, deviceName, automationName, and the app path. A wrong path or a typo in automationName stops the session before it opens.

Best Practices for Appium Inspector

  • Inspect Elements: Use the graphical interface to view detailed element properties and verify them for automation scripts.
  • Parallel Testing: In Appium 2.0, parallel testing across multiple devices is more efficient, helping you scale your automation efforts.
  • Use XPath and Accessibility IDs: Leverage Appium Inspector’s tools to generate XPath expressions and use Accessibility IDs for precise targeting, ensuring test script stability.

Advanced Techniques and Tips

  • Page Object Model (POM): This design pattern helps make your tests more maintainable by separating UI code from test logic. In Appium 2.0, using POM can be enhanced by employing plugins that optimize locator strategies.
  • Dynamic Element Identification: Use dynamic locators like XPath and CSS selectors. With Appium 2.0, relative XPath paths can be more efficiently handled using plugins that improve locator performance.
  • Cross-Platform Testing: Reuse test scripts for both Android and iOS. Appium 2.0’s driver flexibility makes switching between platforms faster and more efficient.

Mastering Appium Inspector with Kobiton

Appium Inspector, especially with the added flexibility of Appium 2.0, is a must-have tool for mobile automation. Whether you’re inspecting elements, generating scripts, or debugging, Appium’s new modular approach makes it easier to scale your testing and adapt to the latest technologies. Teams should always choose the framework that best fits their needs, and with Appium 2.0, the choice has never been clearer.

Our clients run the testing tool gamut using Appium, Espresso, and XCTest / XCUITest frameworks. Kobiton enhances Appium Inspector’s functionality by providing cross-platform testing capabilities, making it easier for you to deliver reliable mobile experiences. Experience this difference for yourself by trying Kobiton today with a free demo. Streamline your testing efforts and optimize your mobile apps more efficiently.

Get a Kobiton Demo