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


in reply to How to handle a browser window that opens up during the execution of some external program commands

I am on Internet Explorer and found Win32::IEAutomation useful in the past as it emulates the user interaction with the browser. Have a look at the code snippet below. This is a bit older code and I hope it still works on newer IE.

my $ie = Win32::IEAutomation->new( visible => 1 ); $ie->gotoURL( "http://some.site.com/" ); # login $ie->getTextBox('name:', "userid")->SetValue($user); $ie->getTextBox('name:', "password")->SetValue($pass); $ie->getButton('name:', "login.x")->Click; # move to job page $ie->getLink('linktext:', "Job")->Click; $ie->getLink('linktext:', $jobid)->Click; # retrieve results my $content = $ie->PageText;
  • Comment on Re: How to handle a browser window that opens up during the execution of some external program commands
  • Download Code