I am trying to program in Excel VBA with selenium to click on a button but the web (http://app.bde.es/rss_www/) has two buttons with the same "Type" and "Class".
<input type="button" class="boton" value="Consultar en PDF" onclick="irAConsulta(document.getElementById('entidad').value, document.getElementById('objetivo').value, document.getElementById('paisRegistro').value, document.getElementById('sector').value, document.getElementById('ejercicio').value, document.getElementById('dimension').value, document.getElementById('pais').value, '0');">
<input type="button" class="boton" value="Consultar en EXCEL" onclick="irAConsultaExcel(document.getElementById('entidad').value, document.getElementById('objetivo').value, document.getElementById('paisRegistro').value, document.getElementById('sector').value, document.getElementById('ejercicio').value, document.getElementById('dimension').value, document.getElementById('pais').value, '0');">
I need to click on the second one to download the data in Excel.
If I type :
OBJ.FindElementByClass("button").Click
This Clicks on the first one (the PDF), how can I click on the second one for the excel data?