How I can set viewport size in PhantomJS? I tried to set it using window.callPhantom
:
window.callPhantom('page.viewportSize = { width: 480, height: 800 };')
as suggested here: https://github.com/mmanela/chutzpah/issues/355, but this doesn't seem to work, because later window.innerHeight
still shows 300px (this is the default height of viewport in PhantomJS)