Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, I try to navigate the search page (an .asp-page, made with MS FrontPage) in our intranet. The navigation buttons are in the html table as follows:
<TR> <TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=4> <FORM NAME="fpdbr_0" ACTION="/information/participant.asp" TARGET="_se +lf" METHOD=POST><NOBR><INPUT TYPE=Button NAME="fpdbr_0_PagingMove" VALUE=" -- "><INPUT TYPE=Button NAME="fpdb +r_0_PagingMove" VALUE=" -- "><INPUT TYPE=Submit NAME="fpdbr_0_PagingMove" VALUE=" > "><INPUT TYPE=Submi +t NAME="fpdbr_0_PagingMove" VALUE=" >| "> [1/100]</NOBR><INPUT TYPE=HIDDEN NAME="Name" VALUE=""> </FORM> </TD> </TR>
I would like to click the third button (with " > ") to move to the next page until there is one. An attempt:
$mech->click_button( name => 'fpdbr_0_PagingMove', value => ' > ' +);
brings only:
No clickable input with name fpdbr_0_PagingMove at ... .
Another attempt:
$mech->submit_form(form_name => 'fpdbr_0', button => " > ",);
and the output:
No clickable input with name > at ... .
I tried:
use Data::Dump; my @forms = $mech->forms(); dd \@forms;
with the following output:
[ bless({ accept_charset => "UNKNOWN", action => bless(do{\(my $o = "http://our.intranet/information/part +icipant.asp")}, "URI::http"), attr => { botid => 0, method => "POST" }, default_charset => "UTF-8", enctype => "application/x-www-form-urlencoded", inputs => [ bless({ name => "Name", size => 20, type => "text", value => "", value_name => "", }, "HTML::Form::TextInput"), bless({ type => "submit", value => "Search", value_name => "" }, + "HTML::Form::SubmitInput"), ], method => "POST", }, "HTML::Form"), bless({ accept_charset => "UNKNOWN", action => bless(do{\(my $o = "http://our.intranet/information/part +icipant.asp")}, "URI::http"), attr => { method => "POST", name => "fpdbr_0", target => "_self" } +, default_charset => "UTF-8", enctype => "application/x-www-form-urlencoded", inputs => [ bless({ name => "fpdbr_0_PagingMove", type => "button", value => " -- ", value_name => "", }, "HTML::Form::SubmitInput"), bless({ name => "fpdbr_0_PagingMove", type => "button", value => " -- ", value_name => "", }, "HTML::Form::SubmitInput"), bless({ name => "fpdbr_0_PagingMove", type => "submit", value => " > ", value_name => "", }, "HTML::Form::SubmitInput"), bless({ name => "fpdbr_0_PagingMove", type => "submit", value => " >| ", value_name => "[1/100]", }, "HTML::Form::SubmitInput"), bless({ name => "Name", readonly => 1, type => "hidden", value => "", value_name => "", }, "HTML::Form::TextInput"), ], method => "POST", }, "HTML::Form"), ]
The first form is on top of the page, simply a search form. The second form is the form I wish to navigate (click on " > " to move on ). Seeking your advice.

Replies are listed 'Best First'.
Re: Trying to navigate the asp page
by poj (Abbot) on Jul 28, 2014 at 13:51 UTC
    Try selecting the form first ;
    $mech->form_name('fpdbr_0'); $mech->click_button( value => " > " );
    poj
      You saved my day! Thank you very much!