Recording a WPF application does not work with WPF Test but only with Desktop Test

1 Answer 23 Views
Execution
Philipp
Top achievements
Rank 1
Iron
Philipp asked on 15 Jan 2024, 03:28 PM | edited on 15 Jan 2024, 03:31 PM

Hello,

I am currently evaluating Telerik Test Studio Dev Edition (Visual Studio Plugin) with a trial license.
I successfully created a few WPF Tests in a sample application I created from scratch using .NET 6, WPF and some Telerik UI for WPF components (e.g. RadGridView). Here, the recording works perfectly. When I click on Start by recording Test Steps, the application starts, gets unresponsive for ashort while (~3 sec.) and then the Recorder overlay appears and I can record the test.

But then I tried to automate tests for a small tool, let's call it SmallTool, which is also a .NET 6 WPF application. But here, recording only works by using a Desktop Test. This limits the available test steps significantly (e.g. I cannot "evaluate the third item in this List"), so the tests become useless.

Here are the differences between my sample project and SmallTool that I notice:

  • SmallTool does not use any Telerik UI lib
  • SmallTool does use two COM references (for interaction with outlook)

I also already checked the Desktop Application Will Not Record support article. My SmallTool did appear as a WPF application.

Can you help me with getting WPF tests to work?

Log output in the Test Studio log:

<see attachment "teststudioLog - Kopie.txt">

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 18 Jan 2024, 11:18 AM

Hi Philipp,

Thank you for sharing details on the application you are trying to automate - this helped me a lot. 

Based on the provided information I have the following assumptions:

  • The actual WPF application which you are testing uses some ActiveX controls which are not WPF ones. Thus the WPF test cannot recognize and automate these.
  • The Desktop test uses different type of technology and relies on the exposed automation peers of the used controls. Thus, this type of test can recognize these ActiveX controls but not completely. The probable reason for this is because they don't expose their automation peers. 

With this in mind the WPF test will not work for this application. The Desktop test may fit better if you can enable the exposure for these automation peers. 

I hope that this information is useful for you. Let me know in case you have any additional questions. 

Regards,
Elena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Execution
Asked by
Philipp
Top achievements
Rank 1
Iron
Answers by
Elena
Telerik team
Share this question
or