Hi.
I'm looking into variables as part of the path of a repository item.
In the repository i choose an object, and click on "Edit Path in Spy" - A path editor opens, an i can assign variables to parts of the path, but only to a certain depth, the rest is greyed out, and if i try to assign a variable it says "... please edit the parent folder ... " but that would affect all child-objects of that folder, would it not? how can i assign a variable to a deep parent of an object without affecting all children?
Thanks!
Variable in XPath of Repository Item - how to root?
Re: Variable in XPath of Repository Item - how to root?
Hi,
The reason why you cannot edit the grayed-out part of the xpath is that it belongs to a parent (rooted) folder. In other words, if you want to edit the 'disabled' part of xpath, you need to go to and edit the parent repo folder. And yes, if you place a variable in rooted folder, it will affect all children placed in this folder. If you want to avoid this behaviour, then the only way is to create a copy of rooted folder a insert inside only the elements you want to be affected by the variable added to rooted folder xpath.
The reason why you cannot edit the grayed-out part of the xpath is that it belongs to a parent (rooted) folder. In other words, if you want to edit the 'disabled' part of xpath, you need to go to and edit the parent repo folder. And yes, if you place a variable in rooted folder, it will affect all children placed in this folder. If you want to avoid this behaviour, then the only way is to create a copy of rooted folder a insert inside only the elements you want to be affected by the variable added to rooted folder xpath.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration