Using Appium Inspector
When you want to create screen nickname files, use Appium Inspector for inspecting element information.
Install
- Get install package from appium/appium-inspector.
Appium-Inspector-mac-202x.x.x.dmg
(for Mac)Appium-Inspector-windows-202x.x.x.exe
(for Windows)
- Install the package.
- Start Appium Inspector.
Start Appium Server
- Open terminal.
- Start Appium Server process. Type just
appium
and enter.
wave1008@SNB-M1 ~ % appium
Last login: Sun Apr 14 22:48:21 on ttys003
wave1008@ip-192-168-10-101 ~ % appium
[Appium] Welcome to Appium v2.5.1 (REV 7f745d04d90eaec76c8d5830d6ce6a0d7db888b3)
[Appium] The autodetected Appium home path: /Users/wave1008/.appium
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/wave1008/.appium/node_modules/appium-uiautomator2-driver/build/index.js
[Appium] Requiring driver at /Users/wave1008/.appium/node_modules/appium-xcuitest-driver/build/index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 0.957s
[Appium] XCUITestDriver has been successfully loaded in 2.020s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] http://192.168.10.101:4723/
[Appium] http://10.0.0.101:4723/
[Appium] http://192.168.30.10:4723/
[Appium] Available drivers:
[Appium] - uiautomator2@3.0.4 (automationName 'UiAutomator2')
[Appium] - xcuitest@7.5.1 (automationName 'XCUITest')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
See Quick Start to install appium.
Start Appium Inspector
- Start Appium Inspector.
- Show
Desired Capabilities
tab. - Edit parameters as follows.
{
"appium:automationName": "UiAutomator2",
"platformName": "Android",
"appium:platformVersion": "14",
"appium:appPackage": "com.android.settings",
"appium:appActivity": "com.android.settings.Settings"
}
- Start
Android 14 emulator
. (For setting up AVD for Android 14, see Quick Start) - Click
[Start Session]
Settings app
starts in the device.
The screen image is captured. You can inspect screen elements.
Finding unique attribute(s)
To identify screen element, unique key information is required. You can use external editor to examine.
- Capture the screen you want to inspect in Appium Inspector.
- Click
Copy XML Source to Clipboard
. - Open your favorite editor and paste it. Now you can search unique attribute(s).