Firefox

This module is a browser plugin for DalekJS. It provides all a WebDriverServer & browser launcher for Mozilla Firefox & Firefox OS.

The browser plugin can be installed with the following command:


 $ npm install dalek-browser-firefox --save-dev
 

You can use the browser plugin by adding a config option to the your Dalekfile


 "browser": ["firefox"]
 

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


 $ dalek mytest.js -b firefox
 

Dalek looks for the browser in the std. installation directory, if you installed the browser in a different place, you can add the location of the browser executable to you Dalekfile, because Dalek isnʼt capable of finding the executable yet on its own.


 "browsers": [{
   "firefox": {
     "path": "~/Apps/FirefoxNightlyDebug.app/Contents/MacOS/firefox-bin"
   }
 }]
 

The Firefox plugin only implements a subset of Dalekʼs assertions & actions, so if you run into any bugs, the issue is most probably related to missing commands. Please report any issues you find, Thank you :)

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


 "browsers": [{
   "firefox": {
     "port": 5555 
   }
 }]
 

It is also possible to specify a range of ports:


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

If you would like to test Nightly, Aurora oder Firefox OS releases, you can simply apply a snd. argument, which defines the browser type:


 $ dalek mytest.js -b firefox:aurora
 

for Firefox Aurora, and if you would like to use the Firefox OS, just append :os:


 $ dalek mytest.js -b firefox:os
 

This will only work if you installed your browser in the default locations, if the browsers binary is located in a non default location, you are able to specify its location in your Dalekfile:


 "browsers": [{
   "firefox": {
     "binary": "/Applications/Custom Located Firefox.app/MacOS/Contents/firefox-bin" 
   }
 }]
 

This also works for the aurora & Firefox OS builds


 "browsers": [{
   "firefox:aurora": {
     "binary": "/Applications/Custom Located Firefox Aurora.app/MacOS/Contents/firefox-bin" 
   }
 }]