API Testing:



How to Install Selenium 4

Install Selenium4

In the previous post, we have seen Selenium 4 new features and in this post, we will see “How To Install Selenium 4“.

We will install Selenium 4 and go through all the new features of Selenium 4 in the next post.

How To Upgrade From Selenium 3 To Selenium 4

Most of us are already using Selenium 3 (Selenium WebDriver) and would like to migrate from Selenium 3 to Selenium 4. Follow the below steps to upgrade from Selenium 3 to Selenium 4. 

Using Selenium with Maven:

If you are using Selenium with Maven, you can easily upgrade to Selenium 4 by simply changing the version of Selenium to Selenium 4.

We have downloaded the Maven Dependency for Selenium 4 Java and added the same in pom.xml

Maven Repository Selenium

Note: Still stable version is not released. The current version is Selenium 4 (Alpha 7), released on 10th November’20. Until Selenium 4 is officially released, It’s not recommended to upgrade or migrate your existing Selenium Project

How To Install Fresh Instance of Selenium 4

Follow the below steps to complete the installation.

Step 1: How To Install JAVA
Step 2: How To Install Eclipse
Step 3: How To Install Selenium 4

Step 1: How To Install Java

Check the below video to see “How To Install Java”

Go to the below-mentioned link and download the latest version of JAVA or click here

Install Java - Click JDK Download

Accept the license agreement and choose the right ‘JDK’ file to download based on your system requirement.

Install Java - Accept License Aggrement

Once downloaded. Go ahead and verify the Java version. To do this, open the command prompt and type “java -version” and hit enter

Install Java - Verify Java Version

Step 2: How To Install Eclipse

Go to the following link to download eclipse

Download the appropriate file based on your system requirement

Install Eclipse - Download Eclipse

Download ‘Eclipse IDE for Java Developers’

Install Eclipse - Download Eclipse IDE For Java Developers

Extract the eclipse file which you have downloaded

Install Eclipse - Extract Eclipse File

Right-click on ‘eclipse.exe’ and run it as ‘Run as administrator’

Install Eclipse - Run As Admin

Choose a specified path to create ‘workspace’ by using the ‘Browse’ button.

Install Eclipse - Choose Workspace

You could create Java Projects, Packages, and Classes in Java Eclipse.

Install Eclipse - Eclipse API

Step 3: How To Install Selenium 4

Selenium Java binding can be set up in 2 ways using build tools or manually. 

Install Selenium using Maven (build tool):

Even though there are many build tools available in the market to manage the build and dependencies, the most widely used one is Maven. 

Install and Setup Maven

Check this post on how to install and setup maven

Download Selenium using Maven

We can add dependencies in pom.xml to download Selenium 4 using maven. 

Add the below code into a new Java class under the ‘src’ directory in your project. 

Install Selenium manually:

To install Selenium 4 manually first we have to download Selenium 4 Java bindings from the official Selenium page.

Add Selenium to your favorite IDE. Here we are using Eclipse IDE.

Go to the Project – right click and select Properties – Build path – Configure Build Path

In the Java Build path screen – Click on Add External Jars – Select all the jars files and click on Open

Click on the “Apply” and then “OK” button within the dialogue box.

Finally, we have completed the configuration part of Selenium Libraries in our project.

Finally, we have installed Selenium 4. 

Selenium 4 comes with many new selenium features like Selenium Grid Optimization, Relative Locators, Multiple Tabs & Windows, Browsers Support, Selenium IDE, Chrome DevTools, etc.,

In this post, we have seen how to upgrade from Selenium 3 to Selenium 4 for Java language bindings. 

How is your experience with Selenium 4, please share your experience in the comment section below.

Sharing is caring.

Share on facebook
Share on twitter
Share on linkedin

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

Leave a Comment

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

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook