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;
}
|