以下の内容はhttps://anton0825.hatenablog.com/entry/20140717/1412008799より取得しました。


CasperJSのヘッドレスブラウザ内のconsole.logの出力をコンソールに出す

普通にthis.evaluateの中でconsole.logを実行してもコンソールには出力されない。
そのconsole.logはヘッドレスブラウザの中で実行されるので。
コンソールに出力させるには以下のようにする。

casper.start('http://google.com/', function() {
    this.evaluate(function sendLog(log) {
        // you can access the log from page DOM
        console.log('from the browser, I can tell you there are ' + log.length + ' entries in the log');
    }, this.result.log);
});

CasperJSのデバッグしんどいなぁ。ステップ実行できるようにならないかな。。
参考:javascript - Output client-side console with casper/phantomjs - Stack Overflow




以上の内容はhttps://anton0825.hatenablog.com/entry/20140717/1412008799より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14