[VB.NET] Help Needed!.

Status
Not open for further replies.
B

Brawl

Guest
Original poster
[VB.NET] Help Needed! [EASY].

Alright so I'm trying to set the value of a TextBox although Ive tried everything including this
Code:
 WebBrowser1.Document.All.GetElementsByName("gaia sub emailtxtfield")(0).SetAttribute("value", "Test")

and this

Code:
 WebBrowser1.Document.All.GetElementsByName("Email")(0).SetAttribute("value", "Test")

But it doesnt seem to work here's the source.. that should be right... right?.
Code:
<input type="text" class="gaia sub emailtxtfield" size="30" value="" name="Email">

Edit here's some more info hopefully someone can help..

Here's the URL the webbrowser navigates to in the video..

[youtube]tvl3NeAGFFs[/youtube]
 
K

KamaluNg

Guest
Original poster
Try this:

Code:
Dim elements As HtmlElementCollection = WebBrowser1.Document.All
        For Each WebPageElement As HtmlElement In elements
            If WebPageElement.GetAttribute("className") = "gaia sub emailtxtfield" Then
WebPageElement.SetAttribute("value", textbox1.text)
            End If
        Next
 
B

Brawl

Guest
Original poster
Try this:

Code:
Dim elements As HtmlElementCollection = WebBrowser1.Document.All
        For Each WebPageElement As HtmlElement In elements
            If WebPageElement.GetAttribute("className") = "gaia sub emailtxtfield" Then
WebPageElement.SetAttribute("value", textbox1.text)
            End If
        Next

Mann.. Still no success :worried:. anyone wanna tv to help me fix this..
 

goku93

Senior
senior
member
Joined
Jun 13, 2011
Posts
465
Reaction score
81
Points
146
Try this
Code:
Dim elements As HtmlElementCollection = WebBrowser1.Document.Getelementbytagname("input")         For Each WebPageElement As HtmlElement In elements             If WebPageElement.GetAttribute("name") = "email" Then WebPageElement.SetAttribute("value", textbox1.text)             End If         Next
 
F

Fear

Guest
Original poster
If you can't solve this check to see if any of the information is changing. Reload the page and check the source or try a different browser. I've found some websites have multiple web pages under the same link to stop bots.

For example, Mail.com does this.
 

Darkness

Veteran
veteran
old school
senior
Life Saver
coldschool
member
Joined
Jul 17, 2009
Posts
3,361
Reaction score
2,442
Points
180
Location
Toronto, Canada
Code:
webBrowser1.Document.GetElementByID("Email").SetAttribute("value", "test");

If this worked and you'd like to know how/why, you can PM me again.
 

SeXy JinXeR

k
veteran
old school
senior
Life Saver
coldschool
member
Joined
Mar 4, 2011
Posts
10,322
Reaction score
5,746
Points
402
Hey im H4x0rzrev i told u ill tv you and help you. Just get that working
 
K

KamaluNg

Guest
Original poster
I've tried this before. It doesn't work because you have to click the radio button first. However none of the invokemember("click") methods through classname, id, value, etc don't make it slide out.

The codes above all work its the radio button you have to work on.
 
B

Brawl

Guest
Original poster
I've tried this before. It doesn't work because you have to click the radio button first. However none of the invokemember("click") methods through classname, id, value, etc don't make it slide out.

The codes above all work its the radio button you have to work on.

i already have the radio button.. pm'd.
 

goku93

Senior
senior
member
Joined
Jun 13, 2011
Posts
465
Reaction score
81
Points
146
im dont know well but in your code says: Button1_click, and u clicked the button 5 o_O
 
Status
Not open for further replies.