From: Ryan Davis Date: 2010-03-29T16:43:38+09:00 Subject: Re: Using Mechanize To Submit Forms On Mar 28, 2010, at 15:29 , Robert Molloy wrote: > > > Basically, I want to be able to click all the links of the above type, > and save the returned data in a file. You're prolly looking for something like: search_form.buttons_with(:onclick => /^chart/).each do |button| button.click end this is untested, but a good portion was glommed from mechanize's tests. Do this: gem unpack mechanize cd mechanize* grep -r buttons_with . and such. I find lots of stuff that way.