Home > Net > Automatic login system does not do the rest
Automatic login system does not do the rest
Time:10-05
Want to realize automatic login the company's internal OA to a certain time, enter the user name and password, then click on the page to work sign in or sign back from work, But I found that every time the input user name and password that step 2 is no problem, but after logging in, performing a final step, click on the sign in button but no reaction, I thought that the question is out in, after login to another surface of the outside world, to obtain the information of the page? How to do this?
HtmlElement btnSubmit=webBrowser1. Document. All [" ImageButton1 "]; HtmlElement tbUserid=webBrowser1. Document. All [" Txt_username "]; HtmlElement tbPasswd=webBrowser1. Document. All [" Txt_password "]; If (tbUserid==null | | tbPasswd==null | | btnSubmit==null) return; TbUserid. SetAttribute (" value ", "user name");//input user name TbPasswd. SetAttribute (" value ", "password");//input password BtnSubmit. InvokeMember (" click ");//click login
HtmlElement BTNQT=webBrowser1. Document. All [" btnQd "]; BTNQT. InvokeMember (" click ");//click sign in to work
CodePudding user response:
Log in after you're waiting for the page loading, direct access btnQd after login, dom didn't finish loading does not button
CodePudding user response:
Write an API parameters user name password sign in/sign back, why should more convenient simulation landing