Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

While developing a website, we keep trying/testing out many functionalities.
All the while, we login in to the website.

Is there any possible script I can write to bypass this screen?

if url is login screen then
Enter username as xyz; password as *****
Click login button

The browser which we use is IE6.0

(We do not have a remember me button, This would save sometime off)
Posted
Updated 25-Sep-11 22:53pm
v2

Not that I know of - you could provide a set of parameters to your login screen though: login.aspx?Id=xxx&PW=xxxx
 
Share this answer
 
Comments
[no name] 26-Sep-11 4:59am    
Yes, that's a nice thought. Thanks.

Can you suggest something that would accomplish this without bothering the code?
[no name] 8-Oct-11 7:34am    
Hey, Created a registry Entry to solve this. Now I get an option on the rightClick (Which is linked to a JavaScript method). On clicking, fills the login form, clicks the submit and takes me to homepage).

Saves few seconds spent on the login form
Two ways,
You can post the data with HttpWebRequest
VB
wreq = WebRequest.Create("http://www.codeproject.com/script/Membership/LogOn.aspx")
wreq.ContentType = "application/x-www-form-urlencoded"
wreq.Method = WebRequestMethods.Http.Post
wreq.CookieContainer = coockies
Dim postData As String = "Email=xyz@yahoo.com&Password=yourPw"
wreq.ContentLength = postData.Length
Dim requestWriter As New StreamWriter(wreq.GetRequestStream, System.Text.Encoding.ASCII)
requestWriter.Write(postData)
requestWriter.Close()
wreq.GetResponse.Close()



or Automation Tool for Web Activities[^]
 
Share this answer
 
v2
Comments
[no name] 26-Sep-11 5:06am    
Thanks Prerak for the answer!

Any lightweight script ideas? For chrome, I believe I can write extensions. For IE, any options? I'm looking for suggestions which do not involve modifying my code.

This should be lightweight, independent solution which run part of the browser.
[no name] 8-Oct-11 7:34am    
Hey, Created a registry Entry to solve this. Now I get an option on the rightClick (Which is linked to a JavaScript method). On clicking, fills the login form, clicks the submit and takes me to homepage).

Saves few seconds spent on the login form
Create a html file with just the script required for auto-fill.

<html>
<head>
<script>
document.forms[0].element.value='Some Value'
</script>
</head>
</html>

Place this in a location on the machine.

Under InternetExplorer in RegEdit, Create a registry entry as discussed below:
<a href="http://msdn.microsoft.com/en-us/library/bb735853(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/bb735853(v=vs.85).aspx</a>[<a href="http://msdn.microsoft.com/en-us/library/bb735853(v=vs.85).aspx" target="_blank" title="New Window">^</a>]

Ensure that the path of the html file is as where you placed it - Mentioned above.

If all was done correctly, restarting IE should show your new RightClick menu option
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900