Lemme,
var interval = 5000;
setTimeout(function() {
var btn = document.createElement('button');
btn.innerHTML = 'button';
btn.onclick = function() {
alert('Click');
};
document.body.appendChild(btn);
}, interval);
document.addEventListener("DOMNodeInserted", function(e) {
if (e.target.tagName == 'BUTTON') {
alert('gotcha!');
e.target.click();
}
}, false);