Package org.uiautomation.ios.application

Examples of org.uiautomation.ios.application.APPIOSApplication


    try {
      File appFile = ZipUtils.extractAppFromURL(appURL);
      if (appFile.getName().endsWith(".app")) {
        capabilities.setCapability(IOSCapabilities.SIMULATOR, true);
      }
      APPIOSApplication app = APPIOSApplication.createFrom(appFile);
      AppleLanguage lang = AppleLanguage.valueOf(capabilities.getLanguage());
      return app.createInstance(lang);
    } catch (Exception ex) {
      throw new SessionNotCreatedException("cannot create app from " + appURL + ": " + ex);
    }

  }
View Full Code Here


                                           + desiredCapabilities.getRawCapabilities()
                                           + ".\n    Available apps: "
                                           + getSupportedApplications());
    }
    // if more than one matches it returns the last in the list (highest version for MobileSafari)
    APPIOSApplication app = matchingApps.get(matchingApps.size() - 1);
    AppleLanguage lang = AppleLanguage.create(desiredCapabilities.getLanguage());
    return app.createInstance(lang);
  }
View Full Code Here

    private JSONObject getAppResources(JSONObject app) {
      JSONObject resources = new JSONObject();
      if (app.has("applicationPath")) {
        try {
          String applicationPath = (String) app.get("applicationPath");
          APPIOSApplication a = mgr.getApplicationStore().getApplication(applicationPath);
          for (String key : a.getResources().keySet()) {
            resources.put(key, "/wd/hub/resources/" + mgr.getCache().getKey(a, key));
          }
        } catch (JSONException ignored) {
        }
      }
View Full Code Here

  public void add(String path) {
    if (path.endsWith(".ipa")) {
      IPAApplication app = IPAApplication.createFrom(new File(path));
      all.add(app);
    } else if (path.endsWith(".app")) {
      all.add(new APPIOSApplication(path));
    }
  }
View Full Code Here

      log.warning("Problem unzipping " + file.getAbsolutePath() + ", " + e.toString());
    }
  }

  private void addApplication(File file) {
    APPIOSApplication app;
    if (isApp(file)) {
      app = APPIOSApplication.createFrom(file);
    } else {
      app = new APPIOSApplication(file.getAbsolutePath());
    }
    iosServerManager.addSupportedApplication(app);
    log.info("added:\n\t" + app);
  }
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.application.APPIOSApplication

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.