How do I submit one of many submit buttons on a page?
I am very new to powershell, so apologies for what is probably a very basic question.
I have a web page with many (identical looking) submit buttons representing various items. Any advice / pointers on how I can automate the execution of a particular button based on specific hidden attributes would be gratefully appreciated. I am currently using $ie to automate the actions, so I can see exactly what is happening.
not sure what happened to the code I posted, so I have put it on gist
There is no code in your post.
Secondly, all elements on a web page have a unique ID, Name, other identifier. That is what you look for to interact with.
You have to have the source of the page or you just enumerate the form object to get what you are after, in most cases.
$R = Invoke-WebRequest https://www.facebook.com -SessionVariable FB
$Form = $R.Forms
If you are really new, it is vital you take a few online no cost courses to get a baseline.
Learn PowerShell: Microsoft Virtual Academy – Getting Started with Microsoft
Windows PowerShell Survival Guide
And start with lots of examples.
Thanks for replying. Not sure what happened to the code, so now on gist.
I am on with the courses – thanks
looking at the htmml I have posted, I don't see any ID's for me to act on. Therefore, how can I identify the correct submit button to action, based on for example the category_id?
If you open the site in google chrome and use the developer tools Ctrl + Shift + I when you click on the button you should see the code behind it, enabling you to determine the buttons ID
You must be logged in to reply to this topic.