Click a button with a span class

0

I'm trying to click on this link (to the side of it there's an icon with a download button) "Save / Print this bill (pdf)

I appreciate any help, as this is the final steps and thank you in advance.

I tried:

($ie.Document.IHTMLDocument3_getElementByID(‘save_desktop’) | select -first 1).click()

($ie.document.getElementById("save_desktop") | select -first 1).click()

From the DOM explorer:

> <span class="tip ng-binding" id="save_desktop" style="color: black
> !important;">Save / Print this bill (PDF)</span>
> 
> <i class="cus-icon-download"></i>   (This is the button beside the
> link as well which would give the drop down options)

Error in PS:

($ie.document.getElementById("save_desktop") | select -first 1).click() Exception from HRESULT: 0x800A01B6 At line:2 char:1 + ($ie.document.getElementById("save_desktop") | select -first 1).click ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], NotSupportedException + FullyQualifiedErrorId : System.NotSupportedException

html
powershell
asked on Stack Overflow Oct 4, 2019 by avij4 • edited Oct 4, 2019 by avij4

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0