webBrowser 模拟登录

webBrowser1.Document.GetElementById("txtUsername").InnerText = "sdsy";//fill name

webBrowser1.Document.GetElementById("txtPassword").InnerText = "1";
HtmlElement formLogin = webBrowser1.Document.Forms["gin126lo"];
// formLogin.InvokeMember("submit");
HtmlElement btnSubmit = webBrowser1.Document.GetElementById("loginButton");
btnSubmit.InvokeMember("click");

posted @ 2014-08-04 16:40  armyfai  阅读(1972)  评论(0编辑  收藏  举报