require 'watir'
test_site = 'http://www.google.com'
ie = Watir::IE.new
ie.goto(test_site)
ie.text_field(:name, "q").set("pickaxe")
ie.button(:name, "btnG").click
if ie.text.include?("Programming Ruby")
puts "Test Passed. Found the test string: 'Programming Ruby'. Actual Results match Expected Results."
else
puts "Test Failed! Could not find: 'Programming Ruby'"
end
ie.show_divs()
安装完成后运行其中的googlesearch,感觉很不错