1from selenium import webdriver
2from selenium.common.exceptions import TimeoutException
3
4Driver = webdriver.Firefox()
5try:
6 Driver.set_page_load_timeout(1)
7 Driver.get("http://www.engadget.com")
8except TimeoutException as ex:
9 isrunning = 0
10 print("Exception has been thrown. " + str(ex))
11 Driver.close()