Package com.opera.core.systems.scope.protos.UmsProtos

Examples of com.opera.core.systems.scope.protos.UmsProtos.Response


  public void init() {
    actions = initActionList();
  }

  private Set<String> initActionList() {
    Response response = executeMessage(ExecMessage.GET_ACTION_LIST, null);
    ActionInfoList.Builder builder = ActionInfoList.newBuilder();
    buildPayload(response, builder);
    ActionInfoList infoList = builder.build();

    Set<String> actions = new CaseInsensitiveStringSet();
View Full Code Here


    // TODO(andreastt): Unsafe long to int cast
    builder.setTimeOut((int) timeout);

    builder.setWindowID(services.getWindowManager().getActiveWindowId());

    Response response = executeMessage(ExecMessage.SETUP_SCREEN_WATCHER,
                                       builder,
                                       OperaIntervals.RESPONSE_TIMEOUT.getMs() + timeout);

    ScreenWatcherResult.Builder watcherBuilder = ScreenWatcherResult.newBuilder();
    buildPayload(response, watcherBuilder);
View Full Code Here

   * services.
   *
   * @return information about the connected browser's debug capabilities
   */
  private HostInfo getHostInfo() {
    Response response = executeMessage(ScopeMessage.HOST_INFO, null);

    try {
      return HostInfo.parseFrom(response.getPayload());
    } catch (InvalidProtocolBufferException e) {
      throw new CommunicationException("Error while parsing host info", e);
    }
  }
View Full Code Here

  private ServiceResult enable(com.opera.core.systems.scope.Service service)
      throws InvalidProtocolBufferException {
    ServiceSelection.Builder selection = ServiceSelection.newBuilder();
    selection.setName(service.getServiceName());
    Response response = executeMessage(ScopeMessage.ENABLE, selection);
    return ServiceResult.parseFrom(response.getPayload());
  }
View Full Code Here

    switch (stpType) {
      //case 1: //command //commands are not supposed to be received
      //throw new WebDriverException("Received command from host?");
      case 2: // response
        // Log what is being sent.
        Response response = Response.parseFrom(payload);
        logger.finest("RECV RESPONSE: " + response.toString());
        signalResponse(response.getTag(), response);
        break;

      case 3: // event
        Event event = Event.parseFrom(payload);
        logger.finest("RECV EVENT: " + event.toString());
View Full Code Here

  public void clearPrivateData(PrivateData... flags) {
    clearPrivateData(privateDataFlagsToScope(flags));
  }

  private BrowserInformation getBrowserInformation() {
    Response response = executeMessage(CoreMessage.GET_BROWSER_INFORMATION);
    BrowserInformation.Builder builder = BrowserInformation.newBuilder();
    buildPayload(response, builder);
    return builder.build();
  }
View Full Code Here

  }

  protected List<RuntimeInfo> listRuntimes(boolean allRuntimes) {
    RuntimeSelection.Builder selection = RuntimeSelection.newBuilder();
    selection.setAllRuntimes(allRuntimes);
    Response response = this.executeMessage(EcmascriptDebuggerMessage.LIST_RUNTIMES,
                                            selection);
    RuntimeList.Builder builder = RuntimeList.newBuilder();
    buildPayload(response, builder);
    return builder.build().getRuntimeListList();
  }
View Full Code Here

      Variable variable = buildVariable(webElement.toString(),
                                        ((OperaWebElement) webElement).getObjectId());
      evalBuilder.addVariableList(variable);
    }

    Response response = executeMessage(EcmascriptDebuggerMessage.EVAL, evalBuilder);

    if (response == null) {
      throw new ScopeException("Internal error while executing script");
    }
View Full Code Here

    */

    EvalData.Builder builder = buildEval(using, runtimeId);
    builder.addAllVariableList(Arrays.asList(variables));

    Response response = executeMessage(EcmascriptDebuggerMessage.EVAL, builder,
                                       OperaIntervals.SCRIPT_TIMEOUT.getMs());

    if (response == null && retries < SCRIPT_RETRIES) {
      retries++;
      sleepDuration += SCRIPT_RETRY_INTERVAL.getMs();
View Full Code Here

  public Object executeScript(String using, boolean responseExpected) {
    return executeScript(using, responseExpected, getRuntimeId());
  }

  public Object executeScript(String using, boolean responseExpected, int runtimeId) {
    Response reply = eval(using, runtimeId);
    return responseExpected ? parseEvalReply(parseEvalData(reply)) : null;
  }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.scope.protos.UmsProtos.Response

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.