Configuring Selenium-RC With Eclipse

Eclipse is a multi-language software development platform comprising an IDE and a plug-in system to extend it. It is written primarily in Java and is used to develop applications in this language and, by means of the various plug-ins, in other languages as well as C/C++, Cobol, Python, Perl, PHP and more.

Following lines describes configuration of Selenium-RC with Eclipse - Version: 3.3.0. (Europa Release). It should not be too different for higher versions of Eclipse

  • Launch Eclipse.
  • Select File > New > Other.

Configuring Selenium-RC With Eclipse
 
 
  • Java > Java Project > Next

Configuring Selenium-RC With Eclipse
 
  • Provide Name to your project, Select JDK in ‘Use a project Specific JRE’ option (JDK 1.5 selected in this example) > click Next
Configuring Selenium-RC With Eclipse
 
  • Keep ‘JAVA Settings’ intact in next window. Project specific libraries can be added here. (This described in detail in later part of document.)
Configuring Selenium-RC With Eclipse
 
  • Click Finish > Click on Yes in Open Associated Perspective pop up window.
Configuring Selenium-RC With Eclipse
 

This would create Project Google in Package Explorer/Navigator pane.

Configuring Selenium-RC With Eclipse
 
  • Right click on src folder and click on New > Folder
Configuring Selenium-RC With Eclipse
 

Name this folder as com and click on Finish button.

  • This should get com package insider src folder.
Configuring Selenium-RC With Eclipse
 
  • Following the same steps create core folder inside com
Configuring Selenium-RC With Eclipse
 

SelTestCase class can be kept inside core package.

Create one more package inside src folder named testscripts. This is a place holder for test scripts.

Please notice this is about the organization of project and it entirely depends on individual’s choice / organization’s standards. Test scripts package can further be segregated depending upon the project requirements.


 
Configuring Selenium-RC With Eclipse
 
  • Create a folder called lib inside project Google. Right click on Project name > New > Folder. This is a place holder for jar files to project (i.e. Selenium client driver, selenium server etc)
Configuring Selenium-RC With Eclipse
 

This would create lib folder in Project directory.

Configuring Selenium-RC With Eclipse
 
  • Right click on lib folder > Build Path > Configure build Path
Configuring Selenium-RC With Eclipse
 
  • Under Library tab click on Add External Jars to navigate to directory where jar files are saved. Select the jar files which are to be added and click on Open button.
Configuring Selenium-RC With Eclipse
 

After having added jar files click on OK button.

Configuring Selenium-RC With Eclipse
 

Added libraries would appear in Package Explorer as following:

Configuring Selenium-RC With Eclipse