This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "WebInspector", | |
"version": "537.36" | |
}, | |
"pages": [ | |
{ | |
"startedDateTime": "2016-04-27T01:42:01.485Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
function getElementXPath(element) { | |
if (element && element.id) | |
return '//*[@id="' + element.id + '"]'; | |
else | |
return getElementTreeXPath(element); | |
} | |
function getElementTreeXPath(element) { | |
var paths = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Override function in given prototype to add a log statement | |
function logMethod(prototype, fname) { | |
if (!(fname in prototype)) { | |
console.warn("Warning: can't instrument " + prototype.constructor.name + '.' + fname); | |
return; | |
} | |
var original = prototype[fname]; | |
prototype[fname] = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Override function in given prototype to add a log statement | |
function logMethod(prototype, fname) { | |
var name = prototype.constructor.name + '.' + fname; | |
if (!(fname in prototype)) { | |
console.warn("Warning: can't instrument " + name); | |
return; | |
} | |
console.log("Instrumenting " + name); | |
var original = prototype[fname]; |