简体   繁体   English

网站登录自动填充

[英]Website log in auto fill

I want to auto fill in a web page and then submit the data in C#. 我想自动填写网页,然后用C#提交数据。

How can I do this? 我怎样才能做到这一点?

You will need to fake a POST HTTP-Request to the webserver. 您将需要向网络服务器伪造POST HTTP请求。 You will need the following classes: HttpWebRequest and HttpWebResponse . 您将需要以下类: HttpWebRequestHttpWebResponse The POST data will be the values for the form fields, to find out the POST request a browser sends out, have a look at Wireshark . POST数据将是表单字段的值,以查找浏览器发出的POST请求,看看Wireshark

Another way could be the WebClient . 另一种方法可以是WebClient

Do you mean programmatically or inside of an actual browser window? 您是通过编程方式还是在实际的浏览器窗口内? If the latter, try WatiN . 如果是后者,请尝试使用WatiN

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM