What To Expect From The Latest Version Of Selenium 4 Alpha?
Automation • Cross Browser Testing • Selenium Tutorial •
76182 Views | 6 Min Read
All of us belonging to the testing domain are familiar with Selenium, one of the most popular open source automation tools available in the industry. We were pretty excited in August 2018 when Simon Stewart, Selenium’s founding member officially announced the release date of Selenium 4 and what new features this latest selenium version will bring to the users.
The framework’s release got postponed just like it happened with Selenium 3. However, we have got our hands on the Alpha version of Selenium 4. We are really glad to see that they delivered some of the features in the latest Alpha version of Selenium 4 which they promised. Without any further delay, let’s get on knowing what is new in Selenium 4 and what we are getting in this selenium latest version .
New Features Promised in Selenium 4
In the Selenium conference at Bangalore, Simon Stewart announced the following changes which are supposed to happen in Selenium 4.
Selenium 4 IDE TNG
The record and playback feature of Selenium is taken to a whole new level with advanced and rich features. Previously Selenium only used to support Chrome. But with the latest selenium version i.e. Selenium 4, a plugin will allow you to run Selenium on any browser. Also, a user can now declare their own locator strategy.
There is also a new CLI runner which is based on Node JS, instead of the old HTML based CLI runner.
- It has the ability to execute test cases in parallel and provide information like passed and failed test cases, the time required, etc.
- The new IDE runner is completely based on WebDriver.
WebDriver API Became W3C Standardized in Selenium 4
WebDriver API is not only used in Selenium but in multiple automation tools as well. Mobile testing tools like Appium depend heavily on it for web testing of mobile applications. The most highlighted change with the latest selenium version i.e. Selenium 4 is the standardization of the WebDriver API with respect to W3C standards. This means it can now be implemented across different software without any compatibility issues.
Previously, when web testing was performed using Selenium 3, browser communication was performed via JSON wire protocol from the local end, which required API encoding and decoding. Not anymore though, as with Selenium 4, you won’t have to decode and encode your API request using W3C protocol. Java bindings, however, will be backward compatible while being focused on the W3C protocol. However, support for PhantomJS and Opera has been removed since WebDriver implementation for those browsers are not anymore developed.
Mostly because of the W3C standardization of WebDriver, the release date of Selenium 4 got postponed. But keeping in mind the new features, it’s worth waiting. Once the specification is complete, the remaining job will fall on the hand of browser vendors who will decide on how they are going to implement the new WebDriver API. This is a more logical approach since the internal architecture of browsers is better known by the vendors.
Selenium 4 Comes With an Improved Grid
If you have worked with Selenium earlier, you must have faced the configuration challenges and the issues that arise when you try to set it up for the first time. Latest selenium version, i.e Selenium 4 makes you free from the installation worries. It allows you to execute test cases in parallel on multiple browsers, systems as well as operating systems. The 2 main elements of the new Selenium Grid are:
A test machine on which you can execute the test cases.
The server acting as a central point to control all other machines available in the network. Selenium Grid has only one hub whose purpose is to allocate the test case execution to a specific node.
Till version 3, testers faced a lot of difficulties while connecting hub with nodes. But in the latest selenium version, Selenium 4, the process is much easier. The moment you start the Selenium Grid, it will act as both node and hub. There is also better Docker support and no chance of thread safety bugs. The new Selenium 4 Grid server also allows the user to output logs in a single line format in JSON.
A Better UI in the latest Selenium Version
A user-friendly interface is a must-have feature for all applications. Selenium has done a lot to improve its UI in the latest selenium version, Selenium 4. The grid UI is more user-friendly having relevant information about the capacity to execute test cases or details about the sessions that are running etc.
Logging with hooks and request tracing is also improved since debugging or observability is no longer for DevOps only. Automation testers will now have a better hold on debugging with the improved UI.
Much Detailed Documentation for the latest Selenium version
Documentation is very important for any project to succeed. Since the release of Selenium 2, the documents were not updated for years. Meaning, anyone willing to learn Selenium had to rely on the old tutorials, in which many of the features changed in version 3.
With Selenium 4, SeleniumHQ promised us to deliver a refreshed and updated documentation which is the most anticipated update among test automation engineers.
What Is So Promising In The Alpha Version Of Selenium 4?
This latest Selenium version i.e. Selenium 4 was released on April 28, 2019, & came with many promised features. Let’s see what those are.
- Selenium interacted with browsers using Backend APIs. The architecture of those APIs changed internally.
- Automation scripts developed using Selenium 2 and 3 will not be impacted.
- WebDriver IDE’s W3C recommended document is now available which provides a detailed and neatly arranged API information.
How To Get Your Hands On Selenium 4 Alpha?
Although Selenium 4 Alpha is not officially released at the website of Selenium, you can still get it from MVN Repository.
However, it should be kept in mind that the Alpha version of Selenium 4 is still in the testing phase and there may be some instability. You can use it if you want to get hands-on with the new features but if you want to implement them in your project, our suggestion is to wait for some time until a stable version is released. If you already have experience working with the alpha version, do let us know the features you found most interesting along with the stability issues that you faced in the comments.
Written by Arnab Roy Chowdhury
Arnab Roy Chowdhury is a UI developer by profession and a blogging enthusiast. He has been writing content for about 5 years and has strong expertise in technical blogs, travelogues, and content in the latest programming languages.
14045 Views | 11 Min Min Read
21424 Views | 12 Min Min Read
35305 Views | 21 Min Min Read
54512 Views | 17 Min Min Read