Use case: Login with a username, navigated to a 2nd factor authentication page to do one of a number of things (i.e. answer a knowledge based question), and then navigated to a final page to enter a password. Close the browser and attempt to login again with the username. This time the 2nd factor authentication page is bypassed because the app recognizes the cookies and the user is prompted to enter their password directly.
Problem: I am using Selenium RemoteWebDriver to run these tests on a separate test machine and when I close the first browser and open a new instance of RemoteWebDriver it appears it starts by clearing cookies and cache and the 2nd factor authentication page comes up every time I attempt to login.
What I need: Help to figure out how to create a new instance of RemoteWebDriver without it automatically clearing any cookies or cache, so the 2nd factor authentication page will be bypassed. I need this for IE, Chrome, Firefox and Safari.
I don’t have any code that clears this explicitly, but I also don’t have anything that attempts to force it to not clear (if that’s even in existence.) I haven’t tried much of anything else because I have no idea what to try.
Versions: Selenium WebDriver: 2.45.0.0, Selenium Grid: 2.45.0
Thanks!