diff refresh-browser.py @ 9:d09937a6cb4b

trying to build something to automatically refresh the browser.
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 05:33:36 -0700
parents
children 83e16df2288a
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/refresh-browser.py	Tue Oct 25 05:33:36 2011 -0700
     1.3 @@ -0,0 +1,19 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +
     1.7 +from selenium import webdriver
     1.8 +from selenium.common.exceptions import TimeoutException
     1.9 +from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
    1.10 +import time
    1.11 +
    1.12 +# Create a new instance of the Firefox driver
    1.13 +#driver = webdriver.Firefox()
    1.14 +
    1.15 +driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX)
    1.16 +
    1.17 +
    1.18 +# go to the google home page
    1.19 +driver.get("http://tycho.usno.navy.mil/cgi-bin/timer.pl")
    1.20 +
    1.21 +# you HAVE to quit if you're reusing firefox sessions
    1.22 +driver.quit()