Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by hdb (Parson)
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: (9)
As of 2014-07-10 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (206 votes), past polls