I have 2 questions, both regarding clicking via js.
So I am on a site and I wish to automate a physical click on 2 buttons, I learned that if we getElementbyId.click() we can do this. But both these buttons do not have an ID. I tried coordinate clicking and it doesn't work and also by the class but to no avail.
<td data-pick="red" class="red" rowspan="2"></td>
How do I click on this?
and also
<button type="submit" class="btn btn-default btn-success">GO</button>
and this.
document.getElementsByClassName doesn't work :(
document.getElementsByClassNamedoesn't work? If you calldocument.getElementsByClassName('red')you'll get a collection which contains the<td>.click()on theHTMLCollectionwhich is returned. It has to be iterated over. Even if there's only 1 element.idor anamefor the elements?