I'm doing some exercises with CasperJS and I'm stuck in a pretty simple exercise.
I don't know if bestbuy.com website blocks the connection in some way. I've tried some different websites and they just work fine.
The Title is not printed on the console and the phantomjs task doesn't exit from the task.
Here you have the simple script:
var casper = require('casper').create({
verbose:true,
logLevel:'debug',
pageSettings:{
loadImages: true,
loadPlugins: false,
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'
}
});
var url = 'http://www.bestbuy.com/';
casper.start(url, function () {
this.echo(this.getTitle());
});
casper.run();
Can somebody, please explain what is this happening?
Thanks :)