Won't Fix
Last Updated: 02 Nov 2015 08:51 by ADMIN
ADMIN
Ivaylo
Created on: 27 Aug 2015 10:13
Type: Bug Report
0
WPF test execution hangs on confirmation window on close
Steps to reproduce:

Using this wpf application attached internally

Configure wpf test and record the following steps:


1. Close the main WPF window (Alt+F4) and make sure the close step is recorded.

2. A confirmation window appear, select Yes.


Replay the recorded steps:


Expected behavior: To be able to successfully close the application and the confirmation window.

Actual behavior: Step 2 fails with Unable to find the window error.


1 comment
ADMIN
Daniel Djambov
Posted on: 02 Nov 2015 08:50
Telerik: Unfortunately this is a specific case in which main window is being closed, a new wpf window appears as confirmation window. This means that we have to handle the new window before closing the main window.

What happens is that we send the "SC_CLOSE" command to the main window, and it freezes until the main window is closed. But it can't be closed without handling the second window first. There is a circular dependency between the two windows made by design.

We can offer at this point is to use a workaround: you can use something different than recorded "Close window" step, something that will trigger the close window procedure without failing the step. For example, send Alt + F4 command in code like this:
Manager.Desktop.KeyBoard.SendString("%{F4}"); then another command to press Enter key or Escape to handle the Confirmation dialog if needed.