Skip to content

Instantly share code, notes, and snippets.

@marklocklear
Created December 1, 2010 14:02
Show Gist options
  • Save marklocklear/723512 to your computer and use it in GitHub Desktop.
Save marklocklear/723512 to your computer and use it in GitHub Desktop.
require 'htmlunit.rb'
require 'test/unit'
class MyFirstTest < Test::Unit::TestCase
def test_main
webClient = WebClient.new(BrowserVersion::FIREFOX_3)
main_page = webClient.getPage("http://www.asheville-outdoors.com")
#this will simply output all the text on the page...nice for screen scraping
#puts main_page.asText
assert_equal("Asheville-Outdoors.com", main_page.getTitleText)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment