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;
}