When we run a CodedUI test case with the following code to close a dialog popup (JavaScript alert):
CurrentBrowser.PerformDialogAction(BrowserDialogAction.Ok);
Or, with the following code:
var popupWindow = new WinWindow(null);
popupWindow.SearchProperties.Add("Name", "Message from webpage", "ClassName", "#32770");
popupWindow.TechnologyName = "MSAA";
var okButton = new WinButton(popupWindow) { TechnologyName = "MSAA" };
okButton.SearchProperties.Add("Name", "OK");
okButton.SetFocus();
Keyboard.SendKeys(okButton, "{ENTER}");
It works locally, but when we run the via Microsoft Test Manager on a VDI with the same version of Windows and Internet Explorer the popup is not closed. No error is thrown, the VDI just waits.
We are using the following versions:
TFS 2012 update 4 test agent
Internet Explorer 10
Windows 7 Enterprise
Does anyone know why this could be and how it can be solved?