In our previous blog, we discussed on Web Application Test Automation using Selenium WebDriver & TestNG. In this blog, we will discuss the main difference between Selenium 2 & 3. Selenium, for a long time, has been one of the most common automation tool used by testers and developers to provide automation testing services. While Selenium was still under development, an automation tool named QTP was popular. However, QTP (now UFT) is not an open source and has an expensive license fee. QTP was developed by Mercury Interactive. Selenium is known for curing Mercury poisoning, the new tools were named as Selenium, so as to provide a free open source alternative to the expensive automation tool developed by Mercury Interactive. Over the years, Selenium quickly grew from being just another automation tool to one of the heavyweights amongst the testing tools. Besides being the most popularly used freeware and open source automation tool, it has immense benefits for Test Automation. Amongst them, is the ease to get started with functional testing of web applications and also it support for various browsers.
Selenium 2.53 has also been quite a popular and stable version of Selenium 2 and has been widely used by the testing communities around the world. But, the only thing constant in this world, is change. The Selenium 3 version has been released and it is more powerful and robust than Selenium 2.
Some features of Selenium 2.0 are as follows
~ Minimum Java version required is below 7 or below.
~ Support Firefox browser version below 47.0
~ It supports HeadLess Browser with HtmlWebDriver.
~ Selenium 2 supported selenium core for backward compatibility.
~ Selenium 2 provided the webdriver for each browser like Firefox, Google Chrome, IE, Microsoft Edge, Safari.
The major version change from Selenium 2 to 3 means significant additions in terms of functionality and/or interface changes. Some of the major changes and additions apart from bug fixes from previous versions are
~ Java 8 is a must.
~ The support for browser drivers has changed for all the major browsers.
~ Developing W3C webdriver specification.
~ The original Selenium Core will be retired, which will have a significant impact on teams using Selenium Core.
~ Selenium 3.0 does not have HeadLess Driver.
Earlier, the Selenium project has been maintaining webdriver for each browser. Now, the major browser vendors like Google Chrome, Apple Safari, Microsoft Edge, and Mozilla Firefox are providing their own implementation of the webdriver. Google will provide its own ChromeDriver. Mozilla’s GeckoDriver will be used for Firefox WebDriver. Apple’s SafariDriver will be used from Safari 10 onwards. Microsoft, too, will provide an EdgeDriver for their Edge Browser.
As the Selenium WebDriver has been accepted as the W3C Standard. The W3C (World Wide Web Consortium) develops common protocols, guidelines, and open standards. These standards will ensure that long-term development advance in the same direction, rather than diverging in different paths causing conflict. The W3C webdriver specification was much needed because browsers are complex, and delivering an established specification that all browser vendors must follow will have a positive impact on the testing community. Browser vendors must prepare for future W3C published webdriver specifications. As the webdrivers, henceforth, are going to be maintained by their respective browser vendors, it is predicted that the future webdrivers will be more stable as the browser vendors know their product well than the open source community.
The journey from Selenium 2.53 to Selenium 3.1.2 will not be a tough one. Most of the automated tests written to work with 2.53 will also work with 3.1.2 seamlessly. The biggest change for most webdriver users will be using the geckodriver with Firefox. Yet, the automated tests need to be updated to work properly with future Selenium release and webdriver versions. Selenium Core users would have to upgrade to Selenium 3, as Selenium Core is longer supported.
Selenium has always been a popular automation testing tool among testers. And now with Selenium 3 release, the experience is set to get even better. Due to flawless and persistent work by the Selenium Community around the world, Selenium stands out among hundreds of other automation testing tools.