Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the responsive-lightbox domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114
Configuring Selenium With Eclipse - Testingpool

Configuring Selenium With Eclipse

Before moving to this step, It is assumed that you have eclipse already installed on your system as explained in the post.

Note: It might take a little time to load all the images as there are many.

Downloading Selenium jars:

It will be better to call it Selenium configuration, instead of Selenium Installation. Selenium is basically a set of jars which can be downloaded from here  (this is official site for selenium).

Go to this above mentioned site, at the download page you will see a Download link with the particular language , its version and release date. Once you click on download link, a zip file will be stored in you system. Unzip it and these are selenium jars file.

Selenium Jars

Configure Selenium jars with eclipse project:

For configuring selenium, let’s follow below mentioned steps.

  1. Open Eclipse and Create a java Project
  2. Add Selenium jars to your project

1. Open Eclipse and Create a java Project:

To open eclipse, go to the folder where you have kept the downloaded eclipse files and click on the file highlighted in the screen below.

ECLipse

 

It will open a window, where you need to choose the workspace (Workspace is nothing but where you will store all the projects). You have option to browser for a desired location and after selecting the location ,click OK

Eclipse Workspace

It will open a welcome page , where it contains some information like samples, eclipse tutorials etc. As of now, you can close this window as shown below.

Welcome eclipse

At the first instance, you might get the window shown below. It will be having the project explorer selected as shown in the screen shot. We need to select the “Package Explorer” instead of “Project explorer”. For that, you need to click on a link shown at the right top corner(Highlighted in red).

Project Exploer

A new window will open where you need to select java option in that.Click OK and it will open a “Package explorer”. This is where we will create our projects.

Eclipse 3

 


Eclipse in Package Explorer View:

Eclipse Package explorer

  1. Package Explorer: Here we will create the projects containing packages, classes, folders, files etc.
  2. Editor: It is used to write the java code.
  3. Here , you can attach console, properties pane, java doc pane etc. to see output, errors if any.
  4. Outline: This view will shown outline of structured file that is currently opened in editor.
  5. Task List: The Task List is part of Eclipse Mylyn and contains tasks that are downloaded from popular bug trackers like Bugzilla, Trac, Mantis, etc.It is basically used to view and manage the tasks.
  6. Explorer view selection: We can select the desired view like “package explorer” or “project explorer” etc.
  7. Tool Bar: It provides all short cuts like execute code, debug code, New button to create a new item like project, class,folder etc, save buttons, Save all etc.

Create a new Project in Eclipse:

Right click in the “Package Explorer” and select New–> Java Project.

Create Java Project

 

A new window will open as shown below. Give the desired name in the “Project Name” field and click ‘Finish’.

Create java project

A project will be added in the “package Explorer” that will contain a src folder and JRE system library.

Project added

 

If you got the above view, that means project is created successfully.


 

2. Add Selenium jars to the project:

Right click on the project –> Go to Build path –> Configure Build path. (as shown in figure).

Build path

 

 

A new window will open, Go to ‘Library tab’ and click on button ‘Add External Jars’ as shown in the figure below.

External jar

 

After clicking ‘Add External Jars’ , It will open a new window where you can browse to the folder which is having all Selenium jars files. Selenium jars which are required to add shown in the below screen shot. Add those 2 jars and all the jars inside lib folder.

Add jars

 

After selecting all jars, Click OK button.

Selenium Jars

Finally, all the external jars should be displayed inside a folder named ‘Referenced Libraries’. If you are able to see that, then You are ready to start Selenium.

Reference libraries

Note : It is recommended not to move for ‘writing the program’ post. Instead, follow the mentioned sequence to understand and write a successful program.
Ask Question
If you have any question, you can go to menu ‘Features -> Q&A forum-> Ask Question’.Select the desired category and post your question.

 

Avatar photo

Shekhar Sharma

Shekhar Sharma is founder of testingpool.com. This website is his window to the world. He believes that ,"Knowledge increases by sharing but not by saving".

You may also like...

3 Responses

  1. August 12, 2015

    […] the previous post, we have seen How to configure selenium with Eclipse? In this post, we will see the usage and importance of developer […]

  2. August 16, 2015

    […] It is assumed that you have already installed and configure selenium with Eclipse and create a project(Explained here.) […]

  3. August 16, 2015

    […] Eclipse. It is assumed that you have already configure Selenium as already explained in the earlier post.We will perform login functionality in Gmail application. To start with this, we need to perform […]