Powershell: How to press a button on a URL if you don't know the button ID
I'm trying to fill in my username and password on a certain URL and then
the press the "sign-in" button, all automatically via Powershell.
The problem is that I cannot find the ID of the sign-in button in the html
source code.
I have tried to use the command:
$link = $ie.Document.getElementsByTagName('A') | where-object
{$_.innerText -match 'sign in'}
but this didn't worked either.
Any thoughts which PS command to use if I want to press the 'sign in' button?
The HTML code is as follows:
Sign in or create a new account What is your email address? Email: Do you
know your password? No, I don't know my password or I'm new . Yes, my
password is: Sign in Cancel Stay signed in Would you like to reset your
password? Choosing yes will reset your password and email a temporary
password to: Yes No
No comments:
Post a Comment