Package org.uiautomation.ios.utils

Examples of org.uiautomation.ios.utils.IOSVersion


  }



  private void setFavorite(){
    boolean isSDK70OrHigher = new IOSVersion(session.getCapabilities().getSDKVersion()).isGreaterOrEqualTo(
        "7.0");
    IOSRunningApplication application = session.getApplication();
    if (application.isSafari() && isSDK70OrHigher && application.isSimulator()) {
      application.setSafariBuiltinFavorites();
    }
View Full Code Here


      }
    }

    script.append("var x = left;");
    boolean ipad = session.getCapabilities().getDevice() == DeviceType.ipad;
    boolean ios7 = new IOSVersion(session.getCapabilities().getSDKVersion()).isGreaterOrEqualTo("7.0");
    boolean ios8 = new IOSVersion(session.getCapabilities().getSDKVersion()).isGreaterOrEqualTo("8.0");

    if (ios8) {
      if (isSafari()) {
        // the first button in the second view for iOS8 safari is the height of the address bar
        script.append("top += root.elements()[1].elements()[0].rect().size.height;");
View Full Code Here

    StringBuilder script = new StringBuilder();
    script.append("var keyboard; var waiter = 10; while(waiter-- > 0){try{ " +
            "keyboard = UIAutomation.cache.get('1').keyboard(); break;}catch(e){UIATarget.localTarget().delay(1);}}; ");

    Boolean keyboardResigned = false;
    boolean ios7 = new IOSVersion(session.getCapabilities().getSDKVersion()).isGreaterOrEqualTo("7.0");

    StringBuilder current = new StringBuilder();
    XPath2Engine xpathEngine = null;
    for (int i = 0; i < value.length(); i++) {
      int idx = specialKeys.indexOf(value.charAt(i));
View Full Code Here

  public void setup() {
    DeviceType deviceType = caps.getDevice();
    IOSRunningApplication application = session.getApplication();
    String locale = caps.getLocale();
    String language = caps.getLanguage();
    IOSVersion instrumentsVersion = new IOSVersion(info.getInstrumentsVersion().getVersion());
    boolean instrumentsIs50OrHigher = instrumentsVersion.isGreaterOrEqualTo("5.0");

    boolean putDefaultFirst = instrumentsIs50OrHigher;

    simulatorSettings.setSimulatorScale(caps.getSimulatorScale());

    if (!instrumentsVersion.isGreaterOrEqualTo("6.0")) {
      application.setDefaultDevice(deviceType, putDefaultFirst);
    }

    if (!caps.getReuseContentAndSettings()) {
      simulatorSettings.resetContentAndSettings();
View Full Code Here

  @Test
  public void supportAllInstalledSDKs() {
    List<String> sdks = ClassicCommands.getInstalledSDKs();
    for (String sdk : sdks) {

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

        try {
          IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains");
          cap.setSDKVersion(sdk);
View Full Code Here

    if (session.getApplication().isSafari()) {
      setMode(WorkingMode.Web);
      getRemoteWebDriver().get("about:blank");

      String sdkVersion = session.getCapabilities().getSDKVersion();
      IOSVersion version = new IOSVersion(sdkVersion);
      if (sdkVersion != null && version.isGreaterOrEqualTo("7.0")) {
        if (!(getNativeDriver().getInstruments() instanceof NoInstrumentsImplementationAvailable)) {
          forceWebViewToReloadManually(3);
        }
      }
    }
View Full Code Here

  }

  public synchronized RemoteIOSWebDriver getRemoteWebDriver() {
    if (!webDriver.isStarted()) {
      String version = session.getCapabilities().getSDKVersion();
      if (new IOSVersion(version).isGreaterOrEqualTo("6.0")) {
        webDriver.start();
      } else {
        log.warning("Cannot create a driver. Version too old " + version);
      }
    }
View Full Code Here


  public static APPIOSApplication locateSafariInstall(String sdkVersion) {
    APPIOSApplication res = safariCopies.get(sdkVersion);
    if (res == null) {
      if (new IOSVersion(sdkVersion).isGreaterOrEqualTo("8.0")) {
        res = APPIOSApplication.findSafariApp(xcode, sdkVersion);
      } else {
        res = copyOfSafari(xcode, sdkVersion);
      }
      safariCopies.put(sdkVersion, res);
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.utils.IOSVersion

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.