title: Getting HTML body content in WinForms WebBrowser after body onload event executes
body: <p>I have a WebBrowser control in WinForms whose URL property is set to an external webpage. I also have an event handler for the DocumentCompleted event. Inside this handler, I'm trying to get specific elements, but wb.Document.Body seems to capture the HTML before onload is executed.</p>
  
  <pre><code>{System.Windows.Forms.HtmlElement}
      All: {System.Windows.Forms.HtmlElementCollection}
      CanHaveChildren: true
      Children: {System.Windows.Forms.HtmlElementCollection}
      ClientRectangle: {X = 0 Y = 0 Width = 1200 Height = 0}
      Document: {System.Windows.Forms.HtmlDocument}
      DomElement: {mshtml.HTMLBodyClass}
      ElementShim: {System.Windows.Forms.HtmlElement.HtmlElementShim}
      Enabled: true
      FirstChild: null
      htmlElement: {mshtml.HTMLBodyClass}
      Id: null
      InnerHtml: "\n"
      InnerText: null
      Name: ""
      NativeHtmlElement: {mshtml.HTMLBodyClass}
      NextSibling: null
      OffsetParent: null
      OffsetRectangle: {X = 0 Y = 0 Width = 1200 Height = 0}
      OuterHtml: "&lt;body onload=\"evt_Login_onload(event);\" uitheme=\"Web\"&gt;\n&lt;/body&gt;"
      OuterText: null
      Parent: {System.Windows.Forms.HtmlElement}
      ScrollLeft: 0
      ScrollRectangle: {X = 0 Y = 0 Width = 1200 Height = 0}
      ScrollTop: 0
      shimManager: {System.Windows.Forms.HtmlShimManager}
      ShimManager: {System.Windows.Forms.HtmlShimManager}
      Style: null
      TabIndex: 0
      TagName: "BODY"
  </code></pre>
  
  <p><code>"&lt;body onload=\"evt_Login_onload(event);\" uitheme=\"Web\"&gt;\n&lt;/body&gt;"</code> is the pre-JavaScript content. Is there a way to capture the state of the body tag after <code>evt_Login_onload(event);</code> executes?</p>
  
  <p>I have also tried using <code>wb.Document.GetElementById("id")</code>, but it returns null.</p>