Created
July 21, 2013 03:50
-
-
Save bsdmad/6047395 to your computer and use it in GitHub Desktop.
PhantomJS のサンプルコードを少しいじって。
viewportSize がブラウザの想定サイズ、clipRect で切り取る画像のサイズ(基準点)を指定する。
Selenium-driver を使う方法では画像サイズの指定方法が分からなかったので、こっちにしよう!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(snip) | |
page.viewportSize = { width: 1024, height: 768 }; | |
page.clipRect = { top: 0, left: 0, width: 981, height: 2000 }; | |
(snip) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://havelog.ayumusato.com/develop/javascript/e520-revealjs_screenshot_by_phantomjs.html とか、色々参考になるなぁ。