CasperJS Training
Trying to understand why the following does not display my results in the console ....
exit:
casperjs testcasper.js
[info] [phantom] Launching ... [info] [phantom] Launching dialing: 3 steps
the code:
var casper = require('casper').create({ loadImages: true, loadPlugins: true, verbose: true, logLevel: 'debug', }); casper.start(url, function() { this.debugPage(); this.echo("Test echo."); this.fill('form#LogonForm', { 'username': username, 'password': password, }, true); }); casper.then(function() { casper.echo("I'm loaded."); }); casper.run(function() { console.log(this.getCurrentUrl(),'info'); });
source share