Question How to click text in webbrowser?

PoL4K

Member
Joined
Jun 14, 2011
Messages
7
Location
Lublin, Poland, Poland
Programming Experience
5-10
Hello!

I have a problem. I need to click that html element:

HTML:
<span class="ts"><font size="1">
 Weryfikacja adresu e-mail Google <font color="#7777CC"> – Witamy w Kontach Google. Aby aktywować konto i potwierdzić adres e-mail, kliknij poniższy link …</font></span>

Can you help me?
 
Have you tried something like this:

WebBrowser1.Document.GetElementById("ts").InvokeMember("click")
 
Why would you want you click text?
 
OK, but the text you posted above doesn't have any function, no links or click events. So I am still confused on what you hope to accomplish by clicking on it. :)
 
Right, but after you click on the text, what happens?
 
:) I still don't get it, sorry. Maybe you could post a screenshot or something to give us more of an idea of what you need.
 
This is over my head :). I don't know how to even start with something like that, sorry.
 
Dim Gazetaactive = WebBrowser1.Document.All

For Each curElement As HtmlElement In Gazetaactive

Dim ctrlIdentity = curElement.GetAttribute("innerText").ToString

If ctrlIdentity = "Weryfikacja adresu e-mail Google" Then

curElement.InvokeMember("click")

End If

Next


It's working for me :)
 
Back
Top