use of com.microsoft.edge.seleniumtools.EdgeOptions in project seleniumRobot by bhecquet.
the class TestEdgeCapabilityFactory method testCreateEdgeCapabilitiesWrongProfileGrid.
@Test(groups = { "ut" })
public void testCreateEdgeCapabilitiesWrongProfileGrid() {
when(config.getMode()).thenReturn(DriverMode.GRID);
when(config.getEdgeProfilePath()).thenReturn("foo");
MutableCapabilities capa = new EdgeCapabilitiesFactory(config).createCapabilities();
// check 'edgeProfile' is not set as it's wrong profile path, and no option added
Assert.assertNull(capa.getCapability("edgeProfile"));
Assert.assertFalse(((Map<String, List<String>>) (((EdgeOptions) capa).asMap().get(EdgeOptions.CAPABILITY))).get("args").toString().contains("--user-data-dir=/home/user/profile"));
}
use of com.microsoft.edge.seleniumtools.EdgeOptions in project seleniumRobot by bhecquet.
the class TestEdgeCapabilityFactory method testCreateDefaultEdgeCapabilities.
@Test(groups = { "ut" })
public void testCreateDefaultEdgeCapabilities() {
MutableCapabilities capa = new EdgeCapabilitiesFactory(config).createCapabilities();
Assert.assertEquals(((Map<?, ?>) (((EdgeOptions) capa).asMap().get(EdgeOptions.CAPABILITY))).get("args").toString(), "[--disable-translate, --disable-web-security, --no-sandbox, --disable-site-isolation-trials, --disable-features=IsolateOrigins,site-per-process]");
Assert.assertEquals(capa.getCapability(CapabilityType.BROWSER_NAME), "MicrosoftEdge");
Assert.assertEquals(((Map<?, ?>) (((EdgeOptions) capa).asMap().get(EdgeOptions.CAPABILITY))).get("prefs").toString(), "{profile.exit_type=Normal}");
// no debuger address set as we do not attach an existing browser
Assert.assertNull(((Map<?, ?>) (((EdgeOptions) capa).asMap().get(EdgeOptions.CAPABILITY))).get("debuggerAddress"));
}
Aggregations