I want to click the 1st span element
<ul class="tabsList"><li><span>Prihlásenie</span></li><li><span>Registrácia</span></li></ul>
For Each span As HtmlElement In WebBrowser1.Document.Body.GetElementsByTagName("span")
If span.OuterHtml.ToString().Contains("Prihlásenie") Then
span.InvokeMember("click")
Exit For
This works fine. But I don´t want to click it by innertext. I guess it is quite hard to specify, because it has no attributes.