Page 1 of 1

Repository items as parameters

Posted: Thu May 12, 2011 9:54 pm
by Anu
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

Re: Repository items as parameters

Posted: Fri May 13, 2011 10:57 am
by Support Team
Hi,

To make your repo items variable, please take a look to following links
http://www.ranorex.com/support/user-gui ... html#c3112
http://www.ranorex.com/support/user-gui ... html#c2970

Regards,
Peter
Ranorex Team