Skip to main content

Posts

Featured

Automatic download and management of Selenium WebDriver binaries (Driver.exe files)

In this post we will see how to avoid downloading driver.exe file and setpath for browser binary.

As you guys already know in order to use chrome, firefox or edge browsers, first we need to download a binary file (driver.exe) and need to set path which allows Webdriver to handle browsers.


Below is example how to set path:
By adding a small dependency in your POM.xml (Assuming you are using maven project) we can avoid downloading binary files and set path.In addition, we have to check manually when new versions of the binaries are released. WebDriverManager will do this job for us automatically


How it works: WebDriver Manager actually gets your browser version and download the compatible browser binary by itself to make you run your code without interruption.
So now, rather than setting the browser binaries, you just need to add below line of code and you’re done

The line WebDriverManager.chromedriver().setup(); WebDriverManager does magic for you:
It checks for the latest version of the Web…

Latest Posts

Git Installation

Git and GitHub

Perfect Example for Handling Window,popup,Frame and Alerts

Handling OnChange events using Selenium webdriver and Java script

Advanced Xpath with Examples

Run selenium tests in Chrome and IE browser

Handling Basic Authentication Using Webdriver

Selenium Integration With Jenkins

Log4J Configuration

Handling webtables