Last active
August 29, 2015 14:15
-
-
Save Artur-/4b2fb9549db4d7de23fb to your computer and use it in GitHub Desktop.
Find remote controls with size problems from TeamCity
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
$x("//a[@class='testWithDetails']").forEach(function(val) {val.click();} ); | |
// Wait for all stack traces to load... | |
var remoteIps = {}; | |
$x("//div[@class='fullStacktrace']").forEach( | |
function(val) { | |
var t = val.innerText ; | |
t = t.substring(0,t.indexOf("\n")); | |
if (t.indexOf("contained images with differing ") == -1) | |
return; | |
matches = t.match(/.*Remote\scontrol:\s\S+\s\(([^\)]+).*/) | |
if (!matches || matches.length < 2) console.log(t+" did not match"); | |
else remoteIps[matches[1]]=1; | |
} | |
); | |
var p = Object.getOwnPropertyNames(remoteIps); | |
copy(p.join("\n")) | |
console.log("Result copied to clipboard") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment