The JS Browser Driver is a Node.JS project originally aiming to simplify writing and running automated UI tests in JS but with the latest development it is now able do much more - it can also run tests inside node.js and in fact is able to manage the execution of code for arbitrary purposes.

Within the conf.json config file, you need to provide an absolute link to each browser. Predictably, this isn't particularly easy as there can be various conflicts with browser windows that are already open. We have gone through this pain many times, so here's a guide for the major browsers:

Chrome

Thankfully Chrome is relatively straightforward, you just need to direct the user data to temp.

- **OS X**
With Firefox, you unfortunately need to create a new profile first, via their Profile Manager. You can do this through the settings, or from the command line you pass the `-ProfileManager` switch to the executable. Lets assume that the profile name you allocate is something really original like "test":
{
"name":"Firefox",
"app":"/Applications/Firefox.app/Contents/MacOS/firefox",
"args":["-P test"]
}
- **Windows**
{
"name":"Firefox",
"app":"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",
"args":[]
}

Ok, so enough with all the waffle, lets run some pre-baked tests included in the project! Depending on how your npm is set up, you need to direct the browser driver to the location of the example tests config file. Before you try to action this, please ensure that you have set up at least 1 browser inside that config file - see above for the gory details.

Ok, so in this example, we will fire up the BrowserDriver on OS X, by pointing to the example tests config:

Time to go to the location it tells you in the above message, http://localhost:8090/manager/manager.html, and see the shiny manager page. From here, you can select the browser(s) that you set up and connect to, pick the tests you want to run, and you will see the feedback in real-time in the console.