Hey!
Simple question, is there any way I can get a webbrowser to wait until an element is present? I'm not an amazing coder, so here's my best example of what I'm trying to do -
Do While PageLoaded = False
Dim OObject As Object
OObject = WebBrowser1.Document.GetElementById("Element-That-I-Need-Loaded")
If (OObject Is Nothing) Then
Pageloaded = False
Else
PageLoaded = True
End If
Loop
The problem with this is that the element doesn't have an ID, so when I'm trying to do something like click it, I have to do something like this -
For Each altelm As HtmlElement In WebBrowser1.Document.GetElementsByTagName("SPAN")
If altelm.GetAttribute("classname").ToString = "Classname-of-Element-I-Need-Loaded" Then
altelm.Focus()
altelm.InvokeMember("click")
End If
I apologise if this is worded poorly, I'm new to this :)
Thanks!