title: selenium webdriver hanging indefinitely for hours
body: <p>The python script gets stuck. How do I generate Exception?
  Eg: the url used in code,  how can I handle such cases. I have tried chromedriver as well.</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  
  
  url="http://collegeofdesign.info/?page_id=9"
  
  caps = webdriver.DesiredCapabilities.PHANTOMJS
  caps["phantomjs.page.settings.resourceTimeout"] = 10
  caps["pageLoadStrategy"] = "none"
  
  
  browser = webdriver.PhantomJS(desired_capabilities=caps,executable_path='/home/md/Downloads/phantomjs-2.1.1-linux-x86_64/bin/phantomjs',service_args=['--ignore-ssl-errors=true', '--ssl-protocol=any','--cookies-file=/tmp/tmpfile'])
  
  browser.set_page_load_timeout(10)
  browser.set_script_timeout(5)
  browser.implicitly_wait(15)
  
  browser.get(url) ## stuck here infinitely
  browser.quit()
  </code></pre>