How to handle Controls in Selenium



1.Create Class in Eclipse.

public class Controls
{
Selenium sel = new DefaultSelenium("localhost",4444,"firefox","http://www.xxxxx.com")
public void test() throws Interrupted Exception
{
sel.start();
sel.open("/");
sel.windowmaximize();
sel.click("link=Test page for Selenium Remote Control");
Thread.sleep(2500);
sel.select("id=Select with label only","label=Option three");
sel.select("id=Selectwith labels And Value","label=Option two");
//Handling Text Box
sel.type("id=textinput","Selenium");
//Handling Checkbox
sel.check("id=checkboxinput");
sel.click("//input[@type='radio' and value='b']");
}
public static void main(String args[])
{
Controls a = new Controls();
a.test();
}
}