Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
this shows 3 forms. But when I try to run this code,$ mech-dump url
Here's the output.use strict; use Data::Dumper; use WWW::Mechanize; my $m = WWW::Mechanize->new( autocheck => 1 ); $m->agent_alias( 'Windows Mozilla' ); $m->cookie_jar( HTTP::Cookies->new ); $m->get( 'same_url_as_mech-dump' ); print Dumper ( $m->forms() ); $m->submit_form( form_number => 1, fields => $fields );
Also, there is no output from $m->forms(). This is weird because mech-dump was able to find the forms. Any help?There is no form numbered 1 ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mechanize Cannot Detect Forms
by roboticus (Chancellor) on Jun 27, 2011 at 23:56 UTC | |
|
Re: Mechanize Cannot Detect Forms
by Marshall (Canon) on Jun 28, 2011 at 00:04 UTC | |
|
Re: Mechanize Cannot Detect Forms
by ajose (Acolyte) on Jun 28, 2011 at 12:53 UTC | |
|
Re: Mechanize Cannot Detect Forms
by Anonymous Monk on Jun 28, 2011 at 07:06 UTC |