TestProject Forum

General => Appium => Topic started by: Nelson on August 31, 2016, 10:46:33 am

Title: Switch between apps with appium
Post by: Nelson on August 31, 2016, 10:46:33 am
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 ?
Title: Re: Switch between apps with appium
Post by: Luthar on September 04, 2016, 20:14:55 pm
Try running AndroidDriver first with Chrome appActivity and appPackage.

after that -
assign
Code
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:
Code
driver.context = "WEBPAGE_1";