use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityIphoneTest.
@Test
public void setupBrowserCapabilityIphoneTest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.IPHONE);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "iPhone");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "iPhone");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserDetailsBrowserNameTest.
@Test
public void setupBrowserDetailsBrowserNameTest() {
TestSetup setup = new TestSetup();
setup.setupBrowserDetails(null);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertFalse(capability.is(CapabilityType.BROWSER_NAME));
Assert.assertNull(capability.getCapability(CapabilityType.BROWSER_NAME));
setup.setupBrowserDetails(new HashMap<>());
capability = setup.getDesiredCapabilities();
Assert.assertFalse(capability.is(CapabilityType.BROWSER_NAME));
Assert.assertNull(capability.getCapability(CapabilityType.BROWSER_NAME));
Map<String, String> browserDetails = new HashMap<>();
browserDetails.put("browserName", "CHROME");
setup.setupBrowserDetails(browserDetails);
capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "CHROME");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "CHROME");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityFIREFOXTest.
@Test
public void setupBrowserCapabilityFIREFOXTest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.FIREFOX);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "firefox");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "firefox");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserCapabilityCHROMETest.
@Test
public void setupBrowserCapabilityCHROMETest() throws InvalidBrowserException {
TestSetup setup = new TestSetup();
setup.setupBrowserCapability(Browser.CHROME);
DesiredCapabilities capability = setup.getDesiredCapabilities();
Assert.assertEquals(capability.getBrowserName(), "chrome");
Assert.assertEquals(capability.getCapability(CapabilityType.BROWSER_NAME), "chrome");
}
use of com.coveros.selenified.utilities.TestSetup in project selenified by Coveros.
the class TestSetupTest method setupBrowserDetailsNonStandardDevicePlatformTest.
@Test
public void setupBrowserDetailsNonStandardDevicePlatformTest() {
Map<String, String> browserDetails = new HashMap<>();
browserDetails.put("devicePlatform", "Sun");
TestSetup setup = new TestSetup();
setup.setupBrowserDetails(browserDetails);
setup.getDesiredCapabilities().getPlatform();
}
Aggregations