QuestionLink labels and labels values in webbrowser

Posts 1–6 of 6 · Page 1 of 1
Link labels and labels values in webbrowser
Hey somebody can teach me or show me a source code for read de labels values in a webbrowser?

For example:

Code:
<div style="padding: 2px;"><a href="member.php?u=1992299">jonnyHS</a></div>
i want to read jonnyHS

And with the link label is almost the same i just want to click de label, but is not the same because i know how to do it with a button.

Help pls!!
Get all elements with the attribute "a" and read their inner text
How? and this will work for click them?
Quote Originally Posted by jonnyHS View Post
How? and this will work for click them?
WebBrowser Class
HtmlDocument Class
HtmlElement Class

Check all elements in the current document with the HtmlTag "a" then read the inner text of each and invoke a click
The correct link label ( The one that i want to click )

Code:
<a href="#" onclick="unlockAccount();">Desbloquear</a>
The one that i want to read (is not a label is div sorry)

Code:
<div class="content">jonnyHS</div>
i have been looking in the internet but i cant understand how i can read jonnyHS

For the link label i try to do it by some id

WebBrowser1.Document.GetElementById("unlockAccount ()").InvokeMember("click")

But that did not work :l
Code:
<div class="content">jonnyHS</div>
SOLVED:

Code:
For Each name As HtmlElement In WebBrowser1.Document.GetElementsByTagName("div")


            If el.GetAttribute("className") = "content" Then
                ListView1.Items.Add((name.InnerText))
            End If
        Next
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us