return new OperaWebElement(driver, id);
} else if (className.equals("Array")) {
List<Object> result = Lists.newArrayList();
for (Property property : properties) {
Type type = property.getValue().getType();
if (type == Type.NUMBER && property.getName().equals("length")) {
// ignore ?!?
} else {
result.add(parseValue(type, property.getValue(), visitedIDs));
}
}
return result;
} else {
// we have a map
Map<String, Object> result = Maps.newHashMap();
for (Property property : properties) {
Type type = property.getValue().getType();
if (type == Type.NUMBER && property.getName().equals("length")) {
// ignore ?!?
} else {
result.put(property.getName(), parseValue(type, property.getValue(), visitedIDs));
}