May 18, 2020 at 1:50 pm #228958ParticipantTopics: 1Replies: 0Points: 12Rank: Member
This may be a bit of an advanced topic/question but I am trying to figure out how to click on a download button on a website but the issue is the elementID changes based on the file name each time. I also need to figure out how to do this for more than 1 file and then lastly how to save as to my download folder when that question pops up. I have made great progress getting to the download button. I hope to insert 3 images here to show the issue-source code and the webpage with the blue download button, the save as image, and my powershell commands so far to get there. Thank you for any pointers/ideas/assistance as I am still learning how to do website commands in powershell.
May 18, 2020 at 10:10 pm #229083ParticipantTopics: 12Replies: 1622Points: 2,560Rank: Community Hero
ccgll0152, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.
When you post code, error messages, sample data or console output format it as code, please.
In the “Text” view you can use the code tags “PRE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
Thanks in advance.
(body) (div id='div1')Blah(/div) (div id='div2') (div id='buttons') (button type="button")Download(/button) (/div) (/div) (/body)
The best you can do is try to narrow the objects down. For instance, you could GetElementById(‘div2’), then GetElementByTagName(‘button’) and then foreach $_.Click()
- This reply was modified 2 weeks ago by Rob Simmers.
- You must be logged in to reply to this topic.