Internet Explorer的脚本 [英] Script for Internet Explorer

查看:111
本文介绍了Internet Explorer的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在开发网站时,我们会不断尝试/测试许多功能.
一直以来,我们都登录到该网站.

我可以编写任何脚本来绕过此屏幕吗?

如果url是登录屏幕,则
输入用户名xyz;密码为*****
点击登录按钮

我们使用的浏览器是IE6.0

(我们没有记住我"按钮,可以节省一些时间)

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)

推荐答案

我不知道-您可以在登录屏幕上提供一组参数虽然:login.aspx?Id = xxx&PW = xxxx
Not that I know of - you could provide a set of parameters to your login screen though: login.aspx?Id=xxx&PW=xxxx


两种方式,
您可以使用HttpWebRequest
发布数据
Two ways,
You can post the data with HttpWebRequest
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[^]


仅使用自动填充所需的脚本创建html文件.

< html>
< head>
< script>
document.forms [0] .element.value =某些值"
</script>
</head>
</html>

将此放置在机器上的某个位置.

在RegEdit中的InternetExplorer下,创建一个注册表项,如下所述:
< 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/zh-cn/library/bb735853(v=vs.85).aspx"目标="_ blank" title =新窗口"> ^</a>]

确保html文件的路径与放置它的位置相同-上面已提及.

如果一切都正确完成,则重新启动IE应该会显示新的RightClick菜单选项
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


这篇关于Internet Explorer的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