September 1, 2010

September 01, 2010 3
Hi all,
I am adit, friend of naga(colleague too)!A great news in the first post! I am recently tansformed from tester to developer(cheers to meeeeeeee). There are a couple of projects that I am working , but for now I will do my best to help you all learn PHP(server-side scripting language). I will start from scratch so that each and everybody can follow and learn(and become a master). Hope you guys like this blog!!!!!lets Rock PHP @

Tester then,Developer now

Setting up Selenium RC & TestNG using Eclipse-II

September 01, 2010 20
Setting up Selenium RC & TestNG using Eclipse-II

I found that it is not easy for the beginners to setup Selenium RC and run the example after downloading it from . The purpose of this post is to help beginners (new users to Selenium RC) help setting up Selenium RC with TestNG using Eclipse.
This assumes that you have done the following steps.
Download and install Eclipse (
Download the latest TestNG (
Download Selenium RC (
Install TestNG plugin for eclipse
Please follow the step by step instructions to setup the test environment.
Launch Eclipse, you can setup any directory as your default workspace. For this example, my default workspace is as shown below.
Click OK, Eclipse will be launched.

Click File > New
Set the project name as Google.
Click Next.
On the Source tab leave the default.
Click on Libraries.
Click on Add External Jars
Add the jar files for TestNG and Selenium RC Java client as shown below.
Click Finish, now you will have a Java project created in Eclipse that is correctly set to use Selenium Client and TestNG jar files.
Now Right Click on the src > New > Class
Name the class file as GoogleTest and Click Finish.
Now create a testng test within GoogleTest class as follows.

The next step is to run the Selenium Server as
Now Right Click on the test and run this as TestNG test.
The test will be successful.

You can Start server directly in the TestNG script..

Below is the code for that

import com.thoughtworks.selenium.*;

import org.openqa.selenium.server.*;
import org.testng.annotations.*;

public class GoogleTest {
public Selenium selenium;
public SeleniumServer seleniumserver;

  public void setUp() throws Exception {
RemoteControlConfiguration rc = new RemoteControlConfiguration();
seleniumserver = new SeleniumServer(rc);
selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://");

public void testgoogle()throws Exception {
        selenium.type("q", "Selenium OpenQA");"btnG");
 public void tearDown()throws Exception {