use of com.seleniumtests.driver.WebUIDriver in project seleniumRobot by bhecquet.
the class TestWebUIDriver method testMultipleConstructor.
/**
* A new WebUIDriver is the new default one
*/
@Test(groups = { "ut" })
public void testMultipleConstructor() {
WebUIDriver uiDriver = WebUIDriverFactory.getInstance("foo");
WebUIDriver uiDriver2 = WebUIDriverFactory.getInstance("bar");
Assert.assertEquals(WebUIDriver.getUxDriverSession().get().size(), 2);
Assert.assertEquals(WebUIDriver.getCurrentWebUiDriverName(), "bar");
}
use of com.seleniumtests.driver.WebUIDriver in project seleniumRobot by bhecquet.
the class TestWebUIDriver method testCleanUpWithBrowserMob.
/**
* BrowserMob proxy is closed when driver is cleaned
*/
@Test(groups = { "ut" })
public void testCleanUpWithBrowserMob() {
SeleniumTestsContextManager.getThreadContext().setCaptureNetwork(true);
SeleniumTestsContextManager.getThreadContext().setBrowser("htmlunit");
WebUIDriver uiDriver = WebUIDriverFactory.getInstance("foo");
uiDriver.createRemoteWebDriver();
Assert.assertNotNull(uiDriver.getConfig().getBrowserMobProxy());
WebUIDriver.cleanUp();
Assert.assertNull(uiDriver.getConfig().getBrowserMobProxy());
}
use of com.seleniumtests.driver.WebUIDriver in project seleniumRobot by bhecquet.
the class TestWebUIDriver method testConstructor.
@Test(groups = { "ut" })
public void testConstructor() {
WebUIDriver uiDriver = WebUIDriverFactory.getInstance("foo");
Assert.assertEquals(WebUIDriver.getUxDriverSession().get().size(), 1);
Assert.assertEquals(WebUIDriver.getCurrentWebUiDriverName(), "foo");
}
use of com.seleniumtests.driver.WebUIDriver in project seleniumRobot by bhecquet.
the class TestWebUIDriver method testGetNoWebUiDriver2.
/**
* Null is returned when no WebUIDriver exist for this name
*/
@Test(groups = { "ut" })
public void testGetNoWebUiDriver2() {
WebUIDriver uiDriver = WebUIDriver.getWebUIDriver(true, "bar");
Assert.assertNull(WebUIDriver.getWebUIDriver(false, "foo"));
}
use of com.seleniumtests.driver.WebUIDriver in project seleniumRobot by bhecquet.
the class TestWebUIDriver method testCleanUpDriverNull.
/**
* Check there are no errors if driver is null
*/
@Test(groups = { "ut" })
public void testCleanUpDriverNull() {
SeleniumTestsContextManager.getThreadContext().setCaptureNetwork(true);
SeleniumTestsContextManager.getThreadContext().setBrowser("htmlunit");
WebUIDriver uiDriver = WebUIDriverFactory.getInstance("foo");
uiDriver.setDriver(null);
WebUIDriver.cleanUp();
}
Aggregations