GaleniumReportUtil.addGalenResult(test);
private static LayoutReport checkLayout(String testName, PageSpec spec, TestDevice device, SectionFilter tags, ValidationListener validationListener, Browser browser, WebDriver driver) { LayoutReport layoutReport; try { layoutReport = Galen.checkLayout(browser, spec, tags, validationListener); } catch (IOException ex) { getLogger().error("IOException with layout checking", ex); throw new GalenLayoutException("IOException with layout checking", ex); } // Creating an object that will contain the information about the test GalenTestInfo test = GalenTestInfo.fromString("Layoutcheck " + testName + " " + device.getName()); // Adding layout report to the test report test.getReport().layout(layoutReport, "check layout on " + driver.getCurrentUrl() + " with device: " + device.toString()); GaleniumReportUtil.addGalenResult(test); if (layoutReport.errors() > 0) { String prettyStringResult; try { prettyStringResult = layoutReport.getValidationErrorResults().get(0).getSpec().getPlace().toPrettyString(); } catch (NullPointerException ex) { prettyStringResult = "____NPE____"; } String msg = "FAILED: Layoutcheck " + prettyStringResult + " with device " + device.toString(); getLogger().error(msg); } return layoutReport; }