My algorithm automatically fills metadata in a specific website (using webBrowser). After fill metadata the algorithm press the button send (in website) and it must wait a few seconds for metadata to be analyzed before contiune (this is not part of algorithm, but webpage). The problem is that i have no way to know when metadata analsys finish. I try the next code, which is used to wait for fully loaded webpage before continuing with the processes:
webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser1_DocumentCompleted);
But it's useless becuse metadata analysis is not related to webpage loading.
So, because metadata analysis takes about 20-40 seconds i think that wait about 60 seconds and continue is a good solution. I try:
System.Threading.Thread.Sleep(60000);
After programmatically press button "send", but for anyreason this wait for 60 seconds before button is pressed.