Page 1 of 1

To be able to Subsitute Application Title

Posted: Fri Jun 05, 2009 9:54 am
by atom
Hiya,

I have an application with a main window with title "My Application v1.0". The application has a child form, with title "My Form".

In Ranorex Spy I locate "My Form" and add it to a repository.
The problem is now that the RxPath used to find all the form controls includes text "My Application v1.0"

This is a problem as now for version 1.1, the main application window will have a different title, so none of our repository items will work, meaning a total re-record.

To avoid this what would be good is for the generated code to set "My Application v1.0" as a constant string, that can be easily changed.

Hope thats clear.
Regards,

Posted: Fri Jun 05, 2009 12:27 pm
by Support Team
Why not just edit the repository folder that contains the "My Application v1.X" string and change it to "v1.1"? Or even better to a regular expression? If you edit the path of the application/rooted folder, the paths of all elements underneath the folder are automatically updated.

Regards,
Alex
Ranorex Support Team

Posted: Fri Jun 05, 2009 3:15 pm
by atom
Ok... i wasnt aware of how Repository folders work
So the way they work is that a folder has an associated xpath,
and child elements in the folder inherit the path from the folder, and extend it with their own path?

Posted: Fri Jun 05, 2009 3:20 pm
by Support Team
atom wrote:So the way they work is that a folder has an associated xpath, and child elements in the folder inherit the path from the folder, and extend it with their own path?
Right, the paths of items in a folder are relative paths in respect to the folder (parent). So the actual path of a repository item in a folder is the folder's path concatenated with the item's path.

Regards,
Alex
Ranorex Support Team