title: Dumbed down Powershell web client function to let me post form data easily
body: <p>Ive been using an Internet Explorer automation script found here:
  <a href="http://www.pvle.be/2009/06/web-ui-automationtest-using-powershell/" rel="nofollow">http://www.pvle.be/2009/06/web-ui-automationtest-using-powershell/</a></p>
  
  <p>That lets me easily post form data using commands (functions) like this:</p>
  
  <pre><code>NavigateTo "http://www.websiteURI/"
  SetElementValueByName "q" "powershell variable scope"
  SetElementValueByName "num" "30"
  SetElementValueByName "lr" "lang_en"
  ClickElementById "sb_form_go"
  </code></pre>
  
  <p>The above would let me post values to elements and click to submit the form.</p>
  
  <p>I would like to do the equivalent with Powershell's web client using helper functions.  I haven't found such a script.  The closest I could find was The Scripting Guys, <strong>Send-WebRequest</strong>:</p>
  
  <p><a href="http://gallery.technet.microsoft.com/scriptcenter/7e7b6bf2-d067-48c3-96b3-b38f26a1d143" rel="nofollow">http://gallery.technet.microsoft.com/scriptcenter/7e7b6bf2-d067-48c3-96b3-b38f26a1d143</a></p>
  
  <p>which I'm not even sure it does what I expect (since there's no working examples showing how to do what I want).</p>
  
  <p>Anyway, I'd really appreciate some help to get me started to do the equivalent of what I showed up there with working examples (as simple as possible).  A bonus would be to also be able to get a list of element names for a URI in order to know what form elements I want to submit.</p>
  
  <p>PS:  I also need to be able to specify user-agent and credentials; so, examples with these included would be ideal.</p>