title: Detecting Javascript html page modification in VB.NET Webbrowser control
body: <p>My VB.NET code is supposed to execute third party Javascript code in an attempt to fill in and submit a form. This process consists of five steps, and I have been able to submit the form when all the steps are kept separate (i.e. behind 5 separate consecutive button clicks). Now, what I'd like to have is one button to handle all the five steps.</p>
  <p>The problem is that the form originally only appears after calling &quot;webbrowser.Navigate&quot; command, which apparently modifies the page's HTML code. I seem to be unable to detect when Javascript has finished loading the new HTML in order to fill and submit the form. I have tried a timer control to wait for a certain HTML element ID to appear, but in vain.</p>
  <p>This question has been asked before in different forms, but at least I could not find much help from the earlier answers:</p>
  <p><a href="https://stackoverflow.com/questions/1912678/invalidcastexception-with-webbrowser-isbusy-or-readystate-vb-net">InvalidCastException with WebBrowser.IsBusy or ReadyState (VB .NET)</a></p>
  <p><a href="https://stackoverflow.com/questions/1454451/detect-when-ajax-changes-html-in-a-div-in-webbrowser">Detect when AJAX changes HTML in a DIV in WebBrowser</a></p>
  <p><a href="http://www.techtalkz.com/vb-net/374234-vb-net-webbrowser-control-how-capture-javascript-events-statusbar-changed-mouseclick-etc.html" rel="nofollow noreferrer">http://www.techtalkz.com/vb-net/374234-vb-net-webbrowser-control-how-capture-javascript-events-statusbar-changed-mouseclick-etc.html</a></p>
  <p>Please help me.</p>