CasperJS on Ubuntu linux can be installed using apt-get or node npm. We’ll use npm to install casperjs in this tutorial. Here are the steps to install casperjs on Ubuntu Linux.
- First install node and npm on Ubuntu if not already installed.
-
Get info about casperjs package
$ npm info casperjs { name: 'casperjs', description: 'A navigation scripting & testing utility for PhantomJS and SlimerJS', 'dist-tags': { latest: '1.1.0-beta5' }, versions: [ '1.1.0-beta2', '1.1.0-beta3', '1.1.0-beta4', '1.1.0-beta5' ], maintainers: [ 'istr
', 'n1k0 ' ], ... ... -
Install casperjs using npm in global mode
$ sudo npm install -g casperjs $ npm ls -g casperjs $ npm ls -g | grep casperjs ├── casperjs@1.1.0-beta5
-
Check if casperjs is working
$ casperjs --version 1.1.0-beta5
-
Check where is casperjs installed
$ which casperjs /usr/bin/casperjs $ ls -l /usr/bin/casperjs lrwxrwxrwx 1 root root 41 Jan 23 09:53 /usr/bin/casperjs -> ../lib/node_modules/casperjs/bin/casperjs