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

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


    OpenURLArg.Builder openUrlBuilder = OpenURLArg.newBuilder();
    openUrlBuilder.setWindowID(windowId);
    openUrlBuilder.setUrl(url);

    Response response = executeMessage(WindowManagerMessage.OPEN_URL, openUrlBuilder);

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


    assertSupportsClosingWindows();

    CloseWindowArg.Builder closeWindowBuilder = CloseWindowArg.newBuilder();
    closeWindowBuilder.setWindowID(windowId);

    Response response = executeMessage(WindowManagerMessage.CLOSE_WINDOW, closeWindowBuilder);

    new ImplicitWait(WINDOW_CLOSE_TIMEOUT.getValue(), INTERNAL_FREQUENCY.getValue())
        .until(new Callable<Boolean>() {
          public Boolean call() {
            return !windows.containsKey(windowId);
View Full Code Here

   * don't have script we can still inject to a 'fake' runtime.
   */
  protected void createAllRuntimes() {
    ListRuntimesArg.Builder selection = ListRuntimesArg.newBuilder();
    selection.setCreate(true);
    Response response = executeMessage(EcmascriptMessage.LIST_RUNTIMES, selection);

    runtimesList.clear();
    RuntimeList.Builder builder = RuntimeList.newBuilder();
    buildPayload(response, builder);
    List<Runtime> allRuntimes = builder.build().getRuntimeListList();
View Full Code Here

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

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

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

    //processQueues();

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

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

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

  private Runtime getRuntime(int runtimeID) {
    ListRuntimesArg.Builder builder = ListRuntimesArg.newBuilder();
    builder.addRuntimeIDList(runtimeID);
    builder.setCreate(true);

    Response response = executeMessage(EcmascriptMessage.LIST_RUNTIMES, builder);
    RuntimeList.Builder runtimeListBuilder = RuntimeList.newBuilder();
    buildPayload(response, runtimeListBuilder);
    List<Runtime> runtimes = runtimeListBuilder.build().getRuntimeListList();
    return (runtimes.isEmpty()) ? null : runtimes.get(0);
  }
View Full Code Here

  private ObjectList getObjectList(Integer id) {
    ExamineObjectsArg.Builder builder = ExamineObjectsArg.newBuilder();
    builder.setExaminePrototypes(false);
    builder.setRuntimeID(getRuntimeId());
    builder.addObjectIDList(id);
    Response response = executeMessage(EcmascriptMessage.EXAMINE_OBJECTS, builder);

    ObjectList.Builder objListBuilder = ObjectList.newBuilder();
    buildPayload(response, objListBuilder);
    return objListBuilder.build();
  }
View Full Code Here

    if (excludes != null) {
      argBuilder.setExcludePattern(excludes);
    }

    Response response = executeMessage(SelftestMessage.RUN_TESTS, argBuilder);

    SelftestProtos.RunStatus.Builder builder = SelftestProtos.RunStatus.newBuilder();

    buildPayload(response, builder);
View Full Code Here

  public void onSelftestResult(ServiceCallback<SelftestProtos.SelftestResult> callback) {
    this.callback = callback;
  }

  public Map<String, List<String>> getAvailableGroups() {
    Response response = executeMessage(SelftestMessage.GET_TESTSGROUPS);
    SelftestProtos.GroupList.Builder builder = SelftestProtos.GroupList.newBuilder();
    buildPayload(response, builder);

    ImmutableMap.Builder<String, List<String>> returnModules = ImmutableMap.builder();
View Full Code Here

  }

  // Window

  public int getActiveQuickWindowId() {
    Response response = executeMessage(DesktopWindowManagerMessage.GET_ACTIVE_WINDOW, null);
    DesktopWindowID.Builder builder = DesktopWindowID.newBuilder();
    buildPayload(response, builder);
    activeWindowId = builder.build().getWindowID();
    return activeWindowId;
  }
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.