In VBA I wondered if this possible to click on this HTML button without Id and Name attribute :
<ul aria-hidden="false" role="menu">
<li>
<button ..></button>
</li>
<li>
<button ..></button>
</li>
<li> <!-- THE THIRD li, I would like to access this button -->
<button title="exporter" role="menuitem" data-ng-disabled="myfunction()">my text</button>
</li>
</ul>
For other elements with Id or a Name, here is how I do :
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "site.com"
IE.document.getElementById("submitBtn").Click
// IE.document.getElementByName("submitBtn").Click
but in my previous example there is no "Id" or "Name" available, only a Title attribute for the button, is there any possibility to access this button ?
Any idea ?
Another way I tried but also not working :
the goal is to click the button, so I tried to execute directly "myfunction()", like this :
IE.document.parentWindow.execScript "myfunction()", "Javascript"
btu I get an execution error (error 80020101).. any idea ?