WPF popup in a WF ElementHost not recognized
Posted: Fri Nov 28, 2014 1:23 pm
Hi,
I am using Ranorex for testing an Windows Forms application containing WPF UI elements (Ranorex 5.2.0, Windows 7 SP1, .NET 4.5). Ranorex Spy cannot recognize popups opened by WPF UI elements contained in a Windows Forms element host. I have created a minimal example showing the behavior (see attachment).
Reproduce steps:
- open Ranorex Spy
- open WindowsFormsApplication1.exe
- click button "Toggle"
- hover mouse pointer over popup button
- press Ctrl+Win
-> no button recognized
- hover mouse pointer over toggle button
-> toggle button recognized
- open WpfApplication1.exe
- click toggle button
- hover mouse pointer over popup button
- press Ctrl+Win
-> popup button is recognized
The WPF code is almost the same. The only difference is that one time it is a Windows Forms application hosting the WPF UI and the second time its pure WPF.
Please kindly advice on how to fix this.
Thanks.
Jens
I am using Ranorex for testing an Windows Forms application containing WPF UI elements (Ranorex 5.2.0, Windows 7 SP1, .NET 4.5). Ranorex Spy cannot recognize popups opened by WPF UI elements contained in a Windows Forms element host. I have created a minimal example showing the behavior (see attachment).
Reproduce steps:
- open Ranorex Spy
- open WindowsFormsApplication1.exe
- click button "Toggle"
- hover mouse pointer over popup button
- press Ctrl+Win
-> no button recognized
- hover mouse pointer over toggle button
-> toggle button recognized
- open WpfApplication1.exe
- click toggle button
- hover mouse pointer over popup button
- press Ctrl+Win
-> popup button is recognized
The WPF code is almost the same. The only difference is that one time it is a Windows Forms application hosting the WPF UI and the second time its pure WPF.
Please kindly advice on how to fix this.
Thanks.
Jens