Package org.uiautomation.ios.UIAModels

Examples of org.uiautomation.ios.UIAModels.UIAElement.tap()


    Criteria
        c =
        new AndCriteria(new TypeCriteria(UIAStaticText.class), new NameCriteria("Show Simple"));
    UIAElement el = driver.findElements(c).get(1);
    // opens an alert.
    el.tap();
    try {
      el.tap();
      Assert.fail("shouldn't click behind alerts.");
    } finally {
      driver.switchTo().alert().dismiss();
View Full Code Here


        new AndCriteria(new TypeCriteria(UIAStaticText.class), new NameCriteria("Show Simple"));
    UIAElement el = driver.findElements(c).get(1);
    // opens an alert.
    el.tap();
    try {
      el.tap();
      Assert.fail("shouldn't click behind alerts.");
    } finally {
      driver.switchTo().alert().dismiss();
      waitForAlertToBeGone();
    }
View Full Code Here

    Criteria
        c =
        new AndCriteria(new TypeCriteria(UIAStaticText.class), new NameCriteria("Show Simple"));
    UIAElement el = driver.findElements(c).get(1);
    // opens an alert.
    el.tap();

    try {
      driver.findElement(By.name("Back"));
      Assert.fail("cannot select when alert opened");
    } catch (UnhandledAlertException e) {
View Full Code Here

    } catch (NoSuchElementException e) {
      //ignore
    }

    // opens an alert.
    el.tap();

    WebElement rwe = d.findElement(By.className("UIAAlert"));
    String json = rwe.getAttribute("tree");
    JSONObject tree = new JSONObject(json);
    Assert.assertEquals(tree.getString("type"), "UIAAlert");
View Full Code Here

    Criteria
        c =
        new AndCriteria(new TypeCriteria(UIAStaticText.class), new NameCriteria("Show Simple"));
    UIAElement el = driver.findElements(c).get(1);
    // opens an alert.
    el.tap();

    UIAAlert alert = driver.findElement(new TypeCriteria(UIAAlert.class));

    // check the alert has all its elements
    alert.findElement(UIAStaticText.class, new NameCriteria("UIAlertView"));
View Full Code Here

      type = UIAButton.class;
    }

    UIAElement ok = alert.findElement(type, new NameCriteria("OK"));

    ok.tap();
    // wait for the alert to disappear.
    Thread.sleep(500);
    driver.switchTo().alert();
  }
View Full Code Here

      Criteria c2 = new NameCriteria(name);
      Criteria c = new AndCriteria(c1, c2);
      UIAElement element = driver.findElement(c);
      // should work.
      // new screen. The element doesn't exist anymore
      element.tap();

      // that doesn't throw. The element isn't visible, but it's still accessible with UIAutomation.
      String s = element.getName();
      Assert.fail("cannot access stale elements");
    } finally {
View Full Code Here

    String name = "TextView, Use of UITextField";
    Criteria c1 = new TypeCriteria(UIATableCell.class);
    Criteria c2 = new NameCriteria(name);
    Criteria c = new AndCriteria(c1, c2);
    UIAElement element = driver.findElement(c);
    element.tap();
    Criteria fieldC = new TypeCriteria(UIATextView.class);
    UIATextView res = (UIATextView) driver.findElement(fieldC);
    return res;
  }
View Full Code Here

    getSession().getDualDriver().setMode(WorkingMode.Native);
    getAddressBar().click();
    RemoteUIAKeyboard keyboard = (RemoteUIAKeyboard) getNativeDriver().getKeyboard();
    keyboard.sendKeys(url);
    UIAElement go = keyboard.findElement(new NameCriteria("Go"));
    go.tap();
    getSession().getDualDriver().setMode(WorkingMode.Web);

  }

  private void fakeTypeURL(String url) {
View Full Code Here

    driver =
        new RemoteIOSDriver(getRemoteURL(),
            SampleApps.intlMountainsCap(Locale.FRENCH.toString()));
    Criteria c1 = new TypeCriteria(UIATableCell.class);
    UIAElement element = driver.findElement(c1);
    element.tap();

    NameCriteria criteria =
        new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
    UIAElement el = driver.findElement(criteria);
    JSONObject log = el.logElementTree(null, true);
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.