This topic contains 4 replies, has 3 voices, and was last updated by
February 14, 2018 at 5:21 pm #93636
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
February 15, 2018 at 12:48 am #93658ParticipantPoints: 1,141Rank: Community Hero
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 $Form.Fields
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.
February 15, 2018 at 8:40 am #93672
Thanks for replying. Not sure what happened to the code, so now on gist.
I am on with the courses – thanks
February 16, 2018 at 9:08 pm #93876
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?
February 19, 2018 at 9:08 am #94006ParticipantPoints: 69Rank: Member
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
The topic ‘How do I submit one of many submit buttons on a page?’ is closed to new replies.