I tested the same code that’s running correctly against appium 1.5.3 against 1.6.0beta3, and when I try to start my test I get the following error:
[debug] [ADB] Found package: 'com.siplay.android_siplay' and activity: '.ui.activity.IntroSlideShowActivity'
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/matiasmatteucci/android-sdk-macosx/platform-tools/adb' with args: ["-P",5037,"-s","4d002ce33f5160d1","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'com.siplay.android_siplay' and activity: '.ui.activity.IntroSlideShowActivity'
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[debug] [ADB] Running '/Users/matiasmatteucci/android-sdk-macosx/platform-tools/adb' with args: ["-P",5037,"-s","4d002ce33f5160d1","shell","dumpsys","window","windows"]
[debug] [ADB] Found package: 'com.siplay.android_siplay' and activity: '.ui.activity.IntroSlideShowActivity'
[debug] [ADB] Incorrect package and activity. Retrying.
[ADB] Error: com.siplay.android_siplay/com.siplay.android_siplay.ui.activity.SplashActivity or .ui.activity.SplashActivity or .com.siplay.android_siplay.ui.activity.SplashActivity never started
I’m guessing that for some reason appium 1.5.3 is picking the correct appActivity while 1.6.0beta3 is not? I don’t have appActivity specified on my capabilities btw.
Edit: I did some more research around this. Seems that for reason appium is looking for ‘.ui.activity.SplashActivity’ which is the correct main activity, but is only able to find ‘.ui.activity.IntroSlideShowActivity’ which I assume is the splash screen activity. This happens even when the splash screen is already gone and the main activity has started (it keeps spamming that the only activity it finds is ‘.ui.activity.IntroSlideShowActivity’ until it eventually it stops retrying)
Main question is why is this working correctly in 1.5.3 and not in 1.6.0?
Yes. I talked to the people developing the app I’m testing and in this particular case, the Splash activity is a “router”. Solution was to force IntroSlideShowActivity as appActivity:
You may add as many activities as you wish in driver capabilities using comma. One of needed activity appears (even incorrect that appium looking for) and appium get relaxed.
What worked for me was adding this capability (available since Appium 1.6.5): capabilities.setCapability(AndroidMobileCapabilityType.APP_WAIT_ACTIVITY, "your.package.name.*");
I have tried all the possibilities such as with appWaitActivity, without appWaitActivity still the same problem. If I uninstall the application it will work fine but If I want to keep batch execution that time it will not work and also I tried with noReset capability