I'm using Phantomjs to examine my application. The page I am looking at includes a lot of components and is powered by Angularjs. My test server is slow. In the onLoadFinished
event, I am imaging the web page using render:
page.onLoadFinished = function(response) {
console.log(response, page.url);
if (page.url.indexOf("login") == -1) {
page.render('zoot.png');
phantom.exit();
}
};
My issue is that zoot.png
only includes the site's menu bar. The menu bar's text and static images are rendered but the icons are Xs. The main page area is blank. A textual version number appears in the lower right which is expected.
It looks like the page was not fully drawn when the render
happened. Is there another event that means "done and ready for use"?