rlm@9: #!/usr/bin/env python rlm@9: rlm@9: rlm@9: from selenium import webdriver rlm@9: from selenium.common.exceptions import TimeoutException rlm@9: from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 rlm@9: import time rlm@9: rlm@9: # Create a new instance of the Firefox driver rlm@9: #driver = webdriver.Firefox() rlm@9: rlm@9: driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX) rlm@9: rlm@9: rlm@9: # go to the google home page rlm@9: driver.get("http://tycho.usno.navy.mil/cgi-bin/timer.pl") rlm@9: rlm@9: # you HAVE to quit if you're reusing firefox sessions rlm@9: driver.quit()