Device , package and activity names etc are required to initiate Android Driver instance as Desired capabilities.
Device Name is required to connect the device.
Package and activity names are required to connect the APK.
We can get Device, package and activity names from ADB, Android Debug Bridge, which is a command-line utility included with Google's Android SDK.
If you don't have Android SDK tools and packages installed please refer POST Appium - Install SDK tools and packages
Please connect your android device and make sure USB debugging is enabled. Enable Developer Options in Android
Device Name
Device Name
Open cmd prompt and run the below command
adb devices
*Note: if Android path is not setup then please navigate to the android_sdk\platform-tools
Package and Activity Name
Run below command
adb shell
adb dumpsys window windows | grep -E ‘mCurrentFocus|mFocusedApp’
Other way to get Package and Activity Name:
- Go to Android Play Store > Download and Install APK Info application
- Search the desired application and long press on it.
- Long presssing the selection, opens the Detailed Information popup > go to Detailed Information.
- Look for APK path
- Look for Activities