Skip to content

Instantly share code, notes, and snippets.

@gzmask
Created July 25, 2012 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gzmask/3178231 to your computer and use it in GitHub Desktop.
Save gzmask/3178231 to your computer and use it in GitHub Desktop.
[TypeError: Cannot call method 'call' of undefined]
var Browser = require("zombie");
var expect = require("expect.js");
browser = new Browser();
browser.visit("http://somedomain.com").
then(function () {
console.log("yo");
return fill("username", "monkeyeater").fill("password", "ispassed");
}).
then(function () {
return pressButton("input#loginbtn")
}).
then(function () {
// Form submitted, new page loaded.
expect(browser.success).to.be.ok();
expect(browser.text("title")).to.be("UR Courses");
}).fail(function(err){
console.log(err);
});
//[TypeError: Cannot call method 'call' of undefined]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment