I have a problem with WPF browser. i want to load a web page. Wait for it load completely and then put few search inputs and then retrieve the result and put it in excel.
I am unable to do so, main program loads and completes the execution before the pagecomplete_event is loaded. The scenario is:
- load a component provider website
- go to the search option and search for the part number which I am reading for a EXCEL file
- put the part number in the search bar and click search
- download the details
- repeat the steps for MANY parts
I have done this with WinForms, and it works well. The problem is calling DOEVENTS
. It sometimes makes my program hang, especially if operating on a big list. So wanted to do it in WPF.
I have put the Load_Complete
event, but as I mentioned, it comes to that event after the main program has finished.
I searched and got this link: How to create and use WebBrowser in background thread. But it doesn't seem to help - there seems to be no System.Windows.Deployment
in WPF - I get red squiggly underline. No other solutions that I have found seem to help, either.