Files | Admin

Notes:

Release Name: mechanize-0.5.3

Notes: = Mechanize Release Notes == 0.5.3 (Twan) Here it is. Mechanize 0.5.3 also named the "Twan" release. There are a few new features, a few fixed bugs, and some other stuff too! First, new features. WWW::Mechanize#click has been updated to operate on the first link if an array is passed in. How is this helpful? It allows syntax like this: agent.click page.links.first to be like this: agent.click page.links This trick was actually implemented in WWW::Mechanize::List. If you send a method to WWW::Mechanize::List, and it doesn't know how to respond, it will try calling that method on the first element of the list. But it only does that for methods with no arguments. Radio buttons, check boxes, and select lists can now be ticked, unticked, and clicked. Now to select the second radio button from a list, you can do this: form.radiobuttons.name('color')[1].click Mechanize will handle unchecking all of the other radio buttons with the same name. Pretty printing has been added so that inspecting mechanize objects is very pretty. Go ahead and try it out! pp page Or even pp page.forms.first Now, bugfixes. A bug was fixed when spaces are passed in as part of the URL to WWW::Mechanize#get. Thanks to Eric Kolve, a bug was fixed with methods that conflict with rails. Thanks to Yinon Bentor for sending in a patch to improve Log4r support and a slight speed increase.


Changes: = Mechanize CHANGELOG == 0.5.3 * Mechanize#click will now act on the first element of an array. So if an array of links is passed to WWW::Mechanize#click, the first link is clicked. That means the syntax for clicking links is shortened and still supports selecting a link. The following are equivalent: agent.click page.links.first agent.click page.links * Fixed a bug with spaces in href's and get's * Added a tick, untick, and click method to radio buttons so that radiobuttons can be "clicked" * Added a tick, untick, and click method to check boxes so that checkboxes can be "clicked" * Options on Select lists can now be "tick"ed, and "untick"ed. * Fixed a potential bug conflicting with rails. Thanks Eric Kolve * Updated log4r support for a speed increase. Thanks Yinon Bentor * Added inspect methods and pretty printing