Package org.uiautomation.ios.UIAModels.predicate

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


  }

  @Test
  public void clienSideMapping() throws JSONException {
    NameCriteria c = factory.nameCriteria("abc", L10NStrategy.clientL10N,MatchingStrategy.exact);
    Assert.assertEquals(c.getValue(), "abc localisé.");
  }
View Full Code Here


    decorator = new ClientSideL10NDecorator(contentByKey);
  }

  public NameCriteria nameCriteria(String expected, L10NStrategy l10nStrategy,
      MatchingStrategy matchingStrategy) {
    NameCriteria c = new NameCriteria(expected, l10nStrategy, matchingStrategy);
    c.addDecorator(decorator);
    c.decorate();
    return c;

  }
View Full Code Here

    } catch (NoSuchWindowException e) {
      // expected
    }
    UIAElement el =
        driver.findElement(
            new AndCriteria(new TypeCriteria(UIATableCell.class), new NameCriteria("Web",
                MatchingStrategy.starts)));
    el.tap();

    while (driver.getWindowHandles().size() != 2) {
      Thread.sleep(50);
    }
    handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 2);

    UIAElement back = driver
        .findElement(
        new AndCriteria(new TypeCriteria(UIAButton.class), new NameCriteria("Back")));
    back.tap();
    long deadline = System.currentTimeMillis() + 5000;
    while (driver.getWindowHandles().size() != 1) {
      Thread.sleep(50);
      if (System.currentTimeMillis() > deadline) {
View Full Code Here

    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.uiCatalogCap());
    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);
    UIAElement webCell =
        driver.findElement(new AndCriteria(new TypeCriteria(UIATableCell.class), new NameCriteria(
            "Web", MatchingStrategy.starts)));
    webCell.tap();

    handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 2);
View Full Code Here

    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.uiCatalogCap());
    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);
    UIAElement webCell =
        driver.findElement(new AndCriteria(new TypeCriteria(UIATableCell.class), new NameCriteria(
            "Web", MatchingStrategy.starts)));
    webCell.tap();

    Thread.sleep(5000);
    driver.switchTo().window("Web");
View Full Code Here


  @Test
  public void nameEN() throws JSONException {
    ServerSideL10NFactory factory = create(AppleLanguage.en);
    NameCriteria c = factory.nameCriteria("rootViewNavTitle");
    Assert.assertEquals(c.getValue(), "Mountains");
  }
View Full Code Here

  }

  @Test
  public void nameFR() throws JSONException {
    ServerSideL10NFactory factory = create(AppleLanguage.fr);
    NameCriteria c = factory.nameCriteria("rootViewNavTitle");
    Assert.assertEquals(c.getValue(), "Montagnes");
  }
View Full Code Here

  }

  @Test
  public void nameZH() throws JSONException, IOException {
    ServerSideL10NFactory factory = create(AppleLanguage.zh_Hant);
    NameCriteria c = factory.nameCriteria("rootViewNavTitle");
    Assert.assertEquals(c.getValue(), "山");
  }
View Full Code Here


  @Test
  public void nameWithParametersEN() {
    ServerSideL10NFactory factory = create(AppleLanguage.en);
    NameCriteria c = factory.nameCriteria("footFormat");
    Assert.assertEquals(c.getValue(), "(.*){1} feet");
  }
View Full Code Here

  }

  @Test
  public void nameWithParametersFR() {
    ServerSideL10NFactory factory = create(AppleLanguage.fr);
    NameCriteria c = factory.nameCriteria("footFormat");
    Assert.assertEquals(c.getValue(), "(.*){1} pieds");
  }
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.