Created
January 21, 2020 17:05
-
-
Save eliasnogueira/9834f450cbf657d1d094f684686ebca5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static io.github.bonigarcia.wdm.DriverManagerType.CHROME; | |
import org.openqa.selenium.WebDriver; | |
import io.github.bonigarcia.wdm.WebDriverManager; | |
// ... | |
DriverManagerType chrome = DriverManagerType.CHROME; | |
WebDriverManager.getInstance(chrome).setup(); | |
Class<?> chromeClass = Class.forName(chrome.browserClass()); | |
driver = (WebDriver) chromeClass.newInstance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment