Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by hdb (Prior)
on Mar 28, 2013 at 13:35 UTC ( #1025967=note: print w/ replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2015-08-31 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (358 votes), past polls