如何制作自动提交者 [英] How to make Auto Submitter

查看:84
本文介绍了如何制作自动提交者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜;我如何制作自动提交者?我想让程序或Web应用程序可以自动注册我想要的网站,然后从配置文件和其他数据自动填写表单?

hi; how i can make Auto Submitter ? i want to make program or web application can make auto registration for web sites i want and then auto fill forms from profile and anther data ?

推荐答案

这是一个方法我用作Windows窗体应用程序...

在窗体上添加一个WebBrowser控件和一个按钮

在按钮后面。导航到您选择的网站

将WebBrowser的.Document转换为HtmlDocument,然后您可以访问页面中的元素

例如,此代码段在包含区号的下拉列表中选择一个值,然后单击提交按钮
Here is a method I have used as a Windows Forms Application...
On a form add a WebBrowser control and a button
Behind the button .Navigate to your chosen web site
Convert the WebBrowser''s .Document to a HtmlDocument and you can then access the elements in the page
For example this snippet selects a value on a dropdown list containing Area codes and then clicks the submit button
HtmlDocument md ;
md = (HtmlDocument)webBrowser1.Document;
md.GetElementById("AreaID").SetAttribute("value", "109");
md.GetElementById("cmdSubmit").InvokeMember("click");



这不一定适用于所有webforms,你需要弄清楚元素是什么



这是一篇使用类似方法的文章 http://scyanide.com/2009/07/use-c-sharp-to-fill-out-web-forms/ [ ^ ]可能还有更多


This won''t necessarily work for all webforms and you will need to work out what the element Ids are

Here is an article that uses a similar method http://scyanide.com/2009/07/use-c-sharp-to-fill-out-web-forms/[^] there are probably many more


这篇关于如何制作自动提交者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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