1

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.

Fakher
  • 2,098
  • 3
  • 29
  • 45

1 Answers1

1

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")
Helmi
  • 556
  • 2
  • 19