RxPath for Recognizing forms

Ranorex Spy, Recorder, and Studio.
Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

RxPath for Recognizing forms

Post by Luis Leon » Thu Sep 30, 2010 5:47 pm

Hi,

I have been using Ranorex for a while now and I run into the following issue:

The main Window of my application changes its title depending on the users actions. By default the recorder locates the form by its accessible name but when a given user action (or localization setting) changes the form title, the test execution crashes because the base item (in this case the form) is not being found.

I run into this problem with WinForms forms and used the "@class" attribute as a workaround, but when it comes to WPF the class attribute is displayed like [process.exe ;; <GUID> ]. So far I haven't being able to compose a RxPath that locates this form regardless of its title.

So, my questions are:

-Is there a workaround for my issue?

-What is the best way to identify a WinForms and/or WPF form that does NOT utilizes its accessible name or caption?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: RxPath for Recognizing forms

Post by Ciege » Thu Sep 30, 2010 10:40 pm

Have you sniffed around with RanorexSpy to look for other identifiers?
When the title of the form changes is there anything that remains the same where you can look for a partial match?
Do you know the possible form names? You can create a ranorexpath that uses ORs in it...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: RxPath for Recognizing forms

Post by artur_gadomski » Fri Oct 01, 2010 6:53 am

If there is always a common part in form names you can also use regular expressions in RxPath.

Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

Re: RxPath for Recognizing forms

Post by Luis Leon » Fri Oct 01, 2010 6:40 pm

Hi,

Thanks for the replies.

The only common identifier found with the Spy is the "@class" attribute which is displayed in a a very odd way will look something like [executable.exe ;; GUID] but I can't manage to get this parameter to work.

I'll try to use the regular expressions and I'll keep you posted.

Regards

Luis Leon
Posts: 10
Joined: Tue Aug 10, 2010 12:18 am

Re: RxPath for Recognizing forms

Post by Luis Leon » Mon Oct 04, 2010 8:18 pm

Hi,

Thanks for the help, regular expressions solved my issue.

Regards,