Java Code Examples for io.github.bonigarcia.wdm.WebDriverManager#chromedriver()

The following examples show how to use io.github.bonigarcia.wdm.WebDriverManager#chromedriver() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PropertiesTest.java    From webdrivermanager with Apache License 2.0 5 votes vote down vote up
@Test
public void testCustomProperties() {
    WebDriverManager chromedriver = WebDriverManager.chromedriver();
    chromedriver.config().setProperties("wdm-test.properties");
    chromedriver.setup();
    String binaryPath = chromedriver.getBinaryPath();
    File binary = new File(binaryPath);
    assertTrue(binary.exists());
}
 
Example 2
Source File: DownloadWebDriver.java    From zap-extensions with Apache License 2.0 5 votes vote down vote up
private static WebDriverManager getInstance(DriverManagerType browser) {
    switch (browser) {
        case CHROME:
            return WebDriverManager.chromedriver();
        case FIREFOX:
            return new FirefoxDriverManagerCustom();
        default:
            throw new UnsupportedOperationException(
                    "Only Chrome and Firefox are currently supported.");
    }
}
 
Example 3
Source File: Config.java    From selenium-jupiter with Apache License 2.0 4 votes vote down vote up
public WebDriverManager chromedriver() {
    return WebDriverManager.chromedriver();
}
 
Example 4
Source File: BrowserVersionTest.java    From webdrivermanager with Apache License 2.0 4 votes vote down vote up
@Test
public void testChromeVersion() {
    WebDriverManager driverManager = WebDriverManager.chromedriver();
    driverManager.browserVersion("81").setup();
    assertDriver(driverManager);
}
 
Example 5
Source File: ChromeVersionTest.java    From webdrivermanager with Apache License 2.0 4 votes vote down vote up
@Before
public void setup() {
    browserManager = WebDriverManager.chromedriver();
    specificVersions = new String[] { "2.10", "2.33" };
}