I have problem of capturing everything of a web page. After I log in to outlook.com using regular browser, it should show the inbox message in the right side:
However, when I use CasperJS, it is just blank. Does anyone have any idea?
I have include a temporary login id in the script, you can test it if you can, thanks.
Here is the script:
var casper = require('casper').create({
verbose: true,
logLevel: "info",
viewportSize: {width: 1280,height: 720},
pageSettings: {userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"}
});
casper.start('http://www.hotmail.com').then(function () {
console.log('got here');
});
casper.wait(500, function () {
console.log('wait');
});
casper.then(function(){
this.sendKeys("[name='loginfmt']", 'peterwhite12345678@outlook.com');
this.sendKeys("[name='passwd']", '12345678peterwhite');
this.click("[type='submit']");
console.log('entering log in information');
});
casper.wait(5000, function () {
console.log('wait');
});
casper.then(function (){
console.log('printscreen');
casper.capture('there_is_nothing_by_the_right_side.png')
});
casper.run();
I have also tried something like
casperjs --ssl-protocol=any outlook.js
Should I maybe add any path/plugin to support this CasperJS?