Skip to content

Instantly share code, notes, and snippets.

@prakhar1989
Last active August 29, 2015 14:03
Show Gist options
  • Save prakhar1989/9b1a38d1644a872f81e8 to your computer and use it in GitHub Desktop.
Save prakhar1989/9b1a38d1644a872f81e8 to your computer and use it in GitHub Desktop.
Sparkfun
var casper = require('casper').create();
var home_url = "https://applications2.almullagroup.com/onlineremit/faces/infrastructure/EXLogin.jspx";
var rate;
var sparkfun_url = "https://data.sparkfun.com/input/XCVB?private_key=ABCD&INR="
casper.start(home_url);
casper.waitForSelector("form#form1");
casper.then(function() {
this.fill('form[name="form1"]',{ 'showrate' : '2'});
this.click('input[type=submit]')
});
casper.then(function(){
var rate = this.getHTML('tr:nth-child(4) td:nth-child(4) span');
this.echo("AMX REMIT RATE - Rs." + rate);
this.open(sparkfun_url + rate);
});
casper.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment