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

CodePudding user response:

reference 1/f, kill matt, bull response:
log in after you're waiting for the page loading, direct access btnQd after login, dom didn't finish loading does not button.

I doubt is no load, or any other problems, mainly to do?

CodePudding user response:

Are you login interface for another value

CodePudding user response:

reference 4 floor YBcsdn1996 response:
are you login interface for another interface values?

How to do? For example, or similar, give a link

CodePudding user response:

Think automatic punching

All you have to monitor the second interface is loaded, click again

CodePudding user response:

The simplest way is to sleep 10 s normal 10 s should interface all opened

CodePudding user response:


refer to 7th floor YBcsdn1996 response:
is the most simple way should sleep 10 s normal 10 s interface all opened the


Tomorrow I try to see, but it seems less, because before that I use wizard button tried, I tried to make it delay for a few seconds and then click, is still the same, then use the Call the Plugin. Web. Go (" sign in page ") opened the next page, and then later will continue to, is I don't know what to use these functions to obtain page in c #

CodePudding user response:

Google browser F12 see pass, pass the reference simulation landing point save trouble,

CodePudding user response:

The question is why I dom operation??
Is nothing but a get to submit, post submission, need operation dom?

CodePudding user response:

Monitor whether the second interface all loaded click again

CodePudding user response:

11 references, uncle tis response:
monitor whether the second interface all loaded clicking


Thank you for your attention! But can say clear point? Best for example or similar link what, I a rookie!
  •  Tags:  
  • C#
  • Related