# HG changeset patch # User Robert McIntyre # Date 1319554903 25200 # Node ID 737c903fc815eddc33f0bb2edce5d34f5cbfb98b # Parent 24ff8a9c76c483fa6b9e3d5f3030b858ae97ac92 remove unnecessary files diff -r 24ff8a9c76c4 -r 737c903fc815 browser.pl --- a/browser.pl Tue Oct 25 08:00:48 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -#!/usr/bin/perl - - -use WWW::Selenium; - -my $sel = WWW::Selenium->new( host => "localhost", - port => 4444, - browser => "*firefox", - browser_url => "http://www.google.com", - ); - -$sel->start; -$sel->open("http://www.google.com"); -$sel->type("q", "hello world"); -$sel->click("btnG"); -$sel->wait_for_page_to_load(5000); -print $sel->get_title; -$sel->stop; diff -r 24ff8a9c76c4 -r 737c903fc815 main-firefox.pl --- a/main-firefox.pl Tue Oct 25 08:00:48 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -#!/usr/bin/perl - -use WWW::Mechanize::Firefox; -my $mech = WWW::Mechanize::Firefox->new(); -$mech->get('http://google.com'); - -$mech->eval_in_page('alert("Hello Firefox")'); -my $png = $mech->content_as_png(); diff -r 24ff8a9c76c4 -r 737c903fc815 play-browser.py --- a/play-browser.py Tue Oct 25 08:00:48 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#!/usr/bin/env python - - -from selenium import webdriver -from selenium.common.exceptions import TimeoutException -from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 -import time - -# Create a new instance of the Firefox driver -#driver = webdriver.Firefox() - -driver = webdriver.Remote("http://localhost:7055/wd/hub", webdriver.DesiredCapabilities.FIREFOX) - -# go to the google home page -driver.get("http://tycho.usno.navy.mil/cgi-bin/timer.pl") - -time.sleep(2) - -driver.refresh() - -time.sleep(2) - -driver.refresh() - -time.sleep(2) - - - -driver.quit() diff -r 24ff8a9c76c4 -r 737c903fc815 refresh-browser.py --- a/refresh-browser.py Tue Oct 25 08:00:48 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#!/usr/bin/env python - - -from selenium import webdriver -from selenium.common.exceptions import TimeoutException -from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 -import time -import sys - - -# Create a new instance of the Firefox driver -#driver = webdriver.Firefox() - -driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.FIREFOX) - - -# go to the google home page -driver.get(sys.argv[1]) - -# you HAVE to quit if you're reusing firefox sessions -driver.quit() diff -r 24ff8a9c76c4 -r 737c903fc815 sample.py --- a/sample.py Tue Oct 25 08:00:48 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -from selenium import webdriver -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.keys import Keys -import time - -browser = webdriver.Firefox() # Get local session of firefox -browser.get("http://www.yahoo.com") # Load page -assert "Yahoo!" in browser.title -elem = browser.find_element_by_name("p") # Find the query box -elem.send_keys("seleniumhq" + Keys.RETURN) -time.sleep(0.2) # Let the page load, will be added to the API -try: - browser.find_element_by_xpath("//a[contains(@href,'http://seleniumhq.org')]") -except NoSuchElementException: - assert 0, "can't find seleniumhq" -#browser.close()