TestProject Forum
Powered by leading experts in the test automation community

Switch between apps with appium

I have a test case where I would like to switch apps by using selenium and appium.

I start the process by loading the browser, then I need to get some info from notification bar and then switch back to the browser.

I started by creating a webdriver session, but I can’t open a new session while the first one is still running (browser and appium have different sessions)

Is there a way to do it with 1 session ?

Try running AndroidDriver first with Chrome appActivity and appPackage.

after that -

driver.Context = NATIVE_APP;

so you can use the Android activities.
if you would like to go back to chrome, all you need to do is set the context:

driver.context = "WEBPAGE_1";