Package org.openqa.selenium

Examples of org.openqa.selenium.SessionNotCreatedException


    try {
      logManager = new IOSLogManager(capabilities.getLoggingPreferences());
    } catch (Exception ex) {
      log.log(Level.SEVERE,"log manager error",ex);
      throw new SessionNotCreatedException("Cannot create logManager", ex);
    }

    ensureLanguage();
    ensureLocale();
View Full Code Here


      capabilities.setSDKVersion(ClassicCommands.getDefaultSDK());
    } else {
      String version = capabilities.getSDKVersion();

      if (!new IOSVersion(version).isGreaterOrEqualTo("5.0")) {
        throw new SessionNotCreatedException(
            version + " is too old. Only support SDK 5.0 and above.");
      }
      if (capabilities.isSimulator()) {
        if (!server.getHostInfo().getInstalledSDKs().contains(version)) {
          throw new SessionNotCreatedException(
              "Cannot start on version " + version + ".Installed: "
              + server.getHostInfo().getInstalledSDKs());
        }
      }
    }
View Full Code Here

      }
      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

  public IOSRunningApplication findAndCreateInstanceMatchingApplication(
      IOSCapabilities desiredCapabilities) {
    List<APPIOSApplication> matchingApps = findAllMatchingApplications(desiredCapabilities);
    if (matchingApps.size() == 0) {
      throw new SessionNotCreatedException("desired app not found on server: "
                                           + desiredCapabilities.getRawCapabilities()
                                           + ".\n    Available apps: "
                                           + getSupportedApplications());
    }
    // if more than one matches it returns the last in the list (highest version for MobileSafari)
View Full Code Here

        if (d != null) {
          return d;
        }
      }
    }
    throw new SessionNotCreatedException(
        desiredCapabilities.getRawCapabilities() + " no devices available.\n    Known devices: "
        + devices);
  }
View Full Code Here

      if (socket != null && (socket.isConnected() || !socket.isClosed())) {
        socket.close();
      }
      socket = new Socket(LOCALHOST_IPV6, port);
    } catch (IOException e) {
      throw new SessionNotCreatedException(
          "Cannot connect to the simulator socket on port 27753. Check that you don't have a firewall blocking it.",
          e);
    }
    startListenerThread();
    //sendCommand(PlistManager.SET_CONNECTION_KEY);
View Full Code Here

          break;
        }
      }

      if (session == null) {
        throw new SessionNotCreatedException(
            "failed starting after " + MAX_RETRIES + " retries.Final wait was " + timeOut);
      }

      Response resp = new Response();
      resp.setSessionId(session.getSessionId());
      resp.setStatus(0);
      resp.setValue("");
      return resp;
    } catch (Exception e) {
      if (session != null) {
        session.stop();
      }
      if (e instanceof WebDriverException) {
        throw e;
      } else {
        throw new SessionNotCreatedException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

      // start session
      session.start(timeOut);
      return session;
    } catch (SessionNotInitializedException e) {
      log.info("The server cannot run " + cap + " at the moment." + e.getMessage());
      throw new SessionNotCreatedException("The server cannot run " + cap + " at the moment." + e.getMessage());
    } catch (InstrumentsFailedToStartException|RecoverableCrashException e) {
      log.warning("Instruments failed to start in the allocated time ( " + timeOut + "sec):" + e
          .getMessage());
      if (session != null) {
        session.stop();
View Full Code Here

    if (appCapability.getSupportedLanguages().isEmpty()) {
      log.info(
          "The application doesn't have any content files."
          + " Localization related features won't be available.");
    } else if (l != null && !appCapability.getSupportedLanguages().contains(l)) {
      throw new SessionNotCreatedException(
          "Language requested, " + l + " ,isn't supported.Supported are : "
          + appCapability.getSupportedLanguages());
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.SessionNotCreatedException

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.