Last active
June 16, 2016 09:02
-
-
Save jsgao0/4a8dbbd75cfd1cb6372e752aaa510c4e to your computer and use it in GitHub Desktop.
User submits form and redirect instead of clicking then redirect.
This file contains 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
casper.test.begin('Test page.', 2, function suite(test) { | |
casper.start( | |
'https://cib.icicibank.com/corp/BANKAWAY?Action.CorpUser.Init1.001=Y&AppSignonBankId=ICI&AppType=corporate', | |
function() { | |
this.echo(this.getTitle()); | |
test.assertUrlMatch(/BANKAWAY?/, 'Current location is ' + this.getCurrentUrl()); | |
}); | |
casper.then(function(){ | |
this.fill('#rt', {}, true); | |
this.wait(2000, function() { | |
test.assertUrlMatch(/BANKAWAY;/, 'New location is ' + this.getCurrentUrl()); | |
}); | |
}); | |
casper.run(function() { | |
test.done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment