need help with getting element

07/18/2014 03:59 sander2828#1
so there is 2 problems.

first problem

i try to get element id by using class here is code what i use:
Code:
  Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
Dim PageElement As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("span")
        For Each CurElement As HtmlElement In PageElement
            If (CurElement.GetAttribute("className") = "request_badge_button") Then

                MsgBox(CurElement.GetAttribute("id"))
            End If


        Next
    End Sub
problem is that it finds and works when you are not logged into the website but when you are it won't work. and i need it to work when you are logged in.
here is website.[Only registered and activated users can see links. Click Here To Register...]


second problem is that i also can't click button with .invokemember("click") using id you can find from source of the link i gave right next to the class="request_badge_button" when i am logged into website soo that is problem aswell.

please help me.

also tryed with webkit browser still same problem code i used:
Code:
Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
        Dim ElementListe

        ElementListe = WebKitBrowser1.Document.GetElementsByTagName("span")

        For Each Element In ElementListe
            ListBox3.Items.Add(Element.GetAttribute("class"))
            If Element.GetAttribute("classname") = "request_badge_button" Then

                MsgBox("found")
            End If
        Next


    End Sub