use of com.seleniumtests.util.osutility.ProcessInfo in project seleniumRobot by bhecquet.
the class TestProcessInfo method testObjectEquals.
@Test(groups = { "ut" })
public void testObjectEquals() {
ProcessInfo pi = new ProcessInfo();
ProcessInfo info = new ProcessInfo();
assertEquals(pi, info);
}
use of com.seleniumtests.util.osutility.ProcessInfo in project seleniumRobot by bhecquet.
the class TestProcessInfo method testToStringNull.
@Test(groups = { "ut" })
public void testToStringNull() {
ProcessInfo pi = new ProcessInfo();
pi.setPid(null);
pi.setName(null);
String piString = pi.toString();
assertEquals(piString, "Process #null = null");
}
use of com.seleniumtests.util.osutility.ProcessInfo in project seleniumRobot by bhecquet.
the class TestOsUtility method testIsProcessRunningByPid.
@Test(groups = { "it" })
public void testIsProcessRunningByPid() {
String processName = "";
if (OSUtility.isWindows()) {
processName = "svchost";
} else if (OSUtility.isLinux()) {
processName = "dbus-daemon";
} else if (OSUtility.isMac()) {
processName = "sysmond";
}
ProcessInfo pi = osUtil.getRunningProcess(processName);
Assert.assertTrue(osUtil.isProcessRunningByPid(pi.getPid()));
}
use of com.seleniumtests.util.osutility.ProcessInfo in project seleniumRobot by bhecquet.
the class TestOsUtility method testWhichFirefoxWebBrowserRunning.
@Test(groups = { "it" })
public void testWhichFirefoxWebBrowserRunning() {
osUtil.killAllWebBrowserProcess(true);
SeleniumTestsContextManager.getThreadContext().setBrowser("firefox");
WebUIDriver.getWebDriver(true);
List<ProcessInfo> pis = osUtil.whichWebBrowserRunning(true);
for (ProcessInfo pi : pis) {
if (pi.getName().contains("firefox")) {
return;
}
}
Assert.fail("Firefox has not been found");
}
use of com.seleniumtests.util.osutility.ProcessInfo in project seleniumRobot by bhecquet.
the class TestOsUtility method testWhichChromeWebBrowserRunning.
@Test(groups = { "it" })
public void testWhichChromeWebBrowserRunning() {
osUtil.killAllWebBrowserProcess(true);
SeleniumTestsContextManager.getThreadContext().setBrowser("chrome");
WebUIDriver.getWebDriver(true);
List<ProcessInfo> pis = osUtil.whichWebBrowserRunning();
for (ProcessInfo pi : pis) {
if (pi.getName().contains("chrome")) {
return;
}
}
Assert.fail("Chrome has not been found");
}
Aggregations