I am going to automate the Android sample-app-mobile and i use appium-inspector to get the IDs of element:
{
"appium:app": "Path//to//src//main//resources//app//Android.SauceLabs.Mobile.Sample.app.2.7.1.apk",
"appium:deviceName": "Pixel 3a API 34",
"platformName": "android",
"appium:automationName": "UIAutomator2"
}
However, when i start the session, the app gets open in the android-studio emulator but then the appium-inspector complains with:
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.swaglabsmobileapp' application. Consider checking the driver's troubleshooting documentation. Original error: 'com.swaglabsmobileapp.SplashActivity' or 'com.swaglabsmobileapp.com.swaglabsmobileapp.SplashActivity' never started. Consider checking the driver's troubleshooting documentation.
What i tried:
I tried to figure out what is the MainActivity of the app using the APK.info app and specify the "appium:appActivity":"com.swaglabsmobileapp.com.swaglabsmobileapp.MainActivity"
using the
Failed to create session. An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.swaglabsmobileapp' application. Consider checking the driver's troubleshooting documentation. Original error: Cannot start the 'com.swaglabsmobileapp' application. Consider checking the driver's troubleshooting documentation. Original error: Activity name '.com.swaglabsmobileapp.com.swaglabsmobileapp.MainActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity