Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reverted setting onConsoleMessage scope

  • Loading branch information...
commit fcea6c04e8355080191fcb459d9c8be2a0cec73f 1 parent f9278f0
@thiagof authored
Showing with 12 additions and 12 deletions.
  1. +12 −12 pjscrape.js
View
24 pjscrape.js
@@ -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 = [];
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.