Forum Discussion

slecault's avatar
slecault
Contributor
7 years ago

iOS mobile app vs web links

I am testing a mobile app available in both Android and iOS.  The app contains web views but also quite a few "web links".

 

When I touch one of these "web links" the link opens in a distinct browser. 

 

With Android, I wait a few seconds, take a screenshot, and then send a "hardware back button" which returns me to the mobile app.

 

With iOS, the browser opens with the same page as Android.  The problem is how do I tell this browser to go back to my app since I cannot automate stuff outside my tested app.

 

The objective here is to see that the embedded links point to the appropriate web pages.

  • Answer from my support case: "Apple doesn't allow changing Safari to another browser, so it's not possible that your links are being opened in the SmartBear browser for iOS."

     

    I will try to get some information within the app with our dev team to maybe have a property that would contain the web link. At least some sort of basic verification could be done during the automated testing.

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      Thank you a lot for the update.

       

      > Apple doesn't allow changing Safari to another browser

      :) (Y)
      Reminded me a holy indignation with IE been "too integrated" into Windows...

      What is allowed to Jupiter, then the bull is not allowed...

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Really good question...

    SmartBearBrowser (https://support.smartbear.com/testcomplete/docs/app-testing/web/mobile/real-devices.html) is the first thing that came to my mind... If it is possible to set it as a default browser for your iOS device then I hope that you should be able to control both, the browser and your application and that you will be back to your application after closing the browser.

     

    Another link that might provide you with some ideas is https://support.smartbear.com/testcomplete/docs/app-testing/mobile/ios/how-to/slide-over.html

    • slecault's avatar
      slecault
      Contributor

      My readings and searches so far indicate that iOS does not want you to change the default browser (or other default programs).

      As soon as we step outside the tested app, the control is lost...

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Sounds not good... Unfortunately, I am not working with iOS and thus cannot verify..., so just an idea - does pressing Back button returns you back to your application?

        If it does, you may try

        <iOSDevice>.PressButton(mbkBack)

         

        Does it help ?