Vba - webscraping using ng-click
The desired element is an Angular element you need to induce WebDriverWait for the elementToBeClickable and you can use either of the following Locator Strategies:
Using
FindElementByCss
:d.FindElementByCss("a[ng-click^='download']").click
Using
FindElementByXPath
:d.FindElementByXPath("//a[starts-with(@ng-click, 'download') and text()='download']").click
You can try with xpath
:
.FindElementByXPath("//*[@ng-click='download()']").Click
This is what attribute = value css selectors are for. You can target the ng-click
attribute by its value:
d.FindElementByCss("[ng-click='download()']").click