warning for object

Ranorex Studio, Spy, Recorder, and Driver.
arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

warning for object

Post by arun_volam » Fri Aug 13, 2010 8:09 am

Hi,

how to avoid this waring

Item 'WebDocumentEZPrints_Applications___.ContainerHBox1.ButtonUpdate_Password' could be found using its absolute path, but not by using the repository structure. (No element found for path 'element/button[@text='Update Password']' within 10s.) Please make sure that all of its parent folders have a unique path!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: warning for object

Post by Support Team » Sat Aug 14, 2010 12:38 pm

You get that warning when Ranorex is able to find a repository item using its absolute path, but it wasn't able to find the item using relative paths with respect to the folder the item is in. That means, that the path for a parent folder of the item is not correct, since it does not uniquely identify an actual ancestor of the item.

It's easier to explain that using an example. Imagine the following structure of elements:

Code: Select all

container A (RxPath "container[@title='A'])
    \- button 1
container B (RxPath "container[@title='B'])
    \- button 2
I.e. you have two containers on one level in the element tree with each a button it it. You want to use button 2 in your recording/code and in your repository you have a folder for container B with button 2 in it. Usually, when you use tracking in Ranorex Spy to add items to your repository, container B will have the correct RxPath "container[@title='B']" to identify the container uniquely.

However, when you change the path for that folder to "container" only (omitting the "[@title='B']" attribute), the folder will actually correspond to the first container in that level, that is container A. Consequently, when you use the repository item for button 2, Ranorex will first search for its parent folder - actually finding container A instead of container B - and will then try to find button 2 using its relative path inside the parent folder. As it can't find button 2 inside container A, Ranorex will try to find button 2 again using its absolute path. The absolute path to button 2 might still be unique (depending on how well defined the relative path for button 2 is) and the button might be found, but you will get the above error to inform you that you need to correct the RxPath for the parent folders of the repository item.

In your case, you will most probably need to correct the path for the "ContainerHBox1" folder and make it unique so no other container is found.

Hope that was clear enough! :)

Regards,
Alex
Ranorex Team

arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

Re: warning for object

Post by arun_volam » Tue Aug 17, 2010 3:29 pm

Hi,

that's a very good example.

thank you, for your example Alex :)

Regards
Arun