I thin you should use fill and gethtml function:
- http://docs.casperjs.org/en/latest/modules/casper.html#fill
- http://docs.casperjs.org/en/latest/modules/casper.html#gethtml
Quick program :
casper.start('https://www.bt.com/wifi/secure/statuscheck.do', function() {
this.fill('form[name="LoginForm"]', {
'username': 'LOGIN',
'password': 'PASS'
}, true);
});
casper.wait(2000, function() {
this.echo(this.getHTML());
});
casper.run();