Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriverException


      stop();
      start();
      try {
        writeBytes(bytes);
      } catch (IOException e) {
        throw new WebDriverException(e);
      }
    } catch (IOException e) {
      throw new WebDriverException(e);
    }
  }
View Full Code Here


      builder.append("]");
      return builder.toString();
    }

    log.warning("Not implemented, JS argument is a " + value.getClass());
    throw new WebDriverException("Not implemented, JS argument is a " + value.getClass());
  }
View Full Code Here

    if (sessions.size() == 0) {
      resp.setSessionId(null);
    } else if (sessions.size() == 1) {
      resp.setSessionId(sessions.get(0).getSessionId());
    } else {
      throw new WebDriverException("NI multi sessions per server.");
    }
    return resp;
  }
View Full Code Here

      response.setCharacterEncoding("UTF-8");
      response.setStatus(200);

      response.getWriter().print(b.toString());
    } catch (Exception e) {
      throw new WebDriverException(e);
    }
  }
View Full Code Here

  public int executeAndWait(boolean ignoreErrors) {
    start();
    int exitCode = waitFor(-1);
    if (!ignoreErrors && exitCode != 0) {
      throw new WebDriverException(
          "execution failed. Exit code =" + exitCode + " , command was: " + commandString());
    }
    for (Thread t : threads) {
      try {
        t.join();
      } catch (InterruptedException e) {
        throw new WebDriverException(e);
      }
    }
    return exitCode;
  }
View Full Code Here

    }

    try {
      process = builder.start();
    } catch (IOException e) {
      throw new WebDriverException("failed to start process " + args, e);
    }

    threads.add(listen(process.getInputStream(), out, true));
    threads.add(listen(process.getErrorStream(), err, false));
  }
View Full Code Here

        }, maxWaitMillis);
      }
      return process.waitFor();
    } catch (InterruptedException e) {

      throw new WebDriverException("error waiting for " + args + " to finish.", e);
    } finally {
      if (forceStopTimer != null) {
        forceStopTimer.cancel();
      }
    }
View Full Code Here

    this.workingDirectory =
        new File(System.getProperty("java.io.tmpdir") + pathForVersion(version));

    this.workingDirectory.mkdirs();
    if (!this.workingDirectory.exists()) {
      throw new WebDriverException(
          "Cannot create dir to extract instruments stuff : " + workingDirectory);
    }
    this.executable = extract(version);
  }
View Full Code Here

    this.executable = extract(version);
  }

  public static synchronized InstrumentsNoDelayLoader getInstance(InstrumentsVersion version) {
    if (instance != null && !version.equals(instance.version)) {
      throw new WebDriverException(
          "Cannot switch instruments from vesrion " + instance.version + " to version " + version
          + " without restarting the server.");
    }
    if (instance == null) {
      instance = new InstrumentsNoDelayLoader(version);
View Full Code Here

  /**
   * extract the binaries for the specified version of instruments.
   */
  private File extract(InstrumentsVersion version) {
    if (version.getBuild() == null) {
      throw new WebDriverException("you are running a version of XCode that is too old " + version);
    }

    extractFromJar("instruments");
    extractFromJar("InstrumentsShim.dylib");
    extractFromJar("ScriptAgentShim.dylib");
View Full Code Here

TOP

Related Classes of org.openqa.selenium.WebDriverException

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.