Skip to content

Instantly share code, notes, and snippets.

@DanielVartanov
Created April 18, 2011 08:56
Show Gist options
  • Save DanielVartanov/925029 to your computer and use it in GitHub Desktop.
Save DanielVartanov/925029 to your computer and use it in GitHub Desktop.
var zombie = require("zombie");
var assert = require("assert");
// Load the page from localhost
zombie.visit("http://localhost:3000/", function (err, browser, status) {
// Fill email, password and submit form
browser.
fill("session[email]", "[email protected]").
fill("session[password]", "123456").
pressButton("Sign in", function(err, browser, status) {
console.log(browser.html());
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment