Saturday, 1 December 2018

Open Browser with out downloading driver.exe file || Quick webdriver setup

Dependency:

<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>


Code:

WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();

OR

WebDriverManager.firefoxdriver().setup();
driver = new FirefoxDriver();

OR

WebDriverManager.iedriver().version("3.0.0").setup();
driver = new InternetExplorerDriver();