API Docs for: 0.0.4
Show:

DalekJS Module

Defined in: index.js:34

This module is a browser plugin for DalekJS. It provides a browser launcher as well the PhantomJS browser itself.

The browser plugin comes bundled with the DalekJS base framework.

You can use the browser plugin beside others (it is the default) by adding a config option to the your Dalekfile:

"browser": ["phantomjs", "chrome"]

Or you can tell Dalek that it should test in this & another browser via the command line:

$ dalek mytest.js -b phantomjs,chrome

The Webdriver Server tries to open Port 9001 by default, if this port is blocked, it tries to use a port between 9002 & 9091 You can specifiy a different port from within your Dalekfile like so:

"browsers": {
  "phantomjs": {
    "port": 5555 
  }
}

It is also possible to specify a range of ports:

"browsers": {
  "phantomjs": {
    "portRange": [6100, 6120] 
  }
}

If you would like to use a different Phantom version than the one that comes bundled with the driver, your are able to specify its location in your Dalekfile:

"browsers": {
  "phantomjs": {
    "binary": "~/bin/phantomjs" 
  }
}

If you would like to preserve the ability to use the bundled version, you can also add an additional browser launcher in your Dalekfile.

"browsers": {
  "phantomjs:1.9.1": {
    "binary": "~/bin/phantomjs" 
  }
}

And then launch it like this:

$ dalek mytest.js -b phantomjs:1.9.1

This module provides the following classes: