Can Test studio detect AutomationID for an element in a WPF application ?

1 Answer 113 Views
Elements Test Recording WPF Testing
Rohan
Top achievements
Rank 1
Rohan asked on 19 Nov 2021, 08:34 PM
When we are using highlight element method to record steps for a WPF application Test studio identifies the element using XAML path as its default Find logic. If there is a property "AutomationProperties.AutomationId" is set Teststudio doesn't grab this automation Id by default. Is there a way to force Teststudio to always get Automation Id if it exists and then fall back to XAML path  for its find logic ?

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 24 Nov 2021, 09:48 AM

Hello Rohan,

Thank you for sharing details about your scenario and the structure of the application under test.

You are making a valid point that it would be helpful to configure the priority of properties for element's find logic during recording. This is currently not available for desktop applications and I created a public feature request on your behalf. Please vote for it and follow it to get notifications for its progress. 

Our team will evaluate the suggestion from user and technical side and will consider it for future releases. I must say up front that this change is not on our roadmap at the moment and is likely to not be included in the next few releases. I can't estimate when it will be evaluated, but we will certainly update the public item once it is.

The current implementation for find logic in WPF tests is not configurable and it falls back to XAML path as the last possible case. You can modify the element's find logic after it has been recorded and update it. I hope this solves some of the issues you are having and makes the tests more stable.

I will be happy to assist you further and answer any follow up questions, if you have any.

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
Elements Test Recording WPF Testing
Asked by
Rohan
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or