view play-browser.py @ 11:24ff8a9c76c4

all day for three lines
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 08:00:48 -0700
parents 83e16df2288a
children
line wrap: on
line source
1 #!/usr/bin/env python
4 from selenium import webdriver
5 from selenium.common.exceptions import TimeoutException
6 from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
7 import time
9 # Create a new instance of the Firefox driver
10 #driver = webdriver.Firefox()
12 driver = webdriver.Remote("http://localhost:7055/wd/hub", webdriver.DesiredCapabilities.FIREFOX)
14 # go to the google home page
15 driver.get("http://tycho.usno.navy.mil/cgi-bin/timer.pl")
17 time.sleep(2)
19 driver.refresh()
21 time.sleep(2)
23 driver.refresh()
25 time.sleep(2)
29 driver.quit()