Pregunta

I'm trying to implement UI automation in a WPF application but whenever a modal dialog appears the UI automation will hang until the dialog is manually closed.

So far I've tried using a second thread to close the dialog box, setting the application to use MTA threads, using RaiseEvent to raise the Button.ClickEvent on the button to close the dialog, and using sendinput to send a keypress to the dialog. None of these methods are working and I haven't found any other workarounds to try.

Does anyone know of any possible solutions?

¿Fue útil?

Otros consejos

Hold the UI is definition and purpose of a modal dialog. If you don't want to hold the UI then you want a modeLESS dialog. The UI is not hanging. The modal dialog is doing exactly what it is supposed to do.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top