Tuesday 15 March 2016

Setting up Selenium in Eclipse IDE

Hi all even though SETUP sound like a big word but when it comes to setting up Selenium WebDriver it is very simple and easy and I am here to give you simplest way to do it. In this post we will learn the selenium WebDriver setup for windows. Follow the below steps and then you are good to go.

Video Tutorial -

Step1 - Install JDK. This is the first thing you need to do and below are the steps to install JDK.

1. Download latest version of JDK from HERE.
2. Click on "Accept License Agreement" and download latest code.

3. Click on .exe file and then java installation window will open.
4. click on next and finish installation.
5. Installation deosn't complete unless you set JAVA_HOME. to so go to my computer properties.
6. Click on Advanced System Settings -> Environment Variables -> Edit and then in Variable Name - "JAVA_HOME" and variable value-" C:\Program Files\Java\jdk1.7.0_79

Now your Java setup is ready.

Step 2 - Download Eclipse from this Link.http://www.eclipse.org/downloads/
There is nothing more to do in installing eclipse as you just need to extract the folder and launch eclipse IDE using eclipse.exe. 

Step 3 - Download Selenium WebDriver Java Client from HERE. Extract the folder and store in your system with folder c:\selenium_jars

Step 4 - Configure Eclipse with Selenium WebDriver.
1. Click on eclipse.exe
2. Enter Workspace name and click on OK.
3. Create new java project by File-> New -> Project -> Java Project.

4. Enter Project Name and click on Finish.
5. Right click on the created Project Name then go properties- > java build path ->  Libraries ->Add External Jars.
6. Add 2 jars from c:\selemiun_jar folder and all the jars from c:\selenium/-jar\libs\ folder.
7.Click on OK.

Now your project Eclipse Project in configured with Selenium WebDriver and you can start writing your test cases. It was very simple setup and of you face any kind of issues with this do post your questions in for of comments and I will try my level best to provide soulution.

1 comment: