Examples of UIAScriptResponse


Examples of org.uiautomation.ios.command.UIAScriptResponse

  @Override
  public UIAScriptResponse executeCommand(UIAScriptRequest request) {
    handleLastCommand(request);
    sendNextCommand(request);
    UIAScriptResponse response = waitForResponse();
    return response;
  }
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

  public void handle(String message) {
    if (message.startsWith("IOS_DRIVER_RESPONSE:")) {

      String raw = message.replace("IOS_DRIVER_RESPONSE:", "");
      UIAScriptResponse response = new UIAScriptResponse(raw);
      if (response.isFirstResponse()) {
        registerUIAScript();
      } else {
        setNextResponse(response);
      }
    } else {
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

      response.setSessionId(getSessionId());
      response.setStatus(0);
      response.setValue(STOP_RESPONSE);
      BeanToJsonConverter converter = new BeanToJsonConverter();
      String json = converter.convert(response);
      UIAScriptResponse r = new UIAScriptResponse(json);
      setNextResponse(r);
    }
  }
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

    }
  }


  protected final UIAScriptResponse waitForResponse() {
    UIAScriptResponse res = null;
    long deadline = System.currentTimeMillis() + COMMAND_TIMEOUT_MILLIS;

    while (System.currentTimeMillis() < deadline) {
      try {
        res = responseQueue.poll(1000, TimeUnit.MILLISECONDS);
      } catch (InterruptedException ignore) {
      }
      // the executor is now stopped. Not need to wait any further
      if (!isReady()) {
        Response r = new Response();
        r.setStatus(13);
        r.setSessionId(getSessionId());
        if (session.getStopCause() != null) {
          r.setValue(session.getStopCause().name());
        } else {
          r.setValue(UNKNOWN_REASON);
        }
        UIAScriptResponse response = new UIAScriptResponse(new BeanToJsonConverter().convert(r));
        return response;
      }

      // we have a "valid" response
      if (res != null) {
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

      if (request.getInputStream() != null) {
        StringWriter writer = new StringWriter();
        IOUtils.copy(request.getInputStream(), writer, "UTF-8");
        String json = writer.toString();
        json = Normalizer.normalize(json, LanguageDictionary.form);
        UIAScriptResponse r = new UIAScriptResponse(json);
        log.fine("content : " + r);

        if (r.isFirstResponse()) {
          log.fine("got first response");
          Response resp = r.getResponse();
          ServerSideSession session = getDriver().getSession(resp.getSessionId());
          session.setCapabilityCachedResponse(resp);
          //GetCapabilitiesNHandler.setCachedResponse(resp);
          RemoteIOSNativeDriver
              nativeDriver =
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

    File folder = new File(instruments.getOutput(),"/Run 1/");
    source = new File(folder, SCREEN_NAME + ".png");
  }

  private Response executeScreenshotCommand(){
    UIAScriptResponse r = instruments.getChannel().executeCommand(command);
    return r.getResponse();
  }
View Full Code Here

Examples of org.uiautomation.ios.command.UIAScriptResponse

    return InstrumentsNoDelayLoader.getInstance(version).getInstruments().getAbsolutePath();
  }

  @Override
  public Response executeCommand(UIAScriptRequest request) {
    UIAScriptResponse res = channel.executeCommand(request);
    return res.getResponse();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.