How to get all lookups from the combo with different path

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Saha
Posts: 39
Joined: Tue Mar 01, 2011 6:20 pm

How to get all lookups from the combo with different path

Post by Saha » Thu Apr 14, 2011 3:15 pm

Hi ,

I have this strage scenario.
In our application combo boxes, we have few listitems which have different path. For example most of list items I am able to get using this code
isLookupFound = Host.Local.TryFindSingle("/container[@caption='selectbox']/listitem[@accessiblename='" &lookupItem & "']", Adapter.DefaultSearchTimeout, item)

But few items in the same combo fields are under
isLookupFound = Host.Local.TryFindSingle("/container[@caption='selectbox']/list/listitem[@accessiblename='" &lookupItem & "']", Adapter.DefaultSearchTimeout, item)

For now I am checking if I can find items using the first path, if I can't find then I look for the second path.
I am not sure if there are any other better ways to do this.

Please advice.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to get all lookups from the combo with different path

Post by Support Team » Thu Apr 14, 2011 3:36 pm

Hi,

Please take a look to following documentation to use a relative RxPath.
http://www.ranorex.com/blog/ranorexpath ... cks#Modify

Regards,
Peter
Ranorex Team
.
Image