Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Select Multiple values with $mech->select( $name, \@values ) in mechanize:firefox

by Anonymous Monk
on Nov 13, 2012 at 09:59 UTC ( #1003579=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I am trying to pass multiple values using an array to a select section in mech:firefox (same as that of www:mechanize), but it is not taking that. I am using the below code,

my @values = ("GB","IE","CH"); $mech->field( $name, \@values );

I don't know whether it is correct or not but i tried as same as that which i was using in www:mechanize . Can anybody help me monks? Thanks in advance.

Comment on Select Multiple values with $mech->select( $name, \@values ) in mechanize:firefox
Download Code
Re: Select Multiple values with $mech->select( $name, \@values ) in mechanize:firefox
by Anonymous Monk on Nov 13, 2012 at 10:03 UTC
    Maybe you should use ->select
Re: Select Multiple values with $mech->select( $name, \@values ) in mechanize:firefox
by Matt™ (Acolyte) on Nov 13, 2012 at 10:16 UTC

    Use 'select' instead of 'field' and it should work.

    my @values = ("GB","IE","CH"); $mech->select( $name, \@values );

    Hope this helps.

      It was my fault, Thanks it worked.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1003579]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2015-07-02 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls