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
In reply to www-mechanize-firefox checkbox problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |