code: public static String getXPathScript(WebLocator view) {
          StringBuilder builder = new StringBuilder();
          builder.append("\n\n");
          Map<String, WebLocator> map = webLocatorAsMap(view);
  
          if (map.size() == 0) {
              builder.append(getFirebugXPath(view));
          } else {
              builder.append("// Run next lines in firebug to see if all elements are present in your page").append("\n\n");
              appendLocatorXPath(builder, "current_view", view, true);
  
              for (String locatorName : map.keySet()) {
                  WebLocator locator = map.get(locatorName);
                  appendLocatorXPath(builder, locatorName, locator, true);
              }
          }
  
          builder.append("\n");
          String log = builder.toString();
          LOGGER.info(log);
          return log;
      }
docs: <p>Generate JS script to validate and test xpath of all WebLocator's.
  Just copy next lines and paste them in firebug, then press Run.</p>
  <p>Usage example:</p>
  <pre>{@code
  WebLocatorUtils.getXPathScript(new LoginView());
  }</pre>
  
  @param view any instance of WebLocator
  <p>Views must respect the JavaBeans conventions</p>
  @return script