Reputation: 1
I have a feature file with few scenarios:
in every scenario I need to login in app and then do checks
But if first scenario failed on step after login, it does not perform logout
and then second scenario is failed.
How to bring app to first state? (start app, and not logged in)
driver.resetApp() does not work for me
Upvotes: 0
Views: 12731
Reputation: 5909
If driver.resetApp()
does not work for you, you can try to write this into the desired capabilities instead.
Try adding the fullReset
capability to your driver options -- this is based on this GitHub discussion from Appium:
options.AddAdditionalCapability("fullReset", "true");
If you do not wish to reset the app, but actually just close & restart it, you can use:
driver.closeApp();
driver.launchApp();
Upvotes: 2