Is there a way to trigger a callback from the loaded webpage? I used to use PhantomJS where it was possible using following code:
if (typeof window.callPhantom === 'function') {
window.callPhantom({ data: 'RenderPDF' });
}
And in the phantomjs script:
page.onCallback = function (data) {
/* callback code */
};