I have a scenario where i need to mouse hover or click on menu and select(click) on a item from the list of the menu.

I have defined GUIobject as public GuiTestObject guiobject(String attr1,String value1,String attr2,String value2)
Property[] Objectproperty = {new Property(attr1,value1), new Property(attr2,value2)};
//find the required object from root
TestObject [] testobject = root.find(RationalTestScript.atDescendant(Objectpr operty));
TextGuiTestObject textguiTestObject = new TextGuiTestObject(testobject[0]);
return textguiTestObject;

and in the main method:
GuiTestObject Create_menu_tab = object.guiobject(".class","Html.DIV",".id","menu") ;
But it doesnot recognize the property for the menu. Throws outofbond exception. Please can any body can help me on this?