Social Blog What to Expect with Selenium
May 13, 2020

What to Expect in the Latest Version of Selenium 4

Automation
Continuous Testing

Selenium, the leading web framework for automation, releases frequently. Here, we take a look at Selenium releases, from a few years back to Selenium’s latest version—Selenium 4 RC1. 

Testing With Selenium: A Selenium Overview >>

Getting Started With Selenium 

Perfecto fully embraces open source technology, including Selenium 4, which is one of the top frameworks we support. View all integrations>> 

Here's a quick tutorial on how to get started with Selenium:

  1. Download Selenium.
  2. Follow best practices in Selenium documentation.

Full tutorial available here: How to Use Selenium With Perfecto >>

Selenium 4 Latest Version

The original Selenium 4 release date was May 2019. With consistent upgrades, the latest driver (Selenium RC1) was released in June 2021.

Cypress vs. Selenium: What's the Right Cross-Browser Testing Solution for You? >>

Selenium 4 RC1 Core Features 

Selenium is the "de facto" web app test automation framework, with a large library and community, though there are Selenium alternatives. Selenium is composed of Selenium IDE, Selenium WebDriver, and Selenium Grid. Selenium 4 offers changes to all of these components; below are some of the most pivotal updates. 

How to Use Selenium Testing Tools >>

Supported Chrome Debugging Protocol 

Selenium now offers support for CDP (Chrome Debugging Protocol) which opens the “door” for testers to use network and performance tools that are part of the CDP within their test automation.

Advanced Selenium Grid UI Capabilities 

Earlier versions of the Selenium Grid had a complex setup; the new Selenium Grid is simpler and more efficient. 

With the new Selenium Grid, there is no need to set up hubs and nodes separately as the grid serves the purpose of both now. Other improvements that the enhanced grid brings are Docker support, IPv6 addresses, a user-friendly GUI, and compatibility with tools like Azure, AWS, and more.

Enhanced Selenium 4 grid features
Enhanced Selenium 4 RC1 grid capabilities.

Upgraded Windows & Tabs Testing

Selenium 4 has a new API, newWindow, which allows users to create and switch to a new tab or window without creating a new WebDriver component. 

relative locators in selenium 4
Better support for testing windows and tabs of a web application in Selenium 4. RC1.

Redesigned Selenium IDE

The Selenium IDE tool was redesigned for easy cross-platform automation and simpler setup. Selenium IDE runner will be based on WebDriver, so Selenium can now be used on any browser, not just Chrome. You can use your own locator strategy while easily plugging into the Selenium IDE. Now, the command line runner will be based on NodeJS rather than HTML. 

Improved Relative Locators

The relative locators in Selenium 4 make it simple to locate elements. Testers can now use phrases like toLeftOf() and above() to locate specific site items. The introduction of this new method in Selenium 4 locates web elements based on their visual location relative to other DOM elements.

selenium 4 rc1 relative locators
Support for Relative Locators (using To Left of, To right of, near, Above and Below to identify elements on a web application) in selenium 4 RC1.

Standardized for W3C Compliance

To start, Selenium 4 offers new standardization. In the past, most Selenium commands did not work across browsers. Now, you will no longer need to modify code to work with different browsers. Instead, Selenium 4 interacts directly with the target browser. For users, this latest version of Selenium will allow for a seamless experience.

Selenium Webdriver is completely W3C standardized. Moving to W3C as the default protocol allows Selenium to connect directly with browsers. Since Chrome, Safari, Firefox, Internet Explorer, and Edge also follow W3C standardization, this means that everything runs in W3C standard protocol. Because of the move to W3C, capabilities are transitioning from Legacy/JSON Wire Protocol to WebDriver protocol. This makes cross-browser testing more efficient and stable. 

6 Ways to Use XPath in Selenium WebDriver >>

Users who want to test their implementation on Opera can use the ChromeDriver because the Opera browser is now based on Chromium. Also, as an alternative to PhantomJS, users can test on FireFox or Chrome in headless mode. The command-line runner now provides information such as the number of passes/fails and the test timing.

