Can ruby automate form submission?

Can someone point me to either a gem or a method on how i might go
about filling in and submitting data on a web form that uses POST?

Have you looked into the mechanize gem?

Eric

···

On Feb 22, 9:02 pm, "Simon Jackson" <simon.jack...@gmail.com> wrote:

Can someone point me to either a gem or a method on how i might go
about filling in and submitting data on a web form that uses POST?

----
On-site, hands-on Ruby training is available from http://LearnRuby.com
!

thats exactly what i was looking for, thank you!

···

On 2/22/07, Eric I. <rubytraining@gmail.com> wrote:

On Feb 22, 9:02 pm, "Simon Jackson" <simon.jack...@gmail.com> wrote:
> Can someone point me to either a gem or a method on how i might go
> about filling in and submitting data on a web form that uses POST?

Have you looked into the mechanize gem?

Eric

----
On-site, hands-on Ruby training is available from http://LearnRuby.com
!

Simon Jackson wrote:

thats exactly what i was looking for, thank you!

Maybe it is an overkill for your situation, but you could chek out also scRUBYt! (http://scrubyt.org), a Web scraping framework based on WWW::Mechanize and Hpricot.

For example, login to rubyforge.org looks like this:

rubyforge_data = Scrubyt::Extractor.define do
   fetch 'http://rubyforge.org/&#39;
   click_link 'Log In'
   fill_textfield 'form_loginname', '*login_here*'
   fill_textfield 'form_pw', '*pass_here*'
   submit
end

Cheers,
Peter

···

__
http://www.rubyrailways.com :: Ruby and Web2.0 blog
http://scrubyt.org :: Ruby web scraping framework
http://rubykitchensink.ca/ :: The indexed archive of all things Ruby