Recently found in the group feedback, login layer can not successfully enter the user name password situation, roughly looked at, a little summary:
I encountered the login can not successfully enter the user name password situation there are two, one is the positioning error, one is not the focus element, the two look similar, but the actual somewhat different, the following will be described in detail below:
First, the focus element is not: for example:
Like this click Login, out of the log layer, is prone to error, can not focus element, for the corresponding code:
The Location login registration input box is based on the ID, why do you also prompt this error when executing:
Cannot focus element
We have encountered login registration, if the cursor is not in the input box, the input is empty, this error is this meaning, because the cursor is not in the input box, so cannot locate the element, causing the user name password is not entered correctly
So how to solve it, very simple, when the input content, click on the element can be:
The corresponding code:
Of course, do not ask me why the password does not have a separate click, this I am not very clear, but if it is not possible to enter the situation, you can try to click it first;
Next, the real location problem, where multiple layers are involved, leads to inaccurate positioning, so the content cannot be entered correctly, for example:
Like this login box, using F12 to parse his elements, the attentive person will find that there are two similar tags to locate. Like login there, one is lable, one is input, this time must choose input Oh, only input tag content can be entered, similarly, password where is also, do not locate the contents of the input box, but to locate the entire input box. With this warning
The code attached to the login interface is as follows: The most accurate positioning is also based on the ID, the ID is the only drop
To summarize, if the input is a problem, first see if the element is accurate, and then try Click
Questions about the logon shell cannot successfully enter the user name password