Echo JS 0.11.0

<~>

hborja@cifraseg.net.ec 171 days ago. link 1 point
var x = require('casper').selectXPath;
casper.options.viewportSize = {width: 1920, height: 974};
casper.on('page.error', function(msg, trace) {
   this.echo('Error: ' + msg, 'ERROR');
   for(var i=0; i<trace.length; i++) {
       var step = trace[i];
       this.echo('   ' + step.file + ' (line ' + step.line + ')', 'ERROR');
   }
});
casper.test.begin('Resurrectio test', function(test) {
   casper.start('https://autos.liberty.ec/');
   casper.waitForSelector("#btnAutoPersonal img",
       function success() {
           test.assertExists("#btnAutoPersonal img");
           this.click("#btnAutoPersonal img");
       },
       function fail() {
           test.assertExists("#btnAutoPersonal img");
   });

   casper.run(function() {test.done();});
});