rashichauhan has asked for the wisdom of the Perl Monks concerning the following question:

use strict; use Data::Dumper; use Carp; use WWW::Mechanize; use WWW::Mechanize:Firefox; my $address = 'http://genie.dartmouth.edu/scope'; my $file = "ROX1.fasta"; my $email = 'myemail@gmail.com'; my $id = "ROX1 - Scope"; my $species = "S. cerevisiae"; my $mech = WWW::Mechanize->new(); $mech->get($address); $mech->select( 'species', $species); # this doesn't work. $mech->set_fields( #'species' => $species, # this also won't work # But the rest of these fields are recognized 'groupFile' => $file, 'emailAddress' => $email, 'emailSubject' => $id ); $mech->submit; my $result = $mech->content(); print "$result\n";
In this code i have 2 select one species at a single time.Somehow the 'species' field isn't found and an error is issued instead.I am using www:mechanize:firefox module which understand the javascript .then why the error is coming "input species not found:.plz help me.

Replies are listed 'Best First'.
Re: WWW::Mechanize :firefox 'select' method
by hdb (Monsignor) on Sep 12, 2013 at 07:59 UTC

    This seems to work:

    $mech->field( 'species', $species);
Re: WWW::Mechanize :firefox 'select' method
by Corion (Patriarch) on Sep 12, 2013 at 07:12 UTC

    Have you verified that S. cervisiae is a valid species to select in that listbox?

    When I look at the listbox, it does not show up.

      yesss.. it is a valid species in the list.problem that code is showing that "input species not found".The select box is under javascript " that is why I think it is showing problem.So i have used mechanize::firefox module .But the same error is coming?
        No, it isn't "a valid species in the list."

        In the selection box what appears to be your target appears only as 'Saccharomyces cerevisiae' which is NOT the same thing (to the computer) as the 'S. cerevisiae' in your code.