Mercurial > org-tools
comparison refresh-browser.py @ 10:83e16df2288a
still experimenting
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 25 Oct 2011 07:52:02 -0700 |
parents | d09937a6cb4b |
children |
comparison
equal
deleted
inserted
replaced
9:d09937a6cb4b | 10:83e16df2288a |
---|---|
3 | 3 |
4 from selenium import webdriver | 4 from selenium import webdriver |
5 from selenium.common.exceptions import TimeoutException | 5 from selenium.common.exceptions import TimeoutException |
6 from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 | 6 from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 |
7 import time | 7 import time |
8 import sys | |
9 | |
8 | 10 |
9 # Create a new instance of the Firefox driver | 11 # Create a new instance of the Firefox driver |
10 #driver = webdriver.Firefox() | 12 #driver = webdriver.Firefox() |
11 | 13 |
12 driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX) | 14 driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX) |
13 | 15 |
14 | 16 |
15 # go to the google home page | 17 # go to the google home page |
16 driver.get("http://tycho.usno.navy.mil/cgi-bin/timer.pl") | 18 driver.get(sys.argv[1]) |
17 | 19 |
18 # you HAVE to quit if you're reusing firefox sessions | 20 # you HAVE to quit if you're reusing firefox sessions |
19 driver.quit() | 21 driver.quit() |