2014-11-01 100 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。

它现在有效!