P. 1
Configuring Selenium

Configuring Selenium

|Views: 43|Likes:
Published by kiranr78

More info:

Published by: kiranr78 on Nov 09, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





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. Project specific libraries can be added here.• Keep ‘JAVA Settings’ intact in next window.) .

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

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

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

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

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

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

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

.• Click Next and provide compiler output path.

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

.• 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. (Multiple Jars can be selected b holding down the control key.).jar.• Browse to the Selenium directory and select selenium-java-client-driver.

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

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

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->