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.