How to open a redirecting activity?

Hey guys, I am having an issue getting Appium to deal with a custom browser app that my company has developed. It appears that it starts with a Launcher Activity but then redirects to either an activity that deals with Terms & Conditions, or the actual Browser Activity.

So when I get Appium to open Launcher Activity the following happens:

info: [debug] executing cmd: C:\Users\jceballos\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s 0915f9dd34e52005 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.ntent.docomogu.browser/.ui.activity.LaunchActivity”
info: [debug] Waiting for pkg “com.ntent.docomogu.browser” and activity “.ui.activity.LaunchActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: C:\Users\jceballos\AppData\Local\Android\android-sdk\platform-tools\adb.exe -s 0915f9dd34e52005 shell “dumpsys window windows”

This last two info lines repeat consecutively.

error: com.ntent.docomogu.browser/.ui.activity.LaunchActivity never started. Current: com.ntent.docomogu.browser/.ui.activity.BrowserActivity

Do you guys have any advice on how to deal with this?

Thanks!

Specify the appWaitActivity capability. This capability tells Appium to wait for the given activity to start rather than wait for the launch activity.

2 Likes

Thanks! That ended up solving my issue.

You can set multiple activities for the capability appWaitActivity.

2 Likes