<td <td class="upgrade_building b_wall">
<a href="#" class="building_tooltip d_0" tooltip="<span class='icon header wood'></span> 801 <span class='icon header stone'></span> 1846 <span class='icon header iron'></span> 320<br />Población: 5<br />Tiempo de construcción: 3:12:01">10
</a>
</td>
I'm making a script to perform a autoclick on the element "building_tooltip d_0" contained within a "upgrade_building b_wall" I tried this code:
javascript:var list = document.getElementsByClassName("building_tooltip d_0");
for (var i=0; i<list.length; i++) list[i].click();
But in the DOM of the page there are other elements with "building_tooltip d_0" I do not want to run, I just want to run the "upgrade_building b_wall".
Can anybody help me?