Do you have a question? Post it now! No Registration Necessary. Now with pictures!
December 18, 2009, 8:01 am
rate this thread
I'm no Mech expert, but.. it is a pretty popular module.
You aren't wasting your time learning how to use it.
So 'perldoc WWW::Mechanize' is your friend...
Here's one way to choose a radio field value:
# (obviously not production code)
$mech->field('radiogroup_name', 'value you want to set');
$mech->click_button(number => 1);
This assumes you know the radio name, and that the form is the first
one in the page, as well as the submit button being the first button
in the form. That's a lot of assumptions, but assumptions keep code
simple! If you need a more general solution, you'll have to do more
inspection by accessing data objects through Mech.
Mech scripts can get prohibitively complicated if you don't know
anything about the HTML you may encounter.
- » Posting Guidelines for comp.lang.perl.misc ($Revision: 1.9 $)
- — Next thread in » PERL Discussions