Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Authenticate HTTPS website with IE Automation

by GrandFather (Saint)
on Aug 24, 2016 at 04:05 UTC ( [id://1170285]=note: print w/replies, xml ) Need Help??


in reply to Authenticate HTTPS website with IE Automation

How about you show us what you have tried. We are generally happier to help you fix the same rather than just do the whole job for you.

Premature optimization is the root of all job security
  • Comment on Re: Authenticate HTTPS website with IE Automation

Replies are listed 'Best First'.
Re^2: Authenticate HTTPS website with IE Automation
by rapid_perl (Initiate) on Aug 24, 2016 at 05:23 UTC
    I used LWP::UserAgent for authentication and IEAutomation for navigation and applying funtionality onto pages. But the the respopnse content after the authentication is not the one which could be passed to IEAutomation object. Thus after initialsing $ie object it is again asking for user id password. Please have a look over the code.
    my $URL = 'https://myurl.com'; my $user = 'rapid_perl'; my $pass = 'secret'; my $ua = LWP::UserAgent->new(); $ua->agent("USER/AGENT/IDENTIFICATION"); my $request = HTTP::Request->new(GET => $URL); $request->authorization_basic($user, $pass); my $response = $ua->request($request); my $cont_res = $response->content(); if ($cont_res=~/\<title\>Windchill\<\/title\>/i) { print "Login Successful \n"; my $ie1 = Win32::IEAutomation->new( visible => 1, maximize + => 0); $ie1->gotoURL("$URL"); sleep 15; }

      Please think about what you're doing when posting, always post fake login details.

        To reinforce this sentiment, I found it a very good pattern to read passwords from the environment or pass them via the command line. In both approaches, the password is still discoverable to other users on the machine and maybe stored in the .history file of the account, but it is harder to accidentially leak the password to a wider audience.

        Thanks alot man. I will make sure for this in future

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found