Pre-requisites for Web Test AutomationInstallation Steps for Java Selenium Framework

Installation Steps for Java Selenium Framework

Applies to the Web Applications using Java Selenium framework. To perform Web Test Automation using the Java Selenium framework, Java and Maven are the required components.

The installation method varies depending on your requirement and the platform that you choose to install.

Overview of Java Development Kit Installation

Java Programming and Android Programming use the Java Development Kit (JDK) software. This software is a free download specifically created for programming Java applications. This article guides you through the download and installation procedure for setting up the JDK on your computer.

To develop or run Java applications, download and install JDK.

For windows, perform the following actions:

  1. Download the latest JDK installer

    Download the latest JDK.exe installer here. In this case, Java 21.0.1 version is used.

  2. Select Yes to verify control access.

  3. Welcome to the Installation Wizard window appears and Click Next.

    Java SE Development Kit 21.0.1 Setup wizard welcome screen with Next and Cancel buttons
  4. Optionally, click the Change button if you wish to modify the installation folder path.

    Otherwise, click Next to proceed with copying the files into the specified folder.

    Java SE Development Kit 21 setup Destination Folder screen with Next button
  5. Upon successful installation, JDK Successfully Installed message is displayed. Click Close.

    Java SE Development Kit 21.0.1 installation complete dialog with Next Steps and Close buttons
  6. To add Java Home in environmental variables, perform the following:

    1. Right-click on the Start button and select System.
      Windows taskbar Start button with cursor over it, dimmed knowledge base article in background
    2. Click Advanced system settings link on the right pane.
      Related settings list with Advanced system settings link highlighted
    3. In the System properties window, select Environmental Variables button.
      System Properties dialog Advanced tab with Environment Variables button highlighted
    4. Click New
    5. In the New System Variable window, enter the Variable Name as JAVA_HOME
    6. Enter the path as Variable value. The path will be updated based on your installation directory. For example, if Java is installed on the D drive, the path may differ from the default location as shown in the screenshot:
    7. Click OK and OK again.
      Environment Variables dialog with New System Variable showing JAVA_HOME name and JDK path, OK button
    8. Similarly, you need to update Path as shown in the secondary screenshot. Select the Path and click Edit.
      Environment Variables dialog with system Path variable row and Edit button highlighted
    9. In the Edit environement variable screen, click New button. Update the Path as C:\Program Files\Java\jdk-21\bin.
      Edit environment variable dialog with New button and jdk-21 bin path highlighted in the list
    10. Click OK and OK again.
  7. To verify Java Version, perform the following:

    1. Open a command prompt and run the following command to verify the installation to check the appropriate version of Java.
      Java  - -version
      
    2. This command will display the installed Java version. If the JDK is properly installed and configured, you will see the following information about the Java version, as shown:
      Command Prompt showing output of java --version command with Java 21.0.1 LTS details

Maven Installation on Windows

To install Maven, refer to the Installing Maven on Windows article for step-by- step instructions. Ensure you download the latest version and install it on your windows operating system.