use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testAndroidVersionWrongPattern.
/**
* Check that if file name does not respect the pattern, file is rejected
* @throws Exception
*/
@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testAndroidVersionWrongPattern() throws Exception {
List<String> driverList = Arrays.asList("chromedriver_2.20_chrome-55-57_android-6");
BrowserInfo bInfo = PowerMockito.spy(new BrowserInfo(BrowserType.BROWSER, "6.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 testDriverDoesNotExist.
@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testDriverDoesNotExist() {
BrowserInfo bInfo = new BrowserInfo(BrowserType.EDGE, "10", null);
bInfo.getDriverFileName();
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testHighestDriverVersion.
@Test(groups = { "ut" })
public void testHighestDriverVersion() {
BrowserInfo bi1 = new BrowserInfo(BrowserType.CHROME, "48.0", null);
BrowserInfo bi2 = new BrowserInfo(BrowserType.CHROME, "58.0", null);
BrowserInfo highestBi = BrowserInfo.getHighestDriverVersion(Arrays.asList(bi1, bi2));
Assert.assertEquals(highestBi, bi2);
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testAndroidVersionExactMatch.
/**
* Check we take the exact driver version matching this android browser version
* @throws Exception
*/
@Test(groups = { "ut" })
public void testAndroidVersionExactMatch() throws Exception {
List<String> driverList = Arrays.asList("chromedriver_2.20_chrome-55-57_android-6.0.exe", "chromedriver_2.29_chrome-56-58_android-7.0", "chromedriver_2.31_chrome-58-60");
BrowserInfo bInfo = PowerMockito.spy(new BrowserInfo(BrowserType.BROWSER, "6.0", null));
PowerMockito.when(bInfo, "getDriverFiles").thenReturn(driverList);
PowerMockito.doNothing().when(bInfo, "checkResourceExists");
Assert.assertEquals(bInfo.getDriverFileName(), "chromedriver_2.20_chrome-55-57_android-6.0");
}
use of com.seleniumtests.browserfactory.BrowserInfo in project seleniumRobot by bhecquet.
the class TestBrowserInfo method testGetInfoFromNonExistentPath.
@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testGetInfoFromNonExistentPath() {
BrowserInfo bi1 = new BrowserInfo(BrowserType.CHROME, "48.0", "/home/tu/chrome", false);
BrowserInfo bi2 = new BrowserInfo(BrowserType.CHROME, "58.0", "/home/tu/chrome2", false);
BrowserInfo.getInfoFromBinary("/home/tu/chrome3", Arrays.asList(bi1, bi2));
}
Aggregations