use Win32::IEAutomation; use Data::Dumper; use LWP::Simple; $\="\n"; $,=" "; $ie=Win32::IEAutomation->new(visible=>1, maximize=>1); $url='www.test.com/pp/login.asp'; $ie->gotoURL($url); $ie->getTextBox('name:', 'loginName')->SetValue('test'); $ie->getTextBox('name:', 'password')->SetValue('test'); $ie->getButton('name:', 'loginBtn')->Click; $url1 = 'http://www.test.com/pp/lookup.asp'; $ie->gotoURL($url1); print "Logged in Successfully.....\n"; $ie->getSelectList('name:', 'field')->SelectItem("A Type"); $ie->getSelectList('name:', 'value')->SelectItem("A Notice"); $ie->getButton('name:', 'submitBtn')->Click; $url2 = 'http://www.test.com/pp/lookup.asp?pid=50643'; $ie->gotoURL($url2); print "Reading PDF files.....\n"; $url3 = 'http://test.test.net/files/b6533c01-9ddc-4865-8381-e774804b8a49.pdf'; $ie->gotoURL($url3); print "Selected PDF file Successfully.....\n"; my $file = get ("$url3") ; open( FILE, '>', "D:\\filename.pdf" ) or die $!; binmode FILE; print FILE $file; close( FILE ); print "Downloaded.....\n";