Package org.uiautomation.ios.UIAModels.predicate

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


    return c;
  }

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


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

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

    ValueCriteria 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


  @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();

    AndCriteria c = AbstractCriteria.parse(o);
View Full Code Here

  }

  @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();

    OrCriteria c = AbstractCriteria.parse(o);
View Full Code Here

    }

    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
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.UIAModels.predicate.ValueCriteria

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.