本文整理了Java中org.apache.commons.exec.OS.isFamilyMac()
方法的一些代码示例,展示了OS.isFamilyMac()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OS.isFamilyMac()
方法的具体详情如下:
包路径:org.apache.commons.exec.OS
类名称:OS
方法名:isFamilyMac
暂无
代码示例来源:origin: com.github.becausetesting/commons
+ _serverArguments.get(AppiumCommonArgs.PORT_NUMBER)
+ " \"`) do (FOR /F \"usebackq\" %b in (`TASKLIST /FI \"PID eq %a\" ^| findstr /I node.exe`) do taskkill /F /PID %a)"};
} else if (OS.isFamilyMac()) {
代码示例来源:origin: com.github.becauseQA/becauseQA-utils
+ _serverArguments.get(AppiumCommonArgs.PORT_NUMBER)
+ " \"`) do (FOR /F \"usebackq\" %b in (`TASKLIST /FI \"PID eq %a\" ^| findstr /I node.exe`) do taskkill /F /PID %a)"};
} else if (OS.isFamilyMac()) {
代码示例来源:origin: com.github.becauseQA/becauseQA-utils
/**
* Search the operating system for an Appium server installation directory.
*
* @return A File representation to the Appium server installation
* directory.
*/
private File searchForServerDirectory() {
if (OS.isFamilyWindows()) {
if (getArch().equals("32")) {
return doesDirectoryExists(System.getenv("ProgramFiles")
+ "/Appium");
} else {
// must be the x86_64
return doesDirectoryExists(System.getenv("ProgramFiles")
+ " (x86)/Appium");
}
} else if (OS.isFamilyMac()) {
return doesDirectoryExists("/Applications/Appium.app/Contents/Resources");
}
// server directrory was not found.
throw new ServerDirectoryNotFoundException();
}
代码示例来源:origin: com.github.becausetesting/commons
/**
* Search the operating system for an Appium server installation directory.
*
* @return A File representation to the Appium server installation
* directory.
*/
private File searchForServerDirectory() {
if (OS.isFamilyWindows()) {
if (getArch().equals("32")) {
return doesDirectoryExists(System.getenv("ProgramFiles")
+ "/Appium");
} else {
// must be the x86_64
return doesDirectoryExists(System.getenv("ProgramFiles")
+ " (x86)/Appium");
}
} else if (OS.isFamilyMac()) {
return doesDirectoryExists("/Applications/Appium.app/Contents/Resources");
}
// server directrory was not found.
throw new ServerDirectoryNotFoundException();
}
代码示例来源:origin: com.github.becausetesting/commons
} else if (OS.isFamilyMac() || OS.isFamilyUnix()) {
commanddLine = new CommandLine(command.contains(" ") ? "'" + command + "'" : command);
} else {
commanddLine.addArgument("\"" + parameter + "\"", false);
} else if (OS.isFamilyMac() || OS.isFamilyUnix()) {
for (String parameter : parameters) {
commanddLine.addArgument(parameter.contains(" ") ? "'" + parameter + "'" : parameter, false);
代码示例来源:origin: com.github.becauseQA/becauseQA-utils
} else if (OS.isFamilyMac() || OS.isFamilyUnix()) {
commanddLine = new CommandLine(command.contains(" ") ? "'" + command + "'" : command);
} else {
commanddLine.addArgument("\"" + parameter + "\"", false);
} else if (OS.isFamilyMac() || OS.isFamilyUnix()) {
for (String parameter : parameters) {
commanddLine.addArgument(parameter.contains(" ") ? "'" + parameter + "'" : parameter, false);
代码示例来源:origin: vmi/selenese-runner-java
@Override
public WebDriver newInstance(DriverOptions driverOptions) {
if (!OS.isFamilyMac())
throw new UnsupportedOperationException("Unsupported platform: " + Platform.getCurrent());
SafariDriverService service = setupBuilder(new SafariDriverService.Builder(), driverOptions, null).build();
SafariOptions options = newSafariOptions(driverOptions);
options.merge(driverOptions.getCapabilities());
SafariDriver driver = new SafariDriver(service, options);
setInitialWindowSize(driver, driverOptions);
return driver;
}
}
内容来源于网络,如有侵权,请联系作者删除!