title: HtmlElement.InvokeMember, how wait until page loaded?
body: <p>In my C# application I use WebBrowser object to read HTML include postbacks. To read default page by getting page I use WebBrowserDocumentCompletedEventHandler, like:</p>
  <pre><code>WebBrowser wb = new WebBrowser();
  wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted);
  wb.Navigate(&quot;http://example.com&quot;);
  </code></pre>
  <p>then in that event I have a page:</p>
  <pre><code>private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
  {
      IsDocumentComplete = true;
      // here I can read the page
  }
  </code></pre>
  <p>So, that event fires every time when I call Navigate method, but when I get some element on the page, invoke postback, I need to wait again until page loads again:</p>
  <pre><code>button.InvokeMember(&quot;onclick&quot;);
  </code></pre>
  <p>In that case wb_DocumentCompleted doesn't fire.</p>
  <p>What is the way to know when page completely loaded.</p>