Related: Powershell: Download or Save source code for whole ie page
The input fields I need to programmatically drive do not have an ID, so I'm trying to set them with the form name instead.
In the IE F12 developer console, this command works:
document.forms["loginForm"].elements["_ssoUser"].value = "someone's username"
But in PowerShell, this command fails:
$ie.document.forms["loginForm"].elements["_ssoUser"].value = "$username"
The error is "cannot index into a null array".