code: public static LayoutReport checkLayout(WebDriver driver, String fileName, String[]includedTags, String[]excludedTags,
                                             String sectionNameFilter, Properties properties, String screenshotFilePath,
                                             JsVariable[] vars, JsPageObject[] jsPageObjects) throws IOException {
  
          TestSession session = TestSession.current();
          if (session == null) {
              throw new UnregisteredTestSession("Cannot check layout as there was no TestSession created");
          }
  
          TestReport report = session.getReport();
  
          File screenshotFile = null;
  
          if (screenshotFilePath != null) {
              screenshotFile = new File(screenshotFilePath);
              if (!screenshotFile.exists() || !screenshotFile.isFile()) {
                  throw new IOException("Couldn't find screenshot in " + screenshotFilePath);
              }
          }
  
          if (fileName == null) {
              throw new IOException("Spec file name is not defined");
          }
  
          List<String> includedTagsList = toList(includedTags);
  
          Map<String, Object> jsVariables = convertJsVariables(vars);
  
          LayoutReport layoutReport = Galen.checkLayout(new SeleniumBrowser(driver), fileName,
                  new SectionFilter(includedTagsList, toList(excludedTags)).withSectionName(sectionNameFilter),
                  properties,
                  jsVariables,
                  screenshotFile,
                  session.getListener(), convertObjects(jsPageObjects));
  
          GalenUtils.attachLayoutReport(layoutReport, report, fileName, includedTagsList);
          return layoutReport;
      }
docs: Needed for Javascript based tests
  @throws IOException