Forum Discussion

Xiujuan's avatar
Xiujuan
New Contributor
7 years ago

How to use AutomationID in nameMapping to identify WPF objects uniquely

Hi,

I am automating an WPF application whose control names may change during software development. So I am planning to use Automation IDs to identify objects uniquely. Is there any way to do this using TestComplete?

The TestComplete version I am using is 12.30.

 

I have made below setup:
1. Go to File->Current Project Properties->Open Applications->UI Automation 
 2. Enable the asterisk (*) item in the list of accepted windows. 
 3. Go to File->Current Project Properties->Open Applications->General 
 4. Move the NativeUIAObject to the top of the priority list. 
5. Record one action in keyword test, then the default properties of the nameMapping contains: FrameworkID; ClassName; LocalizedControlType; ObjectIdentifier.
And the value of ObjectIdentifier is the same with the value of the object in NameMapping hierarchy.
And I have found out that the "AutomationID" is a different property compared with "ObjectIdentifier".
 
 
Thanks in advance!
 
 
 
Thanks,
Xiujuan

 

 

 

 

Thanks,

Xiujuan

 

 

5 Replies