Forum Discussion

sree2011's avatar
sree2011
Contributor
12 years ago

Finding a Control Using AutomationIdProperty

I am using Test Complete 9.3 to automate a WPF application. Our dev team has assigned an AutomationId for each control which is not exposed in Test Complete properites. So I tried  to browse the same in the net and was able to find how to get the automationid for a particular control. But my objective is to find the control using the AutomationIdProperty. In my framework which is develped in Test Complete, it takes input as automationid for finding each control object. Is there anyway we can use AutomationIDProperty in FindAll or FindChild Methods in Test Complete.

1 Reply


  • Hi Sreekanth,


     


    Unfortunately, TestComplete cannot work with attached properties and display them in the Object Browser. As a result, it's impossible to use them in the Find methods. It looks like the only way to find the object based on its AutomationID property is to iterate through a batch of objects, get the value of the property from each object, and compare it with the needed value.


     


    BTW, we have a corresponding suggestion in our database to implement special support for attached properties. I've increased its rating due to your request.