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']
Repository item cant be made visible after editing path
-
- Posts: 6
- Joined: Thu Jul 12, 2012 4:32 pm
Re: Repository item cant be made visible after editing path
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...
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:
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']
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...
-
- Posts: 6
- Joined: Thu Jul 12, 2012 4:32 pm
Re: Repository item cant be made visible after editing path
Thank you krstcs,i changed the path to use the "@visible='true'"and that fixed the problem.