Hi
You cannot access directly to the web content from your phantomjs script. You don't have a document object in your script.
So you have to use the evaluate() function to access to your button. Notice also that fireEvent is not a standard DOM function.
you should setTimeout instead of setInterval, because you want to do the snapshot only one time, isn't it?
And you must call phantom.exit() only at the end of your program. Here you exit before the snapshot is done....
var page = require("webpage").create();
page.open(homePage, function(status) {
var url = page.url;
console.log("Status: " + status);
console.log("Loaded: " + url);
page.evaluate(function(){
document.getElementById('btnStart').click();
}
setTimeout(function () {
page.render("speed.png");
phantom.exit();
}, 20000);
};
Laurent