Package org.uiautomation.ios.UIAModels.predicate

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


    Criteria c1 = new TypeCriteria(UIATableCell.class);
    UIAElement element = driver.findElement(c1);
    element.tap();

    NameCriteria
      criteria =
      new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
    UIAElement text = driver.findElement(criteria);
    String actual = text.getName();
    Assert.assertEquals(actual, expectedContent);

    criteria =
      new NameCriteria("meterFormat", L10NStrategy.serverL10N, MatchingStrategy.contains);
    text = driver.findElement(criteria);
    actual = text.getName();
    Assert.assertEquals(actual, expectedContent);

    // and using Xpath
View Full Code Here


          }
          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;};");
View Full Code Here

  private static final String expected =
      "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois 29 May 1953.";

  @Test
  public void findElementDriver() {
    NameCriteria
        criteria =
        new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
    UIAElement text = driver.findElement(criteria);
    String actual = text.getName();
    Assert.assertEquals(actual, expected);
  }
View Full Code Here

  @Test
  public void findElementElement() {
    UIAApplication app = (UIAApplication) driver.findElement(By.tagName("UIAApplication"));

    NameCriteria
        criteria =
        new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
    UIAElement text = app.findElement(criteria);
    String actual = text.getName();
    Assert.assertEquals(actual, expected);
  }
View Full Code Here

  private static final String buttonName = "Buttons, Various uses of UIButton";

  @Test
  public void iosSearchContext() {
    IOSSearchContext finder = IOSDriverAugmenter.augment(driver);
    WebElement element = finder.findElement(new NameCriteria(buttonName));
    Assert.assertTrue(element instanceof UIATableCell);
  }
View Full Code Here

TOP

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

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.