10 lines
213 B
Ruby
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 |