Switch between apps with appium

  • 1 Replies
  • 2091 Views
Switch between apps with appium
« 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 ?

Re: Switch between apps with appium
« Reply #1 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";

 

Sitemap 1 2 3 4 5 6 7 8