use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestMarionetteCapabilitiesFactory method testCreateMarionetteCapabilitiesStandardDriverPathGrid.
@Test(groups = { "ut" })
public void testCreateMarionetteCapabilitiesStandardDriverPathGrid() {
System.clearProperty(GeckoDriverService.GECKO_DRIVER_EXE_PROPERTY);
Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);
new FirefoxCapabilitiesFactory(config).createCapabilities();
Assert.assertNull(System.getProperty(GeckoDriverService.GECKO_DRIVER_EXE_PROPERTY));
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestMarionetteCapabilitiesFactory method testCreateDefaultCapabilitiesWithJavascriptDisabled.
@Test(groups = { "ut" })
public void testCreateDefaultCapabilitiesWithJavascriptDisabled() {
Mockito.when(config.isEnableJavascript()).thenReturn(false);
Mockito.when(config.getProxy()).thenReturn(proxyConfig);
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
Assert.assertFalse(capa.is(CapabilityType.SUPPORTS_JAVASCRIPT));
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestFirefoxCapabilitiesFactory method testCreateDefaultCapabilitiesWithPlatform.
@Test(groups = { "ut" })
public void testCreateDefaultCapabilitiesWithPlatform() {
Mockito.when(config.isEnableJavascript()).thenReturn(true);
Mockito.when(config.getProxy()).thenReturn(proxyConfig);
Mockito.when(config.getWebPlatform()).thenReturn(Platform.WINDOWS);
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
Assert.assertEquals(capa.getPlatform(), Platform.WINDOWS);
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestFirefoxCapabilitiesFactory method testCreateDefaultCapabilitiesWithNodeTagsInGridMode.
/**
* Check default behaviour when node tags are defined in grid mode
* tags are transferred to driver
*/
@Test(groups = { "ut" })
public void testCreateDefaultCapabilitiesWithNodeTagsInGridMode() {
Mockito.when(config.isEnableJavascript()).thenReturn(true);
Mockito.when(config.getProxy()).thenReturn(proxyConfig);
Mockito.when(config.getNodeTags()).thenReturn(Arrays.asList("foo", "bar"));
Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
Assert.assertEquals(capa.getCapability(SeleniumRobotCapabilityType.NODE_TAGS), Arrays.asList("foo", "bar"));
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestFirefoxCapabilitiesFactory method testCreateFirefoxCapabilitiesWithDefaultProfile.
@Test(groups = { "ut" })
public void testCreateFirefoxCapabilitiesWithDefaultProfile() {
Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);
Mockito.when(config.getFirefoxProfilePath()).thenReturn(BrowserInfo.DEFAULT_BROWSER_PRODFILE);
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
// check 'firefoxProfile' is set to 'default'
Assert.assertEquals(capa.getCapability("firefoxProfile"), BrowserInfo.DEFAULT_BROWSER_PRODFILE);
}
Aggregations