title: How to keep session alive for long selenium scripts in Automation
body: <p>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 .</p>
  <p>I tried using using cookies but null is received in output , seems like it does not work for me .</p>
  <pre><code>enter code here
          driver.get(url);
          Set&lt;Cookie&gt; cookies =driver.manage().getCookies();
          System.out.println(&quot;Cookies&quot; + driver.manage().getCookies().toString());
          for(Cookie ck : driver.manage().getCookies())                            
          { 
            System.out.println((ck.getName()+&quot;;&quot;+ck.getValue()+&quot;;&quot;+ck.getDomain()+&quot;;&quot;+ck.getPath()+&quot;;&quot;+ck.getExpiry()+&quot;;&quot;+ck.isSecure()));                                                                                                    
          }  
  </code></pre>