List of usage examples for org.openqa.selenium Platform getMajorVersion
public int getMajorVersion()
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; }