Havent you guys ever thought of why to write code everytime in which we set up path of browser driver exe, in order to begin with selenium.
One spanish engineer thought about it and wrote one library -- WebDriverManager.
Lets see how we use to write code earlier..
System.SetProperty("webdriver.chrome.driver","Path to browser driver exe");
WebDriver driver = new ChromeDrver();
Now you see you have to check latest driver exe's , download them , unzip them, put them at a location in your system , provide its path in your framework or code and then use it. Isn't it a hectic job.
So lets see how WebDriverManger rescues us.
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();
So here we are calling static method of WebDriverManager abstract class which returns instance of another class whose setup() method we are calling to setup binaries for latest version.
Source: https://github.com/bonigarcia/webdrivermanager
Save Water | Save Energy | Save Earth
Stop Pollution | Stop Plastic
Spread Peace
One spanish engineer thought about it and wrote one library -- WebDriverManager.
Lets see how we use to write code earlier..
System.SetProperty("webdriver.chrome.driver","Path to browser driver exe");
WebDriver driver = new ChromeDrver();
Now you see you have to check latest driver exe's , download them , unzip them, put them at a location in your system , provide its path in your framework or code and then use it. Isn't it a hectic job.
So lets see how WebDriverManger rescues us.
WebDriverManager.chromedriver().setup();
WebDriver driver = new ChromeDriver();
So here we are calling static method of WebDriverManager abstract class which returns instance of another class whose setup() method we are calling to setup binaries for latest version.
Source: https://github.com/bonigarcia/webdrivermanager
Save Water | Save Energy | Save Earth
Stop Pollution | Stop Plastic
Spread Peace
No comments:
Post a Comment