Selenium 4 - and its bucket of surprises




 Selenium 4 - and its bucket of surprises



Selenium 4 is about to be released by the end of this year, which makes a lot of us wonder - what surprises are we in for?

Selenium-webdriver is the number one free open source testing framework which is being used by many organization as their main reliance for UI test automation. Selenium's API is also partially used by different free and commercial testing tools. With that being said, we should try and better understand our mysterious partner for automation adventures. Let's review in a nutshell some of the things that are in the bucket for the upcoming version.

In this upcoming version, we are in for some new treats

Selenium IDE is being revived :
As some of us may remember, In August of 2017 it was announced that as of Firefox 55 Selenium IDE would no longer be supported. Selenium IDE or as the Selenium community refers to it - the Legacy IDE was, and is, dead. Since then a lot has happened with it. The Selenium community along with commercial companions such as Applitools have picked up the glove and contributed to the new - Selenium IDE.
For this upcoming version it is in progress, and according to GitHub documentation, it will be a complete rewrite of the old one. The older IDE was a Firefox extension that relied heavily on APIs that are no longer supported by newer versions of Firefox. In this newer version, the IDE is developed as a new browser extension, claiming to support both Chrome and Firefox. In theory, other browser vendors will be able to plug-in as well.
As far as I'm concerned, the bigger question is - will they be able to fix and remake all that was wrong with the "Legacy IDE". (Locators, Iframes, condition support etc.)

Selenium standalone-server
Furthermore, we are in for some improvements in Selenium standalone server in both its UI, logging and setup procedures. Allegedly making the configuration and user experience more friendly. If you ever tried to set up and configure a Selenium grid you must know that is it not the most fun experience, so I'm really looking forward to seeing the changes made.

Standardization
Probably the most significant technical change is the standardization.
The webdriver API is expected to be completely W3C standardized in Selenium 4. As we all know the Selenium webdriver API has grown past the specific framework and is used by other frameworks and tools (such as Appium for example). This is one of the reasons to aspire to become single-standard and compatible across implementations of the webdriver API.


Before we dive into that, let us do a quick recall about what went on in the previous versions.
Our (Code) bindings (for example, Java) implement the WebDriver Interface which communicates with different browser drivers via HTTP commands. In the previous versions, the main difference between Selenium 2 and Selenium 3 was that in Selenium 2 it was the Selenium project who was responsible to provide the driver for each browser. In Selenium 3 that responsibility was transferred to the browser vendors that required them to ship their own WebDriver implementations. The reasoning for that was that they know their browsers the best, and hopefully, the produced drivers were supposed to be much more stable and robust. (Tell that to IE driver users).
That was in theory, in reality - Selenium users had some unpleasant experiences due to the fact that some drivers did not fully support the webdriver interface and had to deal with it. 
A good example is broken clicks that have been reported by Selenium 3 users during nov' 2016 and "sendKeys" command that failed to be invoked.
Basically, up until now, all drivers accept geckodriver (Firefox) supported both protocols. gecko stopped supporting JSON wire protocol starting Selenium 3. 



I made this sheet so you could take a closer look at some of the changes in the W3C HTTP protocol vs the Older JSON wire protocol implementation:



Continuing this topic In Selenium 4 we will see deprecated functions,  added capabilities and changes in the protocol structure.

You can take a look at these changes made to the capabilities and node configurations from the latest version update. That in addition to the node config structure that has slightly changed (For example the "configuration" attribute will not work in the new version of the standalone server).




In conclusion
The latest version claims to be better and improved, with updated official documentation and will require minimum code changes. All that's left for us is to wait for its release so we can touch and feel the fresh version. 









Comments

  1. Replies
    1. Thank you for your kind feedback! :)

      Delete
  2. Thank U Daniel , great article

    ReplyDelete
  3. Isn't it about time you deleted this article now? Selenium is dead, period. There hasn't been any development in more than 2 years, and just about all professional developers are moving to Cypress. Why? Selenium doesn't work anymore. My company has wasted idiotic amounts of money trying to get Selenium to work with Angular9 applications. It can't be done. Over. Finito.

    ReplyDelete

Post a Comment

Popular posts from this blog

Sharing is caring - Intro to Jenkins shared libraries

Intro to Terraform and how it is related to test automation infrastructure

Test Automation, Security, and other vegetables