rethaew has asked for the wisdom of the Perl Monks concerning the following question:
And this is the Perl that is getting that page and trying to populate it. The text field populates just fine, but the file field will not:<html><body> <FORM ENCTYPE="multipart/form-data" ACTION="blah" method="post" name=" +upload"> <input type="file" name="file1"> <input type="text" name="file2"> <input type="submit" value="Upload" name="submit"> </FORM> </body></html>
use Win32::IE::Mechanize; my $ie = Win32::IE::Mechanize->new( visible => 1 ); my $url = 'http://blah/test.html'; $ie->get( $url ); $ie->form_name( 'upload' ); $ie->set_fields( 'file1' => 'D:\test.pl', 'file2' => 'D:\test.pl', );
|
|---|