public synchronized void decorate(Response response) {
if (getSession().hasBeenDecorated()) {
return;
}
ServerSideSession session = getDriver().getSession(response.getSessionId());
Map<String, Object> o = (Map<String, Object>) response.getValue();
List<String> ls = session.getApplication().getSupportedLanguagesCodes();
o.put("supportedLocales", ls);
o.put("takesScreenshot", true);
o.put(IOSCapabilities.CONFIGURABLE, true);
o.put(IOSCapabilities.ELEMENT_TREE, true);
o.put(IOSCapabilities.IOS_SEARCH_CONTEXT, true);
o.put(IOSCapabilities.IOS_TOUCH_SCREEN, true);
o.put("rotatable", true);
o.put("locationContextEnabled", true);
o.put("browserName", session.getCapabilities().getBundleName());
o.put("browserVersion", session.getApplication().getCapabilities().getBundleVersion());
o.put("platform", "IOS");
o.put("platformName", "IOS");
o.put("platformVersion", session.getCapabilities().getSDKVersion());
o.put("javascriptEnabled", true);
o.put("cssSelectors", true);
o.put("takesElementScreenshot", false);
o.put(IOSCapabilities.SIMULATOR, true);
o.put(IOSCapabilities.DEVICE, session.getCapabilities().getDevice());
o.put(IOSCapabilities.VARIATION, session.getCapabilities().getDeviceVariation());
response.setValue(o);
getSession().setDecorated(true);
}