public static LayoutReport checkLayout(Browser browser, List<PageSpec> specs,
List<String> includedTags, List<String> excludedTags,
ValidationListener validationListener) throws IOException {
Page page = browser.getPage();
CombinedValidationListener listener = new CombinedValidationListener();
listener.add(validationListener);
LayoutReport layoutReport = new LayoutReport();
try {
layoutReport.setScreenshotFullPath(page.createScreenshot().getAbsolutePath());
}
catch (Exception ex) {
ex.printStackTrace();
}
listener.add(new LayoutReportListener(layoutReport));