This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 3
Feb 2018

When trying to switch from native app to another native app I’m getting Method is not yet implemented on Driver.getWindowHandle()
How can I switch app ? without close and start new driver ?

  • created

    Feb '18
  • last reply

    Feb '18
  • 2

    replies

  • 426

    views

  • 2

    users

I think for Android:-
Activity activity = new Activity(“app package goes here”, “app activity goes here”);
(AndroidDriver) driver.startActivity(activity);
would serve the purpose.

For iOS, there is no such direct method but in Java + TestNG you can specify 2 test set in testing.xml file where each test set point to corresponding app, this way you can switch b/w apps without starting a new driver, below is the pseudo code for same

suite
test name = "Test set 1"
parameter name = “bundleID” value = "app1 bundled"
other parameters
/test

test name = "Test Set 2"
parameter name = “bundleID” value = "app2 bundled"
other parameters
/test

/suite

Thanks for reply
My problem is that my second app have no permission to use activity for loading the app, so can not use start activity(when tried it I got error that activity does not exist because of no permission). I looking for a way to connect appium driver to tha app when it already on focus