Sunday, July 9, 2017

How to Download & Install Selenium WebDriver

In this tutorial, we will install Java Software Development Kit (JDK) and configure selenium webdriver in Eclipse IDE for Java Developers.

STEP -1 : Install JDK in your computer.

First thing user has to download and install JDK from below link:

http://www.oracle.com/technetwork/java/javase/downloads/index.html



Next step : download and install based on your system configuration.


STEP -2 : Install Eclipse IDE.

Download "Eclipse IDE for Java Developers based on you system requirement of windows device(Windows 32 Bit and 64 Bit versions).
Download IDE from below link:


OR


After the completion of download, you may want to extract file to root Drive that is C:/

Next open the eclipse folder and structure inside the folder is same as below:
Then click on eclipse.exe icon.


Create a workspace folder where you will contain all the program files you create. You can choose whatever place you want for your workspace


After that you move to welcome page inside eclipse IDE.


Next is to create the new project : Click on File > New  > Java Project


Then system will show the pop up window named as "New Java Project"


After that you need to create the packages to store the java files as per their need.Here we are creating the package in newly created workspace.

Right-click on the newly created project and
Select New > Package, and name that package as "demo".



Then you need to create the Class in newly created package. Right click on package name and follow the below steps:





Finally Java class file has been created successfully.

Step - 3 : Installing the Selenium webdriver

Here we are using java as a primarily language for coding for the we need to download and install the Selenium Java Client Driver from below link:



Extract the java driver zip file and place the jar files in Java Build Path.You need to follow below steps:

  • Right-click on "SeleniumNewProject" and select Properties.
  • On the Properties dialog, click on "Java Build Path".
  • Click on the Libraries tab, and then
  • Click on "Add External JARs.."

Now you need to add the jar files.


Add all the below jar files in Library TAB.

Folder structure inside the "lib" folder.

After adding all the jar files below are the structure inside the java build path.

Finally, we are done importing Selenium libraries into our project.

To work with different browser, you just need to download the driver file from selenium official website.
Suppose if you are working with chrome browser, then you need download and use  Google Chrome Driver.



Google chrome driver helps to automate scenarios using selenium webdriver script. lets follow the below link for code integration in chrome driver.





No comments:

Post a Comment