monks,

I am using WWW::Mechanize for my inhouse project. Earlier I asked some question in WWW::Mechanize - Could not connect to a server and I got clarification from that node replies. Also there is a recent node which discusses about web forms in Submit HTML Forms with WWW:Mechanize. I picked up some code from there and used in my code, but I did not get any from names.

#!/usr/bin/perl use WWW::Mechanize ; use LWP::Debug qw(+); use strict; use warnings; use Data::Dumper; #use LWP::UserAgent; my $mech = WWW::Mechanize->new ; #my $ua = LWP::UserAgent->new; $mech->proxy(['http','ftp'], 'http://proxy_ip_dress:port_number/'); $mech ->get("http://application_ip_address:8082/root/Login") ; if ( $mech ->success ) { print "Connection Success ", $mech ->res->st +atus_line, "\n"; } else { print "Status :" , $mech ->res->status_line +, "\n"; } my @webforms = $mech->forms(); print Dumper [ @webforms ]; # @webforms is empty foreach my $form (@webforms) { my @inputfields = $form->param; foreach my $inputfield (@inputfields) { print Dumper [ $inputfield ]; } print Dumper [ $form ]; }
If I try to get google page I am getting value in the webforms arrary. If I use my application URL I am not getting that. Am I missing still something in the code ? will there be any web page without web forms ? Just curious to know.



hmmm ....let me think what did I said

In reply to In a Web Page forms are displayed as empty by jesuashok

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.