webrat/mechanize_spike.rb

10 lines
213 B
Ruby
Raw Normal View History

2008-05-12 04:23:37 +00:00
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