var casper = require('casper').create();
var x = require('casper').selectXPath;
casper.userAgent('Mozilla/4.0 (compatable; MSIE 6.0; Windows NT 5.1)');
casper.start();
casper.then(function step1() {
this.echo('this is step two');
});
casper.thenOpen('https://www.iagcargo.com/iagcargo/portlet/en/html/601/main/search', function step2() {
this.echo('this is step 2 - IAG is open');
});
casper.then(function step3() {
this.echo('this is step Three');
this.sendKeys('#awb_cia','125');
this.sendKeys('#awb_cod','36486914');
});
casper.then(function step4() {
casper.click(x('//*[contains(text(),"'+SEARCH+'")]'));
waitForText('Booked on flight',function(){
this.echo('this is step five');
casper.capture('iag2.png');
});
});
require('utils').dump(casper.steps.map(function(step) {
return step.toString();
}));
casper.run();
var casper = require('casper').create();
var x = require('casper').selectXPath;
casper.userAgent('Mozilla/4.0 (compatable; MSIE 6.0; Windows NT 5.1)');
casper.start();
casper.then(function step1() { this.echo('this is step two');});
casper.thenOpen('https://www.iagcargo.com/iagcargo/portlet/en/html/601/main/search', function step2() { this.echo('this is step 2 - IAG is open');});
casper.then(function step3() { this.echo('this is step Three'); this.sendKeys('#awb_cia','125'); this.sendKeys('#awb_cod','36486914'); });
casper.then(function step4() {
this.echo('step 4') this.click(x('//*[@value="Search"]')); this.waitForText('Booked on flight', function(){