SeleniumWebDrivers

Automatic management of Selenium Driver Executable’s in run-time for Java. Which automates the required driver form cloud into your machine. So, that the driver will allow WebDriver to communicate with and control the browser.

SeleniumWebDrivers API SeleniumWebDrivers

SeleniumWebDrivers is used for driver automation. If the driver is not available in the Temporary path then it is going to download from the cloud and saves to Temporary/Drivers directory and servers from that location.

SeleniumWebDrivers is open source, released under the terms of Apache 2.0 License.

Browser Driver Cloud URL Layout Engine JavaScript Engine
Firefox Logo, 2017.svg Firefox releases GeckoDriver | XPI Extension Gecko SpiderMonkey
Google Chrome icon (September 2014).svg Google Chrome releases ChromeDriver Releases S3 Blink (WebKit on iOS) V8
Opera 2015 icon.svg Opera OperaChromiumDriver Releases Blink (formerly Presto) V8
Small "e" letter with a blue aureola Internet Explorer IEDriverServer CHANGELOG Trident Chakra (JScript9)
Microsoft Edge logo.svg Microsoft Edge Microsoft WebDriver EdgeHTML Chakra (JavaScript)
Apple Safari 8.0 Icon Safari 10 SafariDriver.safariextz 2.48 WebKit Nitro

Note: The SafariDriver is implemented as a Safari browser extension. The driver inverts the traditional client/server relationship and communicates with the WebDriver client using WebSockets.


Usage

In order to use SeleniumWebDrivers in a Maven project, you need to add the following dependency in your pom.xml (Java 7 or higher required):

You can dowlod form any of these Central Repositories like ,

<dependency>
    <groupId>io.github.Yash-777</groupId>
    <artifactId>SeleniumWebDrivers</artifactId>
    <version>1.0.0</version>
</dependency>
SeleniumHQ

Selenium is an umbrella project encapsulating a variety of tools and libraries enabling web browser automation. Selenium specifically provides infrastructure for the W3C WebDriver specification — a platform and language-neutral coding interface compatible with all major web browsers.

Selenium Documentation

Default Version Mappling file from the GITHUB. If the Default Version Mappling file doesnt contain latest mapping information then you can download the mapping file and upadate with new mapping’s, then you can pass it to get the updated driver.

Example Usage

Either use default Version Mappling file (OR) Provide Version pack information as parameter.

package io.github.yash777.driver;

Drivers drivers = new Drivers();
/** Auto Map driver version from browser version */
String CH51 = drivers.getDriverPath(Browser.CHROME, 51, "");
String FF46 = drivers.getDriverPath(Browser.FIREFOX, 46, "");
String FF55 = drivers.getDriverPath(Browser.FIREFOX, 55, "");
String OP50 = drivers.getDriverPath(Browser.OPERA, 50, "");
String OP48 = drivers.getDriverPath(Browser.OPERA, 28, "");

/** You can specify the driver version */
String FF_V19 = drivers.getDriverPath(Browser.FIREFOX, 48, "v0.19.1");
String CH_2_24 = drivers.getDriverPath(Browser.CHROME, 51, "2.24");

/** IE Driver form selenium version pack.
 * Exception « io.github.yash777.driver.WebDriverException: Selenium is not added to your project build path.
 */
String IE_SeleniumVer = drivers.getDriverPath(Browser.IEXPLORE, 11, "");

Download the mapplig file and update it with new mapping information. So, that applicaton uses new mapping information.

String cloud_VersionMappingURL = "https://raw.githubusercontent.com/Yash-777/SeleniumDriverAutomation/master/Drivers/versions-mapping";
DriverVersions.setVersionMappingFileURL( cloud_VersionMappingURL );
System.setProperty("selenium.drivers.mappingfile", "D:/DriversMapping.txt");

Samples to add drvier files to Selenium.

/** After getting the driver path you can set it as System property */
// Firefox
//F_Version XPI - List is > 17,24,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47.
System.setProperty(FirefoxDriver.SystemProperty.DRIVER_XPI_PROPERTY, FF46);
//SELENIUM-3 Mozilla GeckoDriver
System.setProperty("webdriver.gecko.driver", FF55);

// Google Chrome
System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, CH51);
// Opera  
System.setProperty("webdriver.opera.driver", OP50);
// Internet Explorer
System.setProperty(InternetExplorerDriverService.IE_DRIVER_EXE_PROPERTY, IE_SeleniumVer);  

If you are getting an exception like javax.net.ssl.SSLException: Received fatal alert: protocol_version then refer to this POST.