Hi,
I am currentely evalutating Ranorex for my company, we have a product that opens with a title name "Form". When you load a file with this product the title changes to Form - FileName. The problem I am having is that when I use Ranorex Spy on the application after I load a file, it creates a new /Form, so that if I save it to the Element Repository I will now have 2 /Forms, /form[@title='Form'] and /form[@title='Form - FileName'].
What can I do to work around this problem?
Tracking a form that changes title name
- Support Team
- Site Admin
- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
The solution for your problem is easy: Search for the application form once and then use this Form instance from then on to search elements inside you application using relative RxPaths. The RanorexRecorder and the repository generated by the recorder work similar (if the "UseCache" property of the application folder is enabled). So, when you generate repositories using RanorexRecorder or RanorexSpy, elements in the same application should be listed in the same application folder, regardless of the application title.
If you use the RanorexSpy alone without repositories, you get relative paths to elements inside you application by right-clicking on the application element and selecting "Set Element as Root". From then on RanorexSpy will generate paths relative to the application element/folder. So, if you don't use repositories, you will need to write code like that:
Regards,
Alex
Ranorex Support Team
If you use the RanorexSpy alone without repositories, you get relative paths to elements inside you application by right-clicking on the application element and selecting "Set Element as Root". From then on RanorexSpy will generate paths relative to the application element/folder. So, if you don't use repositories, you will need to write code like that:
Code: Select all
Form form = "/form[@title='Form']";
Button button = form.FindSingle<Button>("relativePathToButton");
Alex
Ranorex Support Team