title: How to make "stay logged in" work in Selenium webdriver?
body: <p>I am working in a website like <a href="https://jira.atlassian.com/" rel="nofollow">https://jira.atlassian.com/</a> using firefox, after clicking the "log in" on the top right corner, i am taken to the next login page, where on the right of "log in" button, there is this "stay logged in" checkbox, already checked.</p>
  
  <p>I tested it manually. It seems that after i log in successfully, if i do not exit the page by log out,  but simply close the page, the next time i enter <a href="https://jira.atlassian.com/" rel="nofollow">https://jira.atlassian.com/</a>, i am already logged in. Ok, make sense.</p>
  
  <p>However, if testing such using selenium webdriver, log in, close page, open page again, the above does not happen.</p>
  
  <p>My question is what is the mechanism for this "stay logged in", is it the same as "remember me"? and how do i make it happen when using selenium webdriver?</p>
  
  <p>Up till now my understanding is: </p>
  
  <ol>
  <li>this happens because of cookie</li>
  <li>cookie is stored in firefox profile</li>
  <li>selenium start with a default profile that does not include cookie, and can not store cookie during the test</li>
  </ol>
  
  <p>Is there a relatively standard solution for this problem, in java preferably?</p>
  
  <p>Thanks,</p>