In August 2018, Stimon Stewart’s announcement about release of Selenium 4 caught the attention of the entire automation industry. Selenium is a portable framework to automate web application testing across various browsers and platforms. It is a widely popular tool used by several product and services organizations in their test automation efforts.
The Importance of Selenium 4
Selenium-based codeless automation testing is a boon for small and large organizations that need focused QE, with minimal QE bandwidth. A solid framework once created, becomes a base for codeless automation testing. Selenium makes easy the running of regression tests and synthetic monitoring. It also allows to debug, edit and record tests. In all changes to Selenium is one that the industry is always keen to understand and embrace, given its importance in the overall test automation strategy.
Changes in Selenium 4
While the official release of Selenium 4 has not been made yet, an alpha version is out with some of the promised changes. The same have been discussed briefly below:
1: W3C WebDriver Standardization
The W3C standardization of the Selenium 4 WebDriver will encourage the implementation of WebDriver API across all software without any compatibility issues.
* This change is essential because WebDriver API is not just used in Selenium, but is also used by mobile testing tools like Appium which have a lot of dependence on WebDriver API for web testing of mobile apps. The W3Cstandardization of WebDriver API, will make sure it is compatible with all platforms.
* In Selenium 3, API encoding and decoding had to be done to enable browser communication via JSON Wire Protocol from the local end. In Selenium 4, encoding and decoding would not be needed because of the W3C standardization.
2: Selenium 4 IDE TNG
* Selenium 4 comes with a new record and playback feature consisting of rich and advanced capabilities.
* With the use of a plugin, Selenium 4 can be run on any browser, whereas previous Selenium versions supported only Chrome.
* The old HTML-based CLI runner has been replaced by a new CLI runner which is based on NodeJS.
* Selenium 4 can execute tests in parallel and can provide instant information on outcomes.
* Selenium 4 comes with a new IDE runner that is entirely based on WebDriver.
3: Improved Grid
QA Engineers have thus far, faced challenges with Selenium configuration and set up, for the first time. Selenium 4 solves the installation problems by allowing users to execute test cases in parallel on various browsers, systems, and operating systems.
Two primary elements of Selenium grid are:
* Node: Node is a test machine on which you can run the test cases.
* Hub: Hub acts as a server and a center point which controls all the machines on the network. Selenium grid is known to have a single hub which is used for assigning the test case implementation to a specific node. Selenium 3 required a manual connection of the hub with the nodes, but in Selenium 4, the Selenium Grid acts as both a node and a hub.
The grid UI has also been improved, which provides a more user-friendly experience and displays relevant information regarding test execution.
4: Improved Observation
Logging, debugging, and observability are better enabled with hooks and request tracing that anyone can take on these activities with ease.
5: Improved Documentation
Documentation is the most crucial component of any successful project. Documents were not updated since the release of Selenium 2 and users new to Selenium had to rely on old documentation. There were considerable changes in the third version, but due to old documentation, users were not able to effectively use the newer version. In the latest version, Selenium HQ has promised to provide updated documentation, which will greatly benefit the entire testing community.
6: A few other important changes in the alpha version include:
* Support for Opera and PhantomJS browsers has been discontinued as WebDriver implementations for these browsers are not actively developed.
* A single method WebElement.getRect() has replaced WebElement.getSize() and WebElement.getLocation().
* setRect method has replaced setPosition & setSize methods.
* driver.switchTo().parentFrame() method has been added.
* For all the browsers, Options class will now extend the Capabilities class.
* WebDriver window can be minimized and maximized to full screen.
Selenium 4, which promises a lot of potential than its predecessor is anticipated to be big hit. The W3C Standardization of the Selenium 4 Webdriver, Selenium IDE Support for Chrome, improved Selenium Grid, better observability to allow debugging and refreshed documentation makes this tool, a force to reckon with. The alpha version has already been a good teaser to the full blown version that is yet to be released. The community now eagerly awaits the final release to further leverage this tool in their test automation and overall QE process.