Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i create a perl file to automate fill and reset form. but i'm stucked with a form that must tick a checkbox to proceed. i can take the checkbox name, type and value:
my $inName= $m->xpath('/html/body/div/div/div/form/table[2]/tbody/tr[2 +]/td[2]/label/input', single =>1)->{name}; my $inType= $m->xpath('/html/body/div/div/div/form/table[2]/tbody/ +tr[2]/td[2]/label/input', single =>1)->{type}; my $inValue= $m->xpath('/html/body/div/div/div/form/table[2]/tbody +/tr[2]/td[2]/label/input', single =>1)->{value}; print $inName." ".$inType." ".$inValue;
which result is: stuinfo checkbox value1
below is the line i have tried and it's appropriate respond:
$m->tick($inName,$inValue); <<<<nothing happened for this one
$m->field( $inName => $inValue ); <<<<nothing happened for this one
$m->field( $inName => $inValue , 'on');<<<<nothing happened for this one
$m->tick($inName => $inValue ); <<<<No elements found for Checkbox with name 'stuinfo' and value 'value1' at auto.plx line 77
any help very appreciated, thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: www-mechanize-firefox checkbox problem
by Anonymous Monk on Apr 01, 2011 at 09:50 UTC | |
|
Re: www-mechanize-firefox checkbox problem
by moritz (Cardinal) on Apr 01, 2011 at 09:56 UTC | |
by Anonymous Monk on Apr 01, 2011 at 10:03 UTC | |
by Anonymous Monk on Apr 01, 2011 at 11:10 UTC | |
by Anonymous Monk on Apr 01, 2011 at 11:44 UTC |