Repository items as parameters
Posted: Thu May 12, 2011 9:54 pm
I have a list of menu items in my web browser and each item has sub menus. I want to create a function where I want to tell the user defined method to click on the menuname and then click on the submenu name just by passing parameters to the function like as follows:
public void selectmenutab (string menuname, string submenu)
{
repo.menuname.submenu.click();
}
The only other way I can think of is FindSingle as below: but the objects are identified with id ONLY, and for that I will have to use a string array(underlined number) and select them in a tideous way.
webDocument.submenutab = "/dom[@domain='mydomain']";
Atag submenulink = submenutab.FindSingle(".//td[@id='ltd1']/a[@id='lsnb1']");
submenulink.Click();
I know QTP has this facility of selecting a menuitem thru repository. How can I make this happen in Ranorex? Is there a better way to add property to the objects in the repository?
Thanks
Anu
public void selectmenutab (string menuname, string submenu)
{
repo.menuname.submenu.click();
}
The only other way I can think of is FindSingle as below: but the objects are identified with id ONLY, and for that I will have to use a string array(underlined number) and select them in a tideous way.
webDocument.submenutab = "/dom[@domain='mydomain']";
Atag submenulink = submenutab.FindSingle(".//td[@id='ltd1']/a[@id='lsnb1']");
submenulink.Click();
I know QTP has this facility of selecting a menuitem thru repository. How can I make this happen in Ranorex? Is there a better way to add property to the objects in the repository?
Thanks
Anu