I know there are others more versed in programming and powershell. However,
I enjoying sharing the small victories slower folks, like myself. achieve.
You may run across a website that will throw you right back to the logon
form when you submit your credentials. In that case, view the source of the
file and look for an onsubmit action within the HTML form tag. If you find
one present, modify your code to use the fireEvent method.
This worked for me.
Also, HTML element names are case-sensitive. Powershell kept throwing up
on me for simple syntax errors. I was trying to push data into a field named
h1, but referring to it with "H1". The two are different. Us weekend coders
sometimes need to be reminded of that.