I am trying to implement user interface automation in a WPF application, but whenever a modal dialog appears, the user interface automation will hang until the dialog is closed manually.
So far, I have been trying to use the second thread to close the dialog box, installing the application to use the MTA streams, using RaiseEvent to raise Button.ClickEvent on the button to close the dialog box, and using sendinput to send the keystroke in the dialog box. None of these methods work, and I did not find any other workarounds to try.
Does anyone know of possible solutions?
source share