Example usage for org.openqa.selenium Platform getMajorVersion

List of usage examples for org.openqa.selenium Platform getMajorVersion

Introduction

In this page you can find the example usage for org.openqa.selenium Platform getMajorVersion.

Prototype

public int getMajorVersion() 

Source Link

Document

Returns the major version of this platform.

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());
    }/*from  w  ww .j av a  2  s. co  m*/

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

    return command;
}