The property 'Value' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\file.ps1:53 char:5
+ ($ie.Document.DocumentElement.getElementsByClassName('web-passwor ...
+ CategoryInfo : InvalidOperation: (:) , RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
I used this code earlier in the project and it worked correctly, granted this is to submit a button and not insert text.
So, here's the fun part about that ancient, deprecated, soon-to-be-discontinued Internet Explorer COM object: it sucks.
It's very possible that your Select-Object is changing things enough that .NET can no longer wedge everything through the Interop layer. I might do ....getElementByClassName('whatever') instead, 0 being the first item, followed by .value() or whatever.
But this kind of 'interactive page manipulation' is about the furthest thing from PowerShell's strengths, unfortunately. It truly is based on an outdated technology that hasn't received any improvements almost since before PowerShell was launched. So... it's tough to work with, for sure.
The topic ‘Unable to insert text in a textbox on a website using Powershell’ is closed to new replies.