To be able to Subsitute Application Title

Ranorex Spy, Recorder, and Studio.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

To be able to Subsitute Application Title

Post by atom » Fri Jun 05, 2009 9:54 am

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,

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Fri Jun 05, 2009 12:27 pm

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

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Post by atom » Fri Jun 05, 2009 3:15 pm

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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Fri Jun 05, 2009 3:20 pm

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