0

Hey.
I need to click this button in vb.net.

<button id="login" class="fblogin"></button>

How would I go about it?

Thanks.

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by CharliePrynn
0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("button")
        For Each curElement As HtmlElement In theElementCollection
            Dim controlName As String = curElement.GetAttribute("name").ToString
            controlName = "login"
                curElement.InvokeMember("click")
        Next

    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.