I want to write some automation to website. Simply filling in forms and simulating clicks on elements. But for some elements JavaScript function click() doesn't work. For example it is on this page: http://www1.plus.pl/bsm/ If I do click() on "Wyślij" button, nothing happens. It is my command:
document.getElementsByClassName('tab-button')[0].click()
What is wrong? Why on other elements this function works?
[0]
might not work if it's not an array. – Prerequisite