[英]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. 在一种情况下,请点击链接打开的iOS本机浏览器,之后我需要关闭浏览器并切换回应用程序。 Is there any possible way we can do the using Selenium commands.
有什么可能的方法可以使用Selenium命令。
Consider using sendkeys method to tap at home button twice. 考虑使用sendkeys方法在主页按钮上点击两次。 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. @vignesh您无法在iOS中的不同应用之间切换。 Currently, appium supports app switching between android apps only.
目前,appium仅支持在android应用之间进行应用切换。
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(); driver.navigate()。back();
Just try this out. 只是尝试一下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.