Unique identifier for Form/Control

Ask general questions here.
marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Unique identifier for Form/Control

Post by marcushe » Mon Jul 13, 2009 5:03 am

Environment: Ranorex2.1 ,XP/Vista/Win7
We are working on National languages, therefore , according to product,our testing software has 48 languages,it's almighty workload. Any way to identify form like Control ID ???which would not change when run on diffrent OS. Using Ranorex Spy, i can see Control ID for controls ,no similar thing for form.
Can you give some advice??

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unique identifier for Form/Control

Post by Support Team » Mon Jul 13, 2009 7:31 am

Hello,

"controlid" is the control id of the native win32 window (as defined in the windows api) and is not useful in Windows Forms applications, but can usually be used as a unique identifier in "native" windows applications and MFC/ATL applications.

"automationid" is a WPF (or UIAutomation) specific property and can be directly set in XAML.

For multilingual applications using Windows Forms the best practice is to set the control name to unique values, for WPF the automation id, and for web sites the id attribute of relevant tags. E.g. you should use @controlname='button1' in your path.


Regards,
Mhosen
Ranorex Support Team

marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Re: Unique identifier for Form/Control

Post by marcushe » Mon Jul 13, 2009 8:15 am

Bad news...