When I try to use the form to navigate to a different page, I realize that the input field is hidden.
Below is the HTML code for reference:
<form id="form_pager" method="post" action="">
<input type="hidden" id="txtPage" name="page">
<a class="link-paginador" href="javascript:navigatePage('1');"><<</a>
<a class="link-paginador" href="javascript:navigatePage('1');">Previous</a>
<span id="pager">
<a class="link-paginador" href="javascript:navigatePage('1');">1</a>
<strong>2</strong>
<a class="link-paginador" href="javascript:navigatePage('3');">3</a>
<a class="link-paginador" href="javascript:navigatePage('4');">4</a>
<a class="link-paginador" href="javascript:navigatePage('5');">5</a>
</span>
<a class="link-paginador" href="javascript:navigatePage('3');">Next</a>
<a class="link-paginador" href="javascript:navigatePage('5');">>></a>
</form>
My attempt to manipulate the input fields using the following code:
$form = $mech->form_id('form_pager');
$mech->set_fields('txtPage' => 'page='.$nbpage);
$mech->click();
I also tried changing the input status with this piece of code:
foreach my $forms ($mech->forms()) {
map { $_->readonly(0) } $forms->inputs();
}
Unfortunately, none of these methods seem to work. Any suggestions or ideas would be greatly appreciated. Thank you!