1

I have a simple WPF user control:

<StackPanel>
    <Button>Test</Button>
    <TextBox>Test</TextBox>
    <TextBlock>Test</TextBlock>
</StackPanel>

I am hosting this user control inside Windows Forms host. Silk Test identifies this entire user control as Element-Host only and is not able to identify individual buttons or text-boxes.

Has anybody more insight on this? Is this scenario supported by Silk Test?

Update :

I have little success with Silk Test 14.0 (Earlier i had 13.5). Created test application with similar structure (WPF Control in windows forms host) and checked with Silk Test 14.0. It is able to detect all individual WPF controls within user-control . But with my application, it is still not able to detect controls apart from 2 combo-boxes in "Toolbar". In user-control, i am using custom grid which is derived from Data-grid class

Ujjwal
  • 386
  • 3
  • 18
  • By the way, there is already **Silk Test 15 Update 1** available. If 14 doesn't work for you, you might want to try the most recent version. – tehlexx May 28 '14 at 14:33
  • Yes, i have tried with **Silk Test 15 Update 1** but with no luck – Ujjwal May 29 '14 at 06:57

3 Answers3

1

This should work.

It might depend on how you are embedding the UserControl though.

In the application we are using for testing it is contained in a Windows Forms ElementHost-control. In the code-behind you should see member declarations for both the ElementHost and your UserControl, is this the case?

Is your application using multiple AppDomains? Silk Test currently only supports multiple AppDomains for Windows Forms, not for WPF so this might be another reason why it isn't working for you.

tehlexx
  • 2,821
  • 16
  • 29
  • No, application is not using multiple AppDomain. Yes, members are declared in "Designer.cs" file and i can access them in code behind file. Editing question for some observations/updates – Ujjwal May 27 '14 at 07:17
0

I don't know Silk Test well but it seems to me that this tool supports only standalone WPF applications. In your case, there is a standalone WinForms application with embedded WPFs controls. Documentation says:

Silk Test Workbench provides built-in support for testing Windows Presentation Foundation (WPF) applications. Silk Test Workbench supports standalone WPF applications and can record and play back controls embedded in .NET version 3.5 or later.

Michał Komorowski
  • 6,198
  • 1
  • 20
  • 24
  • "[...] and can record and play back controls embedded in .NET version 3.5 or later." - I believe this should mean that it will also work for embedded controls, although the phrasing might be ambiguous. – tehlexx May 23 '14 at 12:51
0

Silk Test team has identified this to be a bug. Fix may be released as a patch over Silk Test 15.5 version. I will update this post once i have better details on its release.

Ujjwal
  • 386
  • 3
  • 18