use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testGetDefaultEdgeWindowsProfile.
@Test(groups = { "ut" })
public void testGetDefaultEdgeWindowsProfile() throws Exception {
PowerMockito.mockStatic(OSUtility.class);
when(OSUtility.getCurrentPlatorm()).thenReturn(Platform.WINDOWS);
BrowserInfo bi = new BrowserInfo(BrowserType.EDGE, "90.0", null);
Assert.assertTrue(bi.getDefaultProfilePath().replace("\\", "/").matches("C:/Users/.*?/AppData/Local/Microsoft/Edge/User Data"));
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testGetDefaultChromeWindowsProfile.
@Test(groups = { "ut" })
public void testGetDefaultChromeWindowsProfile() throws Exception {
PowerMockito.mockStatic(OSUtility.class);
when(OSUtility.getCurrentPlatorm()).thenReturn(Platform.WINDOWS);
BrowserInfo bi = new BrowserInfo(BrowserType.CHROME, "58.0", null);
Assert.assertTrue(bi.getDefaultProfilePath().replace("\\", "/").matches("C:/Users/.*?/AppData/Local/Google/Chrome/User Data"));
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testChromeVersionNoDriver.
/**
* Error should be raised when no driver is found
* @throws Exception
*/
@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testChromeVersionNoDriver() throws Exception {
List<String> driverList = Arrays.asList("chromedriver_2.20_android-6.0");
BrowserInfo bInfo = PowerMockito.spy(new BrowserInfo(BrowserType.CHROME, "70.0", null));
PowerMockito.when(bInfo, "getDriverFiles").thenReturn(driverList);
PowerMockito.doNothing().when(bInfo, "checkResourceExists");
bInfo.getDriverFileName();
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testIE10Version.
@Test(groups = { "ut" })
public void testIE10Version() {
if (SystemUtils.IS_OS_WINDOWS) {
BrowserInfo bInfo = new BrowserInfo(BrowserType.INTERNET_EXPLORER, "10", null);
Assert.assertEquals(bInfo.getDriverFileName(), "IEDriverServer_Win32");
}
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testGetDefaultEdgeLinuxProfile.
@Test(groups = { "ut" })
public void testGetDefaultEdgeLinuxProfile() throws Exception {
PowerMockito.mockStatic(OSUtility.class);
when(OSUtility.getCurrentPlatorm()).thenReturn(Platform.LINUX);
BrowserInfo bi = new BrowserInfo(BrowserType.EDGE, "90.0", null);
Assert.assertTrue(bi.getDefaultProfilePath().matches("/home/.*?/.config/edge/default"));
}
Aggregations