Dear monks, I am new in Perl and Mechanize. I want to read an Html page and follow the link. This page has a table with radio buttons, in a browser you tick one, and then click on an "Ok" button to see the chosen information.
The source page in html is as follow (printed using print $mech->content() :
<tbody> <tr class="moduloTableauCouleur"> <td> <input type=radio name="%%RBGROUP16843009" value="wt_200 +0-selector[1]" ></td> </td> <td>0001887609 </td> <td> </td> <td>010249X02 </td> <td>Verif. código barra </td> <td align="right">52,00 </td> <td>ZRCB </td> <td> </td> </tr> <tr class="moduloTableauBlanc"> <td> <input type=radio name="%%RBGROUP16843009" value="wt_200 +0-selector[2]" ></td> </td> <td>0001891413 </td> <td> </td> <td>010249X02 </td> <td>Verif. código barra </td> <td align="right">52,00 </td> <td>ZRCB </td> <td> </td> </tr> <tr class="moduloTableauCouleur"> <td> <input type=radio name="%%RBGROUP16843009" value="wt_200 +0-selector[3]" ></td> </td> <td>0001891414 </td> <td> </td> <td>010249X02 </td> <td>Verif. código barra </td> <td align="right">30,00 </td> <td>ZRCB </td> <td> </td> </tr> </tbody>
I would like to select one of these radio buttons but I haven't succeeded. I have tried different ways:
but none has worked. Does anybody know how to do it? Thanks in advance. Yours faithfully, Josep Bonet$mech->tick( name => 'wt_2000-selector[3]', value => 'Select'); $mech->select( name => '%%RBGROUP16843009', value => 'wt_2000-selector +[3]'); $mech->submit_form( form_name=>'%%RBGROUP16843009',fields=>'wt_2000-se +lector[3]', button => 'Select');
In reply to Select radio button by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |