webrat/mechanize_spike.rb
2008-05-12 00:42:43 -04:00

10 lines
213 B
Ruby

require "lib/webrat"
require "lib/webrat/mechanize"
include Webrat
sess = MechanizeSession.new
sess.visits "http://www.google.com/"
sess.fills_in "q", :with => "Webrat"
sess.clicks_button
sess.save_and_open_page