Quoting Peter Szinek <peter at rubyrailways.com>:
> Hey all,
>
> maybe I am missing the obvious again, but I can not submit the form on
> buy.com:
>
> require ''rubygems''
> require ''mechanize''
>
> agent = WWW::Mechanize.new
> agent.user_agent_alias = ''Mac Safari''
> page = agent.get("http://www.buy.com")
> search_form = page.forms.with.name("searchbox").first
> p search_form.buttons
>
> the last array is empty... OK, probably ''GO'' is not a
button - but then
> what it is? How to submit such forms in general (which should be
> submitted with an image button, which is not really an image button...)
Peter,
My only suggestion is that you are probably going to use
search_forms.submit. View the source of the page, I believe the GO! is
an image.
So fill the search box and use search_form.submit.
Mike B.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.