Installing Selenium Webdriver

For the installation of Selenium Webdriver in our system we should have few prerequisites.

  • Java installed on your machine.
  • The latest version of Eclipse.
  • The latest version of Selenium Webdriver.

Java is a high level, a general-purpose object-oriented programming language which is also used for writing automation script in Selenium. We can write Selenium scripts in many other languages such as Java, C#, Python, Ruby, PHP etc.

Download and Installation of Java
For the Java installation please visit this link. HOW TO DOWNLOAD AND INSTALL JAVA

Eclipse provides one of the most popular and free Java IDE (integrated development environment) which you can use to write your scripts.

Download Selenium Webdriver

1. First, we need to download Selenium WebDriver by using this link –
2. After navigating to this website we need to go ‘Selenium Client & WebDriver Language Bindings’ section and here we can see download links next to different languages such as Java, C#, Ruby etc. As we are using Java with Selenium, so we will download Java specific drivers. Now we click on Download link from the Java section.
Selenium Client & WebDriver Language Bindings
3. Then we click on Download link it would start downloading.
4. Once the file is downloaded, we need to unzip it and save in our system.
5. Open the unzipped folder and here the structure of the unzipped folder looks like.
6. Now we will go to the eclipse location in our system where we had unzipped the eclipse folder and double-click on eclipse.exe.
7. Eclipse would start opening and you would see the Eclipse logo.
8. Next, we would see the Workspace popup box. We can either leave the Workspace location as the default value, or we can browse to any folder path as per our choice.
9. Click on Ok button. Eclipse would start loading all the files. Once it is done, we will see the Eclipse IDE Welcome page like this.
10. To create a new Project, click on File > New > Project.
Create Project
11. In the New Project popup box, first, select Java Project and then click on Next button.
 new project
12. In the New Project Name popup box, write any name of a project like SeleniumTest. Leave all the other fields as default and then click on Finish button.
Project Name
13. The screen looks like the below mention image.
14. Now we need to set a build path for this project. Navigate to Project -> Build Path -> Configure Build Path.

15. Go to libraries tab and click on Add External JARs button. With the help of this, we can add Selenium JARs file in our project so that we can access Selenium WebDriver related libraries. After clicking on Add External JARs button, JAR Selection window is opened. Here we need to go to the selected folder where Selenium libraries are downloaded and add all the jars file including libs folder and these two which are outside of libs folder.

16. After getting all JARs in the libraries tab we need to click on Apply button and then click on Ok button.

17. After setting a build path for our project, now we are able to see all these referenced libraries in our project structure.