I am automating a task with Selenium in which while automating long scripts my session got expired and the page automatically get jumped to login page , (Developer is maintaining page session for 60 minutes at server side) . Please guide me if there is any way to maintain the session for as long as my script keeps running .
I tried using using cookies but null is received in output , seems like it does not work for me .
driver.get(url);
Set<Cookie> cookies =driver.manage().getCookies();
System.out.println("Cookies" + driver.manage().getCookies().toString());
for(Cookie ck : driver.manage().getCookies())
{
System.out.println((ck.getName()+";"+ck.getValue()+";"+ck.getDomain()+";"+ck.getPath()+";"+ck.getExpiry()+";"+ck.isSecure()));
}