Tuesday 4 September 2012

Configure Selenium RC With JUnit Using Eclipse



Before configuring Selenium RC with Junit Using Eclipse below components are required - 


1.Install JRE : http://www.java.com/en/download/
2.Download Eclipse IDE for Java Developers : http://www.eclipse.org/downloads/
3. Download Latest version of JUnit: https://github.com/KentBeck/junit/downloads
4.Download and Install Selenium IDE firefox plugin : http://seleniumhq.org/download/
5.Download Selenium RC server and Selenium Client Drivers for Java:http://seleniumhq.org/download/



Once done with above steps launch Eclipse.
After launching eclipse, you need to Create New Project for selenium scripts

Go to File > New > Project then In Select a Wizard Click Java Project. Then provide all details like project name.

Once new project is created, right click on project go to Build Path > Configure Build Path.
Click on Libraries menu when pop-up appears, then click to "Add External Jar's ". Select Selenium RC server and Selenium Client Drivers for Java which is downloaded from http://seleniumhq.org/download/.



Once it is done, now build path is configured and project is ready to use.
Now create a package for project.
Once package is created then next step will be to create class.Right click on Package and add new class, it will ask for name. Click on Finish once class name is provided.



Once done with all above steps, your package explorer looks like below -




Once class is created you are ready to write script for selenium scenario. As well you can execute created script on eclipse IDE.

Thank you...

No comments:

Post a Comment