Installing Selenium WebDriver on Windows

Jul 29, 2024

Notes on Installing Selenium WebDriver on Windows

Overview

  • The video demonstrates how to download and install Selenium WebDriver on Windows, using Eclipse IDE which includes Java.
  • Steps: Install Eclipse, download Selenium WebDriver, configure both.

Installing Eclipse

  1. Download Eclipse

    • Open a web browser (Chrome is used in the video).
    • Search for "Eclipse" and click on the official site (eclipse.org).
    • Click on the download button to go to the downloads page.
    • Eclipse includes Java now, so separate Java installation is not needed.
    • Click on download to start the download.
  2. Install Eclipse

    • Once downloaded, double-click the installer file.
    • In the Eclipse installer, select the Java package.
    • Optionally change the installation folder and choose to create a start menu and desktop shortcut.
    • Click on "Install" to begin the installation.
    • After installation, click on "Launch".
  3. Select Workspace

    • Choose a workspace (default location is recommended for beginners).
    • Click on "Launch" to open Eclipse.
  4. Create a New Java Project

    • Go to File > New > Java Project.
    • Name the project (e.g., "Amit Project").
    • Keep the execution environment default (Java 18).
    • Click "Finish".
  5. Create a New Java Class

    • Right-click on the src folder > New Class.
    • Name the class (e.g., "Studiopedia") with a default package (e.g., com.ameeth).
    • Add public static void main(String[] args) to create a main method.
    • Click on "Finish".
  6. Write and Run a Sample Program

    • Write a simple print statement inside the main method: System.out.println("First Java Program");.
    • Save the file and run it by right-clicking the project > Run As > Java Application.

Downloading and Configuring Selenium WebDriver

  1. Download Selenium WebDriver

    • In a web browser, search for "Selenium WebDriver" and access the official site.
    • Go to the downloads section > Select Java to download version 4.5.0.
    • Extract the downloaded zip file to access jar files.
  2. Configure Selenium in Eclipse

    • In Eclipse, right-click on the project > Properties.
    • Navigate to Java Build Path.
    • Under the Libraries tab, click on Module Path > Add External JARs.
    • Locate the extracted jar files from the Selenium download and select all (hold shift and select).
    • Click "Open", then "Apply and Close".
    • Ensure all selenium libraries are included in the build path.

Conclusion

  • Successfully installed Eclipse with Java and integrated Selenium WebDriver for Java.
  • Video provides a practical demonstration for setting up the development environment for Selenium automation testing.