http://www.perlmonks.org?node_id=484928


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