> For the complete documentation index, see [llms.txt](https://docs.testfirst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testfirst.com/testfirst-editor/android-mobile-automation/inspect-mobile-applications.md).

# Inspect Mobile Applications

Appium Inspector can be used to inspect Android applications and identify elements when creating selectors for mobile tests.

The sample configuration below assumes that:

* An Android emulator is already running
* The emulator instance name is `emulator-5554` (the default emulator name in most Android SDK installations)

{% hint style="info" %}
Appium Inspector is commonly used during test development to inspect application elements and identify selectors that can be used in mobile test steps.
{% endhint %}

#### Install Appium Server

Run:

```bash
npm install -g appium
```

#### Install UiAutomator2 Driver

Run:

```bash
appium driver install uiautomator2
```

#### Install Appium Inspector

Download and install Appium Inspector from:

<https://github.com/appium/appium-inspector/releases>

#### Start Appium Server

Run:

```bash
appium
```

Leave the Appium server running while using Appium Inspector.

#### Open Appium Inspector

Launch Appium Inspector and create a new session.

In **Capability Builder → JSON Representation**, enter the following configuration:

```json
{
  "platformName": "Android",
  "appium:automationName": "UiAutomator2",
  "appium:deviceName": "emulator-5554",
  "appium:udid": "emulator-5554",
  "appium:noReset": true
}
```

#### Save the Configuration

1. Click **Save As**
2. Enter a name (for example, `local android`)
3. Click **Save**

The saved configuration can be reused for future sessions.

#### Start the Session

Click **Start Session**.

Appium Inspector will connect to the running emulator and display the application hierarchy, allowing you to inspect elements and identify selectors for use in your mobile tests.
