我有捕獲網頁的一切問題。我使用普通瀏覽器登錄到outlook.com後,應在右側顯示收件箱消息:爲什麼CasperJS不能顯示網站'outlook.com'的一部分?
然而,當我使用CasperJS,它僅僅是空白。有人有什麼主意嗎?
我在腳本中包含一個臨時登錄ID,如果可以的話,您可以測試它,謝謝。
下面是腳本:
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']", '[email protected]');
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();
我也試着像
casperjs --ssl-protocol=any outlook.js
如果我也許添加任何路徑/插件,以支持該CasperJS?
,我使用casperjs版本使用phantomjs版本1.9.8 –
你的腳本看起來不錯1.1.0-BETA4。請註冊到'resource.error','page.error','remote.message'和'casper.page.onResourceTimeout'事件([Example](https://gist.github.com/artjomb/4cf43d16ce50d8674fdf#file -2_caspererrors-JS))。也許有錯誤。 –
爲什麼當你已經詢問[這裏]時,你反覆詢問同樣的問題(http://stackoverflow.com/questions/35670589/why-casperjs-can-only-load-half-page-of-outlook-com-images -included) –