I have a input type=text inputboxes on a webpage i load and fill with values and click the submitbutton which works fine:
$ie=New-Object -comobject InternetExplorer.Application
$ie.visible=$true
$ie.Navigate("https://myurl/test.html")
while($ie.busy){Start-Sleep 1}
$ie.Document.getElementById("field_firstName").value="Firstname"
$ie.Document.getElementById("field_lastName").value="Lastname"
$ie.Document.getElementById("btn_upload").Click()
while($ie.busy){Start-Sleep 1}
I'd also like to populate a input type=file box with c:\temp\test.txt and upload this. I read that because of security reasonse the value= is not supported from the browsers.
Is there any workaround to do this with powershell? Maybe "click" the browse button and select the file or use sendkey's ?