final String test = anchors.get(j).attr("href");
final File testFile = new File(this.reportsDir, test);
final Document testHtml = parseHtml(testFile);
final List<Element> errors = testHtml.getElementsByClass("error");
for(int k = 0 ; k < errors.size() && logErrorsToConsole() ; k++) {
final Element error = errors.get(k);
final Elements fitLabel = error.getElementsByClass("fit_label");
if(!fitLabel.isEmpty()) {
logFitNesseError(test, fitLabel.text());
}
final Elements fitStacktrace = error.getElementsByClass("fit_stacktrace");
if(!fitStacktrace.isEmpty()) {
logFitNesseError(test, fitStacktrace.text());
}
}
final List<Element> details = testHtml.getElementsByClass("exception-detail");
for(int k = 0 ; k < details.size() && logErrorsToConsole() ; k++) {
final Element detail = details.get(k);
if(detail.hasText()) {
logFitNesseError(test, StringUtils.substringAfter(detail.text(), SlimServer.EXCEPTION_TAG));
}
}
}
}
}