I want to run a Python script using Selenium WebDriver
with PhantomJS
as a headless browser on my Raspberry Pi running Raspbi
Here's how I did it :
For 64-bit system, download phantomjs-1.9.7-linux-x86_64.tar.bz2 (12.6 MB).
For 32-bit system, download phantomjs-1.9.7-linux-i686.tar.bz2 (12.9 MB).
Step 1> $ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
Step 2> $ tar -xvf phantomjs-1.9.7-linux-x86_64.tar.bz2
Step 3> $ cd phantomjs-1.9.7-linux-x86_64
Step 4> $ cd bin
Step 5> $ sudo cp phantomjs /usr/bin
To check phantomjs installed properly perform the following step :
Step 6> $ phantomjs -h
To install the dependencies on Red Hat based systems:
Step 7> $ sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6