Package org.uiautomation.ios.inspector.model

Examples of org.uiautomation.ios.inspector.model.IDESessionModel


  }

  @Override
  public View handle(HttpServletRequest req) throws Exception {
    final Session s = new Session(extractSession(req.getPathInfo()));
    IDESessionModel model = cache.getModel(s);
    // if no 1 sec delay
    Thread.sleep(200);
    model.refresh();
    JSONObject rootNode = model.getTree().getJSONObject("tree");
    JSONToXMLConverter conv = new JSONToXMLConverter(rootNode);
    JSONObject jsTreeObject = createFrom(rootNode, conv.asXML());
    return new JSONView(jsTreeObject);
  }
View Full Code Here


  }

  @Override
  public View handle(HttpServletRequest req) throws Exception {
    final Session s = new Session(extractSession(req.getPathInfo()));
    IDESessionModel model = cache.getModel(s);
    model.refresh();
    return new IDEMainView(model, req.getContextPath() + req.getServletPath());
  }
View Full Code Here

    Session session = new Session(name);
    JSONObject t = new JSONObject(tree.toString());
    IOSCapabilities c = new IOSCapabilities(new JSONObject(cap.toString()));

     IDESessionModel
        model =
        new MockedModel(session, screenshot, t, c, new JSONObject(s.toString()));
    cache.put(session, model);
  }
View Full Code Here

    String resource = path.substring(end);

    InputStream is = null;
    if (resource.endsWith("screenshot.png")) {
      String session = extractSession(req.getPathInfo());
      IDESessionModel model = cache.getModel(new Session(session));
      try {
        is = model.getScreenshot();
      } catch (FileNotFoundException e) {
        is = null;
      }
    } else {
      is = IDEServlet.class.getResourceAsStream("/" + resource);
View Full Code Here

  }

  @Override
  public View handle(HttpServletRequest req) throws Exception {
    final Session s = new Session(extractSession(req.getPathInfo()));
    IDESessionModel model = cache.getModel(s);
    JSONObject tree = (JSONObject) model.getTree().get("tree");
    JSONObject webview = findWebViewNode(tree);
    if (webview != null) {
      html = webview.optString("source");
    }
    return new WebView(html);
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.inspector.model.IDESessionModel

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.