title: Process hangs if web browser crashes in selenium
body: <p>I am using selenium + python, been using implicit waits and try/except code on python to catch errors. However I have been noticing that if the browser crashes (let's say the user closes the browser during the program's executing), my python program will hang, and the timeouts of implicit wait seems to not work when this happens. The below process will just stay there forever.</p>
  
  <pre><code>from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.common.by import By
  from selenium import webdriver
  import datetime
  import time
  import sys
  import os
  
  def open_browser():
      print "Opening web page..."
  
      driver = webdriver.Chrome()
  
      driver.implicitly_wait(1)
      #driver.set_page_load_timeout(30)
      return driver
  
  
  driver = open_browser() # Opens web browser
  
  # LET'S SAY I CLOSE THE BROWSER RIGHT HERE! 
  # IF I CLOSE THE PROCESS HERE, THE PROGRAM WILL HANG FOREVER
  time.sleep(5)
  while True:
      try:
          driver.get('http://www.google.com')
          break
     except:
          driver.quit()
          driver = open_browser()
  </code></pre>