I have the following WebBrowser code which is working fine after loading 1000+ page of another domain to extract data.
objWebBrowser = new WebBrowser();
// Disable any warning/error prompts
objWebBrowser.ScriptErrorsSuppressed = true;
objWebBrowser.Navigate(new Uri(strFullSourceParamUrl));
while (objWebBrowser.ReadyState != WebBrowserReadyState.Complete)
{
Application.DoEvents();
Thread.Sleep(50);
}
objWebBrowser.DocumentCompleted += Wb_DocumentCompleted;
var webScrapperResult = objWebBrowser.Document.GetElementsByTagName("HTML")[0].OuterHtml;
Now I'm trying to load another domain https://nutritiondata.self.com/facts/vegetables-and-vegetable-products/1/0. Last week it was loading fine, but few days ago the ReadyState is always "Interactive" no matter how long it loop. I tried set ScriptErrorsSuppressed to false, there were few dialog boxes appeared indicate some js file loading error. I clicked Yes for all of them and then the program just keep loading without hitting debugger.
Any advice how to resolve this type of issue?