is there anyway that driver Could remember the logged in session
, so it doesn't take me back to Login
page (e.g. like google-chrome
)?
this is what I'm doing at the moment
public static void main(String[] args) throws Exception {
driver = new ChromeDriver();
// I get redirected to login page
driver.get("http://localhost/interestingStuff");
// logins in to the page and submits(note I try to omit this part if possible).
login();
doStuff();
//I want to be able to keep session next time I start this program.
driver.close();
}
Selenium with default configuration creates for every session temporary profile and delete this temp files after work.
So if you want to save cookies (remmember "logged in session") you need to go by one of the following ways:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With