Package org.uiautomation.ios.UIAModels.configuration

Examples of org.uiautomation.ios.UIAModels.configuration.CommandConfiguration


  @Override
  public Response handle() throws Exception {
    String name = (String) getRequest().getVariableValue(":command");
    WebDriverLikeCommand command = WebDriverLikeCommand.valueOf(name);

    CommandConfiguration conf = getSession().configure(command);

    JSONObject res = new JSONObject();
    Map<String, Object> m = conf.getAll();
    for (String key : m.keySet()) {
      res.put(key, m.get(key));
    }

    Response resp = new Response();
View Full Code Here


  protected <T> T getConf(String key) {
    return getConf(key, (T) null);
  }

  protected <T> T getConf(String key, T defaultValue) {
    CommandConfiguration conf = getSession().configure(getRequest().getGenericCommand());
    T res = (T) conf.get(key);
    return res != null ? res : defaultValue;
  }
View Full Code Here

    loadDefaults();
  }

  @Override
  public CommandConfiguration configure(WebDriverLikeCommand command) {
    CommandConfiguration config = configurations.get(command);
    if (config == null) {
      config = new CommandConfigurationStore();
      configurations.put(command, config);
    }
    return config;
View Full Code Here

    JSONObject payload = getRequest().getPayload();
    String type = payload.optString("type");
    if ("page load".equals(type)) {
      long timeout = payload.getLong("ms");
      // meant for driver.get command
      CommandConfiguration conf = getSession().configure(WebDriverLikeCommand.URL);
      conf.set("page load", timeout);
    } else {
      throw new UnsupportedCommandException("timeout " + payload + " NI");
    }
    Response res = new Response();
    res.setSessionId(getSession().getSessionId());
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.UIAModels.configuration.CommandConfiguration

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.