title: C# - Automatic Login to a webpage using WebBrowser - disabled html tag
body: <p>After some research on the WebBrowser DocumentCompleted issue, I've inserted my login attempt into the DocumentCompleted Event Handler.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
      {
          wb.Navigate("fooPage");
          var browser = (WebBrowser)sender;
  
          HtmlElement email = CookieReader.GetElement("email", browser);
          HtmlElement password = CookieReader.GetElement("pass", browser);
          email.SetAttribute("email", "foo@something.com");
          password.SetAttribute("pass", "foo");
          HtmlElement loginElement = CookieReader.GetElement("fooLog", browser);
          loginElement.InvokeMember("click"); //wb_DocumentCompleted Method Continues...
  </code></pre>
  
  <p>I didn't manage to login (double checked that I got the login button right). It seems that the problem is with the ReadyState property of the browser object. It's always loading, while the IsBusy property is always False. Also, the page was supposed to finish loading because the DocumentCompleted event fired. Any ideas how this even possible?</p>
  
  <p>Moreover, when debugging, the InvokeMember method changes the html INPUT element and a disabled tag appears (disabled=\"\" - which is HTML5 disabled="disabled" if I'm not mistaken). I don't know why this tag is added (wasn't there before), and if it's related in any way to the permanent Loading ReadyState of the page... insights and/or advises will be much appreciated! </p>