Reputation: 47
Having opened this link in Chrome, I get to the PDF file that opens in Chrome.
On this page there are buttons for downloading, printing, etc:
When viewing the page code, it does not display any information on the download and print buttons.
When I do view the code by hovering the mouse over the download icon, the code for this button opens, which is not available through a regular DOM.
As I understand it, you can use Shadow DOM here.
How do I access the download button and click it to the VBA?
Upvotes: 0
Views: 577
Reputation: 484
You could access the pdf by HTTP Request and save the data that way. The data is coming from the web, so it's going to be from a Request. You dont need chrome automated with VBA to do this action. Also Webdriver has good support: Downloading pdf file using WebRequests
idk if selenium has it, but i would search more if i were you and not use the DOM to download PDF by clicking elements.
Upvotes: 1