perl - WWW:Mechanize setvisible -


setting radio button in current form simple:

$clone->set_visible([radio => '1']); 

with unknown number of radio buttons (probably 10 20) loop should work:

while(1) {last if (!$clone->set_visible([radio => '1']));}; 

however, though setvisible returns 1. guess returns 0 when nothing set @ all. if 1 field set, can "re-set".

how stop after radios set? or need determine how many there first?

you can find inputs need first:

my @radio_inputs = $mech->find_all_inputs(     type       => 'radio', ); 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -