public static void typeAceEditor(LiferaySelenium liferaySelenium, String locator, String value) { int x = 0; int y = value.indexOf("${line.separator}"); String line = value; if (y != -1) { line = value.substring(x, y); } liferaySelenium.typeKeys(locator, line.trim()); liferaySelenium.keyPress(locator, "\\RETURN"); while (y != -1) { x = value.indexOf("}", x) + 1; y = value.indexOf("${line.separator}", x); if (y != -1) { line = value.substring(x, y); } else { line = value.substring(x, value.length()); } liferaySelenium.typeKeys(locator, line.trim()); liferaySelenium.keyPress(locator, "\\RETURN"); } }