简体   繁体   中英

Switching between app and broswer ios

There is a scenario where tapping on link open's iOS native browser after which I need to close the browser and switch back to applicatio. Is there any possible way we can do the using Selenium commands.

Consider using sendkeys method to tap at home button twice. Then try to tap at some place in the middle of the screen to get back to previously opened app. That could work, but I have not tried it.

@vignesh You can't switch between different apps in iOS. Currently, appium supports app switching between android apps only.

But you can run you app in background and after specified time it will be foreground.

You can use the following code to move back from the browser.

driver.navigate().back();

Just try this out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM