jxson
10/12/2011 - 1:04 AM

zombie-example.js

// less.js, modernizer, and almost all dymanic content seems broken :(
var zombie = require("zombie")
  , assert = require("assert")
;

var jxson  = new zombie.Browser();
var darthburrit0 = new zombie.Browser();
var url = 'http://localhost:8080/simple-chat/index.html';
// var url = 'http://localhost:8080/stylesheets/master.less';

jxson.visit(url, function(err, browser){
  // if (err) throw err;

  // console.log('args', browser);
  browser
    .fill('nick', 'jxson')
    .pressButton('Join →', function(err){
      console.log('heyo', browser.html('.messages'));
    });
});

darthburrit0.visit(url, function(err, browser){
  // if (err) throw err;

  // console.log('args', browser);
  browser
    .fill('nick', 'darthburrit0')
    .pressButton('Join →', function(err){


      setTimeout(function(){
        console.log('heyo', browser.html('body'));

      }, 500)
    });
});