HtmlAgilityPack.HtmlDocument is not compatible with mshtml.HTMLDocumentClass. Somewhere in your code, you probably point webBrowser1 to a file from which you want to extract the inner text of the div "text-conent" (are you sure of the spelling?).
I'd suggest that you follow the process that I used in
SiteMapper Tool[
^]
HAP.HtmlDocument web_page = new HAP.HtmlDocument ( );
try
{
WebRequest web_request;
WebResponse web_response;
web_request = WebRequest.Create ( uri.AbsoluteUri );
web_response = web_request.GetResponse ( );
using ( Stream stream = web_response.
GetResponseStream ( ) )
{
web_page.Load ( stream );
}
}
catch ( WebException we )
{
node.Broken = true;
continue;
}
Simply use the HtmlAgilityPack Load method. I suggest that you never use the mshtml.HTMLDocumentClass.
Once that you have the HTML in web_page, you can extract the div inner text as you are currently doing.