libvenus has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I m trying to access a url using mechanize. The url redirects me to a secure login and i must authenticate myself to get in. I want to automate this login process but the login page is created using Javascript:
document.write("<table border=0 align=center width=100%>"); document.write("<tr>"); document.write("<th align=right id=\"lblUserID\">"); document.write(getUserIDText(bShowBD)); document.write("</th>"); //document.write("<td align=left><input type=\"text\" name=\"useri +d\" value=\"\" maxlength=\"128\" size=\"9\"></td>"); document.write("<td align=left><input type=\"text\" name=\"userid\ +" value=\"" + getUserName() + "\" maxlength=\"128\" size=\"9\"></td>" +); document.write("</tr>"); document.write("<tr>"); document.write("<td colspan=2>"); document.write("<input type=\"hidden\" name=\"username\" value=\"\ +" maxlength=\"128\" size=\"9\">"); document.write("</td>"); document.write("</tr>"); document.write("<tr>"); document.write("<th align=right><LABEL ID=lblPWD>Password:</LABEL> +</th>"); document.write("<td align=left><input type=\"password\" name=\"pas +sword\" value=\"\" maxlength=\"46\" size=\"20\">"); document.write("</td>"); document.write("</tr>"); document.write("<tr>"); document.write("<td colspan=2>"); document.write("<input type=\"hidden\" name=\"login-form-type\" va +lue=\"pwd\">"); document.write("</td>"); document.write("</tr>"); document.write("<tr>"); document.write("<td align=center colspan=2><input type=\"submit\" +name=\"btnSubmit\" value=\" OK \" onClick=\"if (setReqURL()==false) + return false; if (checkCookiesAtField(userid)) return true; else ret +urn false;\"></td>"); document.write("</tr>");
from whatever i have read this isn't possible.But isn't there some hack?
Thanks in Advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Automate WebLogin
by marto (Cardinal) on Jan 21, 2011 at 16:11 UTC | |
|
Re: Automate WebLogin
by Anonymous Monk on Jan 21, 2011 at 16:11 UTC | |
|
Re: Automate WebLogin
by Anonymous Monk on Jan 21, 2011 at 16:14 UTC | |
by Anonymous Monk on Jan 21, 2011 at 16:18 UTC | |
by libvenus (Sexton) on Jan 21, 2011 at 18:07 UTC | |
by Corion (Patriarch) on Jan 21, 2011 at 18:40 UTC | |
by libvenus (Sexton) on Jan 26, 2011 at 14:04 UTC | |
by marto (Cardinal) on Jan 26, 2011 at 14:12 UTC | |
|