mhearse has asked for the wisdom of the Perl Monks concerning the following question:
I'm doing some screenscraping. Trying to submit a form using the HTML::Form->click method. The only problem is: the button doesn't have a name... only an id. I'm unable to get the button using:
This is what I get by doing print Dumper($_);my $login; foreach (HTML::Form->parse($self->{resp})) { #if ($_->find_input('btnLogin')) { print Dumper($_); if ($_->find_input('Login', 'button')) { $login = $_; last; } } die $! if not $login;
Can someone help? Thanks.{ '/' => '/', 'value_name' => '', 'tabindex' => '4', 'value' => 'Login', 'class' => 'login_button butto +n', 'id' => 'btnLogin', 'type' => 'button' },
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: HTML::Form getting button by id
by Corion (Patriarch) on Jul 09, 2012 at 19:09 UTC | |
by mhearse (Chaplain) on Jul 09, 2012 at 19:30 UTC | |
by Corion (Patriarch) on Jul 09, 2012 at 19:43 UTC | |
by mhearse (Chaplain) on Jul 09, 2012 at 20:28 UTC |
Back to
Seekers of Perl Wisdom