I am trying to envoke a text url with no id, I am able to envoke it via the href.innertext just fine but for the program i am creating the innertext will not be completely known before hand. Therefore i am using keywords that i know will be included in the text.
I have tried to assign the href.innertext to a string and try "if string.contains("blah blah")" but i get an error.
Dim HTML As HtmlDocument
HTML = WebBrowser1.Document
For Each href In HTML.Links
item = href.innerText
If item.Contains("Blah Blah") Then
href.InvokeMember("click")
End If
Next
the code above returns
System.NullReferenceException: 'Object reference not set to an instance of an object.'
item was Nothing.