I know it\'s possible to arbitrarily crop a screenshot in PhantomJS, using page.clipRect()
:
page.clipRect = {
top:
Anything you run inside page.evaluate
is not available from the outside world, the execution is sandboxed and confined with the page context. In order to have it available, make it as a return value and then you can access it.
Take a look at PhantomJS included pizza.js
where the list of the pizzeria is returned back the caller.