/// <summary> /// Unattaches the window from the framework agent and subsequently reattaches it /// <para>Users can input the amount of waiting time they want (unit: ms)</para> /// </summary> public void RefreshAttachmentToAgent(int waitTime = TabSleep) { IntPtr handle = TfsBrowserWindow.WindowHandle; TfsBrowserWindow.Unattach(); System.Threading.Thread.Sleep(waitTime); // Random wait. Without it this method didn't seem to work cross-browser. TfsBrowserWindow = Agent.AttachToExistingBrowserWindow(handle); }