title: How to get the value of an input box of the webbrowser control in WPF?
body: <p>I added Microsoft.mshtml as a reference to my project and came this far:</p>
  
  <pre><code>        mshtml.IHTMLDocument2 document = (mshtml.IHTMLDocument2)webbrowser.Document;
          string username = document.all["username"].GetAttribute("value");
  </code></pre>
  
  <p>but the 2nd line doesn't work. It says </p>
  
  <blockquote>
    <p><em>"error CS0021: Cannot apply indexing with [] to an expression of type
    'mshtml.IHTMLElementCollection'"</em></p>
  </blockquote>
  
  <p>when hovering over "all". How do I access the elements in all?</p>