I have some difficulties using the WebBrowser control which I don't seem to be able to overcome.
The problem is that there is no way to indicate when it has fully navigated on a webpage. It seems to do it by steps.
The only thing available seems to be the Navigated Event Handler. But it doesn't seem to work. It fires up twice but still the page is not fully loaded.
What I do is after the page loads I use the GetElementById() method to get what I want, but it doesn't always work.
I tried to use a while(..) loop with GetElementById() method and that part works. It waits until that element loads. Until here OK.
The thing is that I want to search also for elements that might not exist. I simulate a Search Engine search, so some elements will be missing depending on the search (like if there are no results or if there are no sponsored links).
The only thing I can think is to put a delay. I know that works, but it will slow a lot the whole search, where speed is kind of an issue. It is an issue because somebody might have a very fast or a very slow connection so there is no way to put a constant delay that will work for everybody