title: Random 'The connection was reset' webpage with Selenium
body: <p>We use selenium to test whether we are able to browse. But sometimes intermittently, the selenium types the actual URL in the address bar, but the page does not load, and instead "The connection was reset" page loads. </p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  
  driver = webdriver.Firefox()
  driver.get("http://www.google.com")
  
  #Timeout setting block
  self.selenium.set_timeout(90)
  While True:
     if time.time() - start_time &lt; 90:
       try:
         # Waiting 1 second for page load
         self.selenium.wait_for_page_to_load('1000')
         self.log.info('Page loaded')
       except Exception as e:
  
         msg = ('Ignore Selenium error till page loads:'
                         ' {0}'.format(e))
         self.log.info(msg)
     else:
       break
  </code></pre>