Here is a snip of my code:
Dim content As String = ""
Dim web As New HtmlAgilityPack.HtmlWeb
Dim doc As New HtmlAgilityPack.HtmlDocument()
doc.Load(WebBrowser1.DocumentStream)
Dim hnc As HtmlAgilityPack.HtmlNodeCollection = doc.DocumentNode.SelectNodes("//div[@class='address']/preceding-sibling::h3[@class='listingTitleLine']")
For Each link As HtmlAgilityPack.HtmlNode In hnc
Dim replaceUnwanted As String = ""
replaceUnwanted = link.InnerText.Replace("&", "&") '
<span style="white-space:pre"> </span> content &= replaceUnwanted & vbNewLine
Next
'I have a bunch of code here I removed ------------------------------
Dim htmlDoc As HtmlDocument = Me.WebBrowser2.Document
Dim visibleHtmlElements As HtmlElementCollection = htmlDoc.GetElementsByTagName("TD")
Dim found As Boolean = False
For Each str As HtmlElement In visibleHtmlElements
If Not String.IsNullOrEmpty(str.InnerText) Then
Dim text As String = str.InnerText
If str.InnerText.Contains(parts(2)) Then
found = True
End If
End If
Next
Im getting an error for Me.WebBrowser2.Document:
"Value of type 'System.Windows.Forms.HtmlDocument' cannot be converted to 'HtmlAgilityPack.HtmlDocument'.
And another one for htmlDoc.GetElementsByTagName:
'GetElementsByTagName' is not a member of 'HtmlAgilityPack.HtmlDocument'.
The code worked when I wasnt using HAP, but I needed to import it to do something and now its interfering with this. Help please.