I need to now how to fire a mouse click event on a button automatically. I have this but doesn't work :(
window.setInterval(function() { simulateClick(); }, 2000); function simulateClick() { var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", false, false, window, 0, 684, 571, 684, 508, false, false, false, false, 0, null); var a; a.dispatchEvent(evt); }
Thanks in advance
Oscar