Depreciation in Selenium 4

In this tutorial, we will discuss about the features which are deprecated from selenium 4. Depreciation in Selenium 4 is one if the important topic in selenium 4. From this chapter, you will be confident enough with all the features which should not be used in Selenium 4 but can be used Selenium version 3.

Depreciation in Selenium 4

There are many features got deprecated from selenium 4. One of those features is “Desired Capabilities”. In selenium 3, Desired Capabilities were primarily used in the test script to define the test environment like browser name, version, OS  to execute in selenium IDE.

In Selenium 4, Desired Capabilities objects are deprecated and replaced with Option. Here tester needs to create an options object and set the test requirement. After setting, you can pass the object to the Driver Constructor.

Below are the list of options objects which to be used going forward.

BrowserOption Object
Microsoft EdgeEdgeOption

A significant enhancement in selenium 4 are also accomplished by a couple of deprecation in selenium 4. Selenium 4 Changelog is good starting points to understand what is new and what is deprecated.

Addition to the Desired capabilities, Opera and Phantom JS browser drivers are also deprecated from selenium 4.

Selenium 4 has terminated the support for Opera & Phantom JS which was available In selenium 3.  Because in Selenium 4, WebDriver implementation for Opera and Phantom JS is not available. If we want to test some scenarios in Opera, then we can test those scenarios in Chrome Browsers and Opera Browser is basically based on Chromium. Like Opera, if we want to test some scenarios in Phantom JS, the we can test those scenarios in Chrome and Firefox in headless mode. It will be the same impact.

Features deprecated in Selenium 4

Let’s have a look on those features which deprecated from Selenium 4

  • Desired Capabilities
  • Opera Browsers Driver
  • Phantom JS Driver
  • FindsBy
  • Actions
    • Click
    • clickAndHold
    • contextClick
    • doubleClick
    • release
  • Fluent Wait Timeout

Now we have understood about the Depreciation in Selenium 4.

Leave a Reply

Your email address will not be published. Required fields are marked *