# Mechanize - 0.6.2 (Bridget)

**URL:** <https://www.ruby-forum.com/t/mechanize-0-6-2-bridget/71747>\
**Category:** Ruby\
**Created:** [October 11, 2006, 8:19am UTC](https://www.ruby-forum.com/t/mechanize-0-6-2-bridget/71747 "2006-10-11T08:19:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [October 11, 2006, 8:19am UTC](https://www.ruby-forum.com/t/mechanize-0-6-2-bridget/71747/1 "2006-10-11T08:19:53Z")

</div>

Mechanize version 0.6.2 (Bridget) is now available.

= Description  
The Mechanize library is used for automating interaction with websites.  
Mechanize automatically stores and sends cookies, follows redirects, can  
follow links, and submit forms. Form fields can be populated and  
submitted. Mechanize also keeps track of the sites that you have visited  
as a history.

= Example

# This searches google for “Ruby” and prints the results

require ‘rubygems’  
require ‘mechanize’

agent = WWW::Mechanize.new

agent.get(“[http://www.google.com/").form("f](http://www.google.com/%22).form(%22f)”) { |f|  
f.q = “Ruby”  
}.submit.search(“//a[@class=‘l’]”).each { |l| puts l.all\_text }

= Release Notes

== 0.6.2 (Bridget)

Mechanize 0.6.2 (Bridget) is a fairly small bug fix release. You can  
now  
access the parsed page when a ResponseCodeError is thrown. For example,  
this  
loads a page that doesn’t exist, but gives you access to the parsed 404  
page:  
begin  
WWW::Mechanize.new().get(‘[http://google.com/asdfasdfadsf.html](http://google.com/asdfasdfadsf.html)’)  
rescue WWW::Mechanize::ResponseCodeError =\> ex  
puts ex.page  
end  
Accessing forms is now more DSL like. When manipulating a form, for  
example,  
you can use the following syntax:  
page.form(‘formname’) { |form|  
form.first\_name = “Aaron”  
}.submit  
Documentation has also been updated thanks to Paul S…
