follow context is html input
<input type="checkbox" id="chkboxProid4" value="45978663" name="rproid[]" v="1" onclick="selected('apf_id_15','chkboxProid4','myxxxxx1')" />
use diagnostics;
use WWW::Mechanize;
use Data::Dumper;
use HTML::Form;
use Encode;
use WWW::Mechanize::Plugin::Display;
my $name = Encode::decode('GB2312', '刷 新');
my $CACTIURL = "xxxxxxxxxxxxx";
my $ADMINPASSWORD = "zhiyuan";
my $mech = WWW::Mechanize->new();
$mech->get($CACTIURL);
$mech->set_visible("xxxxxx", $ADMINPASSWORD);
$mech->click;
my $link_m = $mech->find_link(url_regex => qr/W0QQactZsale/);
my $value_hash =$link_m->url();
$mech->get($link_m);
$mech->form_number(2);
my @inputs = $mech->current_form()->inputs();
#print "inputs: @inputs\n";
foreach my $input2 (@inputs) {
my $input_type= $input2->type;
my $input_id= $input2->id;
my $input_value= $input2->value;
my $input_name= $input2->name;
if ($input_type eq "checkbox") {
print "LOG: input_name $input_name\n";
print "LOG: input_id $input_id\n";
print "LOG: input_value $input_value\n";
#$mech->field($input2=>'on');
$mech->tick($input2->name,$input2->value);
}
}
$mech->display;
foreach my $input3 (@inputs) {
my $input_value =$input3->id;
#print "LOG:input_value $input_value\n";
if($input_value eq "fresh0"){
#print "LOG:input3 $input3\n";
$mech->click_button(input=>$input3);
}
}
sorry, please help me on my question is " why the module html::form $input->name work,$input->value doesn't work" under the html context:
<input type="checkbox" id="chkboxProid4" value="45978663" name="rproid[]" v="1" onclick="selected('apf_id_15','chkboxProid4','myxxxxx1')" />