In my scenario Native app A calls another native app B and i need do some actions and again it goes back to app A.
In android i am able to automate my my scenarios with out any problem but in IOS i am not able to do it is throwing ‘Selenium::Client::CommandError: mainWindow is nil’ error.
Some one told that these kind of scares not possible in IOS. Is it correct?
app A is the app you are automating? If it is, does it calls app B via a button/link present on app A?
If the above are correct then it should be possible to automate normally. Like when one app sends an email and it calls native email, its possible to interact with elements of the native email.
You can try your scenario it may work in iOS Simulator, considering app2 is also installed on simulator.
But on real device you can only automate those app’s which are build using your apple account provisioning profile. If app2 is also build by your developer certificate then I guess it would be possible else not.
Biggest example you can never install an app on iOS real device other then iTunes. Unlike android way where using adb you can install any apk file on mobile.
For example you cannot see SMS received, if you try to go to message app directly. But if within your app you have an entry that will redirect you to message app, then you can automate it. I use that on my tests, both native messaging and email.
Thanks for correcting my statement. I never tried that, but based on business model this could be possible because while submitting app on apple store they review app code and all redirection from with in app like purchase links or anything other than that are charged on basis of revenue generated by app. So it might be possible apple allows communication b/w app’s.
I just tried opening Setting page by minimizing my current app and it didn’t worked, might be because there is not redirection of settings page from with in app.