How about:
outer_page =
agent.get(''http://path.to.site.come/outer_page.html'')frame_page
= agent.get(outer_page.frames[0].src)
# OR: frame_page = agent.get(outer_page.frame(''oFrame'').src)
form = frame_page.forms[0]
On Tue, Jul 28, 2009 at 6:03 PM, Jonathan Huizingh
<jhuizingh at mindless.com>wrote:
> I''m still hoping for an answer to this one. Is there any way to
> access pages within iframes using mechanize?
>
> Jonathan Huizingh
> Pronunciation: HI-zing
>
>
>
>
> ---------- Forwarded message ----------
> From: Jonathan Huizingh
> Date: Fri, Jul 10, 2009 at 6:33 PM
> Subject: Iframes in pages
> To: Ruby Mechanize Users List <mechanize-users at rubyforge.org>
>
>
> Does mechanize handle iframes that show up within pages that it loads?
>
> I have a page that loads a form I need to fill out within an iframe.
> Is it possible to do something like this? :
>
> outer_page =
agent.get(''http://path.to.site.come/outer_page.html'')
> form = outer_page.iframes[0].forms[0]
> .... more code ...
>
> Is there some way to do something like that? If not, is there a
> recommended way to handle forms embedded in iframes?
>
> Thanks,
>
> Jonathan Huizingh
> Pronunciation: HI-zing
> _______________________________________________
> Mechanize-users mailing list
> Mechanize-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mechanize-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/mechanize-users/attachments/20090728/e8bf7b7e/attachment.html>