public static void typeFrame(LiferaySelenium liferaySelenium, String locator, String value) {

    StringBuilder sb = new StringBuilder();

    String titleAttribute = liferaySelenium.getAttribute(locator + "@title");

    int x = titleAttribute.indexOf(",");
    int y = titleAttribute.indexOf(",", x + 1);

    if (y == -1) {
      y = titleAttribute.length();
    }

    sb.append(titleAttribute.substring(x + 1, y));

    sb.append(".setHTML(\"");
    sb.append(HtmlUtil.escapeJS(value.replace("\\", "\\\\")));
    sb.append("\")");

    liferaySelenium.runScript(sb.toString());
  }