var Nightmare = require('nightmare'); new Nightmare() .goto('http://yahoo.com') .type('input[title="Search"]', 'github nightmare') .click('.searchsubmit') .screenshot('yahoo.png') .run(); var casper = require('casper').create(); casper.start('http://google.fr/', function() { this.fill('form[action="/search"]', { q: 'casperjs' }, true); }); casper.then(function() { this.capture('google.png'); }); c