Package org.uiautomation.ios.UIAModels

Examples of org.uiautomation.ios.UIAModels.Orientation


  public SetOrientationNHandler(IOSServerManager driver, WebDriverLikeRequest request) {
    super(driver, request);

    JSONObject payload = request.getPayload();
    String orientation = payload.optString("orientation");
    Orientation o = Orientation.valueOf(orientation);
    String js = template.generate(
        request.getSession(),
        o.instrumentsValue());
    setJS(js);
  }
View Full Code Here


    NameCriteria criteria =
        new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
    UIAElement el = driver.findElement(criteria);
    JSONObject log = el.logElementTree(null, true);
    Orientation o = Orientation.fromInterfaceOrientation(log.getInt("deviceOrientation"));
    Assert.assertEquals(o, Orientation.PORTRAIT);
    JSONObject tree = log.getJSONObject("tree");

    Assert.assertEquals(tree.getString("type"), "UIAStaticText");
    Assert.assertEquals(tree.getString("value"), expected);
View Full Code Here

    return source;
  }

  private String extractScreenshot(Response response){
    String orientation = response.getValue().toString();
    Orientation o;
    try {
      o = Orientation.valueOf(orientation);
    } catch (IllegalArgumentException e) {
      throw new WebDriverException(
          "the response for the screenshot command should return the orientation the device was on"
View Full Code Here

    map.put("jsList", jsList);

    DeviceType device = model.getCapabilities().getDevice();
    DeviceVariation variation = model.getCapabilities().getDeviceVariation();
    Orientation orientation = model.getDeviceOrientation();

    map.put("frame", getFrame(device, variation, orientation));

    map.put("screenshot", getScreen());
View Full Code Here

      boolean screenshot;

      screenshot = (Boolean) value.get("screenshot");
      Long orientationCode = Long.parseLong(value.get("deviceOrientation").toString());

      Orientation o = Orientation.fromInterfaceOrientation(orientationCode.intValue());

      // TODO freynaud rethink that.
      if (screenshot) {
        TakeScreenshotService service = getNativeDriver().getScreenshotService();
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.UIAModels.Orientation

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.