title: Post to facebook group with C# code
body: <p>I am working on a windows application where I embedded webbroswercontrol. I am trying to post sample message to a open facebook group. I am unable to change value of a textbox with c#.     When ever I automate click it says textbox value is null. What would be the fix?</p>
  
  <hr>
  
  <pre><code>&lt;input type="hidden" autocomplete="off" class="mentionsHidden" 
                                   name="xhpc_message" value="lklklkl"&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>HtmlElement textBox = this.FindControlByName("xhpc_message", 
                                                this.webBrowser.Document.All);
  
  //Click Code
  var elements = webBrowser.Document.GetElementsByTagName("button");
  foreach (HtmlElement element in elements)
  {
      // If there's more than one button, you can check the
      //element.InnerHTML to see if it's the one you want
  
  
      if (element.InnerText.Contains("Post"))
      {
          if (textBox.InnerText.Trim() == "Write something...")
          {
              textBox.Focus();
              textBox.GetAttribute("value").Equals("Test Message");
              IHTMLElement nativeElement = element.DomElement as IHTMLElement;
              nativeElement.click();
              break;
          }
  
      }
  }
  </code></pre>