Connecting Appium Desktop to an android emulator to inspect the app - dn0000001/test-automation GitHub Wiki

Prerequisites

  1. You have docker-android up and running. (See Setting up docker with android emulator & appium)

Instructions for Appium Desktop

  1. Launch appium-desktop
  2. Go to File > New Session Window (Ctrl + N)
  3. It may take a few seconds for the window to load
  4. Click Custom Server
  5. The defaults will connect to the docker-android container defaults
  6. Click Desired Capabilities
  7. Click Edit Raw JSON
  8. Paste in your capabilites and click Save
  9. Click Start Session
  10. You should be the app launch in the docker container. (This may take some time.)
  11. You can then inspect the app

Note: Appium Desktop has been deprecated instead use Appium Inspector.

Capabilities for Calculator

{ "platformName": "Android", "platformVersion": "8.1", "deviceName": "Samsung Galaxy S6", "appPackage": "com.android.calculator2", "appActivity": "com.android.calculator2.Calculator" }

How to find the appPackage & appActivity properties for your app

  1. Install Package Name Viewer from https://apkpure.com/package-name-viewer-2-0/com.csdroid.pkg inside the docker-android container
  2. Launch Package Name Viewer and use it to find your app and display the appPackage & appActivity.

Notes

  1. It will be necessary to allow installs from untrusted sources.
  2. It is also possible to get the appPackage & appActivity from Appium Desktop