I have this HTML:
<input type="submit" name="submit" value="Invoeren" accesskey="s" class="buttons"/>
I’d like to click() it. I can not change anything on the HTML-side. When I do getElementById("submit").click(), I get this:
>>> document.getElementById("submit").click();
Cannot convert 'document.getElementById("submit")' to object
Any hints?
Since you can’t edit the actual HTML (to add the id attribute), and you want this to be cross-browser, you could loop over all of the input elements and check the type and value attributes until it matches your submit button: