Skip to content

Instantly share code, notes, and snippets.

@bsdmad
Created July 21, 2013 03:50
Show Gist options
  • Save bsdmad/6047395 to your computer and use it in GitHub Desktop.
Save bsdmad/6047395 to your computer and use it in GitHub Desktop.
PhantomJS のサンプルコードを少しいじって。 viewportSize がブラウザの想定サイズ、clipRect で切り取る画像のサイズ(基準点)を指定する。 Selenium-driver を使う方法では画像サイズの指定方法が分からなかったので、こっちにしよう!
(snip)
page.viewportSize = { width: 1024, height: 768 };
page.clipRect = { top: 0, left: 0, width: 981, height: 2000 };
(snip)
@bsdmad
Copy link
Author

bsdmad commented Jul 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment