2014-11-01 186 views
0

我使用這個blog post提供的代碼捕獲角頁面的快照,但是當我嘗試運行phantomjs:找不到命令

./make-snapshot.sh http://localhost:5757/#!/home 

我得到的錯誤

phantomjs: command not found 

下面是該文件的內容:

U=$1 
P=$(echo "$U" | perl -MURI -le 'chomp($url = <>); print URI->new($url)->fragment') 
final_url=$U 
P=${P:1} 
final_path=./snapshots$P.html 
phantomjs .phantomjs-runner.js $final_url > $final_path 

更多細節在這個page

phantomjs作品在我的終端

enter image description here

回答

0

上的問題是,當我克隆此回購,它永遠不會下載的文件.phantom-runner.js。

它現在有效!