private void CreateNewFireFoxInstance(string url) { Logger.LogDebug("Starting a new Firefox instance."); CloseExistingFireFoxInstances(); if (string.IsNullOrEmpty(url)) { url = "about:blank"; } Process = FireFox.CreateProcess(url + " -jssh", true); System.Threading.Thread.Sleep(1000); // McWatin.Mono.Process = FireFox.CreateProcess(url + " -jssh", true); //if (IsMainWindowVisible) return; // if (!IsRestoreSessionDialogVisible) return; // NativeMethods.SetForegroundWindow(Process.MainWindowHandle); // TODO replace SendKeys cause they will hang the test when running test in a service or on // a remote desktop session or on a locked system // SendKeys.SendWait("{TAB}"); // SendKeys.SendWait("{ENTER}"); }
public void CreateNewFireFoxInstance(string url) { Logger.LogDebug("Starting a new Firefox instance."); CloseExistingFireFoxInstances(); if (string.IsNullOrEmpty(url)) { url = "about:blank"; } FireFox.CreateProcess(url, true); if (IsMainWindowVisible) { return; } if (!IsRestoreSessionDialogVisible) { return; } NativeMethods.SetForegroundWindow(Process.MainWindowHandle); // TODO replace SendKeys cause they will hang the test when running test in a service or on // a remote desktop session or on a locked system SendKeys.SendWait("{TAB}"); SendKeys.SendWait("{ENTER}"); }