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)
Install Appium Server
Run:
npm install -g appiumInstall UiAutomator2 Driver
Run:
appium driver install uiautomator2Install Appium Inspector
Download and install Appium Inspector from:
https://github.com/appium/appium-inspector/releases
Start Appium Server
Run:
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:
Save the Configuration
Click Save As
Enter a name (for example,
local android)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.
Last updated

