Package org.uiautomation.ios.wkrdp.model

Examples of org.uiautomation.ios.wkrdp.model.RemoteWebElement


  }

  @Override
  public Response handle() throws Exception {
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    String text = element.getText();
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
    res.setStatus(0);
    res.setValue(text);
    return res;
View Full Code Here


                                               + "window with focus has changed.");
    }
    if (session != null) {
      return new RemoteWebNativeBackedElement(new NodeId(nodeId), currentInspector, session);
    } else {
      return new RemoteWebElement(new NodeId(nodeId), currentInspector);
    }
  }
View Full Code Here

  }

  @Override
  public Response handle() throws Exception {
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    boolean isSelected = element.isSelected();
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
    res.setStatus(0);
    res.setValue(isSelected);
    return res;
View Full Code Here

  }

  @Override
  public Response handle() throws Exception {
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    String value = element.getTagName();
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
    res.setStatus(0);
    res.setValue(value);
    return res;
View Full Code Here

  }

  @Override
  public Response handle() throws Exception {
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    boolean isEnabled = element.isEnabled();
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
    res.setStatus(0);
    res.setValue(isEnabled);
    return res;
View Full Code Here

    long deadline = System.currentTimeMillis() + defaultPageLoadTimeoutInMs;
    return getDocument(deadline);
  }

  public RemoteWebElement getDocument(long deadline) {
    RemoteWebElement result = context.getDocument();
    if (result == null) {
      result = retrieveDocumentAndCheckReady(deadline);
      RemoteWebElement window = getMainWindow();
      context.setCurrentFrame(null, result, window);
    }
    return result;
  }
View Full Code Here

    return result;
  }


  public RemoteWebElement getMainWindow() {
    return new RemoteWebElement(new NodeId(0), this);
  }
View Full Code Here

    return new RemoteWebElement(new NodeId(0), this);
  }


  private RemoteWebElement retrieveDocumentAndCheckReady(long deadline) {
    RemoteWebElement element = null;
    String readyState = "";
    while (!readyState.equals("complete")) {
      if (deadline > 0 && System.currentTimeMillis() > deadline) {
        throw new TimeoutException("Timeout waiting to get the document.");
      }
      try {
        log.fine("trying to get the document");
        element = retrieveDocument();
        log.fine("got it");
        readyState = element.getRemoteObject().call(".readyState");
        log.fine("ready ? " + readyState);
      } catch (Exception e) {
        log.warning("Exception waiting for ready state, nodeId=" +
            ((element != null) ? element.getNodeId() : "null") + ": " + e +
            ". Retrying ...");
        throw new WebKitSeemsCorruptedException();
      }
    }
    return element;
View Full Code Here

  }

  @Override
  public Response handle() throws Exception {
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    element.clear();
    Response resp = new Response();
    resp.setSessionId(getSession().getSessionId());
    resp.setStatus(0);
    resp.setValue(new JSONObject());
    return resp;
View Full Code Here

  @Override
  public Response handle() throws Exception {

    String propertyName = getRequest().getVariableValue(":name");
    String ref = getRequest().getVariableValue(":reference");
    RemoteWebElement element = getWebDriver().createElement(ref);
    Object value = element.getCssValue(propertyName);
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
    res.setStatus(0);
    res.setValue(value);
    return res;
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.wkrdp.model.RemoteWebElement

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.