Skip to content

Instantly share code, notes, and snippets.

@Artur-
Last active August 29, 2015 14:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Artur-/4b2fb9549db4d7de23fb to your computer and use it in GitHub Desktop.
Save Artur-/4b2fb9549db4d7de23fb to your computer and use it in GitHub Desktop.
Find remote controls with size problems from TeamCity
$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