title: Selenium Webdriver ConnectionAbortedError in case of 5sec sleeps in between commands
body: <p>My Selenium-WebDriver + Python scripts work fine, but give a <code>ConnectionAbortedError</code> if there is too much time in between the webdriver commands.</p>
  
  <p>The following minimum working example gives an error:</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver import Firefox
  import time
  
  browser = webdriver.Firefox()
  browser.get('http://www.google.com/')
  searchfield = browser.find_element_by_id("lst-ib") 
  time.sleep(5) 
  browser.close() # -&gt; ConnectionAbortedError
  </code></pre>
  
  <p>while without the 5 second sleep, there is no error:</p>
  
  <pre><code>browser = webdriver.Firefox()
  browser.get('http://www.google.com/')
  searchfield = browser.find_element_by_id("lst-ib")
  browser.close()
  </code></pre>
  
  <p>No one else seems to have had this issue... Is it normal that the connection is lost after several seconds? Or am I doing something wrong?</p>
  
  <p>I have tried to use <em>implicitly_wait</em> and <em>set_script_timeout</em>, but increasing these timeouts did not solve the problem.</p>