I want to click on this element.
<a href="/game.php?vil=9&screen=settings&action=sitter_login&player=305&h=417c13fb" target="_blank" class="btn">ini</a>
There are other elements, just like that where only the href changes. I can correctly find the element I want. But cannot click it... I tried the usual click() but didn't work:
document.getElementsByClassName("btn")[1].click()
Any help?
I tried this, it opens the same window, but I want to open in a new tab. I also put the internet option to open tabs with popups:
b=document.getElementsByClassName("btn")[1].href;
window.location.assign(b, '_blank');
How to open in new tab? I tried window.open() but never got to make it work:
window.open(b, '_blank');