/// <summary> /// Refresh the page /// <para>Note: The TFS automation framework's Reload() method calls WaitForPageReload(), so a wait after calling Refresh should be unnecessary</para> /// </summary> /// <param name="serverReload">If true, force an unconditional GET from the server. If false, use client cache if available.</param> public void Refresh(bool serverReload = false) { TfsBrowserWindow.Reload(serverReload); // Logger.Instance.LogInfo("Refreshed browser"); if (Agent.BrowserType == WebBrowserType.Chrome || Agent.BrowserType == WebBrowserType.Firefox) { // Chrome and Firefox seem to exit Reload prematurely occasionally (ノಠ益ಠ)ノ // But an extra call to WaitForPageReload seems to fix it // However, it also makes this method several seconds slower TfsBrowserWindow.WaitForPageReload(); // Logger.Instance.LogInfo("Waited for page reload (extra Chrome call)"); } }