How to use PhantomJS 2.0



The docs would indicate that following is more than sufficient for running 2.0

The below is using the Travis distribution which is a temporary build TravisCI created to support phantom on linux machines.

    version: 4.1.1
     - curl -k -L -o phantomjs.tar.bz2
     - tar -jxf phantomjs.tar.bz2

But this leads to 1.9.8 still being used. I’ve tried various means of extracting it into a specific directory and then setting an environment variable, but that hasn’t worked either. Has anyone gotten PhantomJS 2.0 to run with CircleCI?

Add PhantomJS 2.1.1 to the platform
Using PhantomJS 1.9.8 in an Ubuntu 14.04 (Trusty) build environment
Stripe tests are failing with "A network error has occurred, and you have not been charged"

Hi there,

We have our own version of this that you can use by adding the following to your circle.yml:

    - sudo apt-get update; sudo apt-get install libicu52
    - curl --output /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
    - chmod a+x /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
    - sudo ln -s --force /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic /usr/local/bin/phantomjs

You may still see 1.9.8 in the test output, but checking the version using the phantomjs --version command should still show the version as 2.0.1-development.

If this solves your problem, please mark this thread as solved by clicking on the checkbox below.