title: How to refresh hanging page in Selenium Java Webdriver?
body: <p>I'm doing some test cases using selenium in Java/Firefox and sometimes the QA server hangs. After clicking the login button, it's still on the same page, doesn't get to the next page, and the loading spinner spins forever. Now my only option so far is to manually refresh even though these are meant to be automated. </p>
  
  <p>I've tried</p>
  
  <pre><code>driver.navigate().refresh();
  
  as well as
  
  ((JavascriptExecutor)driver).executeScript("document.location.reload()");
  </code></pre>
  
  <p>They don't seem to work in-between pages. Is there a better way to refresh the page that does not depend of the state of loading?</p>