Chapter 4: Installation of Selenium WebDriver

Home  >>  Software Testing  >>  Selenium Testing  >>  Chapter 4: Installation of Selenium WebDriver

Chapter 4: Installation of Selenium WebDriver

On August 22, 2019, Posted by , In Selenium Testing, With No Comments

So, in Chapter 3 we learnt about Introduction to Selenium WebDriver. Now in this chapter 4, it’s time to install WebDriver and other software’s which are needed to use WebDriver.

Every automation tool requires some programming language to support automation. So Selenium supports multiple languages but here we are going to learn Selenium with Java.

Below software / tool are pre-requisite in order to use WebDriver

  1. Java
  2. Eclipse

Installation Java: Let’s follow below steps:

selenium webdriver

  • Click on “Accept License Agreement”
    selenium webdriver
  • Select Operating System to which you are downloading Java (Windows)
    selenium webdriver
  • Once installation of exe is completed run exe file and keep next and close once installation is completed.
  • ake sure Java folder is shown in your machine in below path: C:\Program Files
    selenium webdriver


Eclipse
: is a tool in which write Java code. We can even write Java code in notepad as well but it is recommended to use tools like Eclipse to write which is very user friendly.

Installation of Eclipse:

  • Go browser and type URL https://www.eclipse.org/downloads/
  • Click on Download 64 bit as shown in below screen
    eclipse - selenium software testing
  • Click on Download as shown in below screen
    eclipse - selenium software testing
  • You can see it in downloads folder as shown below
    eclipse - selenium testing
  • Double click on above .exe file and you will see below screen
    eclipse - selenium software testing
  • Select Eclipse IDE for Java Developers as shown in below screen
    eclipse - selenium software testing
  • Now click on Install
    eclipse - selenium software testing
  • Click on Accept Now button
    eclipse - selenium software testing
  • Click on Accept as shown in below screen and wait until it installs as it will take some time
    eclipse - selenium software testing
  • Click on Accept Selected as shown in below screeneclipse - selenium testing
  • Now click on Launch as shown in beloweclipse - selenium testing
  • Now again click on Launch button as shown in below screeneclipse - selenium testing
  • Now you see Eclipse is launched finally as shown beloweclipse - selenium testingConfiguration of WebDriver with Eclipse:We need to install client libraries related to language which are using in Selenium. As we are using Java as a language in this tutorial we need to download and configure Java clientlibraries,

     

    Steps to download Java libraries

    1. Go to Selenium official website https://www.seleniumhq.org/
    2. Click on Downloads tab
    3. Click on Download for Java languageeclipse - selenium testing
    4. You can see it is downloaded under download as shown beloweclipse - selenium testing
    5. Now copy and Save this zip folder to some location in your system and extract them in the same location

 

Creating Project in Eclipse and mapping WebDriver with Eclipse tool for your project

We downloaded required software’s Selenium WebDriver and let’s configure Selenium WebDriver with Eclipse tool.

Steps to create new project in Eclipse tool:

  1. Open Eclipse tool from short created on your desktop
  2. Click on File – New – Project a new as shown beloweclipse - selenium testing
  3. Enter project Name and click on Next & again Next button
  4. You will see new project is created as shown below
    eclipse - selenium testing

Configuring Java client libraries with project in Eclipse tool

  1. Right click on project that is newly created
  2. Click on Properties and you would see below screen
    eclipse - selenium testing
  3. Click on Libraries tab and click on Add External JARs as shown below
    eclipse - selenium testing
  4. Now Go to path where you extracted ZIP files which are downloaded and select two jar files as shown in below screen
    eclipse - selenium testing
  5. Click on Open button
  6. Click again Add External JAR’s and double click libs folder and select all the JAR files as shown in below screen
    eclipse - selenium testing
  7. Click on Open button and you would see all JAR’s are mapped to your project as shown in below screen.
    eclipse - selenium testing
  8. Click on Apply and Close button and you would see below screen which shows all JAR files are configured to your project.
    eclipse - selenium testing

So, that’s it. We are finally done with chapter 4. While leaving this chapter, by now you should be completely aware of how to do the below 4 steps:

  1. Installation of Java
  2. Installation of Eclipse
  3. Installation of WebDriver
  4. Mapping JAR’s with your project

Now we are ready for writing one simple code with Java & Selenium.

 

Leave a Reply

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