I am creating some tests and once in a while Firefox gets stuck on loading a page forever (until I manually refresh or press the ESC key) I'm using Python 2.7.11 and Selenium 2.53.6 and Firefox 46 (tested 39 as well)
I set the following preferences for the Driver:
driver.set_page_load_timeout(30)
profile.set_preference("network.http.response.timeout", 0.5)
profile.set_preference('webdriver.load.strategy', 'unstable')
Sometimes the timeoutExeption is caught and selenium restarts the loop, however sometimes this does not happen.
How can I stop this behavior?