Package org.uiautomation.ios

Examples of org.uiautomation.ios.IOSCapabilities


    Assert.assertEquals(actual.getLocale(), "en_GB");
  }

  @Test
  public void startSpecifiedLanguageLocale() {
    IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
    cap.setLanguage("fr");
    cap.setLocale("es");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);

    IOSCapabilities actual = driver.getCapabilities();
    Assert.assertEquals(actual.getBundleId(), "com.yourcompany.InternationalMountains");
    Assert.assertEquals(actual.getBundleVersion(), "1.1");
    // default to UK Assert.assertEquals(target.getLanguage(), "fr");
    Assert.assertEquals(actual.getLocale(), "es");
  }
View Full Code Here


  }

  // TODO freynaud should load english instead ?
  @Test(expectedExceptions = SessionNotCreatedException.class)
  public void recognizeUnsupportedLanguageLocale() {
    IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
    cap.setLanguage("es");
    cap.setLocale("es");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

    driver = new RemoteIOSDriver(getRemoteURL(), IOSCapabilities.iphone("ferret", "2.10"));
  }

  @Test(expectedExceptions = SessionNotCreatedException.class)
  public void sdkTooOld() {
    IOSCapabilities cap = SampleApps.uiCatalogCap();
    cap.setSDKVersion("4.3");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }

  @Test(expectedExceptions = SessionNotCreatedException.class)
  public void sdkNotInstalled() {
    IOSCapabilities cap = SampleApps.uiCatalogCap();
    cap.setSDKVersion("5.1");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

        new RemoteIOSDriver(getRemoteURL(), IOSCapabilities.iphone("UICatalog", "not a number."));
  }

  @Test(expectedExceptions = SessionNotCreatedException.class)
  public void wrongSDK() {
    IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
    cap.setSDKVersion("17");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }

  @Test
  public void correctSDK() {
    IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
    String sdk = ClassicCommands.getDefaultSDK();
    cap.setSDKVersion(sdk);
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
    IOSCapabilities actual = driver.getCapabilities();
    Assert.assertEquals(actual.getSDKVersion(), sdk);
  }
View Full Code Here

    for (String sdk : sdks) {

      if (new IOSVersion(sdk).isGreaterOrEqualTo("5.0")) {

        try {
          IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
          cap.setSDKVersion(sdk);

          driver = new RemoteIOSDriver(getRemoteURL(), cap);
          IOSCapabilities actual = driver.getCapabilities();

          Assert.assertEquals(actual.getSDKVersion(), sdk);
        } finally {
          if (driver != null) {
            driver.quit();
            driver = null;
          }
View Full Code Here

    }
  }

  @Test
  public void correctDevice() {
    IOSCapabilities cap = IOSCapabilities.iphone("UICatalog");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
    IOSCapabilities actual = driver.getCapabilities();
    Assert.assertEquals(actual.getDevice(), DeviceType.iphone);

    driver.quit();

    cap = IOSCapabilities.ipad("UICatalog");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
    actual = driver.getCapabilities();
    Assert.assertEquals(actual.getDevice(), DeviceType.ipad);
  }
View Full Code Here

    Assert.assertEquals(actual.getDevice(), DeviceType.ipad);
  }

  @Test
  public void canUseAnyFlagFromInfoPlistMatches() {
    IOSCapabilities cap = IOSCapabilities.iphone("UICatalog");
    cap.setCapability(IOSCapabilities.MAGIC_PREFIX + "CFBundleDevelopmentRegion", "en");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
    IOSCapabilities actual = driver.getCapabilities();
    Assert.assertEquals(actual.getBundleId(), "com.yourcompany.UICatalog");
    Assert.assertEquals(actual.getBundleVersion(), "2.10");
  }
View Full Code Here

  }


  @Test(expectedExceptions = SessionNotCreatedException.class)
  public void canUseAnyFlagFromInfoPlistMatchesNeg() {
    IOSCapabilities cap = IOSCapabilities.iphone("UICatalog");
    cap.setCapability(IOSCapabilities.MAGIC_PREFIX + "CFBundleDevelopmentRegion", "en2");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.IOSCapabilities

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.