Simple Example

Contributed by Jonathan Kohl


require 'watir'
require 'test/unit'

class TC_article_example < Test::Unit::TestCase
 
  def test_search
    browser = Watir::Browser.new
    browser.goto("http://www.google.com/ncr")
    browser.text_field(:name, "q").set("pickaxe")
    browser.button(:value, "Google Search").click
    assert(browser.text.include?("Programming Ruby: The Pragmatic Programmer's Guide"))
  end

end

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.