Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Casperjs script blocked on [phantom] Starting

When i run a casperjs script, my script is blocked on the console message [info] [phantom] Starting... I don't understand why.

My script

var casper = require('casper').create({
    verbose: true,
    logLevel: 'debug',
});

var login = '******@hotmail.fr';
var password = '*******';
var baseURL = 'http://fr.bazarchic.com/';


casper.start('http://fr.bazarchic.com/', function(){
    this.fill('form[action="/login/"', {
    'email' : login,
    'pass' : password
    }, true)
});

casper.then(function() {
    var pageTitle = this.evaluate(function(){
        return document.title;
    })
    this.echo(pageTitle);
});
like image 796
Hugo Avatar asked Feb 27 '14 11:02

Hugo


1 Answers

In fact, i simply forgot to put casper.run(); at the end.

like image 185
Hugo Avatar answered Sep 28 '22 01:09

Hugo