Monday 4 February 2013

Setting up Selenium & Eclipse


Configure Selenium with Eclipse:

1. Go to URL – http://www.eclipse.org/downloads/
2. Download Eclipse IDE for Java Developers (Click on Windows 32 bit platform)
3. Unzip Eclipse and double click Eclipse.exe
4. Create a workspace folder –> C:\Workspace (or)
5. Click File menu –> Switch Worspace –> other



6. Now Select the C:\Workspace folder.
7. Click Workbench.


Download Drivers

Now, download Selenium RC server/client driver and configure that to Eclipse.

1. Download Selenium server


Configure Selenium Client driver 

1. Go to Eclipse –> Click  File –> New –> Project (from various options need to select just “project”)
2. In Select Wizard –> Click Java –> “Java Project” (demonstrated in the below figure)


3. Give the project name (e.g. TestProject)
4. Click Finish.
5. Create a folder named “lib” inside the project "TestProject".
6. Copy the jar file "Selenium-server.jar" into "lib" folder.
7. Also extract all the jar files from "selenium-java-x.xx.x" (Selenium Client driver) into "lib" folder.
8. Right Click the project, “TestProject” and click "Build Path".
9. Select "Configure Build Path".


10. Click Libraries tab
11. Click “Add External JARs” button



12. Now, select all the jar files copied under the "lib" folder.
13. Click OK
14. Check the Referenced libraries for both the Selenium Client driver jar files as shown in the below picture.



Create class file

1. Right click on the folder "src", Click  File –> New –> Package



2. Name the Package. (e.g., testpack) and click Finish.
3. Right click on the Package and Click  File –> New –> class
4. Name the class. (e.g., Test)
5. Now copy the generated test script into the class workspace and run it.

2 comments:

  1. Hi,
    This is a very good blog for learning selenium from the start. Specially I learn the reporting section from here like Xslt,report NG reports etc...
    I want to know one thing that I created a framework using POM. and now I am automating a web application using that framework. I have created common methods for dropdown value selection, checkbox, radio button, wuindw handles etc....
    Now I am facing problem in identifying some of objects of the application. So I want fro your side to provide me support on autmating that application. I will pay for that. I just need your support in automating the app like 1/2 an hour for a week only so that wherever i stuck i will discuss that with you and you will help me in that.

    Kindly let me know if you can do this for me.


    I will be thankful for this..

    Kindly let me know as soon as possible on rswengineer@gmail.com.



    ReplyDelete