Examples of LabelCriteria


Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

  }

  public LabelCriteria labelCriteria(String expected, L10NStrategy l10nStrategy,
      MatchingStrategy matchingStrategy) {
    LabelCriteria c = new LabelCriteria(expected, l10nStrategy, matchingStrategy);
    c.addDecorator(decorator);
    c.decorate();
    return c;
  }
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

    Assert.assertEquals(name.getMatchingStrategy(), c.getMatchingStrategy());
  }

  @Test
  public void label() throws Exception {
    LabelCriteria name = new LabelCriteria("the label");
    JSONObject o = name.stringify();

    LabelCriteria c = AbstractCriteria.parse(o);

    Assert.assertEquals(name.getClass(), c.getClass());
    Assert.assertEquals(name.getValue(), c.getValue());
    Assert.assertEquals(name.getMatchingStrategy(), c.getMatchingStrategy());
  }
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

  }


  @Test
  public void and() throws Exception {
    LabelCriteria l = new LabelCriteria("the label");
    ValueCriteria v = new ValueCriteria("the value");
    AndCriteria and = new AndCriteria(l, v);

    JSONObject o = and.stringify();
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

    Assert.assertEquals(and.getClass(), c.getClass());
  }

  @Test
  public void or() throws Exception {
    LabelCriteria l = new LabelCriteria("the label");
    ValueCriteria v = new ValueCriteria("the value");
    OrCriteria or = new OrCriteria(l, v);

    JSONObject o = or.stringify();
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

  }

  @Test
  public void not() throws Exception {
    LabelCriteria l = new LabelCriteria("the label");

    NotCriteria not = new NotCriteria(l);

    JSONObject o = not.stringify();
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

    if ("name".equals(prop)) {
      return new NameCriteria(val, strategy).stringify();
    } else if ("value".equals(prop)) {
      return new ValueCriteria(val, strategy).stringify();
    } else if ("label".equals(prop)) {
      return new LabelCriteria(val, strategy).stringify();
    } else {
      throw new InvalidSelectorException(
          prop
          + "is not a valid selector for the native part of ios-driver.name | value | label");
    }
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.predicate.LabelCriteria

          ContentResult result = results.get(0);
          String addressL10ned = result.getL10nFormatted();
          Criteria
              c2 =
              new AndCriteria(new TypeCriteria(UIAElement.class), new NameCriteria(addressL10ned),
                  new LabelCriteria(addressL10ned));
          script.append("var addressBar = root.element(-1," + c2.stringify().toString() + ");");
          script.append("var addressBarSize = addressBar.rect();");
          script.append("var delta = addressBarSize.origin.y +39;");
          script.append("if (delta<20){delta=20;};");
          script.append("var y = top+delta;");
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.