Using JavaScript I am atempting to simulate a click. This will be performed on a flash clip swf file. Using the following code. Here is what I have come up with.
countDown = 10;
var rollDice = setInterval(function() {
console.log(countDown);
if (countDown == 0) {
clearInterval(rollDice);
document.elementFromPoint(416, 825).click();
}
countDown--;
}, 1000);
With this code I get the following error: Uncaught TypeError: Cannot call method 'click' of null.