output != null ? output : "Okay");
}
public static String executeScriptWithConsole(String scriptContent, boolean force) {
Bindings bindings = new SimpleBindings();
final JScriptConsole jScriptConsole = new JScriptConsole();
bindings.put("console", jScriptConsole);
String result = JscriptExecutor.executeScript(scriptContent, bindings, force);
if (result != null){
jScriptConsole.log(String.format("\n%s", result));
}
return jScriptConsole.out();
}