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.

Java > Java Project > Next

Provide Name to your project, Select JDK in ‘Use a project Specific JRE’ option (JDK 1.5 selected in this example) > click Next

) . (This described in detail in later part of document.• Keep ‘JAVA Settings’ intact in next window. Project specific libraries can be added here.

• Click Finish > Click on Yes in Open Associated Perspective pop up window. .

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

• Right click on src folder and click on New > Folder .

Name this folder as com and click on Finish button. . • This should get com package insider src folder.

• Following the same steps create core folder inside com .

This is a place holder for test scripts. . Create one more package inside src folder named testscripts.SelTestCase class can be kept inside core package.

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.

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

This would create lib folder in Project directory. • Right click on lib folder > Build Path > Configure build Path .

.• 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.

.After having added jar files click on OK button.

Added libraries would appear in Package Explorer as following: .

Configuring Selenium-RC With Intellij¶ .

• Open a New Project in IntelliJ IDEA. Subversion. • Provide name and location to Project. . Apache Ant and JUnit. Intellij provides a set of integrated refactoring tools that allow programmers to quickly redesign their code. IntelliJ IDEA provides close integration with popular open source development tools such as CVS. Following lines describes configuration of Selenium-RC with IntelliJ 6.IntelliJ IDEA is a commercial Java IDE by the company JetBrains.0 It should not be very different for higher version of intelliJ.

• Click Next and provide compiler output path. .

.• Click Next and select the JDK to be used. • Click Next and select Single Module Project.

.• Click Next and select Java module.

• Click Next and provide Module name and Module content root. • Click Next and select Source directory. .

This will launch the Project Pan.• At last click Finish. .

.Adding Libraries to Project: • Click on Settings button in the Project Tool bar.

.• Click on Project Structure in Settings pan.

• Select Module in Project Structure and browse to Dependencies tab. . • Click on Add button followed by click on Module Library.

jar and seleniumserver.• Browse to the Selenium directory and select selenium-java-client-driver.jar. (Multiple Jars can be selected b holding down the control key.). .

• Select both jar files in project pan and click on Apply button. .

• Now click ok on Project Structure followed by click on Close on Project Settings pan. . Added jars would appear in project Library as following.

• Create the directory structure in src folder as following. .

testscripts package contains the test classes which extend the SelTestCase class. • Herein core contains the SelTestCase class which is used to create Selenium object and fire up the browser. Hence extended structure would look as following.Note This is not hard and fast convention and might very from project to project. .

Sign up to vote on this title
UsefulNot useful