Now its time to learn how to configure Selenium RC client driver with Eclipse IDE and how to run Selenium RC server instance. We will try to understand this step by step.
Note: Download JDK ( from the Oracle / Sun website and install prior to installing Eclipse)
- Go to URL – http://www.eclipse.org/downloads/
- Select Eclipse IDE for Java Developers (Click on Windows 32 bit platform)
- Click on OK button and save to a local drive (i.e. C: or D:, etc)
- Unzip the downloaded zip file and rename that to Eclipse
- Create one more folder “Eclipse-Workspace” (i.e. C:Eclipse-Workspace)in the same drive where Eclipse is unzipped and renamed.
- Create Eclipse desktop shortcut (go to C:Eclipse folder –> right click Eclipse.exe and then click on “desktop create shortcut”) as demonstrated in the below pictures.
- Now we need to create a workspace folder –> C:Eclipse-WorkspaceSeleniumTests
- Double click on “Eclipse shortcut on Desktop”
- This opens the Eclipse
- Close Eclipse welcome screen
- Click File menu –> Switch Worspace –> other
- Now Select the C:Eclipse-WorkspaceSeleniumTests folder (These steps are demonstrated in the following figure)
We have finished setting up the eclipse. Now, we need to download Selenium RC server / client driver and configure that to Eclipse
- Download Selenium server: http://seleniumhq.org/download/
- Download Selenium Client driver for Java (from Selenium Client Drivers section)
- Create “Selenium” folder in C: drive and copy the Selenium-server.jar as well as unzip the Selenium Client driver (C:Selenium)
Downloading and unzipping the files into a folder is done. We need to configure the appropriate Selenium Client driver Jar file to the Eclipse.
- Go to Eclipse –> Click File –> New –> Project (from various options need to select just “project”)
- In Select Wizard –> Click Java –> “Java Project” (demonstrated in the below figure)
- Give the project name (e.g. SugarCRMTests)
- Click Finish – Click Yes
- Now we are done with creation of project and need to configure the Selenium Client driver to this Project
- Right Click “SugarCRMTests” project
- Click “Java Build Path”
- Click Libraries tab
- Click “Add External JARs” button
- Select “Selenium Client Drivers” unzipped in C:Selenium folder (Selenium Server JAR file should not be added)
- Click OK
- Referenced libraries –> contains both the Selenium Client driver jar files as shown in the below picture.
So far we have learnt the following:
- Download latest JDK and install
- Download Selenium Server as well as Client drivers and unzip into a folder
- Download Eclipse and configure
In the next post we will learn how to execute selenium tests using Eclipse