phantomjs + selenium headless test

时间:2014-06-13 07:32:47   收藏:0   阅读:305

1. 安装selenium

pip install selenium

2. 安装phantomjs

如果你是Ubuntu12.04,默认安装的版本是1.4.这个会出错。

需要安装1.9.7

bubuko.com,布布扣
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
bubuko.com,布布扣

 

phantomjs + selenium headless test,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!