use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestMarionetteCapabilitiesFactory method testCreateDefaultCapabilitiesWithVersion.
@Test(groups = { "ut" })
public void testCreateDefaultCapabilitiesWithVersion() {
Mockito.when(config.isEnableJavascript()).thenReturn(true);
Mockito.when(config.getProxy()).thenReturn(proxyConfig);
Mockito.when(config.getBrowserVersion()).thenReturn("60.0");
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
Assert.assertEquals(capa.getVersion(), "60.0");
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestMarionetteCapabilitiesFactory method testCreateMarionetteCapabilitiesNoOverrideDownloadDirRemote.
/**
* issue #365: Check DownloadDir is not set in remote
*/
@Test(groups = { "ut" })
public void testCreateMarionetteCapabilitiesNoOverrideDownloadDirRemote() {
Mockito.when(config.getBrowserDownloadDir()).thenReturn("/home/download");
Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
FirefoxProfile profile = (FirefoxProfile) capa.getCapability(FirefoxDriver.PROFILE);
// check profile
Assert.assertEquals(profile.getStringPreference("browser.download.dir", ""), "");
Assert.assertEquals(profile.getIntegerPreference("browser.download.folderList", 0), 0);
Assert.assertEquals(profile.getStringPreference("browser.helperApps.neverAsk.saveToDisk", ""), "");
}
use of com.seleniumtests.browserfactory.FirefoxCapabilitiesFactory in project seleniumRobot by bhecquet.
the class TestMarionetteCapabilitiesFactory method testCreateFirefoxCapabilitiesWithUserProfile.
@Test(groups = { "ut" })
public void testCreateFirefoxCapabilitiesWithUserProfile() {
Mockito.when(config.getMode()).thenReturn(DriverMode.GRID);
Mockito.when(config.getFirefoxProfilePath()).thenReturn("/home/user/profile");
MutableCapabilities capa = new FirefoxCapabilitiesFactory(config).createCapabilities();
// check 'firefoxProfile' is set to user profile
Assert.assertEquals(capa.getCapability("firefoxProfile"), "/home/user/profile");
}
Aggregations