Hello All, I need help! I'm totally confused. I'm trying to access and list the forms available on a page using WWW::Mechanize::Firefox
$mech->get("http://www.w3schools.com/html/html_forms.asp"); my @forms = $mech->forms(); my $form_obj ; while ( ($index, $form_obj) = each @forms) { print "[F$index] : ", $form_obj , "\n"; print Dumper ($form_obj), "\n"; }
# The $form_obj that is returned is a MozRepl::RemoteObject::Instance # When i do a print Dumper on it, i can't see anything remotely useful. Everything appears to be describing the connection to Firefox, and i can't see anything to do with a form. What I'm trying to do is print a list of forms available on a page and then allow the user to select the form in order to input some data. I've tried googling for some examples of forms with Mechanize::Firefox and MozRepl::RemoteOjects but what i found was neither clear nor well explained. Any assistance would be greatly appreciated

In reply to Accessing Forms with WWW::Mechanize::Firefox by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.