I'm using webbrowser control embeded in a winform in my C# app to do some scraping. The content I'm looking for is dynamically loaded with ajax. However, when I navigate to the page the content won't load unless I have no other code running. I tried doing
while(webbrowser1.isBusy);
But that's not helping. I also tried pausing the program for a few second to give it time to load
Thread.Sleep(2000);
but it's still not loading. If I navigate to the page with no code following, it loads fine. I'm not really sure how I could split this into threads. Any help would be appreciated.