I am trying use selenium VBA to download file. However, it cannot work by using FindElementsByXPath()
. Below codes were tried, but failed:
driver.FindElementByLinkText(" Download all").Click
driver.FindElementsByXPath ("//span[contains(text(),'Download all')]")
driver.FindElementsByXPath("//span[@class='mat-button-wrapper']//span[contains(text(),'Download all')]").Click
driver.FindElementsByXPath("//button[@mat-raised-button='mat-focus-indicator mat-raised-button mat-button-base mat-primary']").Click
driver.FindElementsByXPath("//button[@class='mat-focus-indicator mat-raised-button mat-button-base mat-primary' and text()='Download all']").Click
Snapshot of the HTML: