Identify Elements Uniquely

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
HA_N
Posts: 3
Joined: Fri Feb 01, 2013 9:23 am

Identify Elements Uniquely

Post by HA_N » Fri Feb 01, 2013 9:27 am

An existing application has an html table, within the body tag, there are multiple td tags with the same name

Ranorex isn't able to all of them to the repository, since all of them have the same XPath. (
Capture.PNG
Capture.PNG (3.38 KiB) Viewed 979 times
)

How can I add these items to the repository?

I tried making a recording, the repository that was automatically created contained only one repository item..

NOTE: I cannot make any changes to the application

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

Re: Identify Elements Uniquely

Post by Support Team » Fri Feb 01, 2013 4:08 pm

Hello,

You could try to use the integrated Ranorex Spy by tracking the parent tree node (TR), right click and choose “Add to Repository (incl. children).
Please let me know if this works.

Regards,
Bernhard
.
Image

HA_N
Posts: 3
Joined: Fri Feb 01, 2013 9:23 am

Re: Identify Elements Uniquely

Post by HA_N » Mon Feb 04, 2013 5:59 am

I did try that . It does add the items, but yet again I was unable to identify them uniquely from my code.

In the end I just used FindChildren<Ranorex.OptionTag> and iterated through the List of OptionTags, identifying eaach one through the InnerText property that happened to be unique.

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

Re: Identify Elements Uniquely

Post by Support Team » Tue Feb 05, 2013 1:35 pm

Hello,

Sorry, but I'm not sure. Could you solve the problem?
Please let me know if you need more assistance.

Regards,
Bernhard
.
Image

HA_N
Posts: 3
Joined: Fri Feb 01, 2013 9:23 am

Re: Identify Elements Uniquely

Post by HA_N » Wed Feb 06, 2013 8:04 am

Yes , the items are not in the repository, but i can access them from my code

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

Re: Identify Elements Uniquely

Post by Support Team » Wed Feb 06, 2013 5:39 pm

Ok,
Thank you!

Regards,
Bernhard
.
Image