▲ JavaScript for people who hate JavaScript at zachholman.com▼2 up and 1 down, posted by fcambus 2661 days ago 1 comment
hborja@cifraseg.net.ec 2462 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();}); });