iOS | Always logged in at the start of every new test

Not sure was this already asked here, but I could use help with an issue. I will provide any additional info if needed.

As said in the title, I would like to not be logged in after every test has been run, since I need to go through login test first. My colleague on Android just goes through her test, and does Driver.Quit/Dispose(); at the end, and she’s logged out for every other/next test after that.

On the other hand, for me (iOS), after I dispose of my driver - when the next test starts, I’m frequently (if not all the time) already logged in, and then I need to handle that case as well - and I’m trying to avoid it. I know that some login data is kept in the iOS keychain - and I can reproduce this issue manually with our app - if I uninstall the app, while being logged in - after I reinstall the app and start it - I’m already logged in.

Is there a way to handle this in a proper way? I’ve tried a lot of things, like actually logging out through the app, but that adds additional code, and makes it more complicated. Tried few additional capabilities - but nothing worked.

Try reset strategies in your capabilities:

In your case I would try:

fullReset:  false
noReset:  true

Didn’t try these two together, maybe I’ll try it. Thanks for the suggestion @wreed!

Did you manage to reset the Keychain?