検証環境
OSX 10.9.4
Github Page
Github
使い方(テストケース)
セットアップ
Phantom.jsをインストールする
$ sudo brew update && brew install phantomjs
少し時間がかかる
npmをインストールする
$ brew install npm
nightmareをインストールする
$ npm install --save nightmare
デモ
demo.jsを作成
demo.js
var Nightmare = require('nightmare');
new Nightmare()
.goto('http://google.co.jp')
.screenshot('./google.png')
.run();
実行
$ node ./demo.js
スクリーンショットを確認する
$ open ./google.png