This is my second question about clicking buttons in JavaScript but this one I’m really stuk on: I’m trying to click an image button with javascript however there’s not much to go on as the source only gives this information about the image button
<div id="claimBtnDv" style="bottom:-30px; position:absolute; right:0; margin-top:0;">
<input type="image" class="btnClaim" src="websitebuttonimage" onclick="alert('buttonclicked');">
</div>
I tried to do document.getElementById('claimBtnDv').click() but no success , are there other methods to use?
If you can’t change the HTML and you need to click the image using javascript, you can go into the child nodes to find the image. This is pretty easy since a class name is provided.