Reputation: 2128
I am testing an Android application using calabash
for Android.
The application open the browser after some treatment, and so I am losing control on my application. How can I go back to the app after the browser is opened and it's on foreground.
Upvotes: 1
Views: 210
Reputation: 556
After you have been redirected out of the app , you can bring it back from the background with the following command
system("#{default_device.adb_command} shell am start -n 'PATH_TO_ACTIVITY_IN_THE_SYSTEM' -a android.intent.action.MAIN -c android.intent.category.LAUNCHER")
Upvotes: 1