Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Filling in a form on a web page using perl

by davidj (Priest)
on Aug 18, 2005 at 18:54 UTC ( #484928=note: print w/ replies, xml ) Need Help??


in reply to Filling in a form on a web page using perl

hey jonp,

You are off to a good start. As you already know you need to set the values of the appropriate dropdown menus, input fields, etc and submit them (which you are currently doing). Here's your next step: First, remember that a pushdown button (the "Run BLAST" submit button) is just like the other form objects. It, too, has to be set when you submit the form. I viewed the source of the form and the html for the "Run BLAST" submit button is as follows:

<INPUT TYPE="submit" NAME="value" VALUE="Run BLAST">
Therefore, all you should need to do is change the following code
my $response = $browser->post( $URL, [ 'Algorithem' => 'blastx', 'BlastTargetSet' => 'ATH1_pep', 'QueryText' => $sequence, ] );
to
my $response = $browser->post( $URL, [ 'Algorithem' => 'blastx', 'BlastTargetSet' => 'ATH1_pep', 'QueryText' => $sequence, 'value' => 'Run BLAST', ] );
This will at least submit the form as though the "Run BLAST" submit button has been pushed. For further information you should check out Perl & LWP.

hope this helps,

davidj


Comment on Re: Filling in a form on a web page using perl
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2014-08-22 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls