简体   繁体   English

在应用程序和浏览器iOS之间切换

[英]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.

相关问题 iOS从和应用程序打开浏览器并在某个时候关闭它并返回到应用程序? - iOS open broswer from and App and close it at some point and return to the App? 在 Swift iOS MPMediaPlayer 应用程序中切换播放列表和设置计时器的问题 - Problems switching between playlists and setting timers in Swift iOS MPMediaPlayer app iOS浏览数据->用于Phonegap应用程序/会话的缓存和Cookie? - iOS broswer data -> Cache & Cookie for Phonegap App / Session? Ionic 4 IOS 深层链接重定向到浏览器而不是实际应用程序 - Ionic 4 IOS deeplinks redirect to broswer instead of the actual app iOS阻止应用切换 - iOS prevent app switching iOS:以编程方式在视图之间切换 - iOS: Switching between views programmatically 在领域之间切换(iOS / Swift 3) - Switching between realms (iOS / Swift 3) Ionic iOS Cordova 在应用程序之间切换保持旧图标,未生成新图标 应用程序切换器 - Ionic iOS Cordova Switching between apps stays old icon, new icon is not being generated app switcher 在具有URL方案(iOS)的应用程序之间切换 - Switching between apps with URL Schemes (iOS) 用于在IOS中的视图之间切换的页面控件 - Page Control for Switching Between Views in IOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM