Using Appium Desktop Inspector to inspect Android/iOS Apps locally

Prerequisite

For Android:

- Configuring your Windows/Mac/Linux and Android device for Android Native Test Execution

- Wikipedia App installed on your device - Download Wikipedia APK


For iOS

- Configuring your Mac and iOS device for iOS Native Test Execution

- Wordpress App installed on your device - Download Wordpress IPA


If you would like to avoid the above configuration, you may follow the below guide for inspecting the Application on Cloud devices pre-configured for Automation.

Configuring Appium Desktop Inspector to inspect Android/iOS Apps from TestObject


Appium Desktop  - Local Configuration

Appium Desktop is an open-source app for Mac, Windows, and Linux which allows you to use Appium Server in an intuitive and simple Graphical UI as compared to the command line.

You can install it from here - Appium Desktop


Appium Inspector is a component of the Appium Desktop application that allows us to inspect mobile Apps.


On opening the Appium Desktop Client, it will look as shown below:


1. First, click on the Start Server button to start the Server. Your Appium Server will start running and it will look as shown below:

Note: It is highly recommended to keep the Port number unchanged unless you are a System Administrator since other port numbers might be used by another Application.


Appium Server has started now.


2. Click on the Start Inspector Session button(first icon on the top right corner with the lens icon) to open the Inspector Session Configuration page. 

Since we have already started Appium Server in the previous step, we can click on the first tab - 'Automatic Server' to begin.


3. After that, we can add a set of Desired Capabilities that mentions the details of the App to inspect and the device we need to use for Inspection. Below given are some sample Desired Capabilities for inspecting the Android App and iOS App that is mentioned in the Prerequisites section at the beginning of this article.

 

Desired Capabilities for Android

Below given is the desired capabilities for the Android App supplied at the beginning of this article - Prerequisites section (If you have not installed already, download from the links in 'Prerequisites' section and install on your local device.)

  • platformName: We need to provide the value 'Android'.
  • platformVersion: As per the version of your Android Device/Simulator.
  • deviceName: DeviceName is optional and can be any name if there's only one device connected.
  • appPackage: Package name of the app to be automated.
  • appActivity: Name of the Activity of the App we need to start with.


Here's a sample set:

{
  "platformName": "Android",
  "platformVersion": "8.1",
  "deviceName": "Redmi 5 Pro",
  "appPackage": "org.wikipedia",
  "appActivity": ".main.MainActivity"
}

 

Desired Capabilities for iOS

Below given is the desired capabilities for an iOS App present in your Mac. If you don't have it, download from the link in 'the Prerequisites' section and mention the location in the 'app' property below.


Here's a sample set:

{
  platformName: "iOS",
  platformVersion: "12.0",
  deviceName: "iPhone X",
  app: "~/Documents/TestApp.ipa",
  udid: "12345678-ABCD-DEFG-AVBFJDSKFL"
}


Enter the above given Desired Capabilities in the Appium Inspector Session Configuration window as shown below:


Finally, click on Start Session to start the session and inspect the Apps using Appium Inspector.


Thus, we have successfully started a local Appium Server and Appium Inspector session for inspecting your Mobile App.

Please check the below article for a detailed video on inspecting Android/iOS Apps using Appium - How to inspect UI Identifiers for Android/iOS Apps using Appium Desktop Inspector?


Happy Automation!