Repository item cant be made visible after editing path

Bug reports.
starrdoug99
Posts: 6
Joined: Thu Jul 12, 2012 4:32 pm

Repository item cant be made visible after editing path

Post by starrdoug99 » Thu Jul 12, 2012 7:00 pm

I made a new recording that validates the Accessible Value of a listitem. Our application sometimes assignes controlids in the xpath, but the controlid changes each time a new instance of the window is opened, so i have to remove these controlids from the path, which normally works fine.

For this item when I remove the controlid and attempt to highlight the repository item i get this error. "The item exists but could not be highlighted because it could not be made visible." I have never seen this error before and do not know how to work around this issue.

Example of my path before and after the edit.
This path shows up as visible
Base: /form[title~'Main*']element/container[@controlid='5176']/element/element/listitem[@accesiblename='ATO Call Sign']

This path shows up as NOT visible
Base: /form[title~'Main*']element/container/element/element/listitem[@accesiblename='ATO Call Sign']

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Repository item cant be made visible after editing path

Post by krstcs » Thu Jul 12, 2012 8:54 pm

Most likely you have another item in a different path that matches the info in the 2nd example, but not the first.

So, for example, you have...

Code: Select all

/form
    /element
        /container            <-- Not visible, but exists
            /element
                /element
                    /listitem[@accessiblename='ATO Call Sign']
        /container[@controlid='5167']
            /element
                /element
                    /listitem[@accessiblename='ATO Call Sign']
Ranorex will search until it finds the FIRST item that matches the designated path.

In your case, that FIRST item is not visible.

I would suggest adding the "@visible='true'" tag to your listitem element. That should find ONLY the one that is visible at the time of the action.

ETA: Your path would look like:

Code: Select all

/form/element/container/element/element/listitem[@visible='true' and @accessiblename='ATO Call Sign']
Shortcuts usually aren't...

starrdoug99
Posts: 6
Joined: Thu Jul 12, 2012 4:32 pm

Re: Repository item cant be made visible after editing path

Post by starrdoug99 » Thu Jul 12, 2012 9:18 pm

Thank you krstcs,i changed the path to use the "@visible='true'"and that fixed the problem.