DOM

public class DOM extends DriverScript{

public static String click(String str)
{
String index=selenium.getEval("var x=selenium.browserbot.getCurrentWindow().document.getElementsByTagName(\"a\");for(var i=0;i selenium.getEval("var x=selenium.browserbot.getCurrentWindow().document.getElementsByTagName(\"a\");x["+ index + "].click();");
return "pass";
}
public static void main(String[] args) {
// TODO Auto-generated method stub
selenium.start();
selenium.open("http://www.google.com");
selenium.windowMaximize();
click("Hindi");

}
}