Package org.openqa.selenium.os

Examples of org.openqa.selenium.os.CommandLine


  @After
  public void afterEach() {
    driver.quit();

    // Make sure Opera is gone
    CommandLine line = new CommandLine("kill", "`pgrep opera`");
    line.execute();
  }
View Full Code Here


      throw new WebDriverException("Unknown platform: " + currentPlatform);
    }
  }

  private static String executeCommand(String commandName, String... args) {
    CommandLine cmd = new CommandLine(commandName, args);
    logger.fine(cmd.toString());

    cmd.execute();
    String output = cmd.getStdOut();

    if (!cmd.isSuccessful()) {
      throw new WebDriverException(
          String.format("exec return code %d: %s", cmd.getExitCode(), output));
    }

    return output;
  }
View Full Code Here

    try {
      if (isOperaRunning()) {
        return;
      }

      process = new CommandLine(
          settings.getBinary().getCanonicalPath(),
          Iterables.toArray(settings.arguments().getArgumentsAsStringList(), String.class)
      );
      logger.config(String.format("runner arguments: %s", process));
View Full Code Here

TOP

Related Classes of org.openqa.selenium.os.CommandLine

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.