use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityHtmlUnitTest.
@Test
public void setupBrowserCapabilityHtmlUnitTest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.HTMLUNIT);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "htmlunit");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "htmlunit");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityEdgeTest.
@Test
public void setupBrowserCapabilityEdgeTest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.EDGE);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "MicrosoftEdge");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "MicrosoftEdge");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupProxyTest.
@Test
public void setupProxyTest() {
TestSetup setup = new TestSetup();
setup.setupProxy();
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertFalse(capability.is(CapabilityType.PROXY));
System.setProperty("proxy", "localhost");
setup.setupProxy();
capability = setup.getDesiredCapabilities();
Proxy export = (Proxy) capability.getCapability(CapabilityType.PROXY);
Assert.assertEquals(export.getHttpProxy(), "localhost");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserDetailsBrowserNameIllegalBrowserTest.
@Test(expectedExceptions = IllegalArgumentException.class)
public void setupBrowserDetailsBrowserNameIllegalBrowserTest() {
Map<String, String> browserDetails = new HashMap<>();
browserDetails.put("browserName", "BadBrowser");
TestSetup setup = new TestSetup();
setup.setupBrowserDetails(browserDetails);
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityInternetExplorerTest.
@Test
public void setupBrowserCapabilityInternetExplorerTest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.INTERNETEXPLORER);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "internet explorer");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "internet explorer");
}
Aggregations