Is it possible to use PhantomJS\'s rendering to PDF capabilities when PhantomJS is being used in combination with Selenium and Python? (ie. mimic page.ren
@rejected, I know you mentioned not wanting to use subprocesses, but...
You may actually be able to leverage subprocess communication more than you anticipated. Theoretically, you could take Ariya's stdin/stdout example and extend it to be a relatively generic wrapper script. It might first accept a page to load, then listen for (& execute) your test actions on that page. Eventually, you could kick off the .render or even make a generic capture for error handling:
try {
// load page & execute stdin commands
} catch (e) {
page.render(page + '-error-state.pdf');
}