Cross-Browser Testing With Selenium: Web Testing Tutorial >>

Updated Documentation

The documentation section has not been updated since Selenium 2.0, and was updated for an improved navigation UI covering information for all tools and APIs under Selenium.  

Read our eBook: Test Automation Strategy For Beginners

Looking Back on Selenium Releases

Here is a timeline looking back at the monumental Selenium releases through the years:

2004: Selenium is launched.

2007: Selenium IDE and Selenium WebDriver launched.

2011: Selenium 2 is introduced.

2016: Selenium 3 debuts.

2019: Selenium 4 Alpha is released.

2021: Selenium 4 RC is released.

Below, we break down some of the recent Selenium releases, starting with the Selenium latest version and working backwards, and their key features.

Selenium VersionRelease DateKey Features
Selenium Releases

Selenium 4.0
RC1

(Selenium Latest Version)

June 2021
  • Adds native support for Chrome DevTools Protocol. 
  • Enhances Selenium Grid with Docker support, IPv6 addresses, user-friendly GUI, and compatibility with tools like Azure, AWS, and more.
  • Upgrades Selenium IDE.
  • Adds "relative" locators for specific web elements. 

Selenium 4.0
Alpha 5

March 2020
  • Improves docker support by using unix domain sockets and the DOCKER_HOST env variable.
  • Reuses the same HTTP client instead of creating a client per session.
  • Replaces OpenTracing with OpenTelemetry.
Selenium 4.0 Alpha 4January 2020
  • Chrome Debugging Protocol mirrors the latest CDP spec.
  • Adds support for creating and removing virtual authenticators.
  • Adds support for debugging virtual authenticators.
Selenium 4.0 Alpha 3

July 2019

  • Adds "relative" locators.
  • Adds ApplicationCache, Fetch, Network, Performance, Profiler, ResourceTiming, Security, and Target CDP domains.
  • Ensures protocol converters handle the new session responses.
  • Moves to new Grid, deleting the old standalone server.
Selenium 4.0 Alpha 2May 2019
  • Adds Chromium-based Edge support, which adds a new Chromium driver to the tree too.
  • Adds extra domains for CDP: Network, Performance, Security, Target.
  • Enables full page screenshots for Firefox.
  • Reworks HTTP abstractions for better support streaming.
Selenium 4.0 Alpha 1May 2019
  • Removes deprecated methods and classes.
  • Grid supports standalone, hub, and node, and completely distributed usage.
  • Supports Docker containers within Grid Server.
  • Adds element screenshotting.
  • New Grid can output logs in single-line JSON format.
V3.141.59April 2019
  • Tests that remoteHost is properly read and set.
  • Fixes displayed content in help servlet.
  • Implement `WrapsElement` by `Select` element wrapper.
V3.141.0November 2018
  • Selenium server distribution package is drastically reduced with HtmlUnit driver and all its dependencies removed.
  • W3C trumps the original Actions API.
  • Users must choose a release channel format to use in their tests depending on the browser version they run tests in.
  • Nodes and hubs in the grid can be started in any order.
V3.14.0August 2018
  • Introduces experimental basic JPMS support.
  • Removes the GSON dependency.
  • Adds High Sierra to the platforms.
  • Adds node info to hub status.
  • Allows temporary installation of FF extension.

How Perfecto Makes Selenium 4 Better

With Perfecto, you can test on everything, with Selenium 4 RC1 and any browser version, new, or old. Selenium 4 and Perfecto seamlessly integrate for testing on web and mobile web. 

With Perfecto and Selenium, you can:

  • Execute web testing 50% faster than other vendors.
  • Enjoy the scalability of Selenium Grid from the cloud.
  • Scale your tests across multiple platforms.
  • Find and fix bugs quickly with advanced test reporting and debugging.
  • Integrate into your entire CI/CD toolchain.

Experience the world’s largest global testing cloud for web and mobile apps. Try Perfecto free for 14 days.

Try Perfecto

Related Content