Hi,
This is what I do.
- Launch App (iOS).
- Sign in to App.
- Home page is displayed after successful sign in.
AppiumDriver appiumDriver = new iOSDriver<>(new URL(“http://myurl.com”), getDesiredCapabilities());
I have a couple of test cases in the Home page. If any of my test cases in Step#3 (Home page) fails, the test suite execution comes to an end and appiumDriver instance becomes null. When I want to re-run my tests, I would like to continue from the Home page itself instead of starting from the beginning from Login page.
While it is possible to push the app to the background and then bring to foreground, the appiumDriver instance however becomes null after the test suite execution due to which I am forced to create a new instance of appiumDriver but that would mean doing it again from app launch and not from the home page directly.
Can someone please suggest on how can this be resolved? Is there a way to get the old appiumDriver instance instead of creating a new one?
Thanks,
GD