Skip to content

Commit

Permalink
Reverted setting onConsoleMessage scope
Browse files Browse the repository at this point in the history
  • Loading branch information
macedd committed Jun 17, 2012
1 parent f9278f0 commit fcea6c0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pjscrape.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,7 @@ var pjs = (function(){
format: 'json',
logFile: 'pjscrape_log.txt',
outFile: 'pjscrape_out.txt',
pageSettings: {
// set up console output
onConsoleMessage: function(msg, line, id) {
// kill initialization message
if (msg.indexOf('___') === 0) return;
id = id || 'injected code';
if (line) msg += ' (' + id + ' line ' + line + ')';
log.msg('CLIENT: ' + msg);
},
onAlert: function(msg) { log.alert('CLIENT: ' + msg) }
}
pageSettings: { },
};

var suites = [];
Expand Down Expand Up @@ -481,7 +471,17 @@ var pjs = (function(){
suiteq = [];

// create a single WebPage object for reuse
var page = require('webpage').create(config.pageSettings);
var page = require('webpage').create({
// set up console output
onConsoleMessage: function(msg, line, id) {
// kill initialization message
if (msg.indexOf('___') === 0) return;
id = id || 'injected code';
if (line) msg += ' (' + id + ' line ' + line + ')';
log.msg('CLIENT: ' + msg);
},
onAlert: function(msg) { log.alert('CLIENT: ' + msg) }
});

// add waitFor method
page.waitFor = function(test, callback) {
Expand Down

0 comments on commit fcea6c0

Please sign in to comment.