Installation

Installation

Video provided by our community member @ontytoom.

Local Installation

CodeceptJS can be installed via NPM, together with a suitable driver to connect to the browser:

npm install --save-dev codeceptjs webdriverio
# or
npm install --save-dev codeceptjs protractor
# or
npm install --save-dev codeceptjs puppeteer
# or
npm install --save-dev codeceptjs nightmare

then it can be started as

./node_modules/.bin/codeceptjs

Local installations are easier to reproduce on other machines. This is useful on CI/Build servers that should install all the needed tools automatically.

WebDriver

WebDriver based helpers like WebDriver, Protractor, Selenium WebDriver will require Selenium Server or PhantomJS installed. They will also require ChromeDriver or GeckoDriver to run corresponding browsers.

We recommend to install them using an NPM package:

Selenium Standalone will install and run Selenium, ChromeDriver, Firefox Driver with one package.

npm install --save-dev codeceptjs webdriverio
[sudo] npm install -g selenium-standalone
selenium-standalone install
selenium-standalone start

This installs Selenium globally, which makes the selenium-standalone command available in the PATH.

Note that Selenium is Java based, so you may need to install or update that first.