public void StartDriver(WebDriverOptions browserOptions, bool shouldMaximizeBrowserWindow) { MyLog.Write("StartDriver - Entered"); wasBrowserStarted = false; view.DisableDriverStartButton(); Exception threadException; bool isSuccessful = UIActions.PerformSlowOperation( "Operation: Start new WebDriver instance", () => { WebSpyBrowser.Initialize(browserOptions); wasBrowserStarted = true; if (shouldMaximizeBrowserWindow) { WebSpyBrowser.Maximize(); } }, out threadException, null, TimeSpan.FromMinutes(10) ); view.EnableDriverStartButton(); if (isSuccessful) { SetDesiredCapabilities(browserOptions); view.DriverWasStarted(); } else if (threadException != null) { throw threadException; } MyLog.Write("StartDriver - Exited"); }