Rahul Dagli
Rahul Dagli

Reputation: 4502

Unable to capture screenshot greater than screen height

I'm looking to capture a 5000px long screenshot. But after capturing, it only captures content that is equal to the height of my desktop screen height which is 1080px and rest is blank.

casper.viewport(1024, 5000);

enter image description here

Upvotes: 0

Views: 370

Answers (1)

mildog8
mildog8

Reputation: 2154

Make sure you set up your Casper options correctly. Look at their documentation at http://docs.casperjs.org/en/latest/modules/casper.html#index-1.

It appears there is a secion on viewport size here http://docs.casperjs.org/en/latest/modules/casper.html#viewportsize. From the docs: PhantomJS ships with a default viewport of 400x300, and CasperJS won’t override it by default.

Upvotes: 0

Related Questions