I am playing around with web automation and have a problem.

I am clicking a "java button" (I think it is called that) and that button shows a "java window" (a window which doesn't require the whole site to reload). I need to wait for this window to show before I continue with the execution of the code, but since the whole page isn't re-rendering the webBrowser_DocumentCompleted doesn't execute.

I only need to wait like a second, maybe even 500ms will do. I tried with Thread.Sleep, but that paused the webbrowser rendering too so it failed.

Any good method to solve this?