# Mechanize - 0.6.3 (Big Man)

**URL:** <https://www.ruby-forum.com/t/mechanize-0-6-3-big-man/75002>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/mechanize-0-6-3-big-man/75002 "2006-11-07T11:05:46Z")\
**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:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/mechanize-0-6-3-big-man/75002/1 "2006-11-07T11:05:46Z")

</div>

Mechanize version 0.6.3 (Big Man) 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

Mechanize 0.6.3 (Big Man) has a few bug fixes and some new features  
added to  
the Form class. The Form class is now more hash like. I’ve added an  
Form#add\_field! method that will add a field to your form. Form#[]=  
will now  
add a field if the key doesn’t exist. For example, your form doesn’t  
have  
an input field named ‘foo’, the following 2 lines of code are  
equivalent, and  
will create a field named ‘foo’:  
form[‘foo’] = ‘bar’  
or  
form.add\_field!(‘foo’, ‘bar’)  
To make forms more hashlike, has\_value?, and has\_key? methods.

= CHANGELOG

- Added keys and values methods to Form
- Added has\_value? to Form
- Added a has\_field? method to Form
- The add\_field! method on Form now creates a field for you on the form.  
Thanks to Mat S. for the patch.  
[http://rubyforge.org/pipermail/mechanize-users/2006-November/000025.html](http://rubyforge.org/pipermail/mechanize-users/2006-November/000025.html)
- Fixed a bug when form actions have html ecoded entities in them.  
[http://rubyforge.org/pipermail/mechanize-users/2006-October/000019.html](http://rubyforge.org/pipermail/mechanize-users/2006-October/000019.html)
- Fixed a bug when links or frame sources have html encoded entities in  
the  
href or src.
- Fixed a bug where ‘#’ symbols are encoded  
[http://rubyforge.org/forum/message.php?msg\_id=14747](http://rubyforge.org/forum/message.php?msg_id=14747)
