Catching MessageBox & Popups

Hi there,

Is there a way to catch MessageBoxes and popup, using IronPython? I want to catch them for testing purposes. My goal is to test multiple variations of the same algorithm without being stopped during the process. I intend to use try-catch for actual errors, but can i do the same for MessageBoxes and popups? Ideally I would be informed of their existence to log them, but them I would like to apply the default answer and continue automatically. Thank you!