Невозможно нажать на кнопку, все, что я пробовал, не работает.
$ie.Document.IHTMLDocument3_getElementByID("save_desktop").click()
и
$Link=$ie.Document.getElementsByTagName("span") | where-object {$_.type -eq "Save / Print this bill (PDF)"}
$Link.click();
и
$ie.Document.IHTMLDocument3_getElementByID('save_desktop') | select -first 1).click()
Требуется первая часть, но ей не нравится .click, я пробовал .submitкроме того, кажется, что ничего не работает!
<span class="tip ng-binding" id="save_desktop" style="color: black
!important;">Save / Print this bill (PDF)</span>
Ошибки:
Вы не можете вызвать нулевое выражение
Ошибка вызова метода, поскольку [System.DBNull] делаетне содержит метод с именем «нажмите». В строке: 1 символ: 1 + $ ie.Document.getElementById ('save_desktop'). Нажмите ()
Я добавил дополнительную информацию:
> <span class="print-save-pdf-link ng-scope"
> ng-click="bbTrackData('events',true,'bill:save:print this bill')"
> tooltip-trigger="click" tooltip-placement="bottom-left"
> tooltip-html-unsafe="<div
> class="downloadPdfEbuText">Download:</div><div
> class="d-iflex"><i
> class="cus-icon-rogers_overlay-arrow-circle"></i><span
> onclick="downloadCompleteBill('14161234567-123456789')"
> class="downloadPdfEbuLink-rogers">Complete
> bill</span></div><div class="d-iflex"><i
> class="cus-icon-rogers_overlay-arrow-circle"></i><span
> onclick="downloadAccountSummary('1-1234-5678','24092019')"
> class="downloadPdfEbuLink-rogers">Account
> summary</span></div>"><i class="cus-icon-download"></i><span
> class="tip ng-binding" id="save_desktop" style="color: black
> !important;">Save / Print this bill (PDF)</span></span>