title: powershell $ie.Document.getElementById("username").value="my username " error
body: <p>I want to automate a login form using powershell:</p>
  
  <pre><code>&lt;form method="post" class="login-form" name="loginForm" action="/Service/WebObjects/Service.woa/wo/0.15.7.3.1"&gt;
  &lt;label&gt;Username&lt;/label&gt;
  &lt;input maxlength="128" style="width: 240px;" type="text" name="username" /&gt;
  &lt;label&gt;Password&lt;/label&gt;
  &lt;input maxlength="64" style="width: 240px;" type="password" name="password" /&gt;
  &lt;input class="login-check-input" type="checkbox" name="rememberCheckBox" value="15.7.3.1.15" /&gt;
  &lt;label class="login-check-label" for="flag_stay_logged_in"&gt;Remember login&lt;/label&gt;&lt;br/&gt;
  &lt;noscript&gt;
  You need a JavaScript enabled browser to use this application.
  &lt;/noscript&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
  document.write('&lt;div class="buttonBar"&gt;&lt;input alt="Login" class="button" type="submit" value="Login" name="ButtonLogin" /&gt;&lt;/div&gt;');
  &lt;/script&gt;
  &lt;/form&gt;
  
  $ie=New-Object -comobject InternetExplorer.Application  
  $ie.visible=$true  
  $ie.ParsedHtml
  $ie.Navigate("https://livetime/Service/WebObjects/Service")  
  while($ie.busy){Start-Sleep 1}  
  
  $ie.Document.getElementById("username").value="my username "  
  $ie.Document.getElementById("password").value="my password " 
  $ie.Document.getElementById('ButtonLogin').click()  
  </code></pre>
  
  <p>After ran this script I get these errors:    </p>
  
  <pre><code>The property 'value' cannot be found on this object. Verify that the property exists and can be set.
  At line:7 char:1
  + $ie.Document.getElementById("username").value="mt username"
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException
  
  The property 'value' cannot be found on this object. Verify that the property exists and can be set.
  At line:8 char:1
  + $ie.Document.getElementById("password").value="my password "
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException
  </code></pre>
  
  <p>The examples from internet I found show that this script should work.</p>
  
  <p>Is there something that I can/should check (different/old version or settings)?</p>