I'm having a little bit of odd behaviour with one of my testcases. The testcase opens a dialog within my application and begins an import. During the import a progress bar is shown but occasionally an info/error MessageBox will pop up. The problem we are having is that when we click OK to close the MessageBox the focus is switching to SilkTest. Has anyone seen anything like this before? The problem we are having is that when the import completes a "completed" MessageBox is shown but since SilkTest is the active application we can't close the message box. And since there is a message box open we can't set the application or the dialog active to switch back. We're totally stumped. If anyone has any idea what might be causing this or any suggestions on a resolution it would be much appreciated. The application is a Win32 (C++)application running on WinXP. Thanks,
You can configure SilkTest to be minimized when running tests which will help in avoiding Silktest being set as the Active Application.
go to Options->Runtime and select the check box for "minimize at runtime"
I had exactly same problem about an year before, The focus was being set to next open application in the task manger after AUT,for my case was sometimes Windows explorer or SilkTest,depending on the order i opened those.Anyway as far as i remember it was the timing issue.I put some sleep statements before/after closing teh messagebox and increased window timeout.I know it does not make too sense, but i don't remember to do anything special/extra than this.