title: Powershell to automate IE | fill Paiement form issue
body: <p>I'm just starting to use powershell scripts.</p>
  <p>I am trying to automate a payment process (for personal use).</p>
  <p>But when I enter my payment information via my script the information is not saved on the page (the data acts as a placeholder)</p>
  <p>I tried to use a &quot;focus()&quot; before entering the values but it doesn't work :(
  (maybe a bad use ?)</p>
  <p>I had the idea to simulate an &quot;ENTER&quot; key press after entering my values but I feel like I'm misusing the syntax</p>
  <p>Here is an example of my code:</p>
  <pre><code>$cardnumber = &quot;4000 1000 2000 0000&quot;
  $nameoncard = &quot;Alban Mysteriousguy&quot;
  $expirationdate = &quot;10/77&quot;
  $ccv = &quot;420&quot;
  $ie = New-Object -COMObject InternetExplorer.Application
  $ie.visible = $true
  $ie.Navigate(‘https://secure2.ldlc.com/fr-fr/DeliveryPayment’)
  #Achat CB 
  while ($ie.Busy -eq $true) { Start-Sleep -Seconds 1; }    #wait for browser idle
  
  #notworking
  $Carednumbervar = $ie.document.getElementsByName(&quot;CardNumber&quot;)
  ($Carednumbervar |Select-Object -first 1).value = $cardnumber; 
  
  #working
  ($ie.document.getElementsByName(&quot;OwnerName&quot;) |Select-Object -first 1).value = $nameoncard; 
  
  #notworking
  ($ie.document.getElementsByName(&quot;ExpirationDate&quot;) |Select-Object -first 1).value = $expirationdate; 
  
  #notworking
  ($ie.document.getElementsByName(&quot;Cryptogram&quot;) |Select-Object -first 1).value = $ccv; 
  
  #working
  $payementButton = $ie.Document.getElementsByTagName('button') | Where-Object { ($_.ClassName -ceq 'button color2 maxi') }
  $CGV = $ie.Document.getElementsByTagName('label') | Where-Object { ($_.for -ceq 'terms') }
  $CGV.click
  #$payementButton.click()
  </code></pre>
  <p>If anyone have an idea about how can I solve this issue or just a trick that I can try, you are welcome :)</p>
  <p>Thanks by advance</p>
  <p>PS: To test the script you need to create an account to Ldlc.com, add something in your cart and go to the payment page ( <a href="https://secure2.ldlc.com/fr-fr/DeliveryPayment" rel="nofollow noreferrer">https://secure2.ldlc.com/fr-fr/DeliveryPayment</a> for exemple) if needed I can upload a video of the behavior.</p>
  <p>Edit: Here I made a youtube video to show my issue : youtu.be/pTbSWU_cudY</p>