Last active
August 29, 2015 14:03
-
-
Save prakhar1989/9b1a38d1644a872f81e8 to your computer and use it in GitHub Desktop.
Sparkfun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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