StringBuffer sb = new StringBuffer();
// Since we don't have access to the XWiki object from Selenium tests and since we don't want to restart XWiki
// with a different xwiki.cfg file for each test that requires a configuration change, we use the following
// trick: We create a document and we access the XWiki object with a Velocity script inside that document.
for (Entry<Object, Object> param : properties.entrySet()) {
sb.append("$xwiki.xWiki.config.setProperty('").append(param.getKey()).append("', '").append(
param.getValue()).append("')").append('\n');
}
editInWikiEditor("Test", "XWikiConfigurationPageForTest", "xwiki/1.0");
setFieldValue("content", sb.toString());