I am looking to automate multiple apps on iOS (not supported), but with a different approach. I have already seen https://discuss.appium.io/t/testing-multiple-apps-on-same-device/2865.
I just want to understand if my thinking is sane and if this is achievable. Here is how I plan on doing it.
1) Install app1 and app2 on the real device or simulator.
2) Run test1 that starts app1 and invokes app2 through app1. I call driver.quit to close connection with the app1.
3) Run test2 where I create a new driver instance and attach to app2 that is already running. Invoke app1 from app2. I call driver.quit to close connection with the app1.
4) Run test3 where I attach to app1 that is in foreground now. validate data and call it a success.
This approach is assuming that I can attach to an existing already running app without restarting it. Any thoughts if this would work?