I have been using the following code to determine when my webpage has finished loading, however, it seems like there might be an issue. It appears that the Angular components are not yet executed even when the document.readyState is complete:
page.open(url, function (status) {
function verifyReadyState() {
setTimeout(function () {
var readyState = page.evaluate(function () {
return document.readyState;
});
if ("complete" === readyState) {
// onPageReady();
doRender();
} else {
verifyReadyState();
}
});
}
verifyReadyState();
});