A problem with Web Elements
Hello guys, I have a login page in my website. I'm developing a login program.
Code:
For Each obj In WebBrowser1.Document.GetElementsByTagName("input")
If (obj.GetAttribute("name") = "email") Then
obj.Value = Text1.Text
End If
Next
I'm writing my textbox(username) to login website e-mail area and..
Code:
For Each obj In WebBrowser1.Document.GetElementsByTagName("button")
If (obj.GetAttribute("submit") = "login") Then
obj.click
End If
Next
I'm sending login request. There is not a problem my textbox appear to web but when I click submit button textbox like dissapear like as no writen as..
Attachment 137125Attachment 137127
So I can't log in. How can I transfer correctly?
***There is html of login text;
Code:
<input class="abc" aria-describedby="" aria-label="E-mail" aria-required="true" autocapitalize="off" autocorrect="off" name="email" placeholder="E-mail" value="" type="text" data-reactid=".0.1.0.1.0.1.0.3.0">
Re: A problem with Web Elements
"submit" is not a Tag name nor is it an attribute
Code:
For Each obj In WebBrowser1.Document.GetElementsByTagName("submit")
If (obj.GetAttribute("submit") = "login") Then
obj.click
Exit For
End If
Next
Re: A problem with Web Elements
Quote:
Originally Posted by
jmsrickland
"submit" is not a Tag name
It is an example.. There is a problem it is not tags names...
*It is <button>
Re: A problem with Web Elements
Quote:
Originally Posted by
jmsrickland
"submit" is not a Tag name nor is it an attribute
Code:
For Each obj In WebBrowser1.Document.GetElementsByTagName("submit")
If (obj.GetAttribute("submit") = "login") Then
obj.click
Exit For
End If
Next
Man it is not problem to clicking login button. I could do it. My problem is when i click login button my text datas disappear and login page will show error "Please fill blanks"
Re: A problem with Web Elements
In your 1st post you said your textbox disappears and now you are saying your data disappears. So when you say data you mean you username disappears from the the input textbox when you click on login button.
Re: A problem with Web Elements
Quote:
Originally Posted by
jmsrickland
In your 1st post you said your textbox disappears and now you are saying your data disappears. So when you say data you mean you username disappears from the the input textbox when you click on login button.
Yes yes when i click login button my written username data deleting and error occuring "Fill blanks..."
Re: A problem with Web Elements
Many web sites will erase your input data if it is incorrect when you submit the web form or you do something that is not the proper thing to do. I can't tell what your data is and if it is correct; I'm assuming its your email address since you are looking for an input box that has the name "emal". So, if it is your email address and it is correct then the only other thing I can guess at is you are not submitting the correct button but you already said you have no problem clicking on submit button even though I think your code is wrong.
Can you post the HTML that shows the two elements you are coding for
Re: A problem with Web Elements
Quote:
Originally Posted by
jmsrickland
Many web sites will erase your input data if it is incorrect when you submit the web form or you do something that is not the proper thing to do. I can't tell what your data is and if it is correct; I'm assuming its your email address since you are looking for an input box that has the name "emal". So, if it is your email address and it is correct then the only other thing I can guess at is you are not submitting the correct button but you already said you have no problem clicking on submit button even though I think your code is wrong.
Can you post the HTML that shows the two elements you are coding for
Now I'm looking for register,
E-mail HTML;
Code:
<input class="_kp5f7 _qy55y" aria-describedby="" aria-label="E-posta" aria-required="true" autocapitalize="off" autocorrect="off" name="email" placeholder="E-posta" value="" type="text" data-reactid=".0.1.0.1.0.1.0.3.0">
E-mail VB;
Code:
For Each obj In WebBrowser1.Document.GetElementsByTagName("input")
If (obj.GetAttribute("name") = "email") Then
obj.Value = List3.Text
End If
Next
Name HTML;
Code:
<input class="_kp5f7 _qy55y" aria-describedby="" aria-label="Tam Adın" aria-required="false" autocapitalize="sentences" autocorrect="off" name="fullName" placeholder="Tam Adın" value="" type="text" data-reactid=".0.1.0.1.0.1.0.4.0">
Name VB;
Code:
For Each obj2 In WebBrowser1.Document.GetElementsByTagName("input")
If (obj2.GetAttribute("name") = "fullName") Then
obj2.Value = List1.Text & " " & List2.Text
End If
Next
Username HTML;
Code:
<input class="_kp5f7 _qy55y" aria-describedby="" aria-label="Kullanıcı adı" aria-required="true" autocapitalize="off" autocorrect="off" maxlength="30" name="username" placeholder="Kullanıcı adı" value="" type="text" data-reactid=".0.1.0.1.0.1.0.5.0">
Username VB;
Code:
For Each obj3 In WebBrowser1.Document.GetElementsByTagName("input")
If (obj3.GetAttribute("name") = "username") Then
obj3.Value = List4.Text
End If
Next
Password HTML;
Code:
<input class="_kp5f7 _qy55y" aria-describedby="" aria-label="Şifre" aria-required="true" autocapitalize="off" autocorrect="off" name="password" placeholder="Şifre" type="password" value="" data-reactid=".0.1.0.1.0.1.0.6.0">
Password VB;
Code:
For Each obj4 In WebBrowser1.Document.GetElementsByTagName("input")
If (obj4.GetAttribute("name") = "password") Then
obj4.Value = Text1.Text
End If
Next
And this is register button in HTML;
Code:
<button class="_1on88 _k2yal _84y62 _7xso1 _nv5lf" data-reactid=".0.1.0.1.0.1.0.7.0">Kaydol</button>
Register button VB;
Code:
For Each obj5 In WebBrowser1.Document.GetElementsByTagName("button")
If (obj5.GetAttribute("data-reactid") = ".0.1.0.1.0.1.0.7.0") Then
obj5.Click
End If
Next
I have 4 textbox and 1 button when I'm trying to textbox > web text area this error occuring. "Fill blanks..." because It seems to have transferred but actually not transfered just appeared...
Re: A problem with Web Elements
can you post a link to the page?
Re: A problem with Web Elements
Well your code fills in the fields and clicks the button so I suspect there is something else going on in your code you are not exposing or you are not sending the correct data and the web site is rejecting your submit and making you do it again which is quite common with web sites. So, without seeing all of your code and/or being able to access the web site with the correct data there isn't anything else I can do for you
Re: A problem with Web Elements
Quote:
Originally Posted by
eren2340
Hello guys, I have a login page in my website. I'm developing a login program.
I'm sending login request.
Code:
<input class="_kp5f7 _qy55y" aria-describedby=""
aand... how nice that in 'your webiste' has exactly same class than some other well known website has...
Few others 'magically' has same kind of problem, but in decoding malware.
http://ddecode.com/phpdecoder/?resul...1fe46560c18de7
I think that we should not help you, with that brute forcing code.
Re: A problem with Web Elements
We're using IIS as our main webserver, but I know we had to install something Tomcat-related at install time, plus I guess the CMC runs under Tomcat (thus the 8080 port number). I'll try going back to do the HTML pass-through according to the Tomcat instructions (previously I just did the IIS instructions).