Package com.opera.core.systems.scope.protos.EcmascriptProtos.Value

Examples of com.opera.core.systems.scope.protos.EcmascriptProtos.Value.Type


      case FAILURE:
        throw new ScopeException("Could not execute script");
    }

    Value value = result.getValue();
    Type type = value.getType();

    switch (type) {
      case STRING:
        return value.getStr();
      case FALSE:
View Full Code Here


      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));
        }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.scope.protos.EcmascriptProtos.Value.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.