Example usage for org.openqa.selenium.os CommandLine CommandLine

List of usage examples for org.openqa.selenium.os CommandLine CommandLine

Introduction

In this page you can find the example usage for org.openqa.selenium.os CommandLine CommandLine.

Prototype

public CommandLine(String[] cmdarray) 

Source Link

Usage

From source file:com.atlassian.selenium.browsers.firefox.DisplayAwareFirefoxChromeLauncher.java

License:Apache License

protected CommandLine prepareCommand(String... commands) {
    CommandLine command = new CommandLine(commands);
    command.setEnvironmentVariable("MOZ_NO_REMOTE", "1");

    // don't set the library path on Snow Leopard
    Platform platform = Platform.getCurrent();
    if (!platform.is(Platform.MAC) || ((platform.is(Platform.MAC)) && platform.getMajorVersion() <= 10
            && platform.getMinorVersion() <= 5)) {
        command.setDynamicLibraryPath(browserInstallation.libraryPath());
    }/*  w  w  w. ja v a 2s .c  om*/

    if (System.getProperty("DISPLAY") != null) {
        command.setEnvironmentVariable("DISPLAY", System.getProperty("DISPLAY"));
    }

    return command;
}