Created
September 20, 2010 12:29
-
-
Save Marlena/587830 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#since I've got Snow Leopard, I have to start Firefox with jssh. | |
/Applications/Firefox.app/Contents/MacOS/firefox-bin -jssh | |
#now start irb | |
irb | |
>> require "firewatir" | |
=> true | |
>> b = Watir::Browser.new | |
=> #<FireWatir::Firefox:0x101765dc0 url="" title=""> | |
>> b.goto("http://www.toiletmap.gov.au/suggest.aspx") | |
=> #<FireWatir::Firefox:0x101765dc0 url="" title="National Public Toilet Map - Suggest a Toilet"> | |
>> links_arr = [] | |
>> b.links.each do |link| | |
?> links_arr << link.href | |
?> puts link.href | |
>> end | |
=> 0..24 | |
#lots more ways to explore what on this page as well: | |
>> b.show_links | |
>> b.showForms() | |
#etc. | |
#go explore :o) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment