I am writing a PowerShell script that launches a site in IE, authenticates and logs into the web page which is working fine.
Below (bottom of this) is the element in the web page but I can't seem to get the right combination in PowerShell to log out of the web page. I tried:
But that didn't work – tried just a .click and then tried .return but none of those worked. If anyone can point me in the right direction – I'd greatly appreciate it!
It depends entirely on how the web page is designed. Normally, click() is the right method. However, since here the element is defining a JS response to click(), you could potentially try just calling that JS directly. It's going to be tricky, though, and you might not be able to get it to work. The IE COM object just wasn't designed for this kind of manipulation, and the fact that it has to go through .NET Interop into PowerShell makes it even more difficult. IE just wasn't designed with this kind of automation in mind. If sending a click() to the element didn't work, then you may be stuck.
You must be logged in to reply to this topic.