soda: Selenium adapter for Node.js

Soda the latest project from LearnBoost, brings Selenium RC to Node.js.

Install Soda via npm

$ npm install soda

and with your Selenium server running you can run an example in your Node app with:

$ node examples/my_example.js

As with most everything Node, example actions are callback-driven:

browser.session(function(err){'/', function(err, body, res){
    browser.type('q', 'Hello World', function(err, body, res){


To keep your code from looking like a set of Matryoshka dolls, Soda supports chaining:

  .type('q', 'Hello World')
    if (err) throw err;

Testing in the cloud

With Saucelabs, you can even move your acceptance testing to the cloud:

var soda = require('soda')
  , assert = require('assert');

var browser = soda.createSauceClient({
    'url': ''
  , 'username': '<your username>'
  , 'access-key': '<your api key>'
  , 'os': 'Linux'
  , 'browser': 'firefox'
  , 'browser-version': '3.'
  , 'max-duration': 300 // 5 minutes

Keep an eye on the README and API docs for more advanced examples.

[Source on GitHub]


Sign in or join to comment

0:00 / 0:00